MIDL Compiler Wraps the Operation Number After 255

Last reviewed: September 23, 1996
Article ID: Q124564
The information in this article applies to:
  • Microsoft Windows NT Workstation version 3.5
  • Microsoft Windows NT Server version 3.5

SYMPTOMS

The RPC MIDL compiler (version 2.00.72) that ships with the Win 32 SDK appears to only keep 8 bits of "Operation number" when it generates the stub code. This creates a problem if you define more than 256 remote procedures. When operation 256 is to be called, operation 0 is really called instead because the call number created by the MIDL compiler wrapped at 255.

WORKAROUND

If you have more than 256 Remote Procedures defined, manually edit the output file and correct the operation number. You can do this by examining the stub code created by the MIDL compiler. The 4th parameter to the NdrClientInitializeNew() wraps around after 255; edit this for each successive procedure in the stub and increment it correctly.

STATUS

Microsoft has confirmed this to be a problem in Windows NT version 3.5. This problem was corrected in Windows NT version 3.51.


KBCategory: kbnetwork kbbug3.50 kbfix3.51
KBSubcategory: ntnetserv
Additional reference words: prodnt 3.50


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 23, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.