diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index 72ba11e716a..19debb6b4fe 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -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 #() diff --git a/dlls/msvcrt/process.c b/dlls/msvcrt/process.c index ae7ac6c7135..0ed72a52ac9 100644 --- a/dlls/msvcrt/process.c +++ b/dlls/msvcrt/process.c @@ -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 ); +}