From d354a1ca8720a12c330a9be8a9028c2fa19ec514 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 17 Mar 2003 00:05:44 +0000 Subject: [PATCH] Implemented _getdllprocaddr(), it cannot be simply a forward to GetProcAddress. --- dlls/msvcrt/msvcrt.spec | 2 +- dlls/msvcrt/process.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) 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 ); +}