22 #define PENUMERATE_DEFINED
23 typedef struct ENUMERATE_WDM *PENUMERATE;
24 #include "cbm_driver.h"
66 PENUMERATE enumStruct;
73 DBG_IRQL( < DISPATCH_LEVEL);
74 enumStruct = ExAllocatePoolWithTag(PagedPool,
81 enumStruct->CurrentSymbolicLink = NULL;
85 DBG_IRQL( == PASSIVE_LEVEL);
86 ntStatus = IoGetDeviceInterfaces(&GUID_PARALLEL_DEVICE,
89 &enumStruct->SymbolicLinkList);
93 ntStatus = STATUS_INSUFFICIENT_RESOURCES;
98 if (!NT_SUCCESS(ntStatus))
107 DBG_IRQL( < DISPATCH_LEVEL);
108 ExFreePool(enumStruct);
114 *EnumStruct = enumStruct;
116 FUNC_LEAVE_NTSTATUS(ntStatus);
148 DBG_ASSERT(EnumStruct->SymbolicLinkList != NULL);
152 if (EnumStruct->CurrentSymbolicLink == NULL)
156 EnumStruct->CurrentSymbolicLink = EnumStruct->SymbolicLinkList;
162 EnumStruct->CurrentSymbolicLink += wcslen(EnumStruct->CurrentSymbolicLink)+1;
167 *DriverName = EnumStruct->CurrentSymbolicLink;
169 FUNC_LEAVE_NTSTATUS((**DriverName) ? STATUS_SUCCESS : STATUS_NO_MORE_ENTRIES);
193 DBG_ASSERT(EnumStruct->SymbolicLinkList != NULL);
197 DBG_IRQL( < DISPATCH_LEVEL);
198 ExFreePool(EnumStruct->SymbolicLinkList);
199 ExFreePool(EnumStruct);
201 DBGDO(EnumStruct = NULL;)
217 FUNC_LEAVE_NTSTATUS(IoOpenDeviceRegistryKey(a, b, c, d));
NTSTATUS CbmOpenDeviceRegistryKey(IN PDEVICE_OBJECT a, IN ULONG b, IN ACCESS_MASK c, OUT PHANDLE d)
Stub for a function.
NTSTATUS ParPortEnumerate(PENUMERATE EnumStruct, PCWSTR *DriverName)
Get next enumerated parallel port driver.
VOID ParPortEnumerateClose(PENUMERATE EnumStruct)
Stop enumeration of the parallel port drivers.
NTSTATUS ParPortEnumerateOpen(PENUMERATE *EnumStruct)
Start enumeration of the parallel port drivers.
struct ENUMERATE_WDM ENUMERATE
struct ENUMERATE_WDM * PENUMERATE
pointer to a ENUMERATE_WDM or ENUMERATE_NT4 struct
PWSTR CurrentSymbolicLink