Microsoft KB Archive/232491

{|
 * width="100%"|

INFO: Windows Requires _stdcall Calling Convention

 * }

Q232491

This article discusses a Beta release of a Microsoft product. The information in this article is provided as-is and is subject to change without notice.

No formal product support is available from Microsoft for this Beta product. For information about obtaining support for a Beta release, please see the documentation included with the Beta product files, or check the Web location from which you downloaded the release.

-

The information in this article applies to:


 * Microsoft Win32 Application Programming Interface (API), included with:
 * the operating system: Microsoft Windows 2000
 * Microsoft Windows 98
 * Microsoft Windows 95
 * Microsoft Windows NT Server version 4.0
 * Microsoft Windows NT Workstation version 4.0

-

SUMMARY
Windows 2000 requires that applications use the _stdcall calling convention for window and dialog procedures.

MORE INFORMATION
Microsoft Visual C++ defaults to the _cdecl convention for calling functions. Most 32-bit DLLs included with Microsoft Windows 95, Windows 98, Microsoft Windows NT, and Windows 2000 support the _stdcall calling convention. Procedures that require _stdcall return a "Bad DLL calling convention error" if _cdecl is used. In Windows 2000, all window and dialog procedures require _stdcall.