14const GUID GUID_NULL = {0x00000000L, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}};
15const GUID KSMEDIUMSETID_Standard = {0x4747B320L, 0x62CE, 0x11CF, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}};
98 DPRINT(
"KsReleaseDevice\n");
205 ListEntry = ListEntry->
Flink;
403 IN PFNKSCONTEXT_DISPATCH PowerDispatch
OPTIONAL,
461 IN PKSOBJECT_CREATE_ITEM ItemsList)
480 Entry->ReferenceCount = 0;
504 if (
Entry->ItemFreeCallback)
559 Header->BasicHeader.Parent.KsDevice = &
Header->KsDevice;
562 if (ItemsCount && ItemsList)
569 Header->ItemListCount = ItemsCount;
676 if (ItemsCount && ItemsList)
693 IoStack->
FileObject->FsContext2 = ObjectHeader;
761 while(
Entry != ListHead)
810 DPRINT(
"KsAddObjectCreateItemToDeviceHeader entered\n");
832 DPRINT(
"KsAddObjectCreateItemToDeviceHeader Status %x\n",
Status);
854 DPRINT(
"KsAddObjectCreateItemToDeviceHeader entered\n");
888 IN PKSOBJECT_CREATE_ITEM CreateItem,
890 IN PFNKSITEMFREECALLBACK ItemFreeCallback
OPTIONAL)
894 PKSOBJECT_CREATE_ITEM
Item;
927 Item->Context = CreateItem->Context;
928 Item->Create = CreateItem->Create;
929 Item->Flags = CreateItem->Flags;
930 Item->SecurityDescriptor = CreateItem->SecurityDescriptor;
931 Item->ObjectClass.Length = 0;
932 Item->ObjectClass.MaximumLength = CreateItem->ObjectClass.MaximumLength;
936 if (!
Item->ObjectClass.Buffer)
948 if (ItemFreeCallback)
951 ItemFreeCallback =
NULL;
975 IN PKSOBJECT_CREATE_ITEM CreateItem)
991 KSOBJECT_CREATE_ITEM
Item;
1010 KSOBJECT_CREATE_ITEM
Item;
1172 Irp->AssociatedIrp.SystemBuffer = InBuffer;
1275 PathAdjusted =
TRUE;
1374 DPRINT1(
"FileObject not attached!\n");
1381 if (!DriverObjectExtension)
1383 DPRINT1(
"No DriverObjectExtension!\n");
1392 DPRINT1(
"failed to allocate KO_OBJECT_HEADER\n");
1449 PKSOBJECT_CREATE_ITEM CreateItem;
1559 DPRINT1(
"Setting KS function handlers\n");
1626 IKsDevice *KsDevice;
1629 DPRINT(
"KsAcquireDevice\n");
1636 KsDevice->lpVtbl->AcquireDevice(KsDevice);
1647 IKsDevice *KsDevice;
1654 KsDevice->lpVtbl->ReleaseDevice(KsDevice);
1666 IKsDevice *KsDevice;
1671 DeviceHeader = DeviceExtension->DeviceHeader;
1683 KsDevice->lpVtbl->Release(KsDevice);
1844 IN ULONG MaxMappingsByteCount,
1898 IN PKSAUTOMATION_TABLE AutomationTableA
OPTIONAL,
1899 IN PKSAUTOMATION_TABLE AutomationTableB
OPTIONAL)
1904 if (!AutomationTableA)
1905 return AutomationTableB->MethodSetsCount;
1907 if (!AutomationTableB)
1908 return AutomationTableA->MethodSetsCount;
1911 DPRINT(
"AutomationTableA MethodItemSize %lu MethodSetsCount %lu\n", AutomationTableA->MethodItemSize, AutomationTableA->MethodSetsCount);
1912 DPRINT(
"AutomationTableB MethodItemSize %lu MethodSetsCount %lu\n", AutomationTableB->MethodItemSize, AutomationTableB->MethodSetsCount);
1914 if (AutomationTableA->MethodItemSize && AutomationTableB->MethodItemSize)
1917 ASSERT(AutomationTableA->MethodItemSize == AutomationTableB->MethodItemSize);
1921 Count = AutomationTableA->MethodSetsCount;
1928 for(SubIndex = 0; SubIndex < AutomationTableA->MethodSetsCount; SubIndex++)
1947 IN PKSAUTOMATION_TABLE AutomationTableA
OPTIONAL,
1948 IN PKSAUTOMATION_TABLE AutomationTableB
OPTIONAL)
1953 if (!AutomationTableA)
1954 return AutomationTableB->EventSetsCount;
1956 if (!AutomationTableB)
1957 return AutomationTableA->EventSetsCount;
1959 DPRINT(
"AutomationTableA EventItemSize %lu EventSetsCount %lu\n", AutomationTableA->EventItemSize, AutomationTableA->EventSetsCount);
1960 DPRINT(
"AutomationTableB EventItemSize %lu EventSetsCount %lu\n", AutomationTableB->EventItemSize, AutomationTableB->EventSetsCount);
1962 if (AutomationTableA->EventItemSize && AutomationTableB->EventItemSize)
1965 ASSERT(AutomationTableA->EventItemSize == AutomationTableB->EventItemSize);
1969 Count = AutomationTableA->EventSetsCount;
1976 for(SubIndex = 0; SubIndex < AutomationTableA->EventSetsCount; SubIndex++)
1996 IN PKSAUTOMATION_TABLE AutomationTableA
OPTIONAL,
1997 IN PKSAUTOMATION_TABLE AutomationTableB
OPTIONAL)
2002 if (!AutomationTableA)
2003 return AutomationTableB->PropertySetsCount;
2005 if (!AutomationTableB)
2006 return AutomationTableA->PropertySetsCount;
2009 DPRINT(
"AutomationTableA PropertyItemSize %lu PropertySetsCount %lu\n", AutomationTableA->PropertyItemSize, AutomationTableA->PropertySetsCount);
2010 DPRINT(
"AutomationTableB PropertyItemSize %lu PropertySetsCount %lu\n", AutomationTableB->PropertyItemSize, AutomationTableB->PropertySetsCount);
2011 ASSERT(AutomationTableA->PropertyItemSize == AutomationTableB->PropertyItemSize);
2014 Count = AutomationTableA->PropertySetsCount;
2021 for(SubIndex = 0; SubIndex < AutomationTableA->PropertySetsCount; SubIndex++)
2023 if (
IsEqualGUIDAligned(AutomationTableB->PropertySets[
Index].Set, AutomationTableA->PropertySets[SubIndex].Set))
2041 IN PKSAUTOMATION_TABLE AutomationTableA
OPTIONAL,
2042 IN PKSAUTOMATION_TABLE AutomationTableB
OPTIONAL)
2047 if (!AutomationTableA)
2050 RtlMoveMemory((
PVOID)
Table->MethodSets, AutomationTableB->MethodSets,
sizeof(KSMETHOD_SET) * AutomationTableB->MethodSetsCount);
2053 else if (!AutomationTableB)
2056 RtlMoveMemory((
PVOID)
Table->MethodSets, AutomationTableA->MethodSets,
sizeof(KSMETHOD_SET) * AutomationTableA->MethodSetsCount);
2061 RtlMoveMemory((
PVOID)
Table->MethodSets, AutomationTableA->MethodSets,
sizeof(KSMETHOD_SET) * AutomationTableA->MethodSetsCount);
2063 Count = AutomationTableA->MethodSetsCount;
2071 for(SubIndex = 0; SubIndex < AutomationTableA->MethodSetsCount; SubIndex++)
2094 OUT PKSPROPERTY_SET OutPropertySet,
2098 PKSPROPERTY_ITEM CurrentPropertyItem;
2102 CurrentPropertyItem = (PKSPROPERTY_ITEM)OutPropertySet->PropertyItem;
2103 for(
Index = 0; Index < OutPropertySet->PropertiesCount;
Index++)
2105 if (CurrentPropertyItem->PropertyId ==
PropertyItem->PropertyId)
2112 CurrentPropertyItem = (PKSPROPERTY_ITEM)((
ULONG_PTR)CurrentPropertyItem + PropertyItemSize);
2116 OutPropertySet->PropertiesCount++;
2122 OUT PKSPROPERTY_SET OutPropertySet,
2123 IN PKSPROPERTY_SET PropertySetA,
2124 IN PKSPROPERTY_SET PropertySetB,
2132 PropertyCount = PropertySetA->PropertiesCount + PropertySetB->PropertiesCount;
2156 OutPropertySet->PropertiesCount = PropertySetA->PropertiesCount;
2160 CurrentPropertyItem = (PKSPROPERTY_ITEM)PropertySetB->PropertyItem;
2161 for(
Index = 0; Index < PropertySetB->PropertiesCount;
Index++)
2168 CurrentPropertyItem = (PKSPROPERTY_ITEM)((
ULONG_PTR)CurrentPropertyItem +
Table->PropertyItemSize);
2179 IN PKSAUTOMATION_TABLE AutomationTableA
OPTIONAL,
2180 IN PKSAUTOMATION_TABLE AutomationTableB
OPTIONAL,
2187 if (!AutomationTableA)
2190 RtlMoveMemory((
PVOID)
Table->PropertySets, AutomationTableB->PropertySets,
sizeof(KSPROPERTY_SET) * AutomationTableB->PropertySetsCount);
2193 else if (!AutomationTableB)
2196 RtlMoveMemory((
PVOID)
Table->PropertySets, AutomationTableA->PropertySets,
sizeof(KSPROPERTY_SET) * AutomationTableA->PropertySetsCount);
2201 RtlMoveMemory((
PVOID)
Table->PropertySets, AutomationTableA->PropertySets,
sizeof(KSPROPERTY_SET) * AutomationTableA->PropertySetsCount);
2203 Count = AutomationTableA->PropertySetsCount;
2211 for(SubIndex = 0; SubIndex < AutomationTableA->PropertySetsCount; SubIndex++)
2213 if (
IsEqualGUIDAligned(AutomationTableB->PropertySets[
Index].Set, AutomationTableA->PropertySets[SubIndex].Set))
2230 Status =
KspMergePropertySet(
Table, (PKSPROPERTY_SET)&
Table->PropertySets[SubIndex], (PKSPROPERTY_SET)&AutomationTableA->PropertySets[SubIndex], (PKSPROPERTY_SET)&AutomationTableB->PropertySets[
Index], Bag);
2246 IN PKSAUTOMATION_TABLE AutomationTableA
OPTIONAL,
2247 IN PKSAUTOMATION_TABLE AutomationTableB
OPTIONAL)
2252 if (!AutomationTableA)
2255 RtlMoveMemory((
PVOID)
Table->EventSets, AutomationTableB->EventSets,
sizeof(KSEVENT_SET) * AutomationTableB->EventSetsCount);
2258 else if (!AutomationTableB)
2261 RtlMoveMemory((
PVOID)
Table->EventSets, AutomationTableA->EventSets,
sizeof(KSEVENT_SET) * AutomationTableA->EventSetsCount);
2266 RtlMoveMemory((
PVOID)
Table->EventSets, AutomationTableA->EventSets,
sizeof(KSEVENT_SET) * AutomationTableA->EventSetsCount);
2268 Count = AutomationTableA->EventSetsCount;
2276 for(SubIndex = 0; SubIndex < AutomationTableA->EventSetsCount; SubIndex++)
2304 OUT PKSAUTOMATION_TABLE *AutomationTableAB,
2305 IN PKSAUTOMATION_TABLE AutomationTableA
OPTIONAL,
2306 IN PKSAUTOMATION_TABLE AutomationTableB
OPTIONAL,
2309 PKSAUTOMATION_TABLE
Table;
2312 if (!AutomationTableA && !AutomationTableB)
2339 if (
Table->PropertySetsCount)
2341 if (AutomationTableA)
2344 Table->PropertyItemSize = AutomationTableA->PropertyItemSize;
2349 Table->PropertyItemSize = AutomationTableB->PropertyItemSize;
2352 if (AutomationTableA && AutomationTableB)
2355 ASSERT(AutomationTableA->PropertyItemSize == AutomationTableB->PropertyItemSize);
2361 if (!
Table->PropertySets)
2388 if (
Table->MethodSetsCount)
2390 if (AutomationTableA)
2393 Table->MethodItemSize = AutomationTableA->MethodItemSize;
2398 Table->MethodItemSize = AutomationTableB->MethodItemSize;
2404 if (!
Table->MethodSets)
2431 if (
Table->EventSetsCount)
2433 if (AutomationTableA)
2436 Table->EventItemSize = AutomationTableA->EventItemSize;
2441 Table->EventItemSize = AutomationTableB->EventItemSize;
2447 if (!
Table->EventSets)
2471 *AutomationTableAB =
Table;
2480 if (
Table->PropertySets)
2487 if (
Table->MethodSets)
2494 if (
Table->EventSets)
2531 ClientUnknown->lpVtbl->AddRef(ClientUnknown);
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
PRTL_UNICODE_STRING_BUFFER Path
#define InterlockedIncrement
NTSTATUS NTAPI KsAddItemToObjectBag(IN KSOBJECT_BAG ObjectBag, IN PVOID Item, IN PFNKSFREE Free OPTIONAL)
KSDDKAPI ULONG NTAPI KsRemoveItemFromObjectBag(IN KSOBJECT_BAG ObjectBag, IN PVOID Item, IN BOOLEAN Free)
PDEVICE_OBJECT PhysicalDeviceObject
#define FILE_DEVICE_SECURE_OPEN
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
#define STATUS_DEVICE_REMOVED
#define STATUS_NOT_IMPLEMENTED
#define NT_SUCCESS(StatCode)
static void cleanup(void)
static const WCHAR SymbolicLink[]
struct _BEEP_DEVICE_EXTENSION * PDEVICE_EXTENSION
NTSTATUS NTAPI CompleteRequest(IN PIRP Irp, IN NTSTATUS Status, IN ULONG_PTR Information)
COMDDKAPI NTSTATUS NTAPI KoDeviceInitialize(IN PDEVICE_OBJECT DeviceObject)
NTSTATUS NTAPI KsMergeAutomationTables(OUT PKSAUTOMATION_TABLE *AutomationTableAB, IN PKSAUTOMATION_TABLE AutomationTableA OPTIONAL, IN PKSAUTOMATION_TABLE AutomationTableB OPTIONAL, IN KSOBJECT_BAG Bag OPTIONAL)
KSDDKAPI VOID NTAPI KsAcquireDeviceSecurityLock(IN KSDEVICE_HEADER DevHeader, IN BOOLEAN Exclusive)
KSDDKAPI NTSTATUS NTAPI KsAddObjectCreateItemToObjectHeader(IN KSOBJECT_HEADER ObjectHeader, IN PDRIVER_DISPATCH Create, IN PVOID Context, IN PWCHAR ObjectClass, IN PSECURITY_DESCRIPTOR SecurityDescriptor)
ULONG KspCountEventSets(IN PKSAUTOMATION_TABLE AutomationTableA OPTIONAL, IN PKSAUTOMATION_TABLE AutomationTableB OPTIONAL)
KSDDKAPI NTSTATUS NTAPI KsDefaultDispatchPnp(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
NTSTATUS KspAddCreateItemToList(OUT PLIST_ENTRY ListHead, IN ULONG ItemsCount, IN PKSOBJECT_CREATE_ITEM ItemsList)
KSDDKAPI void NTAPI KsDeviceRegisterAdapterObject(IN PKSDEVICE Device, IN PADAPTER_OBJECT AdapterObject, IN ULONG MaxMappingsByteCount, IN ULONG MappingTableStride)
NTSTATUS NTAPI KopAddDevice(IN PDRIVER_OBJECT DriverObject, IN PDEVICE_OBJECT PhysicalDeviceObject)
KSDDKAPI NTSTATUS NTAPI KsForwardIrp(IN PIRP Irp, IN PFILE_OBJECT FileObject, IN BOOLEAN ReuseStackLocation)
KSDDKAPI VOID NTAPI KsRecalculateStackDepth(IN KSDEVICE_HEADER Header, IN BOOLEAN ReuseStackLocation)
KSDDKAPI NTSTATUS NTAPI KsCreateDefaultSecurity(IN PSECURITY_DESCRIPTOR ParentSecurity OPTIONAL, OUT PSECURITY_DESCRIPTOR *DefaultSecurity)
NTSTATUS KspCopyPropertySets(OUT PKSAUTOMATION_TABLE Table, IN PKSAUTOMATION_TABLE AutomationTableA OPTIONAL, IN PKSAUTOMATION_TABLE AutomationTableB OPTIONAL, IN KSOBJECT_BAG Bag OPTIONAL)
NTSTATUS NTAPI KspSynchronousIoControlDeviceCompletion(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PVOID Context)
NTSTATUS KspMergePropertySet(OUT PKSAUTOMATION_TABLE Table, OUT PKSPROPERTY_SET OutPropertySet, IN PKSPROPERTY_SET PropertySetA, IN PKSPROPERTY_SET PropertySetB, IN KSOBJECT_BAG Bag OPTIONAL)
KSDDKAPI ACCESS_MASK NTAPI KsQueryObjectAccessMask(IN KSOBJECT_HEADER Header)
NTSTATUS NTAPI DllInitialize(PUNICODE_STRING RegistryPath)
KSDDKAPI VOID NTAPI KsAcquireControl(IN PVOID Object)
KSDDKAPI VOID NTAPI KsFreeObjectHeader(IN PVOID Header)
KSDDKAPI NTSTATUS NTAPI KsFreeObjectCreateItemsByContext(IN KSDEVICE_HEADER Header, IN PVOID Context)
NTSTATUS NTAPI KspSetGetBusDataCompletion(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PVOID Context)
KSDDKAPI PVOID NTAPI KsGetFirstChild(IN PVOID Object)
VOID NTAPI KsReleaseControl(IN PVOID Object)
KSDDKAPI VOID NTAPI KsSetDevicePnpAndBaseObject(IN KSDEVICE_HEADER Header, IN PDEVICE_OBJECT PnpDeviceObject, IN PDEVICE_OBJECT BaseDevice)
KSDDKAPI PDEVICE_OBJECT NTAPI KsQueryDevicePnpObject(IN KSDEVICE_HEADER Header)
KSDDKAPI VOID NTAPI KsSetTargetDeviceObject(IN KSOBJECT_HEADER Header, IN PDEVICE_OBJECT TargetDevice OPTIONAL)
KSDDKAPI VOID NTAPI KsReleaseDeviceSecurityLock(IN KSDEVICE_HEADER DevHeader)
KSDDKAPI VOID NTAPI KsTerminateDevice(IN PDEVICE_OBJECT DeviceObject)
KSDDKAPI NTSTATUS NTAPI KsCacheMedium(IN PUNICODE_STRING SymbolicLink, IN PKSPIN_MEDIUM Medium, IN ULONG PinDirection)
NTSTATUS KspAddObjectCreateItemToList(PLIST_ENTRY ListHead, IN PDRIVER_DISPATCH Create, IN PVOID Context, IN PWCHAR ObjectClass, IN PSECURITY_DESCRIPTOR SecurityDescriptor)
KSDDKAPI VOID NTAPI KsSetPowerDispatch(IN KSOBJECT_HEADER Header, IN PFNKSCONTEXT_DISPATCH PowerDispatch OPTIONAL, IN PVOID PowerContext OPTIONAL)
KSDDKAPI NTSTATUS NTAPI KsSynchronousIoControlDevice(IN PFILE_OBJECT FileObject, IN KPROCESSOR_MODE RequestorMode, IN ULONG IoControl, IN PVOID InBuffer, IN ULONG InSize, OUT PVOID OutBuffer, IN ULONG OutSize, OUT PULONG BytesReturned)
KSDDKAPI PKSOBJECT_CREATE_ITEM NTAPI KsQueryObjectCreateItem(IN KSOBJECT_HEADER Header)
KSDDKAPI NTSTATUS NTAPI KsAllocateDeviceHeader(OUT KSDEVICE_HEADER *OutHeader, IN ULONG ItemsCount, IN PKSOBJECT_CREATE_ITEM ItemsList OPTIONAL)
KSDDKAPI NTSTATUS NTAPI KsForwardAndCatchIrp(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PFILE_OBJECT FileObject, IN KSSTACK_USE StackUse)
KSDDKAPI NTSTATUS NTAPI KsAcquireResetValue(IN PIRP Irp, OUT KSRESET *ResetValue)
KSDDKAPI NTSTATUS NTAPI KsUnserializeObjectPropertiesFromRegistry(IN PFILE_OBJECT FileObject, IN HANDLE ParentKey OPTIONAL, IN PUNICODE_STRING RegistryPath OPTIONAL)
KSDDKAPI NTSTATUS NTAPI KsAddObjectCreateItemToDeviceHeader(IN KSDEVICE_HEADER DevHeader, IN PDRIVER_DISPATCH Create, IN PVOID Context, IN PWCHAR ObjectClass, IN PSECURITY_DESCRIPTOR SecurityDescriptor)
KSDDKAPI VOID NTAPI KsFreeDeviceHeader(IN KSDEVICE_HEADER DevHeader)
KSDDKAPI PUNKNOWN NTAPI KsRegisterAggregatedClientUnknown(IN PVOID Object, IN PUNKNOWN ClientUnknown)
NTSTATUS KspCopyEventSets(OUT PKSAUTOMATION_TABLE Table, IN PKSAUTOMATION_TABLE AutomationTableA OPTIONAL, IN PKSAUTOMATION_TABLE AutomationTableB OPTIONAL)
VOID NTAPI KsReleaseDevice(IN PKSDEVICE Device)
VOID KspAddPropertyItem(OUT PKSPROPERTY_SET OutPropertySet, IN PKSPROPERTY_ITEM PropertyItem, IN ULONG PropertyItemSize)
KSDDKAPI NTSTATUS NTAPI KsFreeObjectCreateItem(IN KSDEVICE_HEADER Header, IN PUNICODE_STRING CreateItem)
NTSTATUS NTAPI KopDispatchClose(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
KSDDKAPI NTSTATUS NTAPI KsDefaultForwardIrp(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
KSDDKAPI ULONG NTAPI KsDeviceGetBusData(IN PKSDEVICE Device, IN ULONG DataType, IN PVOID Buffer, IN ULONG Offset, IN ULONG Length)
NTSTATUS KspCopyMethodSets(OUT PKSAUTOMATION_TABLE Table, IN PKSAUTOMATION_TABLE AutomationTableA OPTIONAL, IN PKSAUTOMATION_TABLE AutomationTableB OPTIONAL)
VOID KspFreeCreateItems(PLIST_ENTRY ListHead)
KSDDKAPI ULONG NTAPI KsDeviceSetBusData(IN PKSDEVICE Device, IN ULONG DataType, IN PVOID Buffer, IN ULONG Offset, IN ULONG Length)
KSDDKAPI VOID NTAPI KsCompletePendingRequest(IN PIRP Irp)
KSDDKAPI PVOID NTAPI KsGetNextSibling(IN PVOID Object)
NTSTATUS KspDeviceSetGetBusData(IN PDEVICE_OBJECT DeviceObject, IN ULONG DataType, IN PVOID Buffer, IN ULONG Offset, IN ULONG Length, IN BOOL bGet)
KSDDKAPI VOID NTAPI KsSetTargetState(IN KSOBJECT_HEADER Header, IN KSTARGET_STATE TargetState)
static KSDISPATCH_TABLE KoDispatchTable
COMDDKAPI NTSTATUS NTAPI KoDriverInitialize(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPathName, IN KoCreateObjectHandler CreateObjectHandler)
KSDDKAPI NTSTATUS NTAPI KsAllocateObjectHeader(OUT KSOBJECT_HEADER *Header, IN ULONG ItemsCount, IN PKSOBJECT_CREATE_ITEM ItemsList OPTIONAL, IN PIRP Irp, IN KSDISPATCH_TABLE *Table)
KSDDKAPI NTSTATUS NTAPI KsDefaultDispatchPower(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
ULONG KspCountPropertySets(IN PKSAUTOMATION_TABLE AutomationTableA OPTIONAL, IN PKSAUTOMATION_TABLE AutomationTableB OPTIONAL)
NTSTATUS KspObjectFreeCreateItems(IN KSDEVICE_HEADER Header, IN PKSOBJECT_CREATE_ITEM CreateItem)
NTSTATUS NTAPI KopDispatchCreate(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
KSDDKAPI NTSTATUS NTAPI KsAllocateObjectCreateItem(IN KSDEVICE_HEADER DevHeader, IN PKSOBJECT_CREATE_ITEM CreateItem, IN BOOLEAN AllocateEntry, IN PFNKSITEMFREECALLBACK ItemFreeCallback OPTIONAL)
NTSTATUS NTAPI KsRegisterFilterWithNoKSPins(IN PDEVICE_OBJECT DeviceObject, IN const GUID *InterfaceClassGUID, IN ULONG PinCount, IN BOOL *PinDirection, IN KSPIN_MEDIUM *MediumList, IN GUID *CategoryList OPTIONAL)
const GUID KSMEDIUMSETID_Standard
ULONG KspCountMethodSets(IN PKSAUTOMATION_TABLE AutomationTableA OPTIONAL, IN PKSAUTOMATION_TABLE AutomationTableB OPTIONAL)
COMDDKAPI VOID NTAPI KoRelease(IN REFCLSID ClassId)
KSDDKAPI VOID NTAPI KsAcquireDevice(IN PKSDEVICE Device)
KSDDKAPI VOID NTAPI KsDereferenceBusObject(IN KSDEVICE_HEADER Header)
KSDDKAPI NTSTATUS NTAPI KsDispatchInvalidDeviceRequest(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
KSDDKAPI NTSTATUS NTAPI KsSetMajorFunctionHandler(IN PDRIVER_OBJECT DriverObject, IN ULONG MajorFunction)
KSDDKAPI BOOLEAN NTAPI KsDispatchFastReadFailure(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN BOOLEAN Wait, IN ULONG LockKey, OUT PVOID Buffer, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject)
KSDDKAPI NTSTATUS NTAPI KsDispatchSetSecurity(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
KSDDKAPI NTSTATUS NTAPI KsDispatchQuerySecurity(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
KSDDKAPI VOID NTAPI KsNullDriverUnload(IN PDRIVER_OBJECT DriverObject)
KSDDKAPI BOOLEAN NTAPI KsDispatchFastIoDeviceControlFailure(IN PFILE_OBJECT FileObject, IN BOOLEAN Wait, IN PVOID InputBuffer OPTIONAL, IN ULONG InputBufferLength, OUT PVOID OutputBuffer OPTIONAL, IN ULONG OutputBufferLength, IN ULONG IoControlCode, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject)
static PVOID Mapping[EMS_PHYSICAL_PAGES]
#define RemoveEntryList(Entry)
#define InsertTailList(ListHead, Entry)
#define IsListEmpty(ListHead)
#define KeWaitForSingleObject(pEvt, foo, a, b, c)
#define KeInitializeEvent(pEvt, foo, foo2)
NTSTATUS RtlAppendUnicodeToString(IN PUNICODE_STRING Str1, IN PWSTR Str2)
#define KeSetEvent(pEvt, foo, foo2)
struct _IO_STATUS_BLOCK * PIO_STATUS_BLOCK
#define ExAcquireResourceExclusiveLite(res, wait)
#define RemoveHeadList(ListHead)
#define InitializeListHead(ListHead)
#define ExAcquireResourceSharedLite(res, wait)
VOID NTAPI ProbeForRead(IN CONST VOID *Address, IN SIZE_T Length, IN ULONG Alignment)
_Inout_ PLIST_ENTRY _In_ PVOID _In_ PSTRING _In_ BOOLEAN _In_ BOOLEAN _In_ ULONG _In_ PFLT_CALLBACK_DATA _In_opt_ PCHECK_FOR_TRAVERSE_ACCESS _In_opt_ PSECURITY_SUBJECT_CONTEXT SubjectContext
__in PWDFDEVICE_INIT __in BOOLEAN Exclusive
#define OBJ_KERNEL_HANDLE
#define OBJ_CASE_INSENSITIVE
NTSYSAPI NTSTATUS WINAPI RtlStringFromGUID(REFGUID, PUNICODE_STRING)
#define EXCEPTION_EXECUTE_HANDLER
#define IoSetCompletionRoutine(_Irp, _CompletionRoutine, _Context, _InvokeOnSuccess, _InvokeOnError, _InvokeOnCancel)
NTSTATUS(* KoCreateObjectHandler)(IN REFCLSID ClassId, IN IUnknown *UnkOuter OPTIONAL, IN REFIID InterfaceId, OUT PVOID *Interface)
#define KOSTRING_CreateObject
#define KeLeaveCriticalRegion()
#define KeEnterCriticalRegion()
KSIDENTIFIER KSPIN_MEDIUM
@ KsObjectTypeFilterFactory
#define IOCTL_KS_READ_STREAM
#define IOCTL_KS_WRITE_STREAM
PVOID AllocateItem(IN POOL_TYPE PoolType, IN SIZE_T NumberOfBytes)
VOID FreeItem(IN PVOID Item)
struct KSBASIC_HEADER * PKSBASIC_HEADER
struct KSIOBJECT_HEADER * PKSIOBJECT_HEADER
struct KO_OBJECT_HEADER * PKO_OBJECT_HEADER
struct CREATE_ITEM_ENTRY * PCREATE_ITEM_ENTRY
struct KO_DRIVER_EXTENSION * PKO_DRIVER_EXTENSION
struct KSIDEVICE_HEADER * PKSIDEVICE_HEADER
static OUT PIO_STATUS_BLOCK IoStatusBlock
#define InitializeObjectAttributes(p, n, a, r, s)
_Inout_opt_ PDEVICE_OBJECT _Inout_opt_ PDEVICE_OBJECT * FunctionalDeviceObject
_Inout_opt_ PDEVICE_OBJECT _Inout_opt_ PDEVICE_OBJECT _Inout_opt_ PDEVICE_OBJECT * NextDeviceObject
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
NTSYSAPI VOID NTAPI RtlCopyUnicodeString(PUNICODE_STRING DestinationString, PUNICODE_STRING SourceString)
NTSYSAPI NTSTATUS NTAPI RtlAppendUnicodeStringToString(PUNICODE_STRING Destination, PUNICODE_STRING Source)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
_In_ ULONG _In_ ULONG Offset
_In_ ULONG _In_ ULONG _In_ ULONG Length
#define IoSkipCurrentIrpStackLocation(Irp)
VOID FASTCALL ExReleaseResourceLite(IN PERESOURCE Resource)
PDEVICE_OBJECT NTAPI IoAttachDeviceToDeviceStack(IN PDEVICE_OBJECT SourceDevice, IN PDEVICE_OBJECT TargetDevice)
NTSTATUS NTAPI IoCreateDevice(IN PDRIVER_OBJECT DriverObject, IN ULONG DeviceExtensionSize, IN PUNICODE_STRING DeviceName, IN DEVICE_TYPE DeviceType, IN ULONG DeviceCharacteristics, IN BOOLEAN Exclusive, OUT PDEVICE_OBJECT *DeviceObject)
PDEVICE_OBJECT NTAPI IoGetRelatedDeviceObject(IN PFILE_OBJECT FileObject)
VOID NTAPI IoDetachDevice(IN PDEVICE_OBJECT TargetDevice)
VOID NTAPI IoDeleteDevice(IN PDEVICE_OBJECT DeviceObject)
NTSTATUS NTAPI IoOpenDeviceInterfaceRegistryKey(IN PUNICODE_STRING SymbolicLinkName, IN ACCESS_MASK DesiredAccess, OUT PHANDLE DeviceInterfaceKey)
NTSTATUS NTAPI IoGetDeviceInterfaces(IN CONST GUID *InterfaceClassGuid, IN PDEVICE_OBJECT PhysicalDeviceObject OPTIONAL, IN ULONG Flags, OUT PWSTR *SymbolicLinkList)
PVOID NTAPI IoGetDriverObjectExtension(IN PDRIVER_OBJECT DriverObject, IN PVOID ClientIdentificationAddress)
NTSTATUS NTAPI IoAllocateDriverObjectExtension(IN PDRIVER_OBJECT DriverObject, IN PVOID ClientIdentificationAddress, IN ULONG DriverObjectExtensionSize, OUT PVOID *DriverObjectExtension)
PGENERIC_MAPPING NTAPI IoGetFileObjectGenericMapping(VOID)
PIRP NTAPI IoAllocateIrp(IN CCHAR StackSize, IN BOOLEAN ChargeQuota)
PIRP NTAPI IoBuildDeviceIoControlRequest(IN ULONG IoControlCode, IN PDEVICE_OBJECT DeviceObject, IN PVOID InputBuffer, IN ULONG InputBufferLength, IN PVOID OutputBuffer, IN ULONG OutputBufferLength, IN BOOLEAN InternalDeviceIoControl, IN PKEVENT Event, IN PIO_STATUS_BLOCK IoStatusBlock)
VOID NTAPI IoFreeIrp(IN PIRP Irp)
VOID NTAPI KeInitializeMutex(IN PKMUTEX Mutex, IN ULONG Level)
LONG NTAPI KeReleaseMutex(IN PKMUTEX Mutex, IN BOOLEAN Wait)
VOID NTAPI PoStartNextPowerIrp(IN PIRP Irp)
#define STATUS_INVALID_PARAMETER_4
#define STATUS_INVALID_PARAMETER_2
#define STATUS_ALLOTTED_SPACE_EXCEEDED
#define STATUS_INVALID_PARAMETER_1
#define STATUS_INVALID_PARAMETER_5
#define _SEH2_GetExceptionCode()
#define _SEH2_EXCEPT(...)
#define IRP_MJ_DEVICE_CONTROL
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
_In_ UCHAR _In_ ULONG _Out_ PUCHAR _Outptr_result_bytebuffer_ OutBufferLength PVOID * OutBuffer
#define STATUS_MORE_PROCESSING_REQUIRED
PULONG MinorVersion OPTIONAL
_In_ const GUID _In_ ULONG PinCount
PKSOBJECT_CREATE_ITEM CreateItem
LIST_ENTRY ObjectItemList
PFNKSITEMFREECALLBACK ItemFreeCallback
base of all file and directory entries
KoCreateObjectHandler CreateObjectHandler
struct _IO_STACK_LOCATION::@1580::@1581 DeviceIoControl
struct _IO_STACK_LOCATION::@3979::@4008 ReadWriteConfig
union _IO_STACK_LOCATION::@1580 Parameters
struct _IO_STACK_LOCATION::@3979::@3980 Create
struct _LIST_ENTRY * Flink
VOID NTAPI SeReleaseSubjectContext(_In_ PSECURITY_SUBJECT_CONTEXT SubjectContext)
Releases both the primary and client tokens of a security subject context.
VOID NTAPI SeCaptureSubjectContext(_Out_ PSECURITY_SUBJECT_CONTEXT SubjectContext)
Captures the security subject context of the calling thread and calling process.
#define RTL_CONSTANT_STRING(s)
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define RtlMoveMemory(Destination, Source, Length)
#define CONTAINING_RECORD(address, type, field)
#define STATUS_INVALID_PARAMETER
#define STATUS_UNSUCCESSFUL
#define STATUS_OBJECT_NAME_COLLISION
#define STATUS_INSUFFICIENT_RESOURCES
_Must_inspect_result_ _In_ WDFDEVICE Device
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
_In_ WDFCOLLECTION _In_ ULONG Index
_In_ WDFCOLLECTION _In_ WDFOBJECT Item
_In_ PDEVICE_OBJECT DeviceObject
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
_In_ WDF_POWER_DEVICE_STATE TargetState
_Must_inspect_result_ _In_ WDFDEVICE _In_ CONST GUID * InterfaceClassGUID
_In_ UCHAR _In_ UCHAR MinorFunction
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_ ULONG _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_opt_ PULONG_PTR BytesReturned
_Must_inspect_result_ _In_opt_ WDFKEY ParentKey
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
#define IsEqualGUIDAligned(guid1, guid2)
_In_ USHORT _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR _Reserved_ ULONG _In_opt_ PVOID _In_opt_ const WSK_CLIENT_CONNECTION_DISPATCH _In_opt_ PEPROCESS _In_opt_ PETHREAD _In_opt_ PSECURITY_DESCRIPTOR SecurityDescriptor
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetNextIrpStackLocation(_In_ PIRP Irp)
_In_opt_ PDEVICE_OBJECT _In_ ULONG _Outptr_result_nullonfailure_ _At_ * SymbolicLinkList(return==0, __drv_allocatesMem(Mem))) PZZWSTR *SymbolicLinkList
_Must_inspect_result_ __drv_aliasesMem PDEVICE_OBJECT _In_ PDEVICE_OBJECT TargetDevice
#define DEVICE_INTERFACE_INCLUDE_NONACTIVE
#define IRP_MN_READ_CONFIG
#define IRP_MN_WRITE_CONFIG
#define IRP_MN_REMOVE_DEVICE
DRIVER_DISPATCH * PDRIVER_DISPATCH
#define IRP_MJ_SYSTEM_CONTROL