Microsoft KB Archive/105170
SAMPLE: Win32s Universal Thunks PSS ID Number: Q105170 Article last modified on 07-27-1994
|The information in this article applies to:|
|- Microsoft Win32s versions 1.0 and 1.1|
UTSAMPLE can be found in the WIN32Sdirectory on your Win32s source CD.
This sample shows how to use Universal Thunks to call application programming interfaces (APIs) that are not supported directly by Win32s.
This sample detects at run time whether it’s running under Win32s or Windows NT, and checks to see whether or not the APIs it calls are supported; if they are not supported, the sample calls the appropriate 16- bit APIs via Universal Thunks.
Because this sample uses 16-bit code, you need a 16-bit compiler (not included in the Win32 SDK). For Win32s 1.0 and 1.1, the included MAKEFILE.16 uses Microsoft C/C++ version 7.0, but it could be easily adaptable to other compilers. With Win32s 1.2, the makefiles use Visual C++.
Also, you need to obtain some components from the 32S directory on your Win32 SDK CD-ROM. In particular, the W32SUT.H file needs to go in %MSTOOLS% also in a directory in the INCLUDE path for your Win16 development environment. W32SUT32.LIB needs to go in %MSTOOLS% and W32SUT16.LIB needs to go in a directory in the LIB path for your Win16 development environment.
Additional reference words: 3.10 KBCategory: Ref KBSubcategory: CodeSam W32s
Copyright Microsoft Corporation 1994.