Class TGWIOPM_Driver (unit gwiopm)

Inherits from

TObject

Constructors


constructor Create;

file & pipe -----------------------------------------


Functions

function CloseSCM: DWORD;

-------------------------------------------

function DeviceClose: DWORD;

get a valid hDevice

-------------------------------------------


function DeviceOpen: DWORD;

-------------------------------- Device Open/Close --------------------------------

============================================================= Device Open/Close functions ============================================================= -------------------------------------------


function ErrorLookup(ErrorNum: DWORD): string;

query KIOPM to LIOPM --------------------------------

-----------------------------------------


function Install(newdriverpath: string): DWORD;

--------------------------------------- Install/Start/Stop/Remove driver ---------------------------------------

-----------------------------------------


function IOCTL_IOPMD_ACTIVATE_KIOPM: DWORD;

Interact with kernel IOPM (KIOPM

-------------------------------------------


function IOCTL_IOPMD_CLEAR_LIOPM: DWORD;

Manipulate driver's local IOPM (LIOPM

-------------------------------------------


function IOCTL_IOPMD_DEACTIVATE_KIOPM: DWORD;

copy LIOPM to be active map

-------------------------------------------


function IOCTL_IOPMD_GET_LIOPMA(var A: TIOPM): DWORD;

get a byte from LIOPM (diagnostic

-------------------------------------------


function IOCTL_IOPMD_GET_LIOPMB(Addr: Word; var B: byte): DWORD;

set a byte (8 ports-worth) in LIOPM

-------------------------------------------


function IOCTL_IOPMD_QUERY_KIOPM: DWORD;

tell kernel to forget map

-------------------------------------------


function IOCTL_IOPMD_READ_TEST(var RetVal: DWORD): DWORD;

-------------------------------- IO Permission Map functions -------------------------------- Test functions

-------------------------------------------


function IOCTL_IOPMD_READ_VERSION(var RetVal: DWORD): DWORD;

-------------------------------------------

function IOCTL_IOPMD_SET_LIOPM(Addr: Word; B: byte): DWORD;

set "local" map to block perm for all I/O addr

-------------------------------------------


function LIOPM_Set_Ports(BeginPort: word; EndPort: word; Enable: Boolean): DWORD;

get entire LIOPM array (diagnostic

-------------------------------------------


function OpenSCM: DWORD;

--------------------------------------- Interact with Service Control Manager ---------------------------------------

-------------------------------------------


function Remove: DWORD;

-------------------------------------------

function Start: DWORD;

use '' for default

-------------------------------------------


function Stop: DWORD;

-------------------------------------------

function IOCTL_IOPMD_GET_SET_LIOPM(Addr: Word; var B: byte; cmd: integer): DWORD;

-------------------------------------------

function IOCTL_IOPMD_Misc1(var RetVal: DWORD; Cmd: integer): DWORD;

Handle for device --------------------------------------- private multi-func funcs called by public ones ---------------------------------------

-------------------------------------------


Properties

Events

Variables

LastOutBuf : longint;


DriverDir : string;


DriverName : string;


DriverPath : string;


hDevice : SC_HANDLE;

Service Control Manager

HomeDir : string;


hSCMan : SC_HANDLE;

the whole thing


Constructors


constructor Create;

file & pipe -----------------------------------------


Functions


function CloseSCM: DWORD;

-------------------------------------------


function DeviceClose: DWORD;

get a valid hDevice

-------------------------------------------


function DeviceOpen: DWORD;

-------------------------------- Device Open/Close --------------------------------

============================================================= Device Open/Close functions ============================================================= -------------------------------------------


function ErrorLookup(ErrorNum: DWORD): string;

query KIOPM to LIOPM --------------------------------

-----------------------------------------


function Install(newdriverpath: string): DWORD;

--------------------------------------- Install/Start/Stop/Remove driver ---------------------------------------

-----------------------------------------


function IOCTL_IOPMD_ACTIVATE_KIOPM: DWORD;

Interact with kernel IOPM (KIOPM

-------------------------------------------


function IOCTL_IOPMD_CLEAR_LIOPM: DWORD;

Manipulate driver's local IOPM (LIOPM

-------------------------------------------


function IOCTL_IOPMD_DEACTIVATE_KIOPM: DWORD;

copy LIOPM to be active map

-------------------------------------------


function IOCTL_IOPMD_GET_LIOPMA(var A: TIOPM): DWORD;

get a byte from LIOPM (diagnostic

-------------------------------------------


function IOCTL_IOPMD_GET_LIOPMB(Addr: Word; var B: byte): DWORD;

set a byte (8 ports-worth) in LIOPM

-------------------------------------------


function IOCTL_IOPMD_QUERY_KIOPM: DWORD;

tell kernel to forget map

-------------------------------------------


function IOCTL_IOPMD_READ_TEST(var RetVal: DWORD): DWORD;

-------------------------------- IO Permission Map functions -------------------------------- Test functions

-------------------------------------------


function IOCTL_IOPMD_READ_VERSION(var RetVal: DWORD): DWORD;

-------------------------------------------


function IOCTL_IOPMD_SET_LIOPM(Addr: Word; B: byte): DWORD;

set "local" map to block perm for all I/O addr

-------------------------------------------


function LIOPM_Set_Ports(BeginPort: word; EndPort: word; Enable: Boolean): DWORD;

get entire LIOPM array (diagnostic

-------------------------------------------


function OpenSCM: DWORD;

--------------------------------------- Interact with Service Control Manager ---------------------------------------

-------------------------------------------


function Remove: DWORD;

-------------------------------------------


function Start: DWORD;

use '' for default

-------------------------------------------


function Stop: DWORD;

-------------------------------------------


function IOCTL_IOPMD_GET_SET_LIOPM(Addr: Word; var B: byte; cmd: integer): DWORD;

-------------------------------------------


function IOCTL_IOPMD_Misc1(var RetVal: DWORD; Cmd: integer): DWORD;

Handle for device --------------------------------------- private multi-func funcs called by public ones ---------------------------------------

-------------------------------------------


Properties


Events


Variables


LastOutBuf : longint;


DriverDir : string;


DriverName : string;


DriverPath : string;


hDevice : SC_HANDLE;

Service Control Manager


HomeDir : string;


hSCMan : SC_HANDLE;

the whole thing