Commit fe2b31a5 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

Load advpack.dll at runtime to avoid link problems with the platform

sdk.
parent 737da586
......@@ -3,7 +3,7 @@ TOPOBJDIR = ../../..
SRCDIR = @srcdir@
VPATH = @srcdir@
TESTDLL = advpack.dll
IMPORTS = advpack user32 kernel32
IMPORTS = user32 kernel32
CTESTS = \
advpack.c
......
......@@ -18,12 +18,14 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#define NONAMELESSSTRUCT
#define NONAMELESSUNION
#include <windows.h>
#include <advpub.h>
#include "wine/test.h"
#include "advpub.h"
static HRESULT (WINAPI *pGetVersionFromFile)(LPSTR,LPDWORD,LPDWORD,BOOL);
static void version_test()
{
......@@ -31,7 +33,7 @@ static void version_test()
DWORD major, minor;
major = minor = 0;
hr = GetVersionFromFile("kernel32.dll", &major, &minor, FALSE);
hr = pGetVersionFromFile("kernel32.dll", &major, &minor, FALSE);
ok (hr == S_OK, "GetVersionFromFileEx(kernel32.dll) failed, returned "
"0x%08lx\n", hr);
......@@ -39,7 +41,7 @@ static void version_test()
major, minor);
major = minor = 0;
hr = GetVersionFromFile("kernel32.dll", &major, &minor, TRUE);
hr = pGetVersionFromFile("kernel32.dll", &major, &minor, TRUE);
ok (hr == S_OK, "GetVersionFromFileEx(kernel32.dll) failed, returned "
"0x%08lx\n", hr);
......@@ -49,5 +51,14 @@ static void version_test()
START_TEST(advpack)
{
HMODULE hdll;
hdll = LoadLibraryA("advpack.dll");
if (!hdll)
return;
pGetVersionFromFile = (void*)GetProcAddress(hdll, "GetVersionFromFile");
if (!pGetVersionFromFile)
return;
version_test();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment