SHELL32: Get current directory during tests on win9x too.

Saulius Krasuckas saulius2 at
Thu Jun 9 04:11:44 CDT 2005

To succeed on win9x GetCurrentDirectoryW() requires MSLU to be
installed and to be linked to.  Otherwise the function returns an
error with GLE==120 (call not implemented), thus leaving all the
cCurrDirW[MAX_PATH] uninitialized (filled with {'c'} at startup on my
win9x box), so subsequent call to strcatW() trashes stack of a test

* Get current directory during tests on win9x too.

Index: dlls/shell32/tests/shlfolder.c
RCS file: /home/wine/wine/dlls/shell32/tests/shlfolder.c,v
retrieving revision 1.8
diff -u -p -r1.8 shlfolder.c
--- dlls/shell32/tests/shlfolder.c      7 Jun 2005 20:30:30 -0000       1.8
+++ dlls/shell32/tests/shlfolder.c      9 Jun 2005 08:06:50 -0000
@@ -219,11 +219,13 @@ START_TEST(shlfolder)
    IShellFolder *IDesktopFolder, *testIShellFolder;
+    char  cCurrDirA [MAX_PATH] = {0};
    WCHAR cCurrDirW [MAX_PATH];
    static const WCHAR cTestDirW[] = {'\\','t','e','s','t','d','i','r',0};
    HRESULT hr;

-    GetCurrentDirectoryW(MAX_PATH, cCurrDirW);
+    GetCurrentDirectoryA(MAX_PATH, cCurrDirA);
+    MultiByteToWideChar(CP_ACP, 0, cCurrDirA, -1, cCurrDirW, MAX_PATH);
    strcatW(cCurrDirW, cTestDirW);


More information about the wine-patches mailing list