Hello,
i'm looking for some good souls testing the attached patch one windows.
While looking for bug 7701 i found that the function __vbaNew2 of the
MSVBVM60.dll does not like return values from SHGetFileInfoA bigger than
0x7fff
Can you please report at least the results of the trace statements and if any
modified test fails for you, the console output is fine for me too.
Thanks for your help
Stefan
--- wine-git/dlls/shell32/tests/shlfileop.c 2009-06-01 15:06:52.000000000 +0200
+++ wine-mingw/dlls/shell32/tests/shlfileop.c 2009-07-28 18:03:19.000000000 +0200
@@ -189,7 +189,8 @@
/* Test whether fields of SHFILEINFOA are always cleared */
memset(&shfi, 0xcf, sizeof(shfi));
rc=SHGetFileInfoA("", 0, &shfi, sizeof(shfi), 0);
- ok(rc, "SHGetFileInfoA('' | 0) should not fail\n");
+ trace("SHGetFileInfoA('') %x\n", rc);
+ ok(rc && rc < 0x8000, "SHGetFileInfoA('' | 0) should not fail %x\n", rc);
todo_wine ok(shfi.hIcon == 0, "SHGetFileInfoA('' | 0) did not clear hIcon\n");
todo_wine ok(shfi.szDisplayName[0] == 0, "SHGetFileInfoA('' | 0) did not clear szDisplayName[0]\n");
todo_wine ok(shfi.szTypeName[0] == 0, "SHGetFileInfoA('' | 0) did not clear szTypeName[0]\n");
@@ -225,7 +226,8 @@
rc=SHGetFileInfoA("c:\\nonexistent", FILE_ATTRIBUTE_DIRECTORY,
&shfi, sizeof(shfi),
SHGFI_ATTRIBUTES | SHGFI_USEFILEATTRIBUTES);
- ok(rc, "SHGetFileInfoA(c:\\nonexistent | SHGFI_ATTRIBUTES) failed\n");
+ trace("SHGetFileInfoA(c:\\nonexistent) %x\n", rc);
+ ok(rc && rc < 0x8000, "SHGetFileInfoA(c:\\nonexistent | SHGFI_ATTRIBUTES) failed %x\n", rc);
if (rc)
ok(shfi.dwAttributes != 0xcfcfcfcf, "dwFileAttributes is not set\n");
todo_wine ok(shfi.hIcon == 0, "SHGetFileInfoA(c:\\nonexistent | SHGFI_ATTRIBUTES) did not clear hIcon\n");
@@ -246,7 +248,8 @@
rc=SHGetFileInfoA("c:\\nonexistent", FILE_ATTRIBUTE_DIRECTORY,
&shfi, sizeof(shfi),
SHGFI_ICONLOCATION | SHGFI_USEFILEATTRIBUTES);
- ok(rc, "SHGetFileInfoA(c:\\nonexistent) failed\n");
+ trace("SHGetFileInfoA(c:\\nonexistent) %x\n", rc);
+ ok(rc && rc < 0x8000, "SHGetFileInfoA(c:\\nonexistent) failed %x\n", rc);
if (rc)
{
ok(strcpy(shfi.szDisplayName, "dummy") != 0, "SHGetFileInfoA(c:\\nonexistent) displayname is not set\n");
@@ -263,13 +266,15 @@
rc=SHGetFileInfoA(notepad, GetFileAttributes(notepad),
&shfi, sizeof(shfi),
SHGFI_ICONLOCATION | SHGFI_USEFILEATTRIBUTES);
- ok(rc, "SHGetFileInfoA(%s, SHGFI_USEFILEATTRIBUTES) failed\n", notepad);
+ ok(rc && rc < 0x8000, "SHGetFileInfoA(%s, SHGFI_USEFILEATTRIBUTES) failed %x\n", notepad, rc);
+ trace("SHGetFileInfoA(%s) %x\n", notepad, rc);
strcpy(shfi2.szDisplayName, "dummy");
shfi2.iIcon=0xdeadbeef;
rc2=SHGetFileInfoA(notepad, 0,
&shfi2, sizeof(shfi2),
SHGFI_ICONLOCATION);
- ok(rc2, "SHGetFileInfoA(%s) failed\n", notepad);
+ ok(rc2 && rc2 < 0x8000, "SHGetFileInfoA(%s) failed %x\n", notepad, rc2);
+ trace("SHGetFileInfoA(%s) %x\n", notepad, rc2);
if (rc && rc2)
{
ok(lstrcmpi(shfi2.szDisplayName, shfi.szDisplayName) == 0, "wrong display name %s != %s\n", shfi.szDisplayName, shfi2.szDisplayName);
@@ -283,18 +288,29 @@
rc=SHGetFileInfoA("test4.txt", GetFileAttributes("test4.txt"),
&shfi, sizeof(shfi),
SHGFI_ICONLOCATION | SHGFI_USEFILEATTRIBUTES);
- ok(rc, "SHGetFileInfoA(test4.txt/, SHGFI_USEFILEATTRIBUTES) failed\n");
+ ok(rc && rc < 0x8000, "SHGetFileInfoA(test4.txt/, SHGFI_USEFILEATTRIBUTES) failed %x\n", rc);
+ trace("SHGetFileInfoA(test4.txt) %x\n", rc);
strcpy(shfi2.szDisplayName, "dummy");
shfi2.iIcon=0xdeadbeef;
rc2=SHGetFileInfoA("test4.txt", 0,
&shfi2, sizeof(shfi2),
SHGFI_ICONLOCATION);
- ok(rc2, "SHGetFileInfoA(test4.txt/) failed\n");
+ ok(rc2 && rc2 < 0x8000, "SHGetFileInfoA(test4.txt/) failed %x\n", rc2);
+ trace("SHGetFileInfoA(test4.txt) %x\n", rc2);
if (rc && rc2)
{
ok(lstrcmpi(shfi2.szDisplayName, shfi.szDisplayName) == 0, "wrong display name %s != %s\n", shfi.szDisplayName, shfi2.szDisplayName);
ok(shfi2.iIcon == shfi.iIcon, "wrong icon index %d != %d\n", shfi.iIcon, shfi2.iIcon);
}
+ /* with root directory now */
+ strcpy(shfi.szDisplayName, "dummy");
+ strcpy(shfi.szTypeName, "dummy");
+ shfi.hIcon=(void*) 0xdeadbeef;
+ shfi.iIcon=0xdeadbeef;
+ shfi.dwAttributes=0xdeadbeef;
+ rc=SHGetFileInfoA("c:\\", 0, &shfi, sizeof(shfi),
+ SHGFI_TYPENAME | SHGFI_DISPLAYNAME | SHGFI_ICON | SHGFI_SMALLICON);
+ trace("SHGetFileInfoA(c:\\) %d\n", rc);
}
static void test_get_file_info_iconlist(void)