#include <windows.h>
#include <stdio.h>
#include "instcbm.h"
#include <setupapi.h>
#include <cfgmgr32.h>
#include <initguid.h>
#include <ntddpar.h>
#include "debug.h"
Go to the source code of this file.
Defines | |
| #define | DBG_USERMODE |
| #define | DBG_PROGNAME "INSTCBM.EXE" |
| #define | GET_PROC_ADDRESS(_xxx) |
Typedefs | |
| typedef CMAPI CONFIGRET(* | P_CM_Get_Device_ID_ExA )(IN DEVINST dnDevInst, OUT PTCHAR Buffer, IN ULONG BufferLen, IN ULONG ulFlags, IN HMACHINE hMachine) |
| typedef WINSETUPAPI BOOL(* | P_SetupDiGetDeviceInfoListDetailA )(IN HDEVINFO DeviceInfoSet, OUT PSP_DEVINFO_LIST_DETAIL_DATA DeviceInfoSetDetailData) |
| typedef * | PSETUPAPI |
Functions | |
| VOID | CbmParportRestart (VOID) |
| Restart the parallel port. | |
**************************************************************
Definition in file parport.c.
|
|
The name of the executable |
|
|
Mark: We are in user-space (for debug.h) |
|
|
Value: if (SetupApi && SetupApi->HandleSetupApiDll) \ { \ SetupApi->_xxx##_p = (P_##_xxx) GetProcAddress(SetupApi->HandleSetupApiDll, #_xxx); \ \ DBG_SUCCESS((DBG_PREFIX "p_CM_Get_Device_ID_Ex = %p", SetupApi->_xxx##_p)); \ \ if (SetupApi->_xxx##_p == NULL) \ { \ DBG_WARN((DBG_PREFIX "GetProcAddress(\"" #_xxx "\") FAILED!")); \ FreeDynamicalAddresses(SetupApi); \ } \ } |
|
|
Pointer to the CM_Get_Device_ID_Ex function. As this function is not supported on NT4, we have to dynamically get its address, because our driver would refuse to load on NT4 else. |
|
|
Pointer to the SetupDiGetDeviceInfoListDetailA function. As this function is not supported on NT4, we have to dynamically get its address, because our driver would refuse to load on NT4 else. |
|
|
PSETUPAPI is a pointer to SETUAPI |
|
|
Restart the parallel port. This function tries to restart the parallel port, so that registry changes can take effect. Definition at line 142 of file parport.c. References DBG_ASSERT, DBG_ERROR, DBG_PREFIX, DBG_SUCCESS, DBGDO, FUNC_ENTER, and FUNC_LEAVE. Referenced by CbmCheckCorrectInstallation(). |
1.4.2