[PATCH 1/4] shell32/tests: basic tests of IKnownFolderManager

Vincent Povirk madewokherd at gmail.com
Sun Jun 5 15:26:16 CDT 2011

+    OleInitialize(NULL);

Any particular reason you're using this instead of CoInitialize? I
don't think there's anything wrong with it, but CoInitialize is more

+            todo_wine
+            ok(cat==KF_CATEGORY_FIXED, "invalid folder category: %d\n", cat);

You'd be using cat uninitialized when the function is not implemented
in Wine. I suggest initializing it to 0 or something. Same with
redirectionCapabilities later.

+            ok(lstrcmpW(sWinDir, folderPath)==0, "invalid path
returned: %s\n", wine_dbgstr_w(folderPath));

It might be useful to print sWinDir as well. If there's some situation
where it's the right path but not quite the same string, that'd be
good to know.

+            /* try to set new path */
+            hr = IKnownFolder_SetPath(folder, 0, sTempDir);
+            todo_wine
+            ok(hr == S_OK, "setting path failed: 0x%08x\n", hr);

I'd suggest making up + registering your own known folder to test this
feature, rather than using a standard one. I worry someone could end
up with a broken Windows install if we fail to put it back somehow.

More information about the wine-devel mailing list