OpenCBM
Macros | Functions
registry.c File Reference

Registry manipulation functions. More...

#include <windows.h>
#include "debug.h"
#include "cbmioctl.h"
#include "libmisc.h"

Go to the source code of this file.

Macros

#define DBG_USERMODE
 
#define DBG_PROGNAME   "OPENCBM-libmisc"
 

Functions

LONG RegGetDWORD (IN HKEY RegKey, IN char *SubKey, OUT LPDWORD Value)
 Get a DWORD value from the registry. More...
 
void cbm_get_debugging_flags (const char *ModuleName)
 Set the debugging flags. More...
 

Detailed Description

Registry manipulation functions.



Author
Spiro Trikaliotis

Definition in file registry.c.

Macro Definition Documentation

#define DBG_PROGNAME   "OPENCBM-libmisc"

The name of the executable

Definition at line 24 of file registry.c.

#define DBG_USERMODE

Mark: We are in user-space (for debug.h)

Definition at line 20 of file registry.c.

Function Documentation

void cbm_get_debugging_flags ( const char *  ModuleName)

Set the debugging flags.

This function gets the debugging flags from the registry. If there are any, it sets the flags to that value.

Definition at line 97 of file registry.c.

References CBM_REGKEY_SERVICE, CBM_REGKEY_SERVICE_DLL_DEBUGFLAGS, cbmlibmisc_strcat(), cbmlibmisc_strdup(), cbmlibmisc_strfree(), DBG_PREFIX, DBG_WARN, DbgFlags, FUNC_ENTER, FUNC_LEAVE, and RegGetDWORD().

Referenced by DllMain().

LONG RegGetDWORD ( IN HKEY  RegKey,
IN char *  SubKey,
OUT LPDWORD  Value 
)

Get a DWORD value from the registry.

This function gets a DWORD value in the registry. It is a simple wrapper for convenience.

Parameters
RegKeyA handle to an already opened registry key.
SubKeyPointer to a null-terminiated string which holds the name of the value to be created or changed.
ValuePointer to a variable which will contain the value from the registry
Returns
ERROR_SUCCESS on success, -1 otherwise

If this function returns -1, the given Value will not be changed at all!

Definition at line 54 of file registry.c.

References DBG_ASSERT, DBG_ERROR, DBG_PREFIX, DBG_SUCCESS, FUNC_ENTER, FUNC_LEAVE_INT, and FUNC_PARAM.

Referenced by cbm_get_debugging_flags(), and IsDriverStartedAutomatically().