42 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x02, 0x02, 0x00, 0x00, 0x01, 0x00,
43 0x20, 0x00, 0x40, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x28, 0x00,
44 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00,
45 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x12, 0x0b,
46 0x00, 0x00, 0x12, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
47 0x00, 0x00, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0xde, 0xde,
48 0xde, 0xff, 0xde, 0xde, 0xde, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
52#define COMCTL32_GET_PROC(ordinal, func) \
53 p ## func = (void*)GetProcAddress(hComctl32, (LPSTR)ordinal); \
55 trace("GetProcAddress(%d)(%s) failed\n", ordinal, #func); \
56 FreeLibrary(hComctl32); \
65 trace(
"Could not load comctl32.dll\n");
86 static const char source[] =
"Just a source string";
87 static const char desttest[] =
"Just a destination string";
96 ok (
count == 0,
"Expected count to be 0, it was %d\n",
count);
111 "Expected count to be %d, it was %d\n", sourcelen,
count);
117 "Expected count to be %d, it was %d\n", sourcelen,
count);
120 "Expected destination to not have changed\n");
125 "Expected count to be %d, it was %d\n", sourcelen,
count);
130 "Expected count to be %d, it was %d\n", sourcelen,
count);
135 ok (
count == 0,
"Expected count to be 0, it was %d\n",
count);
136 ok (
dest[0] ==
'\0',
"Expected destination to be cut-off and 0 terminated\n");
142 "Expected count to be 15, it was %d\n",
count);
143 ok (!
memcmp(
source,
dest, 14),
"Expected first part of source and destination to be the same\n");
144 ok (
dest[14] ==
'\0',
"Expected destination to be cut-off and 0 terminated\n");
156 ok(
p !=
NULL,
"Expected non-NULL ptr\n");
167 ok(
p !=
NULL,
"Expected non-NULL ptr\n");
173 "Expected 1, got %d\n",
size);
177 ok(
p !=
NULL,
"Expected non-NULL ptr\n");
183 "Expected 2, got %d\n",
size);
193 "Expected TRUE, got %d\n",
res);
196 p = pReAlloc(
NULL, 2);
197 ok(
p !=
NULL,
"Expected non-NULL ptr\n");
205 static const WCHAR nonexisting_fileW[] = {
'n',
'o',
'n',
'e',
'x',
'i',
's',
't',
'i',
'n',
'g',
'.',
'i',
'c',
'o',0};
206 static const WCHAR nonexisting_resourceW[] = {
'N',
'o',
'n',
'e',
'x',
'i',
's',
't',
'i',
'n',
'g',0};
207 static const WCHAR prefixW[] = {
'I',
'C',
'O',0};
225 if (!pLoadIconMetric || !pLoadIconWithScaleDown)
227 win_skip(
"LoadIconMetric or pLoadIconWithScaleDown not exported by name\n");
243 ok(
ptr == pLoadIconMetric,
244 "got wrong pointer for ordinal 380, %p expected %p\n",
ptr, pLoadIconMetric);
247 ok(
ptr == pLoadIconWithScaleDown,
248 "got wrong pointer for ordinal 381, %p expected %p\n",
ptr, pLoadIconWithScaleDown);
251 icon = (
HICON)0x1234;
254 ok(icon ==
NULL,
"Expected NULL, got %p\n", icon);
256 icon = (
HICON)0x1234;
259 ok(icon ==
NULL,
"Expected NULL, got %p\n", icon);
261 icon = (
HICON)0x1234;
262 hr = pLoadIconWithScaleDown(
NULL,
NULL, 32, 32, &icon);
264 ok(icon ==
NULL,
"Expected NULL, got %p\n", icon);
269 "Expected HRESULT_FROM_WIN32(ERROR_RESOURCE_TYPE_NOT_FOUND), got %x\n",
hr);
271 hr = pLoadIconWithScaleDown(
NULL, nonexisting_fileW, 32, 32, &icon);
274 "Expected HRESULT_FROM_WIN32(ERROR_RESOURCE_TYPE_NOT_FOUND), got %x\n",
hr);
279 "Expected HRESULT_FROM_WIN32(ERROR_RESOURCE_TYPE_NOT_FOUND), got %x\n",
hr);
281 hr = pLoadIconWithScaleDown(
hinst, nonexisting_resourceW, 32, 32, &icon);
283 "Expected HRESULT_FROM_WIN32(ERROR_RESOURCE_TYPE_NOT_FOUND), got %x\n",
hr);
287 ok(
hr ==
S_OK,
"Expected S_OK, got %x\n",
hr);
291 ok(
bytes > 0,
"Failed to get bitmap info for icon\n");
297 ok(
hr ==
S_OK,
"Expected S_OK, got %x\n",
hr);
301 ok(
bytes > 0,
"Failed to get bitmap info for icon\n");
307 ok(
hr ==
S_OK,
"Expected S_OK, got %x\n",
hr);
311 ok(
bytes > 0,
"Failed to get bitmap info for icon\n");
312 ok(
bmp.bmWidth == 42,
"Wrong icon width %d\n",
bmp.bmWidth);
313 ok(
bmp.bmHeight == 42,
"Wrong icon height %d\n",
bmp.bmHeight);
318 ok(
hr ==
S_OK,
"Expected S_OK, got %x\n",
hr);
322 ok(
bytes > 0,
"Failed to get bitmap info for icon\n");
327 hr = pLoadIconWithScaleDown(
NULL, icon_path, 42, 42, &icon);
328 ok(
hr ==
S_OK,
"Expected S_OK, got %x\n",
hr);
332 ok(
bytes > 0,
"Failed to get bitmap info for icon\n");
333 ok(
bmp.bmWidth == 42,
"Wrong icon width %d\n",
bmp.bmWidth);
334 ok(
bmp.bmHeight == 42,
"Wrong icon height %d\n",
bmp.bmHeight);
351 ok( must_exist,
"System class %s should %sexist\n",
name, must_exist ?
"" :
"NOT " );
352 if (!must_exist)
return;
355 ok( !(~wc.
style &
style & ~ignore),
"System class %s is missing bits %x (%08x/%08x)\n",
358 ok( !(wc.
style & ~
style),
"System class %s has extra bits %x (%08x/%08x)\n",
362 hwnd =
CreateWindowA(
name, 0, 0, 0, 0, 0, 0, 0,
NULL,
GetModuleHandleA(
NULL), 0);
363 ok(
hwnd !=
NULL,
"Failed to create window for class %s.\n",
name );
369 ok( !must_exist,
"System class %s does not exist\n",
name );
int strcmp(const char *String1, const char *String2)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
ACPI_SIZE strlen(const char *String)
char * strcpy(char *DstString, const char *SrcString)
static unsigned char bytes[4]
PVOID ReAlloc(IN DWORD dwFlags, IN PVOID lpMem, IN SIZE_T dwBytes)
PVOID Alloc(IN DWORD dwFlags, IN SIZE_T dwBytes)
DWORD WINAPI GetSize(LPVOID)
INT WINAPI Str_GetPtrA(LPCSTR, LPSTR, INT)
INT WINAPI Str_GetPtrW(LPCWSTR, LPWSTR, INT)
BOOL WINAPI Str_SetPtrW(LPWSTR *lppDest, LPCWSTR lpSrc)
BOOL WINAPI Str_SetPtrA(LPSTR *lppDest, LPCSTR lpSrc)
#define GetProcAddress(x, y)
#define INVALID_HANDLE_VALUE
#define FILE_ATTRIBUTE_NORMAL
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
DWORD WINAPI GetTempPathW(IN DWORD count, OUT LPWSTR path)
int WINAPI lstrcmpA(LPCSTR str1, LPCSTR str2)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
static unsigned char buff[32768]
UINT WINAPI GetTempFileNameW(IN LPCWSTR lpPathName, IN LPCWSTR lpPrefixString, IN UINT uUnique, OUT LPWSTR lpTempFileName)
GLuint GLuint GLsizei count
#define ERROR_FILE_NOT_FOUND
static void test_GetPtrAW(void)
static void test_Alloc(void)
static void test_builtin_classes(void)
static void test_LoadIconWithScaleDown(void)
#define COMCTL32_GET_PROC(ordinal, func)
static BOOL InitFunctionPtrs(void)
static char testicon_data[]
#define todo_wine_if(is_todo)
static void test_comctl32_classes(void)
#define check_class(inst, name, menu)
#define WC_NATIVEFONTCTLA
#define DATETIMEPICK_CLASSA
#define TOOLBARCLASSNAMEA
static BOOL load_v6_module(ULONG_PTR *pcookie, HANDLE *hCtx)
static void unload_v6_module(ULONG_PTR cookie, HANDLE hCtx)
DWORD WINAPI GetLastError(void)
#define ERROR_RESOURCE_TYPE_NOT_FOUND
#define HRESULT_FROM_WIN32(x)
int WINAPI GetObjectA(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
BOOL WINAPI GetIconInfo(_In_ HICON, _Out_ PICONINFO)
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
int WINAPI GetClassNameA(_In_ HWND hWnd, _Out_writes_to_(nMaxCount, return) LPSTR lpClassName, _In_ int nMaxCount)
BOOL WINAPI GetClassInfoA(_In_opt_ HINSTANCE, _In_ LPCSTR, _Out_ LPWNDCLASSA)
BOOL WINAPI DestroyWindow(_In_ HWND)
int WINAPI GetSystemMetrics(_In_ int)
BOOL WINAPI DestroyIcon(_In_ HICON)
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION Free