- TBN_DRAGOUT and NM_RDBLCLK notifications.
[wine.git] / dlls / version / tests / info.c
blob11e38c2161b3ec737c2a9179ce252072b44c2022
1 /*
2 * Copyright (C) 2004 Stefan Leichter
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 #include <stdarg.h>
21 #include "wine/test.h"
22 #include "windef.h"
23 #include "winbase.h"
24 #include "winerror.h"
25 #include "winver.h"
27 static void test_info_size(void)
28 { DWORD hdl, retval;
30 SetLastError(-1L);
31 retval = GetFileVersionInfoSizeA( NULL, NULL);
32 ok( !retval,
33 "GetFileVersionInfoSizeA result wrong! 0L expected, got 0x%08lx\n",
34 retval);
35 ok( ERROR_RESOURCE_DATA_NOT_FOUND == GetLastError(),
36 "Last error wrong! ERROR_RESOURCE_DATA_NOT_FOUND expected, got 0x%08lx\n",
37 GetLastError());
39 hdl = 0x55555555;
40 SetLastError(-1L);
41 retval = GetFileVersionInfoSizeA( NULL, &hdl);
42 ok( !retval,
43 "GetFileVersionInfoSizeA result wrong! 0L expected, got 0x%08lx\n",
44 retval);
45 ok( ERROR_RESOURCE_DATA_NOT_FOUND == GetLastError(),
46 "Last error wrong! ERROR_RESOURCE_DATA_NOT_FOUND expected, got 0x%08lx\n",
47 GetLastError());
48 ok( hdl == 0L,
49 "Handle wrong! 0L expected, got 0x%08lx\n", hdl);
51 SetLastError(-1L);
52 retval = GetFileVersionInfoSizeA( "", NULL);
53 ok( !retval,
54 "GetFileVersionInfoSizeA result wrong! 0L expected, got 0x%08lx\n",
55 retval);
56 ok( ERROR_RESOURCE_DATA_NOT_FOUND == GetLastError(),
57 "Last error wrong! ERROR_RESOURCE_DATA_NOT_FOUND expected, got 0x%08lx\n",
58 GetLastError());
60 hdl = 0x55555555;
61 SetLastError(-1L);
62 retval = GetFileVersionInfoSizeA( "", &hdl);
63 ok( !retval,
64 "GetFileVersionInfoSizeA result wrong! 0L expected, got 0x%08lx\n",
65 retval);
66 ok( ERROR_RESOURCE_DATA_NOT_FOUND == GetLastError(),
67 "Last error wrong! ERROR_RESOURCE_DATA_NOT_FOUND expected, got 0x%08lx\n",
68 GetLastError());
69 ok( hdl == 0L,
70 "Handle wrong! 0L expected, got 0x%08lx\n", hdl);
72 SetLastError(-1L);
73 retval = GetFileVersionInfoSizeA( "kernel32.dll", NULL);
74 ok( retval,
75 "GetFileVersionInfoSizeA result wrong! <> 0L expected, got 0x%08lx\n",
76 retval);
77 ok( NO_ERROR == GetLastError(),
78 "Last error wrong! NO_ERROR expected, got 0x%08lx\n",
79 GetLastError());
81 hdl = 0x55555555;
82 SetLastError(-1L);
83 retval = GetFileVersionInfoSizeA( "kernel32.dll", &hdl);
84 ok( retval,
85 "GetFileVersionInfoSizeA result wrong! <> 0L expected, got 0x%08lx\n",
86 retval);
87 ok( NO_ERROR == GetLastError(),
88 "Last error wrong! NO_ERROR expected, got 0x%08lx\n",
89 GetLastError());
90 ok( hdl == 0L,
91 "Handle wrong! 0L expected, got 0x%08lx\n", hdl);
93 SetLastError(-1L);
94 retval = GetFileVersionInfoSizeA( "notexist.dll", NULL);
95 ok( !retval,
96 "GetFileVersionInfoSizeA result wrong! 0L expected, got 0x%08lx\n",
97 retval);
98 ok( ERROR_FILE_NOT_FOUND == GetLastError(),
99 "Last error wrong! ERROR_FILE_NOT_FOUND expected, got 0x%08lx\n",
100 GetLastError());
103 START_TEST(info)
105 test_info_size();