PRB: Cannot Find Entry Point (DLL Name) in the DLLLast reviewed: April 8, 1996Article ID: Q149431 |
The information in this article applies to:
SYMPTOMSWhen you declare a Win32 DLL, the following error occurs:
Cannot find entry point Mydll in the DLLMydll is the name of the DLL being called.
CAUSEThis error occurs because all 32-Bit DLL procedure names are case sensitive.
RESOLUTIONTo avoid this error, copy the function name, description, and parameters from the Win32 API function Help file into your Visual FoxPro program file. This documents the function in your code and ensures that the correct case is used. For example, the GetUserName function retrieves the name of the user currently logged onto the system:
BOOL GetUserName( LPTSTR lpBuffer,// address of name buffer LPDWORD nSize // address of size of name buffer ); ParametersThe lpBuffer parameter points to the buffer receiving the null-terminated string containing the user's logon name. If this buffer is not large enough to contain the entire user name, the function fails. The nSize parameter points to a DWORD that, on input, specifies the maximum size, in characters, of the buffer specified by the lpBuffer parameter. If this buffer is not large enough to contain the entire user name, the function fails. If the function succeeds, it will place the number of characters copied to the buffer into the DWORD to which nSize points. To call the GetUserName DLL in Visual FoxPro, use this command:
DECLARE GetUserName in Win32API ; String @mybuffer, Integer @mybuffersizeIf the same DLL was declared as:
DECLARE GetuserName in Win32API ; String @mybuffer, Integer @mybuffersizethe following error message would display:
Cannot find entry point GetuserName in the DLL. STATUSThis behavior is by design.
|
Additional reference words: 3.00 3.00b VFoxWin
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |