2 * comctl32 MRU unit tests
4 * Copyright (C) 2004 Jon Griffiths <jon_p_griffiths@yahoo.com>
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.
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.
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
31 #include "wine/test.h"
33 /* Keys for testing MRU functions */
34 #define REG_TEST_BASEKEYA "Software\\Wine"
35 #define REG_TEST_BASESUBKEYA "Test"
36 #define REG_TEST_KEYA REG_TEST_BASEKEYA "\\" REG_TEST_BASESUBKEYA
37 #define REG_TEST_SUBKEYA "MRUTest"
38 #define REG_TEST_FULLKEY REG_TEST_KEYA "\\" REG_TEST_SUBKEYA
40 /* Undocumented MRU functions */
41 typedef struct tagMRUINFOA
51 typedef struct tagMRUINFOW
61 #define MRU_STRING 0 /* this one's invented */
63 #define MRU_CACHEWRITE 2
65 #define LIST_SIZE 3 /* Max entries for each mru */
67 static HMODULE hComctl32
;
68 static HANDLE (WINAPI
*pCreateMRUListA
)(MRUINFOA
*);
69 static void (WINAPI
*pFreeMRUList
)(HANDLE
);
70 static INT (WINAPI
*pAddMRUStringA
)(HANDLE
,LPCSTR
);
71 static INT (WINAPI
*pEnumMRUListA
)(HANDLE
,INT
,LPVOID
,DWORD
);
72 static INT (WINAPI
*pEnumMRUListW
)(HANDLE
,INT
,LPVOID
,DWORD
);
73 static HANDLE (WINAPI
*pCreateMRUListLazyA
)(MRUINFOA
*, DWORD
, DWORD
, DWORD
);
74 static HANDLE (WINAPI
*pCreateMRUListLazyW
)(MRUINFOW
*, DWORD
, DWORD
, DWORD
);
75 static INT (WINAPI
*pFindMRUData
)(HANDLE
, LPCVOID
, DWORD
, LPINT
);
76 static INT (WINAPI
*pAddMRUData
)(HANDLE
, LPCVOID
, DWORD
);
77 static HANDLE (WINAPI
*pCreateMRUListW
)(MRUINFOW
*);
79 static void InitPointers(void)
81 pCreateMRUListA
= (void*)GetProcAddress(hComctl32
,(LPCSTR
)151);
82 pFreeMRUList
= (void*)GetProcAddress(hComctl32
,(LPCSTR
)152);
83 pAddMRUStringA
= (void*)GetProcAddress(hComctl32
,(LPCSTR
)153);
84 pEnumMRUListA
= (void*)GetProcAddress(hComctl32
,(LPCSTR
)154);
85 pCreateMRUListLazyA
= (void*)GetProcAddress(hComctl32
,(LPCSTR
)157);
86 pAddMRUData
= (void*)GetProcAddress(hComctl32
,(LPCSTR
)167);
87 pFindMRUData
= (void*)GetProcAddress(hComctl32
,(LPCSTR
)169);
88 pCreateMRUListW
= (void*)GetProcAddress(hComctl32
,(LPCSTR
)400);
89 pEnumMRUListW
= (void*)GetProcAddress(hComctl32
,(LPCSTR
)403);
90 pCreateMRUListLazyW
= (void*)GetProcAddress(hComctl32
,(LPCSTR
)404);
93 /* Based on RegDeleteTreeW from dlls/advapi32/registry.c */
94 static LSTATUS
mru_RegDeleteTreeA(HKEY hKey
, LPCSTR lpszSubKey
)
97 DWORD dwMaxSubkeyLen
, dwMaxValueLen
;
98 DWORD dwMaxLen
, dwSize
;
99 CHAR szNameBuf
[MAX_PATH
], *lpszName
= szNameBuf
;
104 ret
= RegOpenKeyExA(hKey
, lpszSubKey
, 0, KEY_READ
, &hSubKey
);
108 /* Get highest length for keys, values */
109 ret
= RegQueryInfoKeyA(hSubKey
, NULL
, NULL
, NULL
, NULL
,
110 &dwMaxSubkeyLen
, NULL
, NULL
, &dwMaxValueLen
, NULL
, NULL
, NULL
);
111 if (ret
) goto cleanup
;
115 dwMaxLen
= max(dwMaxSubkeyLen
, dwMaxValueLen
);
116 if (dwMaxLen
> sizeof(szNameBuf
)/sizeof(CHAR
))
118 /* Name too big: alloc a buffer for it */
119 if (!(lpszName
= HeapAlloc( GetProcessHeap(), 0, dwMaxLen
*sizeof(CHAR
))))
121 ret
= ERROR_NOT_ENOUGH_MEMORY
;
127 /* Recursively delete all the subkeys */
131 if (RegEnumKeyExA(hSubKey
, 0, lpszName
, &dwSize
, NULL
,
132 NULL
, NULL
, NULL
)) break;
134 ret
= mru_RegDeleteTreeA(hSubKey
, lpszName
);
135 if (ret
) goto cleanup
;
139 ret
= RegDeleteKeyA(hKey
, lpszSubKey
);
144 if (RegEnumValueA(hKey
, 0, lpszName
, &dwSize
,
145 NULL
, NULL
, NULL
, NULL
)) break;
147 ret
= RegDeleteValueA(hKey
, lpszName
);
148 if (ret
) goto cleanup
;
152 /* Free buffer if allocated */
153 if (lpszName
!= szNameBuf
)
154 HeapFree( GetProcessHeap(), 0, lpszName
);
156 RegCloseKey(hSubKey
);
160 static BOOL
create_reg_entries(void)
164 ok(!RegCreateKeyA(HKEY_CURRENT_USER
, REG_TEST_FULLKEY
, &hKey
),
165 "Couldn't create test key \"%s\"\n", REG_TEST_KEYA
);
166 if (!hKey
) return FALSE
;
171 static void delete_reg_entries(void)
175 if (RegOpenKeyExA(HKEY_CURRENT_USER
, REG_TEST_BASEKEYA
, 0, KEY_ALL_ACCESS
,
178 mru_RegDeleteTreeA(hKey
, REG_TEST_BASESUBKEYA
);
182 static void check_reg_entries(const char *mrulist
, const char**items
)
186 DWORD type
, size
, ret
;
189 ok(!RegOpenKeyA(HKEY_CURRENT_USER
, REG_TEST_FULLKEY
, &hKey
),
190 "Couldn't open test key \"%s\"\n", REG_TEST_FULLKEY
);
196 ret
= RegQueryValueExA(hKey
, "MRUList", NULL
, &type
, (LPBYTE
)buff
, &size
);
198 ok(!ret
&& buff
[0], "Checking MRU: got %d from RegQueryValueExW\n", ret
);
199 if(ret
|| !buff
[0]) return;
201 ok(strcmp(buff
, mrulist
) == 0, "Checking MRU: Expected list %s, got %s\n",
203 if(strcmp(buff
, mrulist
)) return;
205 for (i
= 0; i
< strlen(mrulist
); i
++)
208 name
[0] = mrulist
[i
];
213 ret
= RegQueryValueExA(hKey
, name
, NULL
, &type
, (LPBYTE
)buff
, &size
);
215 "Checking MRU item %d ('%c'): got %d from RegQueryValueExW\n",
217 if(ret
|| !buff
[0]) return;
218 ok(!strcmp(buff
, items
[mrulist
[i
]-'a']),
219 "Checking MRU item %d ('%c'): expected \"%s\", got \"%s\"\n",
220 i
, mrulist
[i
], buff
, items
[mrulist
[i
] - 'a']);
224 static INT CALLBACK
cmp_mru_strA(LPCVOID data1
, LPCVOID data2
)
226 return lstrcmpiA(data1
, data2
);
229 static void test_MRUListA(void)
231 const char *checks
[LIST_SIZE
+1];
237 if (!pCreateMRUListA
|| !pFreeMRUList
|| !pAddMRUStringA
|| !pEnumMRUListA
)
239 skip("MRU entry points not found\n");
245 /* Create (NULL) - crashes native */
246 hMRU
= pCreateMRUListA(NULL
);
250 infoA
.cbSize
= sizeof(infoA
) - 2;
251 infoA
.uMax
= LIST_SIZE
;
252 infoA
.fFlags
= MRU_STRING
;
254 infoA
.lpszSubKey
= REG_TEST_SUBKEYA
;
255 infoA
.lpfnCompare
= (PROC
)cmp_mru_strA
;
258 hMRU
= pCreateMRUListA(&infoA
);
259 ok (!hMRU
&& !GetLastError(),
260 "CreateMRUListA(too small) expected NULL,0 got %p,%d\n",
261 hMRU
, GetLastError());
264 infoA
.cbSize
= sizeof(infoA
) + 2;
265 infoA
.uMax
= LIST_SIZE
;
266 infoA
.fFlags
= MRU_STRING
;
268 infoA
.lpszSubKey
= REG_TEST_SUBKEYA
;
269 infoA
.lpfnCompare
= (PROC
)cmp_mru_strA
;
272 hMRU
= pCreateMRUListA(&infoA
);
273 ok (!hMRU
&& !GetLastError(),
274 "CreateMRUListA(too big) expected NULL,0 got %p,%d\n",
275 hMRU
, GetLastError());
278 infoA
.cbSize
= sizeof(infoA
);
279 infoA
.uMax
= LIST_SIZE
;
280 infoA
.fFlags
= MRU_STRING
;
282 infoA
.lpszSubKey
= REG_TEST_SUBKEYA
;
283 infoA
.lpfnCompare
= (PROC
)cmp_mru_strA
;
286 hMRU
= pCreateMRUListA(&infoA
);
287 ok (!hMRU
&& !GetLastError(),
288 "CreateMRUListA(NULL key) expected NULL,0 got %p,%d\n",
289 hMRU
, GetLastError());
291 /* NULL subkey name */
292 infoA
.cbSize
= sizeof(infoA
);
293 infoA
.uMax
= LIST_SIZE
;
294 infoA
.fFlags
= MRU_STRING
;
296 infoA
.lpszSubKey
= NULL
;
297 infoA
.lpfnCompare
= (PROC
)cmp_mru_strA
;
300 hMRU
= pCreateMRUListA(&infoA
);
301 ok (!hMRU
&& !GetLastError(),
302 "CreateMRUListA(NULL name) expected NULL,0 got %p,%d\n",
303 hMRU
, GetLastError());
305 /* Create a string MRU */
306 ok(!RegCreateKeyA(HKEY_CURRENT_USER
, REG_TEST_KEYA
, &hKey
),
307 "Couldn't create test key \"%s\"\n", REG_TEST_KEYA
);
310 infoA
.cbSize
= sizeof(infoA
);
311 infoA
.uMax
= LIST_SIZE
;
312 infoA
.fFlags
= MRU_STRING
;
314 infoA
.lpszSubKey
= REG_TEST_SUBKEYA
;
315 infoA
.lpfnCompare
= (PROC
)cmp_mru_strA
;
317 hMRU
= pCreateMRUListA(&infoA
);
318 ok(hMRU
&& !GetLastError(),
319 "CreateMRUListA(string) expected non-NULL,0 got %p,%d\n",
320 hMRU
, GetLastError());
325 checks
[0] = "Test 1";
326 checks
[1] = "Test 2";
327 checks
[2] = "Test 3";
328 checks
[3] = "Test 4";
330 /* Add (NULL list) */
332 iRet
= pAddMRUStringA(NULL
, checks
[0]);
333 ok(iRet
== -1 && !GetLastError(),
334 "AddMRUStringA(NULL list) expected -1,0 got %d,%d\n",
335 iRet
, GetLastError());
337 /* Add (NULL string) */
340 /* Some native versions crash when passed NULL or fail to SetLastError() */
342 iRet
= pAddMRUStringA(hMRU
, NULL
);
343 ok(iRet
== 0 && GetLastError() == ERROR_INVALID_PARAMETER
,
344 "AddMRUStringA(NULL str) expected 0,ERROR_INVALID_PARAMETER got %d,%d\n",
345 iRet
, GetLastError());
348 /* Add 3 strings. Check the registry is correct after each add */
350 iRet
= pAddMRUStringA(hMRU
, checks
[0]);
351 ok(iRet
== 0 && !GetLastError(),
352 "AddMRUStringA(1) expected 0,0 got %d,%d\n",
353 iRet
, GetLastError());
354 check_reg_entries("a", checks
);
357 iRet
= pAddMRUStringA(hMRU
, checks
[1]);
358 ok(iRet
== 1 && !GetLastError(),
359 "AddMRUStringA(2) expected 1,0 got %d,%d\n",
360 iRet
, GetLastError());
361 check_reg_entries("ba", checks
);
364 iRet
= pAddMRUStringA(hMRU
, checks
[2]);
365 ok(iRet
== 2 && !GetLastError(),
366 "AddMRUStringA(2) expected 2,0 got %d,%d\n",
367 iRet
, GetLastError());
368 check_reg_entries("cba", checks
);
370 /* Add a duplicate of the 2nd string - it should move to the front,
371 * but keep the same index in the registry.
374 iRet
= pAddMRUStringA(hMRU
, checks
[1]);
375 ok(iRet
== 1 && !GetLastError(),
376 "AddMRUStringA(re-add 1) expected 1,0 got %d,%d\n",
377 iRet
, GetLastError());
378 check_reg_entries("bca", checks
);
380 /* Add a new string - replaces the oldest string + moves to the front */
382 iRet
= pAddMRUStringA(hMRU
, checks
[3]);
383 ok(iRet
== 0 && !GetLastError(),
384 "AddMRUStringA(add new) expected 0,0 got %d,%d\n",
385 iRet
, GetLastError());
386 checks
[0] = checks
[3];
387 check_reg_entries("abc", checks
);
389 /* NULL buffer = get list size */
390 iRet
= pEnumMRUListA(hMRU
, 0, NULL
, 0);
391 ok(iRet
== 3 || iRet
== -1 /* Vista */, "EnumMRUList expected %d or -1, got %d\n", LIST_SIZE
, iRet
);
393 /* negative item pos = get list size */
394 iRet
= pEnumMRUListA(hMRU
, -1, NULL
, 0);
395 ok(iRet
== 3 || iRet
== -1 /* Vista */, "EnumMRUList expected %d or -1, got %d\n", LIST_SIZE
, iRet
);
397 /* negative item pos = get list size */
398 iRet
= pEnumMRUListA(hMRU
, -5, NULL
, 0);
399 ok(iRet
== 3 || iRet
== -1 /* Vista */, "EnumMRUList expected %d or -1, got %d\n", LIST_SIZE
, iRet
);
401 /* negative item pos = get list size */
402 iRet
= pEnumMRUListA(hMRU
, -1, buffer
, 255);
403 ok(iRet
== 3, "EnumMRUList expected %d, got %d\n", LIST_SIZE
, iRet
);
405 /* negative item pos = get list size */
406 iRet
= pEnumMRUListA(hMRU
, -5, buffer
, 255);
407 ok(iRet
== 3, "EnumMRUList expected %d, got %d\n", LIST_SIZE
, iRet
);
411 iRet
= pEnumMRUListA(hMRU
, 0, buffer
, 255);
412 ok(iRet
== lstrlen(checks
[3]), "EnumMRUList expected %d, got %d\n", lstrlen(checks
[3]), iRet
);
413 ok(strcmp(buffer
, checks
[3]) == 0, "EnumMRUList expected %s, got %s\n", checks
[3], buffer
);
415 /* check entry 0 with a too small buffer */
416 buffer
[0] = 0; /* overwritten with 'T' */
417 buffer
[1] = 'A'; /* overwritten with 0 */
418 buffer
[2] = 'A'; /* unchanged */
419 buffer
[3] = 0; /* unchanged */
420 iRet
= pEnumMRUListA(hMRU
, 0, buffer
, 2);
421 ok(iRet
== lstrlen(checks
[3]), "EnumMRUList expected %d, got %d\n", lstrlen(checks
[3]), iRet
);
422 ok(strcmp(buffer
, "T") == 0, "EnumMRUList expected %s, got %s\n", "T", buffer
);
423 /* make sure space after buffer has old values */
424 ok(buffer
[2] == 'A', "EnumMRUList expected %02x, got %02x\n", 'A', buffer
[2]);
428 iRet
= pEnumMRUListA(hMRU
, 1, buffer
, 255);
429 ok(iRet
== lstrlen(checks
[1]), "EnumMRUList expected %d, got %d\n", lstrlen(checks
[1]), iRet
);
430 ok(strcmp(buffer
, checks
[1]) == 0, "EnumMRUList expected %s, got %s\n", checks
[1], buffer
);
434 iRet
= pEnumMRUListA(hMRU
, 2, buffer
, 255);
435 ok(iRet
== lstrlen(checks
[2]), "EnumMRUList expected %d, got %d\n", lstrlen(checks
[2]), iRet
);
436 ok(strcmp(buffer
, checks
[2]) == 0, "EnumMRUList expected %s, got %s\n", checks
[2], buffer
);
438 /* check out of bounds entry 3 */
439 strcpy(buffer
, "dummy");
440 iRet
= pEnumMRUListA(hMRU
, 3, buffer
, 255);
441 ok(iRet
== -1, "EnumMRUList expected %d, got %d\n", -1, iRet
);
442 ok(strcmp(buffer
, "dummy") == 0, "EnumMRUList expected unchanged buffer %s, got %s\n", "dummy", buffer
);
444 /* Finished with this MRU */
448 /* FreeMRUList(NULL) crashes on Win98 OSR0 */
451 typedef struct tagMRUINFOA
466 static const create_lazya_t create_lazyA
[] = {
467 {{ sizeof(MRUINFOA
) + 1, 0, 0, HKEY_CURRENT_USER
, NULL
, NULL
}, FALSE
},
468 {{ sizeof(MRUINFOA
) - 1, 0, 0, HKEY_CURRENT_USER
, NULL
, NULL
}, FALSE
},
469 {{ sizeof(MRUINFOA
) + 1, 0, 0, HKEY_CURRENT_USER
, "WineTest", NULL
}, TRUE
},
470 {{ sizeof(MRUINFOA
) - 1, 0, 0, HKEY_CURRENT_USER
, "WineTest", NULL
}, TRUE
},
471 {{ sizeof(MRUINFOA
), 0, 0, HKEY_CURRENT_USER
, "WineTest", NULL
}, TRUE
},
472 {{ sizeof(MRUINFOA
), 0, 0, HKEY_CURRENT_USER
, NULL
, NULL
}, FALSE
},
473 {{ sizeof(MRUINFOA
), 0, 0, NULL
, "WineTest", NULL
}, FALSE
},
474 {{ 0, 0, 0, NULL
, "WineTest", NULL
}, FALSE
},
475 {{ 0, 0, 0, HKEY_CURRENT_USER
, "WineTest", NULL
}, TRUE
}
478 static void test_CreateMRUListLazyA(void)
482 if (!pCreateMRUListLazyA
|| !pFreeMRUList
)
484 win_skip("CreateMRUListLazyA or FreeMRUList entry points not found\n");
488 for (i
= 0; i
< sizeof(create_lazyA
)/sizeof(create_lazya_t
); i
++)
490 const create_lazya_t
*ptr
= &create_lazyA
[i
];
493 hMRU
= pCreateMRUListLazyA((MRUINFOA
*)&ptr
->mruA
, 0, 0, 0);
496 ok(hMRU
!= NULL
, "%d: got %p\n", i
, hMRU
);
500 ok(hMRU
== NULL
, "%d: got %p\n", i
, hMRU
);
504 static void test_EnumMRUList(void)
506 if (!pEnumMRUListA
|| !pEnumMRUListW
)
508 win_skip("EnumMRUListA/EnumMRUListW entry point not found\n");
515 /* crashes on NT4, passed on Win2k, XP, 2k3, Vista, 2k8 */
516 pEnumMRUListA(NULL
, 0, NULL
, 0);
517 pEnumMRUListW(NULL
, 0, NULL
, 0);
521 static void test_FindMRUData(void)
527 win_skip("FindMRUData entry point not found\n");
532 iRet
= pFindMRUData(NULL
, NULL
, 0, NULL
);
533 ok(iRet
== -1, "FindMRUData expected -1, got %d\n", iRet
);
536 static void test_AddMRUData(void)
542 win_skip("AddMRUData entry point not found\n");
547 iRet
= pFindMRUData(NULL
, NULL
, 0, NULL
);
548 ok(iRet
== -1, "AddMRUData expected -1, got %d\n", iRet
);
551 static void test_CreateMRUListW(void)
553 static const WCHAR mrutestW
[] = {'M','R','U','T','e','s','t',0};
559 if (!pCreateMRUListW
)
561 win_skip("CreateMRUListW entry point not found\n");
565 /* exported by name too on recent versions */
566 named
= GetProcAddress(hComctl32
, "CreateMRUListW");
568 ok(named
== pCreateMRUListW
, "got %p, expected %p\n", named
, pCreateMRUListW
);
570 ok(!RegCreateKeyA(HKEY_CURRENT_USER
, REG_TEST_KEYA
, &hKey
),
571 "Couldn't create test key \"%s\"\n", REG_TEST_KEYA
);
573 infoW
.cbSize
= sizeof(infoW
);
576 infoW
.lpszSubKey
= mrutestW
;
578 infoW
.lpfnCompare
= NULL
;
580 hMru
= pCreateMRUListW(&infoW
);
581 ok(hMru
!= NULL
, "got %p\n", hMru
);
585 infoW
.cbSize
= sizeof(infoW
) - 1;
588 infoW
.lpszSubKey
= mrutestW
;
590 infoW
.lpfnCompare
= NULL
;
592 hMru
= pCreateMRUListW(&infoW
);
593 ok(hMru
!= NULL
, "got %p\n", hMru
);
597 infoW
.cbSize
= sizeof(infoW
) + 1;
600 infoW
.lpszSubKey
= mrutestW
;
602 infoW
.lpfnCompare
= NULL
;
604 hMru
= pCreateMRUListW(&infoW
);
605 ok(hMru
!= NULL
, "got %p\n", hMru
);
612 infoW
.lpszSubKey
= mrutestW
;
614 infoW
.lpfnCompare
= NULL
;
616 hMru
= pCreateMRUListW(&infoW
);
617 ok(hMru
!= NULL
, "got %p\n", hMru
);
621 infoW
.cbSize
= sizeof(infoW
);
624 infoW
.lpszSubKey
= mrutestW
;
626 infoW
.lpfnCompare
= NULL
;
628 hMru
= pCreateMRUListW(&infoW
);
629 ok(hMru
== NULL
, "got %p\n", hMru
);
634 static void test_CreateMRUListLazyW(void)
636 static const WCHAR mrutestW
[] = {'M','R','U','T','e','s','t',0};
642 if (!pCreateMRUListLazyW
)
644 win_skip("CreateMRUListLazyW entry point not found\n");
648 /* check that it's not exported by name */
649 named
= GetProcAddress(hComctl32
, "CreateMRUListLazyW");
650 ok(named
== NULL
, "got %p\n", named
);
652 ok(!RegCreateKeyA(HKEY_CURRENT_USER
, REG_TEST_KEYA
, &hKey
),
653 "Couldn't create test key \"%s\"\n", REG_TEST_KEYA
);
655 infoW
.cbSize
= sizeof(infoW
);
658 infoW
.lpszSubKey
= mrutestW
;
660 infoW
.lpfnCompare
= NULL
;
662 hMru
= pCreateMRUListLazyW(&infoW
, 0, 0, 0);
663 ok(hMru
!= NULL
, "got %p\n", hMru
);
667 infoW
.cbSize
= sizeof(infoW
) - 1;
670 infoW
.lpszSubKey
= mrutestW
;
672 infoW
.lpfnCompare
= NULL
;
674 hMru
= pCreateMRUListLazyW(&infoW
, 0, 0, 0);
675 ok(hMru
!= NULL
, "got %p\n", hMru
);
679 infoW
.cbSize
= sizeof(infoW
) + 1;
682 infoW
.lpszSubKey
= mrutestW
;
684 infoW
.lpfnCompare
= NULL
;
686 hMru
= pCreateMRUListLazyW(&infoW
, 0, 0, 0);
687 ok(hMru
!= NULL
, "got %p\n", hMru
);
694 infoW
.lpszSubKey
= mrutestW
;
696 infoW
.lpfnCompare
= NULL
;
698 hMru
= pCreateMRUListLazyW(&infoW
, 0, 0, 0);
699 ok(hMru
!= NULL
, "got %p\n", hMru
);
703 infoW
.cbSize
= sizeof(infoW
);
706 infoW
.lpszSubKey
= mrutestW
;
708 infoW
.lpfnCompare
= NULL
;
710 hMru
= pCreateMRUListLazyW(&infoW
, 0, 0, 0);
711 ok(hMru
== NULL
, "got %p\n", hMru
);
718 hComctl32
= GetModuleHandleA("comctl32.dll");
720 delete_reg_entries();
721 if (!create_reg_entries())
727 test_CreateMRUListLazyA();
728 test_CreateMRUListLazyW();
732 test_CreateMRUListW();
734 delete_reg_entries();