summaryrefslogtreecommitdiff
path: root/plugins/MirOTR/Libgcrypt
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-03-21 13:59:25 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-03-21 13:59:25 +0000
commit71b72fcfba5cbfc960ea92f670036982f18aea69 (patch)
treecac33fa61d680d2e83bdec16897837c8a88a0862 /plugins/MirOTR/Libgcrypt
parentf6ccc9a04a25f10090c2619f07956b87a18311ce (diff)
- removed debugging using MessageBox
- massive Windows-specific code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@12467 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirOTR/Libgcrypt')
-rw-r--r--plugins/MirOTR/Libgcrypt/random/rndw32.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/plugins/MirOTR/Libgcrypt/random/rndw32.c b/plugins/MirOTR/Libgcrypt/random/rndw32.c
index c495131de8..5f988026e1 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 = GetModuleHandle ("AdvAPI32.dll");
+ hAdvAPI32 = GetModuleHandleA("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, INTEL_DEF_PROV,
+ || !pCryptAcquireContext (&hRNGProv, NULL, _T(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 = OpenFileMapping (FILE_MAP_READ, FALSE, "$M$B$M$5$S$D$" );
+ hMBMData = OpenFileMappingA(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 = RegQueryValueEx (HKEY_PERFORMANCE_DATA, "Global", NULL,
+ status = RegQueryValueExA(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 (RegOpenKeyEx (HKEY_LOCAL_MACHINE,
+ if (RegOpenKeyExA(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 = RegQueryValueEx (hKey, "ProductType", 0, NULL,
+ status = RegQueryValueExA(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 = LoadLibrary ("NETAPI32.DLL");
+ hNetAPI32 = LoadLibraryA("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 = GetModuleHandle ("NTDll.dll");
+ hNTAPI = GetModuleHandleA("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 = CreateFile (szDevice, 0, FILE_SHARE_READ | FILE_SHARE_WRITE,
+ hDevice = CreateFileA(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;
- DWORD minimumWorkingSetSize, maximumWorkingSetSize;
+ SIZE_T minimumWorkingSetSize, maximumWorkingSetSize;
handle = GetCurrentThread ();
GetThreadTimes (handle, &creationTime, &exitTime,