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



The information in this article applies to:

  • Microsoft Windows CE Operating System, Versions 2.12
  • Microsoft Windows CE Operating System, Versions 2.11
  • Microsoft Windows CE Operating System, Versions 2.0
  • Microsoft Windows CE Operating System, Versions 3.0

This article was previously published under Q258866

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.

Modification Type:MinorLast Reviewed:8/27/2004
Keywords:kbprb KB258866