advapi32: Cast-qual warnings fix.

This commit is contained in:
Andrew Talbot 2006-08-25 22:14:38 +01:00 committed by Alexandre Julliard
parent 4c4c583f53
commit 9959d7e37f
3 changed files with 7 additions and 6 deletions

View File

@ -1819,7 +1819,8 @@ BOOL WINAPI CryptSetProviderExW (LPCWSTR pszProvName, DWORD dwProvType, DWORD *p
}
CRYPT_Free(keyname);
if (RegSetValueExW(hTypeKey, nameW, 0, REG_SZ, (LPBYTE)pszProvName, (strlenW(pszProvName) + 1)*sizeof(WCHAR)))
if (RegSetValueExW(hTypeKey, nameW, 0, REG_SZ, (const BYTE *)pszProvName,
(strlenW(pszProvName) + 1)*sizeof(WCHAR)))
{
RegCloseKey(hTypeKey);
RegCloseKey(hProvKey);

View File

@ -50,7 +50,7 @@ static void CRYPT_LMhash( unsigned char *dst, const unsigned char *pwd, const in
NTSTATUS WINAPI SystemFunction006( LPCSTR password, LPSTR hash )
{
CRYPT_LMhash( (unsigned char*)hash, (unsigned char*)password, strlen(password) );
CRYPT_LMhash( (unsigned char*)hash, (const unsigned char*)password, strlen(password) );
return STATUS_SUCCESS;
}

View File

@ -373,7 +373,7 @@ HANDLE WINAPI RegisterEventSourceW( LPCWSTR lpUNCServerName, LPCWSTR lpSourceNam
BOOL WINAPI ReportEventA ( HANDLE hEventLog, WORD wType, WORD wCategory, DWORD dwEventID,
PSID lpUserSid, WORD wNumStrings, DWORD dwDataSize, LPCSTR *lpStrings, LPVOID lpRawData)
{
LPCWSTR *wideStrArray;
LPWSTR *wideStrArray;
UNICODE_STRING str;
int i;
BOOL ret;
@ -384,17 +384,17 @@ BOOL WINAPI ReportEventA ( HANDLE hEventLog, WORD wType, WORD wCategory, DWORD d
if (wNumStrings == 0) return TRUE;
if (!lpStrings) return TRUE;
wideStrArray = HeapAlloc(GetProcessHeap(), 0, sizeof(LPCWSTR) * wNumStrings);
wideStrArray = HeapAlloc(GetProcessHeap(), 0, sizeof(LPWSTR) * wNumStrings);
for (i = 0; i < wNumStrings; i++)
{
RtlCreateUnicodeStringFromAsciiz(&str, lpStrings[i]);
wideStrArray[i] = str.Buffer;
}
ret = ReportEventW(hEventLog, wType, wCategory, dwEventID, lpUserSid,
wNumStrings, dwDataSize, wideStrArray, lpRawData);
wNumStrings, dwDataSize, (LPCWSTR *)wideStrArray, lpRawData);
for (i = 0; i < wNumStrings; i++)
{
HeapFree( GetProcessHeap(), 0, (LPSTR)wideStrArray[i] );
HeapFree( GetProcessHeap(), 0, wideStrArray[i] );
}
HeapFree(GetProcessHeap(), 0, wideStrArray);
return ret;