cryptlib  3.4.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros
Classes | Macros | Typedefs | Enumerations | Functions
win32.c File Reference
#include "crypt.h"
#include "random/random.h"
#include <tlhelp32.h>
#include <winperf.h>
#include <winioctl.h>
#include <process.h>

Go to the source code of this file.

Classes

struct  SharedIndex
 
struct  SharedSensor
 
struct  SharedInfo
 
struct  SharedData
 
struct  SYSTOOL_SHMEM_SENSOR
 
struct  SYSTOOL_SHMEM
 
struct  RTHM_SHARED_MEMORY_HEADER
 
struct  RTHM_SHARED_MEMORY_ENTRY
 
struct  HMONITOR_DATA
 
struct  TRAY_TOOLS_DATA
 
struct  CORE_TEMP_SHARED_DATA
 
struct  GPUZ_RECORD
 
struct  GPUZ_SENSOR_RECORD
 
struct  GPUZ_SH_MEM
 
struct  _SP_DEVINFO_DATA
 

Macros

#define addRandomHandle   addRandomValue
 
#define RANDOM_BUFSIZE   4096
 
#define SYSTEMRNG_BYTES   64
 
#define PROV_INTEL_SEC   22
 
#define INTEL_DEF_PROV   "Intel Hardware Cryptographic Service Provider"
 
#define HCRYPTPROV   HANDLE
 
#define BusType   char
 
#define SMBType   char
 
#define SensorType   char
 
#define SH_MEM_MAX_SENSORS   128
 
#define MAX_RECORDS   128
 
#define DIGCF_PRESENT   0x02
 
#define DIGCF_ALLCLASSES   0x04
 
#define SPDRP_HARDWAREID   0x01
 
#define BIG_RANDOM_BUFSIZE   ( RANDOM_BUFSIZE * 4 )
 
#define PERFORMANCE_BUFFER_SIZE   65536 /* Start at 64K */
 
#define PERFORMANCE_BUFFER_STEP   16384 /* Step by 16K */
 

Typedefs

typedef LPCTSTR pszContainer
 
typedef LPCTSTR LPCTSTR pszProvider
 
typedef LPCTSTR LPCTSTR DWORD dwProvType
 
typedef LPCTSTR LPCTSTR DWORD DWORD dwFlags
 
typedef DWORD dwLen
 
typedef DWORD BYTEpbBuffer
 
typedef ULONG RandomBufferLength
 
typedef BYTE VARIANT [16]
 
typedef BYTE UINT8
 
typedef WORD UINT16
 
typedef void * HDEVINFO
 
typedef struct _SP_DEVINFO_DATA SP_DEVINFO_DATA
 
typedef struct _SP_DEVINFO_DATAPSP_DEVINFO_DATA
 
typedef DWORD MemberIndex
 
typedef DWORD PSP_DEVINFO_DATA DeviceInfoData
 
typedef void * Enumerator
 
typedef void HWND hwndParent
 
typedef void HWND DWORD Flags
 
typedef PSP_DEVINFO_DATA DWORD Property
 
typedef PSP_DEVINFO_DATA DWORD
PDWORD 
PropertyRegDataType
 
typedef PSP_DEVINFO_DATA DWORD
PDWORD PBYTE 
PropertyBuffer
 
typedef PSP_DEVINFO_DATA DWORD
PDWORD PBYTE DWORD 
PropertyBufferSize
 
typedef PSP_DEVINFO_DATA DWORD
PDWORD PBYTE DWORD PDWORD 
RequiredSize
 
typedef LPMODULEENTRY32 lpme
 
typedef LPTHREADENTRY32 lpte
 
typedef LPPROCESSENTRY32 lppe
 
typedef LPHEAPLIST32 lphl
 
typedef DWORD th32ProcessID
 
typedef DWORD THREAD_ID th32HeapID
 
typedef LPWSTR szService
 
typedef LPWSTR DWORD dwLevel
 
typedef LPWSTR DWORD DWORD dwOptions
 
typedef LPWSTR DWORD DWORD LPBYTE * lpBuffer
 
typedef LPDWORD cbBuffer
 
typedef PVOID systemInformation
 
typedef PVOID ULONG systemInformationLength
 
typedef PVOID ULONG PULONG returnLength
 
typedef DWORD processInformationClass
 
typedef DWORD PVOID processInformation
 
typedef DWORD PVOID ULONG processInformationLength
 
typedef PVOID inputBuffer
 
typedef PVOID ULONG inputBufferLength
 
typedef PVOID ULONG PVOID outputBuffer
 
typedef PVOID ULONG PVOID ULONG outputBufferLength
 

Enumerations

enum  SYSTOOL_SENSOR_TYPE {
  sUnknown, sNumber, sTemperature, sVoltage,
  sRPM, sBytes, sBytesPerSecond, sMhz,
  sPercentage, sString, sPWM
}
 

Functions

typedef BOOL (WINAPI *CRYPTACQUIRECONTEXT)(HCRYPTPROV *phProv
 
typedef HDEVINFO (WINAPI *SETUPDIGETCLASSDEVS)(void *ClassGuid
 
void fastPoll (void)
 
typedef HANDLE (WINAPI *CREATESNAPSHOT)(DWORD dwFlags
 
unsigned __stdcall threadSafeSlowPollWin95 (void *dummy)
 
typedef DWORD (WINAPI *NETSTATISTICSGET)(LPWSTR szServer
 
unsigned __stdcall threadSafeSlowPollWinNT (void *dummy)
 
void slowPoll (void)
 
CHECK_RETVAL int waitforRandomCompletion (const BOOLEAN force)
 
void initRandomPolling (void)
 
void endRandomPolling (void)
 

Macro Definition Documentation

#define addRandomHandle   addRandomValue

Definition at line 56 of file win32.c.

#define BIG_RANDOM_BUFSIZE   ( RANDOM_BUFSIZE * 4 )

Definition at line 1258 of file win32.c.

#define BusType   char

Definition at line 314 of file win32.c.

#define DIGCF_ALLCLASSES   0x04

Definition at line 771 of file win32.c.

#define DIGCF_PRESENT   0x02

Definition at line 770 of file win32.c.

#define HCRYPTPROV   HANDLE

Definition at line 91 of file win32.c.

#define INTEL_DEF_PROV   "Intel Hardware Cryptographic Service Provider"

Definition at line 87 of file win32.c.

#define MAX_RECORDS   128

Definition at line 702 of file win32.c.

#define PERFORMANCE_BUFFER_SIZE   65536 /* Start at 64K */

Definition at line 1524 of file win32.c.

#define PERFORMANCE_BUFFER_STEP   16384 /* Step by 16K */

Definition at line 1525 of file win32.c.

#define PROV_INTEL_SEC   22

Definition at line 86 of file win32.c.

#define RANDOM_BUFSIZE   4096

Definition at line 61 of file win32.c.

#define SensorType   char

Definition at line 316 of file win32.c.

#define SH_MEM_MAX_SENSORS   128

Definition at line 440 of file win32.c.

#define SMBType   char

Definition at line 315 of file win32.c.

#define SPDRP_HARDWAREID   0x01

Definition at line 773 of file win32.c.

#define SYSTEMRNG_BYTES   64

Definition at line 82 of file win32.c.

Typedef Documentation

typedef LPDWORD cbBuffer

Definition at line 1490 of file win32.c.

Definition at line 784 of file win32.c.

typedef DWORD dwFlags

Definition at line 96 of file win32.c.

typedef DWORD dwLen

Definition at line 99 of file win32.c.

typedef LPWSTR DWORD dwLevel

Definition at line 1487 of file win32.c.

typedef LPWSTR DWORD DWORD dwOptions

Definition at line 1487 of file win32.c.

typedef LPCTSTR LPCTSTR DWORD dwProvType

Definition at line 96 of file win32.c.

typedef void* Enumerator

Definition at line 787 of file win32.c.

typedef void HWND DWORD Flags

Definition at line 787 of file win32.c.

typedef void* HDEVINFO

Definition at line 768 of file win32.c.

typedef void HWND hwndParent

Definition at line 787 of file win32.c.

typedef PVOID inputBuffer

Definition at line 1505 of file win32.c.

typedef PVOID ULONG inputBufferLength

Definition at line 1505 of file win32.c.

typedef LPWSTR DWORD DWORD LPBYTE* lpBuffer

Definition at line 1487 of file win32.c.

typedef LPHEAPLIST32 lphl

Definition at line 1234 of file win32.c.

typedef LPMODULEENTRY32 lpme

Definition at line 1231 of file win32.c.

typedef LPPROCESSENTRY32 lppe

Definition at line 1233 of file win32.c.

typedef LPTHREADENTRY32 lpte

Definition at line 1232 of file win32.c.

typedef DWORD MemberIndex

Definition at line 784 of file win32.c.

typedef PVOID ULONG PVOID outputBuffer

Definition at line 1505 of file win32.c.

typedef PVOID ULONG PVOID ULONG outputBufferLength

Definition at line 1505 of file win32.c.

typedef DWORD BYTE* pbBuffer

Definition at line 99 of file win32.c.

typedef DWORD PVOID processInformation

Definition at line 1500 of file win32.c.

Definition at line 1500 of file win32.c.

typedef DWORD PVOID ULONG processInformationLength

Definition at line 1500 of file win32.c.

Definition at line 790 of file win32.c.

typedef PSP_DEVINFO_DATA DWORD PDWORD PBYTE PropertyBuffer

Definition at line 790 of file win32.c.

Definition at line 790 of file win32.c.

Definition at line 790 of file win32.c.

typedef LPCTSTR pszContainer

Definition at line 96 of file win32.c.

typedef LPCTSTR LPCTSTR pszProvider

Definition at line 96 of file win32.c.

typedef ULONG RandomBufferLength

Definition at line 113 of file win32.c.

typedef PSP_DEVINFO_DATA DWORD PDWORD PBYTE DWORD PDWORD RequiredSize

Definition at line 790 of file win32.c.

typedef DWORD PVOID ULONG PULONG returnLength

Definition at line 1496 of file win32.c.

typedef PVOID systemInformation

Definition at line 1496 of file win32.c.

typedef PVOID ULONG systemInformationLength

Definition at line 1496 of file win32.c.

typedef LPWSTR szService

Definition at line 1487 of file win32.c.

typedef DWORD THREAD_ID th32HeapID

Definition at line 1235 of file win32.c.

Definition at line 1235 of file win32.c.

typedef WORD UINT16

Definition at line 438 of file win32.c.

typedef BYTE UINT8

Definition at line 437 of file win32.c.

typedef BYTE VARIANT[16]

Definition at line 436 of file win32.c.

Enumeration Type Documentation

Enumerator:
sUnknown 
sNumber 
sTemperature 
sVoltage 
sRPM 
sBytes 
sBytesPerSecond 
sMhz 
sPercentage 
sString 
sPWM 

Definition at line 442 of file win32.c.

Function Documentation

typedef BOOL ( WINAPI *  CRYPTACQUIRECONTEXT)
typedef DWORD ( WINAPI *  NETSTATISTICSGET)
void endRandomPolling ( void  )

Definition at line 2217 of file win32.c.

void fastPoll ( void  )

Definition at line 873 of file win32.c.

typedef HANDLE ( WINAPI *  CREATESNAPSHOT)
typedef HDEVINFO ( WINAPI *  SETUPDIGETCLASSDEVS)
void initRandomPolling ( void  )

Definition at line 2209 of file win32.c.

void slowPoll ( void  )

Definition at line 2095 of file win32.c.

unsigned __stdcall threadSafeSlowPollWin95 ( void *  dummy)

Definition at line 1475 of file win32.c.

unsigned __stdcall threadSafeSlowPollWinNT ( void *  dummy)

Definition at line 2031 of file win32.c.

CHECK_RETVAL int waitforRandomCompletion ( const BOOLEAN  force)

Definition at line 2162 of file win32.c.