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

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

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

Go to the source code of this file.

Data Structures

struct  ENUMERATE_NT4
 

Macros

#define PENUMERATE_DEFINED
 Make sure the PENUMERATE is correctly defined.
 

Typedefs

typedef struct ENUMERATE_NT4PENUMERATE
 pointer to a ENUMERATE_WDM or ENUMERATE_NT4 struct
 
typedef struct ENUMERATE_NT4 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 nt4/PortEnum.c.

Typedef Documentation

typedef struct ENUMERATE_NT4 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. Because of this, we define it here for cbm4nt.sys, so that the driver successfully loads

Definition at line 303 of file nt4/PortEnum.c.

References DBG_ASSERT, and FUNC_ENTER.

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 196 of file nt4/PortEnum.c.

References DBG_ASSERT, and FUNC_ENTER.

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 264 of file nt4/PortEnum.c.

References DBG_ASSERT, FUNC_ENTER, and FUNC_LEAVE.

Referenced by ParPortEnumerateOpen().

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 74 of file nt4/PortEnum.c.

References DBG_PREFIX, DBG_WARN, FUNC_ENTER, MTAG_SENUMERATE, and ParPortEnumerateClose().