OpenCBM
Data Structures | Macros | Typedefs | Functions
wdm/PortEnum.c File Reference

Functions for communicating with the parallel port driver. More...

#include <initguid.h>
#include <wdm.h>
#include "cbm_driver.h"

Go to the source code of this file.

Data Structures

struct  ENUMERATE_WDM
 

Macros

#define PENUMERATE_DEFINED
 Make sure the PENUMERATE is correctly defined.
 

Typedefs

typedef struct ENUMERATE_WDMPENUMERATE
 pointer to a ENUMERATE_WDM or ENUMERATE_NT4 struct
 
typedef struct ENUMERATE_WDM ENUMERATE
 

Functions

NTSTATUS ParPortEnumerateOpen (PENUMERATE *EnumStruct)
 Start enumeration of the parallel port drivers. More...
 
NTSTATUS ParPortEnumerate (PENUMERATE EnumStruct, PCWSTR *DriverName)
 Get next enumerated parallel port driver. More...
 
VOID ParPortEnumerateClose (PENUMERATE EnumStruct)
 Stop enumeration of the parallel port drivers. More...
 
NTSTATUS CbmOpenDeviceRegistryKey (IN PDEVICE_OBJECT a, IN ULONG b, IN ACCESS_MASK c, OUT PHANDLE d)
 Stub for a function. More...
 

Detailed Description

Functions for communicating with the parallel port driver.



Author
Spiro Trikaliotis

Definition in file wdm/PortEnum.c.

Typedef Documentation

typedef struct ENUMERATE_WDM ENUMERATE

This struct is used as internal storage for the ParPortEnumerateOpen()/ParPortEnumerate()/ParPortEnumerateClose() functions

Function Documentation

NTSTATUS CbmOpenDeviceRegistryKey ( IN PDEVICE_OBJECT  a,
IN ULONG  b,
IN ACCESS_MASK  c,
OUT PHANDLE  d 
)

Stub for a function.

This function is not available on NT4, and it is not needed there, but it is needed for WDM. Because of this, we define it here for cbm4wdm.sys, so that the driver works in either case.

Definition at line 213 of file wdm/PortEnum.c.

References FUNC_ENTER.

Referenced by cbm_registry_open_hardwarekey().

NTSTATUS ParPortEnumerate ( PENUMERATE  EnumStruct,
PCWSTR *  DriverName 
)

Get next enumerated parallel port driver.

This function starts the enumeration process of the parallel port drivers

Parameters
EnumStructPointer to a ENUMERATE structure. This is internal storage for these functions.
DriverName;Pointer to a storage area which will contain the next driver implementing this interface.
Returns
If the routine succeeds, it returns STATUS_SUCCESS. Otherwise, it returns one of the error status values.

For enumerating, a caller has to do the following:

Definition at line 143 of file wdm/PortEnum.c.

References DBG_ASSERT, and FUNC_ENTER.

Referenced by DriverEntry().

VOID ParPortEnumerateClose ( PENUMERATE  EnumStruct)

Stop enumeration of the parallel port drivers.

This function stops the enumeration process of the parallel port drivers

Parameters
EnumStructPointer to a ENUMERATE structure, which contains the last enumerated driver

For enumerating, a caller has to do the following:

Definition at line 188 of file wdm/PortEnum.c.

References DBG_ASSERT, DBGDO, FUNC_ENTER, and FUNC_LEAVE.

Referenced by DriverEntry().

NTSTATUS ParPortEnumerateOpen ( PENUMERATE EnumStruct)

Start enumeration of the parallel port drivers.

This function starts the enumeration process of the parallel port drivers

Parameters
EnumStructPointer to a pointer to hold an ENUMERATE structure. This is internal storage for these functions, and it is allocated by this function.
Returns
If the routine succeeds, it returns STATUS_SUCCESS. Otherwise, it returns one of the error status values.

For enumerating, a caller has to do the following:

Definition at line 64 of file wdm/PortEnum.c.

References FUNC_ENTER, and MTAG_SENUMERATE.

Referenced by DriverEntry().