Microsoft KB Archive/149431

= Cannot find entry point (DLL name) in the DLL with Visual FoxPro =

Article ID: 149431

Article Last Modified on 1/27/2005

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition
 * Microsoft Visual FoxPro 3.0b Standard Edition
 * Microsoft Visual FoxPro 6.0 Professional Edition
 * Microsoft Visual FoxPro 7.0 Professional Edition
 * Microsoft Visual FoxPro 8.0 Professional Edition
 * Microsoft Visual FoxPro 9.0 Professional Edition

-



This article was previously published under Q149431



SYMPTOMS
When you declare a Win32 DLL, the following error occurs:

Cannot find entry point Mydll in the DLL

Mydll is the name of the DLL being called.



CAUSE
This error occurs because all 32-Bit DLL procedure names are case sensitive.



RESOLUTION
To 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 );  Parameters The 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 the following command: DECLARE GetUserName in Win32API ; String @mybuffer, Integer @mybuffersize

If the same DLL was declared as: DECLARE GetuserName in Win32API ; String @mybuffer, Integer @mybuffersize you receive the following error message:

Cannot find entry point GetuserName in the DLL.



STATUS
This behavior is by design.

Additional query words: VFoxWin

Keywords: KB149431

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.