How to Use RPC Under Win32s

Last reviewed: June 6, 1995
Article ID: Q127903
The information in this article applies to:
  • Microsoft Win32s, versions 1.2 and 1.25a

Win32s does not thunk Remote Procedure Call (RPC) calls. Therefore, if you have a Win32-based application that uses RPC and you want it to run on Win32s, you will need to write a thunking layer for your application to thunk the 32-bit calls to the 16-bit RPC implementation.

One issue to keep in mind when writing the thunking layer is how to handle stub code. It is convenient to direct the MIDL compiler to produce 16-bit stub code for the application. The stub code can be built as a 16-bit DLL, which can be called from the Win32-based application via the Universal Thunk. This eliminates the need to write a thunking layer for the RPC run-time functions that appear in 32-bit client stub code.

One limitation is that RPC servers are not supported with the 16-bit RPC, only clients. Microsoft's 32-bit RPC implements servers by spawning threads for each call, and threads are not supported under Win32s. There may be other vendors who supply a 16-bit RPC that supports servers.


Additional reference words: 1.20
KBCategory: kbprg
KBSubcategory: W32s


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: June 6, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.