module = (MODSTRUCT *) hModule;
+ /* try to assert on attempt to locate symbol by ordinal */
+ /* this can't be an exact test for HIWORD((DWORD)lpProcName) == 0
+ because of the address range reserved for ordinals contain can
+ be a valid string address on non-Windows systems
+ */
+ if ((DWORD_PTR)lpProcName < VIRTUAL_PAGE_SIZE)
+ {
+ ASSERT("Attempt to locate symbol by ordinal?!\n");
+ }
+
/* parameter validation */
if ((lpProcName == nullptr) || (*lpProcName == '\0'))
SetLastError(ERROR_INVALID_HANDLE);
goto done;
}
-
- /* try to assert on attempt to locate symbol by ordinal */
- /* this can't be an exact test for HIWORD((DWORD)lpProcName) == 0
- because of the address range reserved for ordinals contain can
- be a valid string address on non-Windows systems
- */
- if ((DWORD_PTR)lpProcName < VIRTUAL_PAGE_SIZE)
- {
- ASSERT("Attempt to locate symbol by ordinal?!\n");
- }
// Get the symbol's address.
FARPROC pFunc = NULL, pFuncW = NULL;
+#ifndef FEATURE_PAL
// Handle ordinals.
if (GetEntrypointName()[0] == '#')
{
long ordinal = atol(GetEntrypointName()+1);
return reinterpret_cast<LPVOID>(GetProcAddress(hMod, (LPCSTR)(size_t)((UINT16)ordinal)));
}
+#endif
// Just look for the unmangled name. If it is unicode fcn, we are going
// to need to check for the 'W' API because it takes precedence over the