Reverse the order for deleting the items in resetcontent to correctly
[wine] / dlls / advpack / tests / advpack.c
1 /*
2  * Unit tests for advpack.dll
3  *
4  * Copyright (C) 2005 Robert Reif
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  */
20
21 #include <windows.h>
22 #include <advpub.h>
23
24 #include "wine/test.h"
25
26
27 static HRESULT (WINAPI *pGetVersionFromFile)(LPSTR,LPDWORD,LPDWORD,BOOL);
28
29
30 static void version_test()
31 {
32     HRESULT hr;
33     DWORD major, minor;
34
35     major = minor = 0;
36     hr = pGetVersionFromFile("kernel32.dll", &major, &minor, FALSE);
37     ok (hr == S_OK, "GetVersionFromFileEx(kernel32.dll) failed, returned "
38         "0x%08lx\n", hr);
39
40     trace("kernel32.dll Language ID: 0x%08lx, Codepage ID: 0x%08lx\n",
41            major, minor);
42
43     major = minor = 0;
44     hr = pGetVersionFromFile("kernel32.dll", &major, &minor, TRUE);
45     ok (hr == S_OK, "GetVersionFromFileEx(kernel32.dll) failed, returned "
46         "0x%08lx\n", hr);
47
48     trace("kernel32.dll version: %d.%d.%d.%d\n", HIWORD(major), LOWORD(major),
49           HIWORD(minor), LOWORD(minor));
50 }
51
52 START_TEST(advpack)
53 {
54     HMODULE hdll;
55
56     hdll = LoadLibraryA("advpack.dll");
57     if (!hdll)
58         return;
59     pGetVersionFromFile = (void*)GetProcAddress(hdll, "GetVersionFromFile");
60     if (!pGetVersionFromFile)
61         return;
62
63     version_test();
64 }