Warning C4267 'argument': conversion from 'size_t' to 'DWORD', possible loss of data
问题 I am migrating code from 32bit vs2012 to 64bit vs2015. I encountered the following function call in my program: CryptHashData(hHash, (BYTE*)AUTH_ENCRYPTION_KEY, wcslen(AUTH_ENCRYPTION_KEY) * sizeof(wchar_t), 0u)) whose declaration is in wincrypt.h located in c:\Program Files (x86)\Windows Kits\8.0\Include\um\wincrypt.h (looks like not to be edited). The declaration is: WINADVAPI BOOL WINAPI CryptHashData( _In_ HCRYPTHASH hHash, _In_reads_bytes_(dwDataLen) CONST BYTE *pbData, _In_ DWORD