Microsoft KB Archive/125674

From BetaArchive Wiki

HOWTO: Call a New 32-bit API from a 16-bit Application

Q125674



The information in this article applies to:


  • Microsoft Win32 Application Programming Interface (API), included with:
    • Microsoft Windows 95





SUMMARY

Windows 95 supports a new set of APIs for 32-bit applications. These APIs are exported by USER32, GDI32, KERNEL32, and so on. In Windows 95, some of these new APIs are also exported by the 16-bit counterpart DLLs in the system such as USER16, GDI16, and so on. But 16-bit applications running on Windows 95 should not call these new APIs from the 16-bit system DLLs because these calls are not unsupported and might be removed from the 16-bit system DLLs in the future.



MORE INFORMATION

APIs such as WindowFromDC(), SetWindowRgn(), SetForeGroundWindow(), and so on for 16-bit USER window management and PolyBezier(), PolyBezierTo(), and so on for 16-bit GDI graphics management are exported from the 16-bit system DLLs.

Even though these APIs are intended for 32-bit applications, the 16-bit system DLLs export some of them. 16-bit Windows 95 Applications should not call them. They are not supported and the APIs will not work as intended.

If Windows 95 Applications need to use these APIs, port the 16-bit application to 32-bit. This is the best solution and is the one that Microsoft recommends. One addtional solution is to write a 32-bit DLL that actually calls the 32-bit API; then the 16-bit application can thunk into this 32-bit DLL. However, Microsoft strongly discourages developers from having applications thunk into sytem DLLs (16- or 32-bit).

Additional query words:

Keywords : kbGrpDSUser kbOSWin95
Issue type :
Technology : kbAudDeveloper kbWin32sSearch kbWin32API


Last Reviewed: December 31, 2000
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.