Author: cwittich
Date: Wed Apr 22 19:58:37 2009
New Revision: 40651
URL:
http://svn.reactos.org/svn/reactos?rev=40651&view=rev
Log:
sync advapi32/cred.c to wine 1.1.19
Modified:
trunk/reactos/dll/win32/advapi32/sec/cred.c
Modified: trunk/reactos/dll/win32/advapi32/sec/cred.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/sec/cre…
==============================================================================
--- trunk/reactos/dll/win32/advapi32/sec/cred.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/advapi32/sec/cred.c [iso-8859-1] Wed Apr 22 19:58:37 2009
@@ -67,7 +67,7 @@
struct ustring data;
struct ustring key;
- ret = RegQueryValueExW(hkey, wszPasswordValue, 0, &type,
(LPVOID)credential_blob,
+ ret = RegQueryValueExW(hkey, wszPasswordValue, 0, &type, credential_blob,
credential_blob_size);
if (ret != ERROR_SUCCESS)
return ret;
@@ -161,10 +161,7 @@
ret = RegQueryValueExW(hkey, wszUserNameValue, 0, &type,
(LPVOID)credential->UserName,
&count);
if (ret == ERROR_FILE_NOT_FOUND)
- {
credential->UserName = NULL;
- ret = ERROR_SUCCESS;
- }
else if (ret != ERROR_SUCCESS)
return ret;
else if (type != REG_SZ)
@@ -182,10 +179,7 @@
credential->CredentialBlob = (LPBYTE)buffer;
ret = read_credential_blob(hkey, key_data, credential->CredentialBlob,
&count);
if (ret == ERROR_FILE_NOT_FOUND)
- {
credential->CredentialBlob = NULL;
- ret = ERROR_SUCCESS;
- }
else if (ret != ERROR_SUCCESS)
return ret;
credential->CredentialBlobSize = count;
@@ -459,7 +453,7 @@
data.Buffer = encrypted_credential_blob;
SystemFunction032(&data, &key);
- ret = RegSetValueExW(hkey, wszPasswordValue, 0, REG_BINARY,
(LPVOID)encrypted_credential_blob, credential_blob_size);
+ ret = RegSetValueExW(hkey, wszPasswordValue, 0, REG_BINARY,
encrypted_credential_blob, credential_blob_size);
HeapFree(GetProcessHeap(), 0, encrypted_credential_blob);
return ret;
@@ -646,7 +640,7 @@
memcpy(key_data, my_key_data, KEY_SIZE);
count = KEY_SIZE;
- ret = RegQueryValueExW(hkeyMgr, wszEncryptionKeyValue, NULL, &type,
(LPVOID)key_data,
+ ret = RegQueryValueExW(hkeyMgr, wszEncryptionKeyValue, NULL, &type, key_data,
&count);
if (ret == ERROR_SUCCESS)
{
@@ -667,14 +661,14 @@
*(DWORD *)(key_data + 4) = value;
ret = RegSetValueExW(hkeyMgr, wszEncryptionKeyValue, 0, REG_BINARY,
- (LPVOID)key_data, KEY_SIZE);
+ key_data, KEY_SIZE);
if (ret == ERROR_ACCESS_DENIED)
{
ret = open_cred_mgr_key(&hkeyMgr, TRUE);
if (ret == ERROR_SUCCESS)
{
ret = RegSetValueExW(hkeyMgr, wszEncryptionKeyValue, 0, REG_BINARY,
- (LPVOID)key_data, KEY_SIZE);
+ key_data, KEY_SIZE);
RegCloseKey(hkeyMgr);
}
}