Implemented _getdllprocaddr(), it cannot be simply a forward to

GetProcAddress.
This commit is contained in:
Alexandre Julliard 2003-03-17 00:05:44 +00:00
parent 52ec0a3ff3
commit d354a1ca87
2 changed files with 15 additions and 1 deletions

View file

@ -254,7 +254,7 @@
@ cdecl _getcwd(str long) _getcwd
@ cdecl _getdcwd(long str long) _getdcwd
@ cdecl _getdiskfree(long ptr) _getdiskfree
@ forward _getdllprocaddr kernel32.GetProcAddress
@ cdecl _getdllprocaddr(long str long) _getdllprocaddr
@ cdecl _getdrive() _getdrive
@ forward _getdrives kernel32.GetLogicalDrives
@ stub _getmaxstdio #()

View file

@ -472,3 +472,17 @@ int _unloaddll(int dll)
return err;
}
}
/*********************************************************************
* _getdllprocaddr (MSVCRT.@)
*/
void *_getdllprocaddr(int dll, const char *name, int ordinal)
{
if (name)
{
if (ordinal != -1) return NULL;
return GetProcAddress( (HMODULE)dll, name );
}
if (HIWORD(ordinal)) return NULL;
return GetProcAddress( (HMODULE)dll, (LPCSTR)(ULONG_PTR)ordinal );
}