The information in this article applies to:
SYMPTOMSUnder Windows NT, when you load a DLL, a message box titled "Invalid DLL Entrypoint" is displayed and has the following text: Under Windows 95, the message box is titled "Error starting program" and the text is: The user is not given a choice to continue, only an OK button. Pressing the OK button fails program load. CAUSE
The system expects DLL entrypoints to use the _stdcall convention. If you
use the _cdecl convention, the stack is not properly restored and
subsequent calls into the DLL can cause a general protection fault (GPF).
RESOLUTIONCorrect the prototype of your entrypoint. For example, if your entrypoint is as follows:
change it to the following:
Then, link with the following linker option to specify the entry point if
you are using the C run-time:
MORE INFORMATIONIf you are using the Microsoft C run-time, you need to use the entry point given in the RESOLUTION section in order to properly initialize the C run- time. For additional information, please see the following article in the Microsoft Knowledge Base: Q94248 HOWTO: Use the C Run Time REFERENCESFor more information on the DLL entrypoint, please search on the topic DllEntryPoint in the Win32 API help file. Additional query words:
Keywords : kbDLL kbKernBase kbGrpKernBase |
Last Reviewed: October 19, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |