diff options
Diffstat (limited to 'plugins/MirOTR')
-rw-r--r-- | plugins/MirOTR/Libgcrypt/random/rndw32.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/plugins/MirOTR/Libgcrypt/random/rndw32.c b/plugins/MirOTR/Libgcrypt/random/rndw32.c index 5f988026e1..c495131de8 100644 --- a/plugins/MirOTR/Libgcrypt/random/rndw32.c +++ b/plugins/MirOTR/Libgcrypt/random/rndw32.c @@ -80,7 +80,7 @@ #include <winsock2.h> #include <windows.h> -#include <tchar.h> + #include "types.h" #include "g10lib.h" @@ -259,7 +259,7 @@ init_system_rng (void) system_rng_available = 0; hRNGProv = NULL; - hAdvAPI32 = GetModuleHandleA("AdvAPI32.dll"); + hAdvAPI32 = GetModuleHandle ("AdvAPI32.dll"); if (!hAdvAPI32) return; @@ -282,7 +282,7 @@ init_system_rng (void) as well, mostly due to virtually nonexistent support/marketing by Intel, it's included here mostly for form's sake. */ if ( (!pCryptAcquireContext || !pCryptGenRandom || !pCryptReleaseContext - || !pCryptAcquireContext (&hRNGProv, NULL, _T(INTEL_DEF_PROV), + || !pCryptAcquireContext (&hRNGProv, NULL, INTEL_DEF_PROV, PROV_INTEL_SEC, 0) ) && !pRtlGenRandom) { @@ -337,7 +337,7 @@ read_mbm_data (void (*add)(const void*, size_t, enum random_origins), HANDLE hMBMData; SharedData *mbmDataPtr; - hMBMData = OpenFileMappingA(FILE_MAP_READ, FALSE, "$M$B$M$5$S$D$" ); + hMBMData = OpenFileMapping (FILE_MAP_READ, FALSE, "$M$B$M$5$S$D$" ); if (hMBMData) { mbmDataPtr = (SharedData*)MapViewOfFile (hMBMData, FILE_MAP_READ,0,0,0); @@ -438,7 +438,7 @@ registry_poll (void (*add)(const void*, size_t, enum random_origins), if ( debug_me ) log_debug ("rndw32#slow_gatherer_nt: get perf data\n" ); - status = RegQueryValueExA(HKEY_PERFORMANCE_DATA, "Global", NULL, + status = RegQueryValueEx (HKEY_PERFORMANCE_DATA, "Global", NULL, NULL, (LPBYTE) pPerfData, &dwSize); if (status == ERROR_SUCCESS) { @@ -501,7 +501,7 @@ slow_gatherer ( void (*add)(const void*, size_t, enum random_origins), if ( debug_me ) log_debug ("rndw32#slow_gatherer: init toolkit\n" ); /* Find out whether this is an NT server or workstation if necessary */ - if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, + if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Control\\ProductOptions", 0, KEY_READ, &hKey) == ERROR_SUCCESS) { @@ -511,7 +511,7 @@ slow_gatherer ( void (*add)(const void*, size_t, enum random_origins), if ( debug_me ) log_debug ("rndw32#slow_gatherer: check product options\n" ); - status = RegQueryValueExA(hKey, "ProductType", 0, NULL, + status = RegQueryValueEx (hKey, "ProductType", 0, NULL, szValue, &dwSize); if (status == ERROR_SUCCESS && stricmp (szValue, "WinNT")) { @@ -530,7 +530,7 @@ slow_gatherer ( void (*add)(const void*, size_t, enum random_origins), /* readPnPData (); - we have not implemented that. */ /* Initialize the NetAPI32 function pointers if necessary */ - hNetAPI32 = LoadLibraryA("NETAPI32.DLL"); + hNetAPI32 = LoadLibrary ("NETAPI32.DLL"); if (hNetAPI32) { if (debug_me) @@ -551,7 +551,7 @@ slow_gatherer ( void (*add)(const void*, size_t, enum random_origins), } /* Initialize the NT kernel native API function pointers if necessary */ - hNTAPI = GetModuleHandleA("NTDll.dll"); + hNTAPI = GetModuleHandle ("NTDll.dll"); if (hNTAPI) { /* Get a pointer to the NT native information query functions */ @@ -604,7 +604,7 @@ slow_gatherer ( void (*add)(const void*, size_t, enum random_origins), /* Check whether we can access this device. */ snprintf (szDevice, sizeof szDevice, "\\\\.\\PhysicalDrive%d", drive_no); - hDevice = CreateFileA(szDevice, 0, FILE_SHARE_READ | FILE_SHARE_WRITE, + hDevice = CreateFile (szDevice, 0, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL); if (hDevice == INVALID_HANDLE_VALUE) break; /* No more drives. */ @@ -888,7 +888,7 @@ _gcry_rndw32_gather_random_fast (void (*add)(const void*, size_t, { HANDLE handle; FILETIME creationTime, exitTime, kernelTime, userTime; - SIZE_T minimumWorkingSetSize, maximumWorkingSetSize; + DWORD minimumWorkingSetSize, maximumWorkingSetSize; handle = GetCurrentThread (); GetThreadTimes (handle, &creationTime, &exitTime, |