Microsoft KB Archive/258866

{|
 * width="100%"|

PRB: GetProcAddress Requires the Length of the Function Name Parameter to Be 127 Characters or Less

 * }

Q258866

-

The information in this article applies to:


 * Microsoft Windows CE Operating System versions 2.0, 2.11, 2.12, 3.0

-

SYMPTOMS
An application that uses the LoadLibrary and GetProcAddress Win32 API functions on Windows CE to run-time bind to a DLL function may not get the correct function address for the exported DLL function if the function name is longer than 127 characters. The result is an application that may appear to be correct and that successfully compiles but that calls the wrong DLL function.

CAUSE
The GetProcAddress API does not look beyond the 127th character of a function name. But there are conditions under which function names with lengths greater than this limit may work (namely, when function name uniqueness doesn't lie beyond the 127th character). These conditions may be the cause of future bugs as code gets updated, so application developers may find it worthwhile to search for and correct these function name references.

RESOLUTION
By design, the GetProcAddress function on Windows CE does not distinguish between functions with names longer than 127 characters. The application programmer should develop code within these design constraints.

STATUS
This behavior is by design.

Additional query words:

Keywords : kbOSWinCE200 kbOSWinCE211 kbDSupport kbOSWinCE212 kbOSWinCE300

Issue type : kbprb

Technology : kbOSWinCE kbWinCESearch kbWinCE200 kbWinCE211 kbWinCE212 kbWinCE300