+ 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 common.
+ 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.
Thank you for suggestions. I fixed the problems.
W dniu 05.06.2011 22:26, Vincent Povirk pisze:
/* 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
Testing of registering custom folders is implemented in patch I did not submit yet. I think I will simply move test of setting path to (or after) that patch.