* On Mon, 14 May 2007, Juan Lang wrote:
+static const WCHAR Software_Publishing[] = {
- 'S','o','f','t','w','a','r','e','\',
- 'M','i','c','r','o','s','o','f','t','\',
- 'W','i','n','d','o','w','s','\',
- 'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\',
- 'W','i','n','t','r','u','s','t','\',
- 'T','r','u','s','t',' ','P','r','o','v','i','d','e','r','s','\',
- 'S','o','f','t','w','a','r','e',' ',
- 'P','u','b','l','i','s','h','i','n','g',0 };
+static const WCHAR State[] = { 'S','t','a','t','e',0 };
/***********************************************************************
WintrustGetRegPolicyFlags (WINTRUST.@)
*/ void WINAPI WintrustGetRegPolicyFlags( DWORD* pdwPolicyFlags ) {
- FIXME("%p\n", pdwPolicyFlags);
- HKEY key;
- LONG r;
- TRACE("%p\n", pdwPolicyFlags);
- *pdwPolicyFlags = 0;
- r = RegCreateKeyExW(HKEY_CURRENT_USER, Software_Publishing, 0, NULL, 0,
KEY_READ, NULL, &key, NULL);
- if (!r)
- {
DWORD size = sizeof(DWORD);
r = RegQueryValueExW(key, State, NULL, NULL, (LPBYTE)pdwPolicyFlags,
&size);
RegCloseKey(key);
This function tries to open Software_Publishing key. And creates it, if the key didn't exist, I suppose. It is absent in a clean $WINEPREFIX. Hence 4 test failures:
$ wine dlls/wintrust/tests/wintrust_test.exe.so register register.c:327: Test failed: RegOpenKeyEx failed: 2 register.c:331: Test failed: RegQueryValueEx failed: 6 register.c:334: Test failed: Didn't get expected flags register.c:341: Test failed: Didn't get expected flags register: 43 tests executed (0 marked as todo, 4 failures), 0 skipped.
During next run failures are gone, and I get this difference between two registry dumps:
+[HKEY_USERS\S-1-5-4\Software\Microsoft\Windows\CurrentVersion\Wintrust] + +[HKEY_USERS\S-1-5-4\Software\Microsoft\Windows\CurrentVersion\Wintrust\Trust Providers] + +[HKEY_USERS\S-1-5-4\Software\Microsoft\Windows\CurrentVersion\Wintrust\Trust Providers\Software Publishing] +"State"=dword:00023c00
So this key should be registered during wineprefix run at some point, right?
Hi Saulius,
This function tries to open Software_Publishing key. And creates it, if the key didn't exist, I suppose. It is absent in a clean $WINEPREFIX. Hence 4 test failures:
Oops.
During next run failures are gone, and I get this difference between two registry dumps:
Right.
So this key should be registered during wineprefix run at some point, right?
No, it's simpler than that, the order of the tests is merely wrong. WintrustGetRegPolicyFlags calls WintrustSetRegPolicyFlags with the default value if the registry value doesn't exist. The call to WintrustGetRegPolicyFlags (line 333) should precede the RegOpenKeyExW call (line 325-326.)
I'll try to remember to patch it up.. --Juan
____________________________________________________________________________________ Need a vacation? Get great deals to amazing places on Yahoo! Travel. http://travel.yahoo.com/
* On Sun, 3 Jun 2007, Juan Lang wrote:
This function tries to open Software_Publishing key.
...
So this key should be registered during wineprefix run at some point, right?
No, it's simpler than that, the order of the tests is merely wrong. WintrustGetRegPolicyFlags calls WintrustSetRegPolicyFlags with the default value if the registry value doesn't exist. The call to WintrustGetRegPolicyFlags (line 333) should precede the RegOpenKeyExW call (line 325-326.)
Well, I didn't dig into this yet, but on Windows tests aren't failing. So I guess this key arrives during Windows setup process. Can't be so?
Well, I didn't dig into this yet, but on Windows tests aren't failing. So I guess this key arrives during Windows setup process. Can't be so?
You're correct, I'm sure. It's just not that important in Wine, as we don't use these flags yet, so the precise value is perhaps meaningless. Some apps use the API, so it was mostly with the aim of removing a fixme that I implemented it.
--Juan
____________________________________________________________________________________ Shape Yahoo! in your own image. Join our Network Research Panel today! http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7