Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
wolInit.cpp File Reference
#include <snmp.h>
#include <winreg.h>
#include <atlbase.h>
#include <atlcom.h>
#include <stdio.h>
#include <stdarg.h>
#include "wolSetup.h"
#include "wolapi/wolapi.h"

Go to the source code of this file.

Classes

class  OLEInitializer
 

Macros

#define WIN32_LEAN_AND_MEAN
 
#define GENERALS_REG_KEY_TOP   "HKEY_LOCAL_MACHINE"
 Registry base.
 
#define GENERALS_REG_KEY_PATH   "SOFTWARE\\Westwood\\Generals"
 Generals registry key.
 
#define GENERALS_REG_KEY_BOTTOM   GENERALS_REG_KEY_PATH "\\"
 Generals registry key with trailing backslashes.
 
#define GENERALS_REG_KEY_VERSION   "Version"
 Version registry key.
 
#define GENERALS_REG_KEY_SKU   "SKU"
 SKU registry key.
 
#define GENERALS_REG_KEY_NAME   "Name"
 Product name registry key.
 
#define GENERALS_REG_KEY_INSTALLPATH   "InstallPath"
 Install path registry key.
 
#define GENERALS_REG_KEY_SERIAL   "Serial"
 Serial # registry key.
 
#define GENERALS_REG_KEY   GENERALS_REG_KEY_TOP "\\" GENERALS_REG_KEY_BOTTOM
 Full Generals registry path.
 
#define WOLAPI_REG_KEY_TOP   "HKEY_LOCAL_MACHINE"
 Registry base.
 
#define WOLAPI_REG_KEY_PATH   "SOFTWARE\\Westwood\\WOLAPI"
 WOLAPI registry key.
 
#define WOLAPI_REG_KEY_BOTTOM   WOLAPI_REG_KEY_PATH "\\"
 WOLAPI registry key with trailing backslashes.
 
#define WOLAPI_REG_KEY_VERSION   "Version"
 Version registry key.
 
#define WOLAPI_REG_KEY_INSTALLPATH   "InstallPath"
 Install path registry key.
 
#define WOLAPI_REG_KEY   WOLAPI_REG_KEY_TOP "\\" WOLAPI_REG_KEY_BOTTOM
 Full WOLAPI registry path.
 
#define DLL_REG_KEY_TOP   "HKEY_CLASSES_ROOT"
 Registry base.
 
#define DLL_REG_KEY_PATH   "CLSID\\{18FD6763-F5EA-4fa5-B2A9-668554152FAE}\\InprocServer32"
 WOLAPI registry key.
 
#define DLL_REG_KEY_BOTTOM   DLL_REG_KEY_PATH "\\"
 WOLAPI registry key with trailing backslashes.
 
#define DLL_REG_KEY_LOCATION   ""
 Version registry key.
 

Functions

void getPathsFromRegistry (void)
 
void setupGenerals (const char *genPath, const char *genSerial)
 
void checkInstalledWolapiVersion (void)
 

Variables

CComModule _Module
 
unsigned long g_wolapiRegistryVersion = 0
 
unsigned long g_wolapiRealVersion = 0
 
bool g_wolapiInstalled = false
 
char g_wolapiRegFilename [MAX_PATH]
 
char g_wolapiRealFilename [MAX_PATH]
 
char g_generalsFilename [MAX_PATH]
 
char g_generalsSerial [1024]
 
OLEInitializer g_OLEInitializer
 
IChatg_pChat = NULL
 

Macro Definition Documentation

◆ DLL_REG_KEY_BOTTOM

#define DLL_REG_KEY_BOTTOM   DLL_REG_KEY_PATH "\\"

WOLAPI registry key with trailing backslashes.

Definition at line 66 of file wolInit.cpp.

◆ DLL_REG_KEY_LOCATION

#define DLL_REG_KEY_LOCATION   ""

Version registry key.

Definition at line 67 of file wolInit.cpp.

◆ DLL_REG_KEY_PATH

#define DLL_REG_KEY_PATH   "CLSID\\{18FD6763-F5EA-4fa5-B2A9-668554152FAE}\\InprocServer32"

WOLAPI registry key.

Definition at line 65 of file wolInit.cpp.

◆ DLL_REG_KEY_TOP

#define DLL_REG_KEY_TOP   "HKEY_CLASSES_ROOT"

Registry base.

Definition at line 64 of file wolInit.cpp.

◆ GENERALS_REG_KEY

#define GENERALS_REG_KEY   GENERALS_REG_KEY_TOP "\\" GENERALS_REG_KEY_BOTTOM

Full Generals registry path.

Definition at line 55 of file wolInit.cpp.

◆ GENERALS_REG_KEY_BOTTOM

#define GENERALS_REG_KEY_BOTTOM   GENERALS_REG_KEY_PATH "\\"

Generals registry key with trailing backslashes.

Definition at line 49 of file wolInit.cpp.

◆ GENERALS_REG_KEY_INSTALLPATH

#define GENERALS_REG_KEY_INSTALLPATH   "InstallPath"

Install path registry key.

Definition at line 53 of file wolInit.cpp.

◆ GENERALS_REG_KEY_NAME

#define GENERALS_REG_KEY_NAME   "Name"

Product name registry key.

Definition at line 52 of file wolInit.cpp.

◆ GENERALS_REG_KEY_PATH

#define GENERALS_REG_KEY_PATH   "SOFTWARE\\Westwood\\Generals"

Generals registry key.

Definition at line 48 of file wolInit.cpp.

◆ GENERALS_REG_KEY_SERIAL

#define GENERALS_REG_KEY_SERIAL   "Serial"

Serial # registry key.

Definition at line 54 of file wolInit.cpp.

◆ GENERALS_REG_KEY_SKU

#define GENERALS_REG_KEY_SKU   "SKU"

SKU registry key.

Definition at line 51 of file wolInit.cpp.

◆ GENERALS_REG_KEY_TOP

#define GENERALS_REG_KEY_TOP   "HKEY_LOCAL_MACHINE"

Registry base.

Definition at line 47 of file wolInit.cpp.

◆ GENERALS_REG_KEY_VERSION

#define GENERALS_REG_KEY_VERSION   "Version"

Version registry key.

Definition at line 50 of file wolInit.cpp.

◆ WIN32_LEAN_AND_MEAN

#define WIN32_LEAN_AND_MEAN

Definition at line 24 of file wolInit.cpp.

◆ WOLAPI_REG_KEY

#define WOLAPI_REG_KEY   WOLAPI_REG_KEY_TOP "\\" WOLAPI_REG_KEY_BOTTOM

Full WOLAPI registry path.

Definition at line 62 of file wolInit.cpp.

◆ WOLAPI_REG_KEY_BOTTOM

#define WOLAPI_REG_KEY_BOTTOM   WOLAPI_REG_KEY_PATH "\\"

WOLAPI registry key with trailing backslashes.

Definition at line 59 of file wolInit.cpp.

◆ WOLAPI_REG_KEY_INSTALLPATH

#define WOLAPI_REG_KEY_INSTALLPATH   "InstallPath"

Install path registry key.

Definition at line 61 of file wolInit.cpp.

◆ WOLAPI_REG_KEY_PATH

#define WOLAPI_REG_KEY_PATH   "SOFTWARE\\Westwood\\WOLAPI"

WOLAPI registry key.

Definition at line 58 of file wolInit.cpp.

◆ WOLAPI_REG_KEY_TOP

#define WOLAPI_REG_KEY_TOP   "HKEY_LOCAL_MACHINE"

Registry base.

Definition at line 57 of file wolInit.cpp.

◆ WOLAPI_REG_KEY_VERSION

#define WOLAPI_REG_KEY_VERSION   "Version"

Version registry key.

Definition at line 60 of file wolInit.cpp.

Function Documentation

◆ checkInstalledWolapiVersion()

void checkInstalledWolapiVersion ( void )

checkInstalledWolapiVersion inits WOLAPI if possible and gets its version number. It also saves off its install path from the registry.

Definition at line 191 of file wolInit.cpp.

◆ getPathsFromRegistry()

void getPathsFromRegistry ( void )

Definition at line 69 of file wolInit.cpp.

◆ setupGenerals()

void setupGenerals ( const char * genPath,
const char * genSerial )

Definition at line 140 of file wolInit.cpp.

Variable Documentation

◆ _Module

CComModule _Module

Definition at line 183 of file wolInit.cpp.

◆ g_generalsFilename

char g_generalsFilename[MAX_PATH]

Definition at line 44 of file wolInit.cpp.

◆ g_generalsSerial

char g_generalsSerial[1024]

Definition at line 45 of file wolInit.cpp.

◆ g_OLEInitializer

OLEInitializer g_OLEInitializer

Definition at line 182 of file wolInit.cpp.

◆ g_pChat

IChat* g_pChat = NULL

Definition at line 185 of file wolInit.cpp.

◆ g_wolapiInstalled

bool g_wolapiInstalled = false

Definition at line 41 of file wolInit.cpp.

◆ g_wolapiRealFilename

char g_wolapiRealFilename[MAX_PATH]

Definition at line 43 of file wolInit.cpp.

◆ g_wolapiRealVersion

unsigned long g_wolapiRealVersion = 0

Definition at line 40 of file wolInit.cpp.

◆ g_wolapiRegFilename

char g_wolapiRegFilename[MAX_PATH]

Definition at line 42 of file wolInit.cpp.

◆ g_wolapiRegistryVersion

unsigned long g_wolapiRegistryVersion = 0

Definition at line 39 of file wolInit.cpp.