none
MS-SRVS problem with IDL RRS feed

  • Question

  • Hi,

    MS-SRVS defines an IDL which contains the following structure.

    typedef struct _SERVER_TRANSPORT_INFO_0
    {
    DWORD svti0_numberofvcs;
    [string] wchar_t * svti0_transportname;
    [size_is(svti0_transportaddresslength)] unsigned char
    * svti0_transportaddress;
    DWORD svti0_transportaddresslength;
    [string] wchar_t * svti0_networkaddress;
    } SERVER_TRANSPORT_INFO_0, *PSERVER_TRANSPORT_INFO_0,
    *LPSERVER_TRANSPORT_INFO_0;

    I want to understand how does the RPC implementation get to know the size of svti0_transportaddress without first reading the svti0_transportaddresslength?

    In all other places where size_is is used the variable is difined before it is used. But in this structure it is used before it is defined.

    Can some one tell me how does MS-RPCE deal with such definition?

     

     

    Wednesday, May 4, 2011 12:29 PM

Answers

  • Hi Rajesh,

     

    It’s ok for the IDL to describe the size_is before the variable itself.

    When marshaled, the call is sent with the variables in the appropriate order on the wire so its NDR provides the variable first and the size_is following it.

    This Technet article (http://msdn.microsoft.com/en-us/library/aa373940(v=vs.85).aspx ) explain that the altered order in the IDL may impact performance.

     

    Please let me know if this answers your question.

     

    Thanks and regards,

     

    Sebastian


    SEBASTIAN CANEVARI - MSFT Escalation Engineer Protocol Documentation Team
    Wednesday, May 11, 2011 8:02 PM

All replies

  • Hi Rajesh,

    Thank you for your question. A member of the protocol documentation team will respond to you soon.


    Josh Curry (jcurry) | Escalation Engineer | US-CSS DSC Protocols Team
    Wednesday, May 4, 2011 3:34 PM
    Moderator
  • Hi Rajesh,

     

    I'll be helping you with this request.

    As soon as I have any questions or answers, I will let you know by posting in this thread.

     

    Thanks and regards,

     


    SEBASTIAN CANEVARI - MSFT Escalation Engineer Protocol Documentation Team
    Thursday, May 5, 2011 5:36 PM
  • Hi Rajesh,

     

    It’s ok for the IDL to describe the size_is before the variable itself.

    When marshaled, the call is sent with the variables in the appropriate order on the wire so its NDR provides the variable first and the size_is following it.

    This Technet article (http://msdn.microsoft.com/en-us/library/aa373940(v=vs.85).aspx ) explain that the altered order in the IDL may impact performance.

     

    Please let me know if this answers your question.

     

    Thanks and regards,

     

    Sebastian


    SEBASTIAN CANEVARI - MSFT Escalation Engineer Protocol Documentation Team
    Wednesday, May 11, 2011 8:02 PM