Ks.h
上传用户:dzyhzl
上传日期:2019-04-29
资源大小:56270k
文件大小:145k
- captured = (BOOLEAN)(InterlockedCompareExchange(&Gate->Count,0,1) == 1);
-
- //
- // If we made a transition, it must be propagated.
- //
- if (captured) {
- KsGateTurnInputOff(Gate->NextGate);
- }
- //
- // We return whatever the state was prior to the compare/exchange. If
- // the state was on, the state is now off.
- //
- return captured;
- }
- void __inline
- KsGateInitialize(
- IN PKSGATE Gate,
- IN LONG InitialCount,
- IN PKSGATE NextGate OPTIONAL,
- IN BOOLEAN StateToPropagate // IN BOOLEAN NextGateIsAnOrGate
- )
- {
- ASSERT(Gate);
- Gate->Count = InitialCount;
- Gate->NextGate = NextGate;
- if (NextGate) {
- if (InitialCount > 0) {
- if (StateToPropagate) {
- KsGateTurnInputOn(NextGate);
- }
- } else {
- if (! StateToPropagate) {
- KsGateTurnInputOff(NextGate);
- }
- }
- }
- }
- void __inline
- KsGateInitializeAnd(
- IN PKSGATE AndGate,
- IN PKSGATE NextOrGate OPTIONAL
- )
- {
- KsGateInitialize(AndGate,1,NextOrGate,TRUE);
- }
- void __inline
- KsGateInitializeOr(
- IN PKSGATE OrGate,
- IN PKSGATE NextAndGate OPTIONAL
- )
- {
- KsGateInitialize(OrGate,0,NextAndGate,FALSE);
- }
- void __inline KsGateAddOnInputToAnd(IN PKSGATE AndGate) { UNREFERENCED_PARAMETER (AndGate); }
- void __inline KsGateAddOffInputToAnd(IN PKSGATE AndGate) { KsGateTurnInputOff(AndGate); }
- void __inline KsGateRemoveOnInputFromAnd(IN PKSGATE AndGate) { UNREFERENCED_PARAMETER (AndGate); }
- void __inline KsGateRemoveOffInputFromAnd(IN PKSGATE AndGate) { KsGateTurnInputOn(AndGate); }
- void __inline KsGateAddOnInputToOr(IN PKSGATE OrGate) { KsGateTurnInputOn(OrGate); }
- void __inline KsGateAddOffInputToOr(IN PKSGATE OrGate) { UNREFERENCED_PARAMETER (OrGate); }
- void __inline KsGateRemoveOnInputFromOr(IN PKSGATE OrGate) { KsGateTurnInputOff(OrGate); }
- void __inline KsGateRemoveOffInputFromOr(IN PKSGATE OrGate) { UNREFERENCED_PARAMETER (OrGate); }
- void __inline
- KsGateTerminateAnd(
- IN PKSGATE AndGate
- )
- {
- ASSERT(AndGate);
- if (KsGateGetStateUnsafe(AndGate)) {
- KsGateRemoveOnInputFromOr(AndGate->NextGate);
- } else {
- KsGateRemoveOffInputFromOr(AndGate->NextGate);
- }
- }
- void __inline
- KsGateTerminateOr(
- IN PKSGATE OrGate
- )
- {
- ASSERT(OrGate);
- if (KsGateGetStateUnsafe(OrGate)) {
- KsGateRemoveOnInputFromAnd(OrGate->NextGate);
- } else {
- KsGateRemoveOffInputFromAnd(OrGate->NextGate);
- }
- }
- #endif // !_NTOS_
- typedef PVOID KSOBJECT_BAG;
- typedef
- BOOLEAN
- (*PFNKSGENERATEEVENTCALLBACK)(
- IN PVOID Context,
- IN PKSEVENT_ENTRY EventEntry
- );
- typedef
- NTSTATUS
- (*PFNKSDEVICECREATE)(
- IN PKSDEVICE Device
- );
- typedef
- NTSTATUS
- (*PFNKSDEVICEPNPSTART)(
- IN PKSDEVICE Device,
- IN PIRP Irp,
- IN PCM_RESOURCE_LIST TranslatedResourceList OPTIONAL,
- IN PCM_RESOURCE_LIST UntranslatedResourceList OPTIONAL
- );
- typedef
- NTSTATUS
- (*PFNKSDEVICE)(
- IN PKSDEVICE Device
- );
- typedef
- NTSTATUS
- (*PFNKSDEVICEIRP)(
- IN PKSDEVICE Device,
- IN PIRP Irp
- );
- typedef
- void
- (*PFNKSDEVICEIRPVOID)(
- IN PKSDEVICE Device,
- IN PIRP Irp
- );
- typedef
- NTSTATUS
- (*PFNKSDEVICEQUERYCAPABILITIES)(
- IN PKSDEVICE Device,
- IN PIRP Irp,
- IN OUT PDEVICE_CAPABILITIES Capabilities
- );
- typedef
- NTSTATUS
- (*PFNKSDEVICEQUERYPOWER)(
- IN PKSDEVICE Device,
- IN PIRP Irp,
- IN DEVICE_POWER_STATE DeviceTo,
- IN DEVICE_POWER_STATE DeviceFrom,
- IN SYSTEM_POWER_STATE SystemTo,
- IN SYSTEM_POWER_STATE SystemFrom,
- IN POWER_ACTION Action
- );
- typedef
- void
- (*PFNKSDEVICESETPOWER)(
- IN PKSDEVICE Device,
- IN PIRP Irp,
- IN DEVICE_POWER_STATE To,
- IN DEVICE_POWER_STATE From
- );
- typedef
- NTSTATUS
- (*PFNKSFILTERFACTORYVOID)(
- IN PKSFILTERFACTORY FilterFactory
- );
- typedef
- void
- (*PFNKSFILTERFACTORYPOWER)(
- IN PKSFILTERFACTORY FilterFactory,
- IN DEVICE_POWER_STATE State
- );
- typedef
- NTSTATUS
- (*PFNKSFILTERIRP)(
- IN PKSFILTER Filter,
- IN PIRP Irp
- );
- typedef
- NTSTATUS
- (*PFNKSFILTERPROCESS)(
- IN PKSFILTER Filter,
- IN PKSPROCESSPIN_INDEXENTRY Index
- );
- typedef
- NTSTATUS
- (*PFNKSFILTERVOID)(
- IN PKSFILTER Filter
- );
- typedef
- void
- (*PFNKSFILTERPOWER)(
- IN PKSFILTER Filter,
- IN DEVICE_POWER_STATE State
- );
- typedef
- NTSTATUS
- (*PFNKSPINIRP)(
- IN PKSPIN Pin,
- IN PIRP Irp
- );
- typedef
- NTSTATUS
- (*PFNKSPINSETDEVICESTATE)(
- IN PKSPIN Pin,
- IN KSSTATE ToState,
- IN KSSTATE FromState
- );
- typedef
- NTSTATUS
- (*PFNKSPINSETDATAFORMAT)(
- IN PKSPIN Pin,
- IN PKSDATAFORMAT OldFormat OPTIONAL,
- IN PKSMULTIPLE_ITEM OldAttributeList OPTIONAL,
- IN const KSDATARANGE* DataRange,
- IN const KSATTRIBUTE_LIST* AttributeRange OPTIONAL
- );
- typedef
- NTSTATUS
- (*PFNKSPINHANDSHAKE)(
- IN PKSPIN Pin,
- IN PKSHANDSHAKE In,
- IN PKSHANDSHAKE Out
- );
- typedef
- NTSTATUS
- (*PFNKSPIN)(
- IN PKSPIN Pin
- );
- typedef
- void
- (*PFNKSPINVOID)(
- IN PKSPIN Pin
- );
- typedef
- void
- (*PFNKSPINPOWER)(
- IN PKSPIN Pin,
- IN DEVICE_POWER_STATE State
- );
- typedef
- BOOLEAN
- (*PFNKSPINSETTIMER)(
- IN PKSPIN Pin,
- IN PKTIMER Timer,
- IN LARGE_INTEGER DueTime,
- IN PKDPC Dpc
- );
- typedef
- BOOLEAN
- (*PFNKSPINCANCELTIMER)(
- IN PKSPIN Pin,
- IN PKTIMER Timer
- );
- typedef
- LONGLONG
- (FASTCALL *PFNKSPINCORRELATEDTIME)(
- IN PKSPIN Pin,
- OUT PLONGLONG SystemTime
- );
- typedef
- void
- (*PFNKSPINRESOLUTION)(
- IN PKSPIN Pin,
- OUT PKSRESOLUTION Resolution
- );
- typedef
- NTSTATUS
- (*PFNKSPININITIALIZEALLOCATOR)(
- IN PKSPIN Pin,
- IN PKSALLOCATOR_FRAMING AllocatorFraming,
- OUT PVOID* Context
- );
- typedef
- void
- (*PFNKSSTREAMPOINTER)(
- IN PKSSTREAM_POINTER StreamPointer
- );
- typedef struct KSAUTOMATION_TABLE_
- KSAUTOMATION_TABLE, *PKSAUTOMATION_TABLE;
- struct KSAUTOMATION_TABLE_ {
- ULONG PropertySetsCount;
- ULONG PropertyItemSize;
- const KSPROPERTY_SET* PropertySets;
- ULONG MethodSetsCount;
- ULONG MethodItemSize;
- const KSMETHOD_SET* MethodSets;
- ULONG EventSetsCount;
- ULONG EventItemSize;
- const KSEVENT_SET* EventSets;
- #if !defined(_WIN64)
- PVOID Alignment;
- #endif // !defined(_WIN64)
- };
- #define DEFINE_KSAUTOMATION_TABLE(table)
- const KSAUTOMATION_TABLE table =
- #define DEFINE_KSAUTOMATION_PROPERTIES(table)
- SIZEOF_ARRAY(table),
- sizeof(KSPROPERTY_ITEM),
- table
- #define DEFINE_KSAUTOMATION_METHODS(table)
- SIZEOF_ARRAY(table),
- sizeof(KSMETHOD_ITEM),
- table
- #define DEFINE_KSAUTOMATION_EVENTS(table)
- SIZEOF_ARRAY(table),
- sizeof(KSEVENT_ITEM),
- table
- #define DEFINE_KSAUTOMATION_PROPERTIES_NULL
- 0,
- sizeof(KSPROPERTY_ITEM),
- NULL
- #define DEFINE_KSAUTOMATION_METHODS_NULL
- 0,
- sizeof(KSMETHOD_ITEM),
- NULL
- #define DEFINE_KSAUTOMATION_EVENTS_NULL
- 0,
- sizeof(KSEVENT_ITEM),
- NULL
- #define MIN_DEV_VER_FOR_QI (0x100)
- struct _KSDEVICE_DISPATCH {
- PFNKSDEVICECREATE Add;
- PFNKSDEVICEPNPSTART Start;
- PFNKSDEVICE PostStart;
- PFNKSDEVICEIRP QueryStop;
- PFNKSDEVICEIRPVOID CancelStop;
- PFNKSDEVICEIRPVOID Stop;
- PFNKSDEVICEIRP QueryRemove;
- PFNKSDEVICEIRPVOID CancelRemove;
- PFNKSDEVICEIRPVOID Remove;
- PFNKSDEVICEQUERYCAPABILITIES QueryCapabilities;
- PFNKSDEVICEIRPVOID SurpriseRemoval;
- PFNKSDEVICEQUERYPOWER QueryPower;
- PFNKSDEVICESETPOWER SetPower;
- PFNKSDEVICEIRP QueryInterface; // added in version 0x100
- };
- struct _KSFILTER_DISPATCH {
- PFNKSFILTERIRP Create;
- PFNKSFILTERIRP Close;
- PFNKSFILTERPROCESS Process;
- PFNKSFILTERVOID Reset;
- };
- struct _KSPIN_DISPATCH {
- PFNKSPINIRP Create;
- PFNKSPINIRP Close;
- PFNKSPIN Process;
- PFNKSPINVOID Reset;
- PFNKSPINSETDATAFORMAT SetDataFormat;
- PFNKSPINSETDEVICESTATE SetDeviceState;
- PFNKSPIN Connect;
- PFNKSPINVOID Disconnect;
- const KSCLOCK_DISPATCH* Clock;
- const KSALLOCATOR_DISPATCH* Allocator;
- };
- struct _KSCLOCK_DISPATCH {
- PFNKSPINSETTIMER SetTimer;
- PFNKSPINCANCELTIMER CancelTimer;
- PFNKSPINCORRELATEDTIME CorrelatedTime;
- PFNKSPINRESOLUTION Resolution;
- };
- struct _KSALLOCATOR_DISPATCH {
- PFNKSPININITIALIZEALLOCATOR InitializeAllocator;
- PFNKSDELETEALLOCATOR DeleteAllocator;
- PFNKSDEFAULTALLOCATE Allocate;
- PFNKSDEFAULTFREE Free;
- };
- #define KSDEVICE_DESCRIPTOR_VERSION (0x100)
- struct _KSDEVICE_DESCRIPTOR {
- const KSDEVICE_DISPATCH* Dispatch;
- ULONG FilterDescriptorsCount;
- const KSFILTER_DESCRIPTOR*const* FilterDescriptors;
- ULONG Version; // this is 0 for pre-version 100 driver
- //#if !defined(_WIN64)
- //PVOID Alignment;
- //#endif //!defined(_WIN64)
- };
- struct _KSFILTER_DESCRIPTOR {
- const KSFILTER_DISPATCH* Dispatch;
- const KSAUTOMATION_TABLE* AutomationTable;
- ULONG Version;
- #define KSFILTER_DESCRIPTOR_VERSION ((ULONG)-1)
- ULONG Flags;
- #define KSFILTER_FLAG_DISPATCH_LEVEL_PROCESSING 0x00000001
- #define KSFILTER_FLAG_CRITICAL_PROCESSING 0x00000002
- #define KSFILTER_FLAG_HYPERCRITICAL_PROCESSING 0x00000004
- #define KSFILTER_FLAG_RECEIVE_ZERO_LENGTH_SAMPLES 0x00000008
- const GUID* ReferenceGuid;
- ULONG PinDescriptorsCount;
- ULONG PinDescriptorSize;
- const KSPIN_DESCRIPTOR_EX* PinDescriptors;
- ULONG CategoriesCount;
- const GUID* Categories;
- ULONG NodeDescriptorsCount;
- ULONG NodeDescriptorSize;
- const KSNODE_DESCRIPTOR* NodeDescriptors;
- ULONG ConnectionsCount;
- const KSTOPOLOGY_CONNECTION* Connections;
- const KSCOMPONENTID* ComponentId;
- };
- #define DEFINE_KSFILTER_DESCRIPTOR(descriptor)
- const KSFILTER_DESCRIPTOR descriptor =
- #define DEFINE_KSFILTER_PIN_DESCRIPTORS(table)
- SIZEOF_ARRAY(table),
- sizeof(table[0]),
- table
- #define DEFINE_KSFILTER_CATEGORIES(table)
- SIZEOF_ARRAY(table),
- table
- #define DEFINE_KSFILTER_CATEGORY(category)
- 1,
- &(category)
- #define DEFINE_KSFILTER_CATEGORIES_NULL
- 0,
- NULL
- #define DEFINE_KSFILTER_NODE_DESCRIPTORS(table)
- SIZEOF_ARRAY(table),
- sizeof(table[0]),
- table
- #define DEFINE_KSFILTER_NODE_DESCRIPTORS_NULL
- 0,
- sizeof(KSNODE_DESCRIPTOR),
- NULL
- #define DEFINE_KSFILTER_CONNECTIONS(table)
- SIZEOF_ARRAY(table),
- table
- #define DEFINE_KSFILTER_DEFAULT_CONNECTIONS
- 0,
- NULL
- #define DEFINE_KSFILTER_DESCRIPTOR_TABLE(table)
- const KSFILTER_DESCRIPTOR*const table[] =
- struct _KSPIN_DESCRIPTOR_EX {
- const KSPIN_DISPATCH* Dispatch;
- const KSAUTOMATION_TABLE* AutomationTable;
- KSPIN_DESCRIPTOR PinDescriptor;
- ULONG Flags;
- #define KSPIN_FLAG_DISPATCH_LEVEL_PROCESSING KSFILTER_FLAG_DISPATCH_LEVEL_PROCESSING
- #define KSPIN_FLAG_CRITICAL_PROCESSING KSFILTER_FLAG_CRITICAL_PROCESSING
- #define KSPIN_FLAG_HYPERCRITICAL_PROCESSING KSFILTER_FLAG_HYPERCRITICAL_PROCESSING
- #define KSPIN_FLAG_ASYNCHRONOUS_PROCESSING 0x00000008
- #define KSPIN_FLAG_DO_NOT_INITIATE_PROCESSING 0x00000010
- #define KSPIN_FLAG_INITIATE_PROCESSING_ON_EVERY_ARRIVAL 0x00000020
- #define KSPIN_FLAG_FRAMES_NOT_REQUIRED_FOR_PROCESSING 0x00000040
- #define KSPIN_FLAG_ENFORCE_FIFO 0x00000080
- #define KSPIN_FLAG_GENERATE_MAPPINGS 0x00000100
- #define KSPIN_FLAG_DISTINCT_TRAILING_EDGE 0x00000200
- #define KSPIN_FLAG_PROCESS_IN_RUN_STATE_ONLY 0x00010000
- #define KSPIN_FLAG_SPLITTER 0x00020000
- #define KSPIN_FLAG_USE_STANDARD_TRANSPORT 0x00040000
- #define KSPIN_FLAG_DO_NOT_USE_STANDARD_TRANSPORT 0x00080000
- #define KSPIN_FLAG_FIXED_FORMAT 0x00100000
- #define KSPIN_FLAG_GENERATE_EOS_EVENTS 0x00200000
- #define KSPIN_FLAG_RENDERER (KSPIN_FLAG_PROCESS_IN_RUN_STATE_ONLY|KSPIN_FLAG_GENERATE_EOS_EVENTS)
- #define KSPIN_FLAG_IMPLEMENT_CLOCK 0x00400000
- #define KSPIN_FLAG_SOME_FRAMES_REQUIRED_FOR_PROCESSING 0x00800000
- #define KSPIN_FLAG_PROCESS_IF_ANY_IN_RUN_STATE 0x01000000
- ULONG InstancesPossible;
- ULONG InstancesNecessary;
- const KSALLOCATOR_FRAMING_EX* AllocatorFraming;
- PFNKSINTERSECTHANDLEREX IntersectHandler;
- };
- #define DEFINE_KSPIN_DEFAULT_INTERFACES
- 0,
- NULL
- #define DEFINE_KSPIN_DEFAULT_MEDIUMS
- 0,
- NULL
- struct _KSNODE_DESCRIPTOR {
- const KSAUTOMATION_TABLE* AutomationTable;
- const GUID* Type;
- const GUID* Name;
- #if !defined(_WIN64)
- PVOID Alignment;
- #endif // !defined(_WIN64)
- };
- #if !defined(_WIN64)
- #define DEFINE_NODE_DESCRIPTOR(automation,type,name)
- { (automation), (type), (name), NULL }
- #else // !defined(_WIN64)
- #define DEFINE_NODE_DESCRIPTOR(automation,type,name)
- { (automation), (type), (name) }
- #endif // !defined(_WIN64)
- struct _KSDEVICE {
- const KSDEVICE_DESCRIPTOR* Descriptor;
- KSOBJECT_BAG Bag;
- PVOID Context;
- PDEVICE_OBJECT FunctionalDeviceObject;
- PDEVICE_OBJECT PhysicalDeviceObject;
- PDEVICE_OBJECT NextDeviceObject;
- BOOLEAN Started;
- SYSTEM_POWER_STATE SystemPowerState;
- DEVICE_POWER_STATE DevicePowerState;
- };
- struct _KSFILTERFACTORY {
- const KSFILTER_DESCRIPTOR* FilterDescriptor;
- KSOBJECT_BAG Bag;
- PVOID Context;
- };
- struct _KSFILTER {
- const KSFILTER_DESCRIPTOR* Descriptor;
- KSOBJECT_BAG Bag;
- PVOID Context;
- };
- struct _KSPIN {
- const KSPIN_DESCRIPTOR_EX* Descriptor;
- KSOBJECT_BAG Bag;
- PVOID Context;
- ULONG Id;
- KSPIN_COMMUNICATION Communication;
- BOOLEAN ConnectionIsExternal;
- KSPIN_INTERFACE ConnectionInterface;
- KSPIN_MEDIUM ConnectionMedium;
- KSPRIORITY ConnectionPriority;
- PKSDATAFORMAT ConnectionFormat;
- PKSMULTIPLE_ITEM AttributeList;
- ULONG StreamHeaderSize;
- KSPIN_DATAFLOW DataFlow;
- KSSTATE DeviceState;
- KSRESET ResetState;
- KSSTATE ClientState;
- };
- struct _KSMAPPING {
- PHYSICAL_ADDRESS PhysicalAddress;
- ULONG ByteCount;
- ULONG Alignment;
- };
- struct _KSSTREAM_POINTER_OFFSET
- {
- #if defined(_NTDDK_)
- union {
- PUCHAR Data;
- PKSMAPPING Mappings;
- };
- #else // !defined(_NTDDK_)
- PUCHAR Data;
- #endif // !defined(_NTDDK_)
- #if !defined(_WIN64)
- PVOID Alignment;
- #endif // !defined(_WIN64)
- ULONG Count;
- ULONG Remaining;
- };
- struct _KSSTREAM_POINTER
- {
- PVOID Context;
- PKSPIN Pin;
- PKSSTREAM_HEADER StreamHeader;
- PKSSTREAM_POINTER_OFFSET Offset;
- KSSTREAM_POINTER_OFFSET OffsetIn;
- KSSTREAM_POINTER_OFFSET OffsetOut;
- };
- struct _KSPROCESSPIN {
- PKSPIN Pin;
- PKSSTREAM_POINTER StreamPointer;
- PKSPROCESSPIN InPlaceCounterpart;
- PKSPROCESSPIN DelegateBranch;
- PKSPROCESSPIN CopySource;
- PVOID Data;
- ULONG BytesAvailable;
- ULONG BytesUsed;
- ULONG Flags;
- BOOLEAN Terminate;
- };
- struct _KSPROCESSPIN_INDEXENTRY {
- PKSPROCESSPIN *Pins;
- ULONG Count;
- };
- typedef enum {
- KsObjectTypeDevice,
- KsObjectTypeFilterFactory,
- KsObjectTypeFilter,
- KsObjectTypePin
- } KSOBJECTTYPE;
- typedef
- void
- (*PFNKSFREE)(
- IN PVOID Data
- );
- typedef
- void
- (*PFNKSPINFRAMERETURN)(
- IN PKSPIN Pin,
- IN PVOID Data OPTIONAL,
- IN ULONG Size OPTIONAL,
- IN PMDL Mdl OPTIONAL,
- IN PVOID Context OPTIONAL,
- IN NTSTATUS Status
- );
- typedef
- void
- (*PFNKSPINIRPCOMPLETION)(
- IN PKSPIN Pin,
- IN PIRP Irp
- );
- #if defined(_UNKNOWN_H_) || defined(__IUnknown_INTERFACE_DEFINED__)
- #if !defined(_IKsControl_)
- #define _IKsControl_
- typedef interface IKsControl* PIKSCONTROL;
- #if !defined(DEFINE_ABSTRACT_UNKNOWN)
- #define DEFINE_ABSTRACT_UNKNOWN()
- STDMETHOD_(NTSTATUS, QueryInterface)(THIS_
- REFIID InterfaceId,
- PVOID* Interface
- ) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- #endif //!defined(DEFINE_ABSTRACT_UNKNOWN)
- #undef INTERFACE
- #define INTERFACE IKsControl
- DECLARE_INTERFACE_(IKsControl,IUnknown)
- {
- DEFINE_ABSTRACT_UNKNOWN() // For C
- STDMETHOD_(NTSTATUS, KsProperty)(THIS_
- IN PKSPROPERTY Property,
- IN ULONG PropertyLength,
- IN OUT PVOID PropertyData,
- IN ULONG DataLength,
- OUT ULONG* BytesReturned
- ) PURE;
- STDMETHOD_(NTSTATUS, KsMethod)(THIS_
- IN PKSMETHOD Method,
- IN ULONG MethodLength,
- IN OUT PVOID MethodData,
- IN ULONG DataLength,
- OUT ULONG* BytesReturned
- ) PURE;
- STDMETHOD_(NTSTATUS, KsEvent)(THIS_
- IN PKSEVENT Event OPTIONAL,
- IN ULONG EventLength,
- IN OUT PVOID EventData,
- IN ULONG DataLength,
- OUT ULONG* BytesReturned
- ) PURE;
- };
- typedef interface IKsReferenceClock* PIKSREFERENCECLOCK;
- #undef INTERFACE
- #define INTERFACE IKsReferenceClock
- DECLARE_INTERFACE_(IKsReferenceClock,IUnknown)
- {
- DEFINE_ABSTRACT_UNKNOWN() // For C
- STDMETHOD_(LONGLONG,GetTime)(THIS
- ) PURE;
- STDMETHOD_(LONGLONG,GetPhysicalTime)(THIS
- ) PURE;
- STDMETHOD_(LONGLONG,GetCorrelatedTime)(THIS_
- OUT PLONGLONG SystemTime
- ) PURE;
- STDMETHOD_(LONGLONG,GetCorrelatedPhysicalTime)(THIS_
- OUT PLONGLONG SystemTime
- ) PURE;
- STDMETHOD_(NTSTATUS, GetResolution)(THIS_
- OUT PKSRESOLUTION Resolution
- ) PURE;
- STDMETHOD_(NTSTATUS, GetState)(THIS_
- OUT PKSSTATE State
- ) PURE;
- };
- #undef INTERFACE
- #define STATIC_IID_IKsControl
- 0x28F54685L, 0x06FD, 0x11D2, 0xB2, 0x7A, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
- DEFINE_GUID(IID_IKsControl,
- 0x28F54685L, 0x06FD, 0x11D2, 0xB2, 0x7A, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96);
- #if defined(__cplusplus) && _MSC_VER >= 1100
- struct __declspec(uuid("28F54685-06FD-11D2-B27A-00A0C9223196")) IKsControl;
- #endif
- #define STATIC_IID_IKsFastClock
- 0xc9902485, 0xc180, 0x11d2, 0x84, 0x73, 0xd4, 0x23, 0x94, 0x45, 0x9e, 0x5e
- DEFINE_GUID(IID_IKsFastClock,
- 0xc9902485, 0xc180, 0x11d2, 0x84, 0x73, 0xd4, 0x23, 0x94, 0x45, 0x9e, 0x5e);
- #if defined(__cplusplus) && _MSC_VER >= 1100
- struct __declspec(uuid("C9902485-C180-11d2-8473-D42394459E5E")) IKsFastClock;
- #endif
- #endif // !defined(_IKsControl_)
- #endif // defined(_UNKNOWN_H_) || defined(__IUnknown_INTERFACE_DEFINED__)
- #endif // defined(_NTDDK_)
- //===========================================================================
- #if defined(__cplusplus)
- extern "C" {
- #endif // defined(__cplusplus)
- //
- // exported prototypes
- //
- #ifdef _KSDDK_
- #define KSDDKAPI
- #else // !_KSDDK_
- #define KSDDKAPI DECLSPEC_IMPORT
- #endif // _KSDDK_
- #if defined(_NTDDK_)
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsEnableEvent(
- IN PIRP Irp,
- IN ULONG EventSetsCount,
- IN const KSEVENT_SET* EventSet,
- IN OUT PLIST_ENTRY EventsList OPTIONAL,
- IN KSEVENTS_LOCKTYPE EventsFlags OPTIONAL,
- IN PVOID EventsLock OPTIONAL
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsEnableEventWithAllocator(
- IN PIRP Irp,
- IN ULONG EventSetsCount,
- IN const KSEVENT_SET* EventSet,
- IN OUT PLIST_ENTRY EventsList OPTIONAL,
- IN KSEVENTS_LOCKTYPE EventsFlags OPTIONAL,
- IN PVOID EventsLock OPTIONAL,
- IN PFNKSALLOCATOR Allocator OPTIONAL,
- IN ULONG EventItemSize OPTIONAL
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsDisableEvent(
- IN PIRP Irp,
- IN OUT PLIST_ENTRY EventsList,
- IN KSEVENTS_LOCKTYPE EventsFlags,
- IN PVOID EventsLock
- );
- KSDDKAPI
- VOID
- NTAPI
- KsDiscardEvent(
- IN PKSEVENT_ENTRY EventEntry
- );
- KSDDKAPI
- VOID
- NTAPI
- KsFreeEventList(
- IN PFILE_OBJECT FileObject,
- IN OUT PLIST_ENTRY EventsList,
- IN KSEVENTS_LOCKTYPE EventsFlags,
- IN PVOID EventsLock
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsGenerateEvent(
- IN PKSEVENT_ENTRY EventEntry
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsGenerateDataEvent(
- IN PKSEVENT_ENTRY EventEntry,
- IN ULONG DataSize,
- IN PVOID Data
- );
- KSDDKAPI
- VOID
- NTAPI
- KsGenerateEventList(
- IN GUID* Set OPTIONAL,
- IN ULONG EventId,
- IN PLIST_ENTRY EventsList,
- IN KSEVENTS_LOCKTYPE EventsFlags,
- IN PVOID EventsLock
- );
- // property.c:
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsPropertyHandler(
- IN PIRP Irp,
- IN ULONG PropertySetsCount,
- IN const KSPROPERTY_SET* PropertySet
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsPropertyHandlerWithAllocator(
- IN PIRP Irp,
- IN ULONG PropertySetsCount,
- IN const KSPROPERTY_SET* PropertySet,
- IN PFNKSALLOCATOR Allocator OPTIONAL,
- IN ULONG PropertyItemSize OPTIONAL
- );
- KSDDKAPI
- BOOLEAN
- NTAPI
- KsFastPropertyHandler(
- IN PFILE_OBJECT FileObject,
- IN PKSPROPERTY Property,
- IN ULONG PropertyLength,
- IN OUT PVOID Data,
- IN ULONG DataLength,
- OUT PIO_STATUS_BLOCK IoStatus,
- IN ULONG PropertySetsCount,
- IN const KSPROPERTY_SET* PropertySet
- );
- // method.c:
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsMethodHandler(
- IN PIRP Irp,
- IN ULONG MethodSetsCount,
- IN const KSMETHOD_SET* MethodSet
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsMethodHandlerWithAllocator(
- IN PIRP Irp,
- IN ULONG MethodSetsCount,
- IN const KSMETHOD_SET* MethodSet,
- IN PFNKSALLOCATOR Allocator OPTIONAL,
- IN ULONG MethodItemSize OPTIONAL
- );
- KSDDKAPI
- BOOLEAN
- NTAPI
- KsFastMethodHandler(
- IN PFILE_OBJECT FileObject,
- IN PKSMETHOD Method,
- IN ULONG MethodLength,
- IN OUT PVOID Data,
- IN ULONG DataLength,
- OUT PIO_STATUS_BLOCK IoStatus,
- IN ULONG MethodSetsCount,
- IN const KSMETHOD_SET* MethodSet
- );
- // alloc.c:
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsCreateDefaultAllocator(
- IN PIRP Irp
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsCreateDefaultAllocatorEx(
- IN PIRP Irp,
- IN PVOID InitializeContext OPTIONAL,
- IN PFNKSDEFAULTALLOCATE DefaultAllocate OPTIONAL,
- IN PFNKSDEFAULTFREE DefaultFree OPTIONAL,
- IN PFNKSINITIALIZEALLOCATOR InitializeAllocator OPTIONAL,
- IN PFNKSDELETEALLOCATOR DeleteAllocator OPTIONAL
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsCreateAllocator(
- IN HANDLE ConnectionHandle,
- IN PKSALLOCATOR_FRAMING AllocatorFraming,
- OUT PHANDLE AllocatorHandle
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsValidateAllocatorCreateRequest(
- IN PIRP Irp,
- OUT PKSALLOCATOR_FRAMING* AllocatorFraming
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsValidateAllocatorFramingEx(
- IN PKSALLOCATOR_FRAMING_EX Framing,
- IN ULONG BufferSize,
- IN const KSALLOCATOR_FRAMING_EX *PinFraming
- );
- // clock.c:
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsAllocateDefaultClock(
- OUT PKSDEFAULTCLOCK* DefaultClock
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsAllocateDefaultClockEx(
- OUT PKSDEFAULTCLOCK* DefaultClock,
- IN PVOID Context OPTIONAL,
- IN PFNKSSETTIMER SetTimer OPTIONAL,
- IN PFNKSCANCELTIMER CancelTimer OPTIONAL,
- IN PFNKSCORRELATEDTIME CorrelatedTime OPTIONAL,
- IN const KSRESOLUTION* Resolution OPTIONAL,
- IN ULONG Flags
- );
- KSDDKAPI
- VOID
- NTAPI
- KsFreeDefaultClock(
- IN PKSDEFAULTCLOCK DefaultClock
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsCreateDefaultClock(
- IN PIRP Irp,
- IN PKSDEFAULTCLOCK DefaultClock
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsCreateClock(
- IN HANDLE ConnectionHandle,
- IN PKSCLOCK_CREATE ClockCreate,
- OUT PHANDLE ClockHandle
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsValidateClockCreateRequest(
- IN PIRP Irp,
- OUT PKSCLOCK_CREATE* ClockCreate
- );
- KSDDKAPI
- KSSTATE
- NTAPI
- KsGetDefaultClockState(
- IN PKSDEFAULTCLOCK DefaultClock
- );
- KSDDKAPI
- VOID
- NTAPI
- KsSetDefaultClockState(
- IN PKSDEFAULTCLOCK DefaultClock,
- IN KSSTATE State
- );
- KSDDKAPI
- LONGLONG
- NTAPI
- KsGetDefaultClockTime(
- IN PKSDEFAULTCLOCK DefaultClock
- );
- KSDDKAPI
- VOID
- NTAPI
- KsSetDefaultClockTime(
- IN PKSDEFAULTCLOCK DefaultClock,
- IN LONGLONG Time
- );
- // connect.c:
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsCreatePin(
- IN HANDLE FilterHandle,
- IN PKSPIN_CONNECT Connect,
- IN ACCESS_MASK DesiredAccess,
- OUT PHANDLE ConnectionHandle
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsValidateConnectRequest(
- IN PIRP Irp,
- IN ULONG DescriptorsCount,
- IN const KSPIN_DESCRIPTOR* Descriptor,
- OUT PKSPIN_CONNECT* Connect
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsPinPropertyHandler(
- IN PIRP Irp,
- IN PKSPROPERTY Property,
- IN OUT PVOID Data,
- IN ULONG DescriptorsCount,
- IN const KSPIN_DESCRIPTOR* Descriptor
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsPinDataIntersection(
- IN PIRP Irp,
- IN PKSP_PIN Pin,
- OUT PVOID Data OPTIONAL,
- IN ULONG DescriptorsCount,
- IN const KSPIN_DESCRIPTOR* Descriptor,
- IN PFNKSINTERSECTHANDLER IntersectHandler
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsPinDataIntersectionEx(
- IN PIRP Irp,
- IN PKSP_PIN Pin,
- OUT PVOID Data,
- IN ULONG DescriptorsCount,
- IN const KSPIN_DESCRIPTOR* Descriptor,
- IN ULONG DescriptorSize,
- IN PFNKSINTERSECTHANDLEREX IntersectHandler OPTIONAL,
- IN PVOID HandlerContext OPTIONAL
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsHandleSizedListQuery(
- IN PIRP Irp,
- IN ULONG DataItemsCount,
- IN ULONG DataItemSize,
- IN const VOID* DataItems
- );
- // image.c:
- #if (!defined( MAKEINTRESOURCE ))
- #define MAKEINTRESOURCE( res ) ((ULONG_PTR) (USHORT) res)
- #endif
- #if (!defined( RT_STRING ))
- #define RT_STRING MAKEINTRESOURCE( 6 )
- #define RT_RCDATA MAKEINTRESOURCE( 10 )
- #endif
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsLoadResource(
- IN PVOID ImageBase,
- IN POOL_TYPE PoolType,
- IN ULONG_PTR ResourceName,
- IN ULONG ResourceType,
- OUT PVOID *Resource,
- OUT PULONG ResourceSize
- );
-
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsGetImageNameAndResourceId(
- IN HANDLE RegKey,
- OUT PUNICODE_STRING ImageName,
- OUT PULONG_PTR ResourceId,
- OUT PULONG ValueType
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsMapModuleName(
- IN PDEVICE_OBJECT PhysicalDeviceObject,
- IN PUNICODE_STRING ModuleName,
- OUT PUNICODE_STRING ImageName,
- OUT PULONG_PTR ResourceId,
- OUT PULONG ValueType
- );
-
- // irp.c:
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsReferenceBusObject(
- IN KSDEVICE_HEADER Header
- );
- KSDDKAPI
- VOID
- NTAPI
- KsDereferenceBusObject(
- IN KSDEVICE_HEADER Header
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsDispatchQuerySecurity(
- IN PDEVICE_OBJECT DeviceObject,
- IN PIRP Irp
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsDispatchSetSecurity(
- IN PDEVICE_OBJECT DeviceObject,
- IN PIRP Irp
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsDispatchSpecificProperty(
- IN PIRP Irp,
- IN PFNKSHANDLER Handler
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsDispatchSpecificMethod(
- IN PIRP Irp,
- IN PFNKSHANDLER Handler
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsReadFile(
- IN PFILE_OBJECT FileObject,
- IN PKEVENT Event OPTIONAL,
- IN PVOID PortContext OPTIONAL,
- OUT PIO_STATUS_BLOCK IoStatusBlock,
- OUT PVOID Buffer,
- IN ULONG Length,
- IN ULONG Key OPTIONAL,
- IN KPROCESSOR_MODE RequestorMode
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsWriteFile(
- IN PFILE_OBJECT FileObject,
- IN PKEVENT Event OPTIONAL,
- IN PVOID PortContext OPTIONAL,
- OUT PIO_STATUS_BLOCK IoStatusBlock,
- IN PVOID Buffer,
- IN ULONG Length,
- IN ULONG Key OPTIONAL,
- IN KPROCESSOR_MODE RequestorMode
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsQueryInformationFile(
- IN PFILE_OBJECT FileObject,
- OUT PVOID FileInformation,
- IN ULONG Length,
- IN FILE_INFORMATION_CLASS FileInformationClass
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsSetInformationFile(
- IN PFILE_OBJECT FileObject,
- IN PVOID FileInformation,
- IN ULONG Length,
- IN FILE_INFORMATION_CLASS FileInformationClass
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsStreamIo(
- IN PFILE_OBJECT FileObject,
- IN PKEVENT Event OPTIONAL,
- IN PVOID PortContext OPTIONAL,
- IN PIO_COMPLETION_ROUTINE CompletionRoutine OPTIONAL,
- IN PVOID CompletionContext OPTIONAL,
- IN KSCOMPLETION_INVOCATION CompletionInvocationFlags OPTIONAL,
- OUT PIO_STATUS_BLOCK IoStatusBlock,
- IN OUT PVOID StreamHeaders,
- IN ULONG Length,
- IN ULONG Flags,
- IN KPROCESSOR_MODE RequestorMode
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsProbeStreamIrp(
- IN OUT PIRP Irp,
- IN ULONG ProbeFlags,
- IN ULONG HeaderSize OPTIONAL
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsAllocateExtraData(
- IN OUT PIRP Irp,
- IN ULONG ExtraSize,
- OUT PVOID* ExtraBuffer
- );
- KSDDKAPI
- VOID
- NTAPI
- KsNullDriverUnload(
- IN PDRIVER_OBJECT DriverObject
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsSetMajorFunctionHandler(
- IN PDRIVER_OBJECT DriverObject,
- IN ULONG MajorFunction
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsDispatchInvalidDeviceRequest(
- IN PDEVICE_OBJECT DeviceObject,
- IN PIRP Irp
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsDefaultDeviceIoCompletion(
- IN PDEVICE_OBJECT DeviceObject,
- IN PIRP Irp
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsDispatchIrp(
- IN PDEVICE_OBJECT DeviceObject,
- IN PIRP Irp
- );
- 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
- );
- 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
- );
- #define KsDispatchFastWriteFailure KsDispatchFastReadFailure
- KSDDKAPI
- VOID
- NTAPI
- KsCancelRoutine(
- IN PDEVICE_OBJECT DeviceObject,
- IN PIRP Irp
- );
- KSDDKAPI
- VOID
- NTAPI
- KsCancelIo(
- IN OUT PLIST_ENTRY QueueHead,
- IN PKSPIN_LOCK SpinLock
- );
- KSDDKAPI
- VOID
- NTAPI
- KsReleaseIrpOnCancelableQueue(
- IN PIRP Irp,
- IN PDRIVER_CANCEL DriverCancel OPTIONAL
- );
- KSDDKAPI
- PIRP
- NTAPI
- KsRemoveIrpFromCancelableQueue(
- IN OUT PLIST_ENTRY QueueHead,
- IN PKSPIN_LOCK SpinLock,
- IN KSLIST_ENTRY_LOCATION ListLocation,
- IN KSIRP_REMOVAL_OPERATION RemovalOperation
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsMoveIrpsOnCancelableQueue(
- IN OUT PLIST_ENTRY SourceList,
- IN PKSPIN_LOCK SourceLock,
- IN OUT PLIST_ENTRY DestinationList,
- IN PKSPIN_LOCK DestinationLock OPTIONAL,
- IN KSLIST_ENTRY_LOCATION ListLocation,
- IN PFNKSIRPLISTCALLBACK ListCallback,
- IN PVOID Context
- );
- KSDDKAPI
- VOID
- NTAPI
- KsRemoveSpecificIrpFromCancelableQueue(
- IN PIRP Irp
- );
- KSDDKAPI
- VOID
- NTAPI
- KsAddIrpToCancelableQueue(
- IN OUT PLIST_ENTRY QueueHead,
- IN PKSPIN_LOCK SpinLock,
- IN PIRP Irp,
- IN KSLIST_ENTRY_LOCATION ListLocation,
- IN PDRIVER_CANCEL DriverCancel OPTIONAL
- );
- // api.c:
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsAcquireResetValue(
- IN PIRP Irp,
- OUT KSRESET* ResetValue
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsTopologyPropertyHandler(
- IN PIRP Irp,
- IN PKSPROPERTY Property,
- IN OUT PVOID Data,
- IN const KSTOPOLOGY* Topology
- );
- KSDDKAPI
- VOID
- NTAPI
- KsAcquireDeviceSecurityLock(
- IN KSDEVICE_HEADER Header,
- IN BOOLEAN Exclusive
- );
- KSDDKAPI
- VOID
- NTAPI
- KsReleaseDeviceSecurityLock(
- IN KSDEVICE_HEADER Header
- );
-
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsDefaultDispatchPnp(
- IN PDEVICE_OBJECT DeviceObject,
- IN PIRP Irp
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsDefaultDispatchPower(
- IN PDEVICE_OBJECT DeviceObject,
- IN PIRP Irp
- );
-
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsDefaultForwardIrp(
- IN PDEVICE_OBJECT DeviceObject,
- IN PIRP Irp
- );
- KSDDKAPI
- VOID
- NTAPI
- KsSetDevicePnpAndBaseObject(
- IN KSDEVICE_HEADER Header,
- IN PDEVICE_OBJECT PnpDeviceObject,
- IN PDEVICE_OBJECT BaseObject
- );
- KSDDKAPI
- PDEVICE_OBJECT
- NTAPI
- KsQueryDevicePnpObject(
- IN KSDEVICE_HEADER Header
- );
- KSDDKAPI
- ACCESS_MASK
- NTAPI
- KsQueryObjectAccessMask(
- IN KSOBJECT_HEADER Header
- );
- KSDDKAPI
- VOID
- NTAPI
- KsRecalculateStackDepth(
- IN KSDEVICE_HEADER Header,
- IN BOOLEAN ReuseStackLocation
- );
- KSDDKAPI
- VOID
- NTAPI
- KsSetTargetState(
- IN KSOBJECT_HEADER Header,
- IN KSTARGET_STATE TargetState
- );
- KSDDKAPI
- VOID
- NTAPI
- KsSetTargetDeviceObject(
- IN KSOBJECT_HEADER Header,
- IN PDEVICE_OBJECT TargetDevice OPTIONAL
- );
- KSDDKAPI
- VOID
- NTAPI
- KsSetPowerDispatch(
- IN KSOBJECT_HEADER Header,
- IN PFNKSCONTEXT_DISPATCH PowerDispatch OPTIONAL,
- IN PVOID PowerContext OPTIONAL
- );
- KSDDKAPI
- PKSOBJECT_CREATE_ITEM
- NTAPI
- KsQueryObjectCreateItem(
- IN KSOBJECT_HEADER Header
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsAllocateDeviceHeader(
- OUT KSDEVICE_HEADER* Header,
- IN ULONG ItemsCount,
- IN PKSOBJECT_CREATE_ITEM ItemsList OPTIONAL
- );
- KSDDKAPI
- VOID
- NTAPI
- KsFreeDeviceHeader(
- IN KSDEVICE_HEADER Header
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsAllocateObjectHeader(
- OUT KSOBJECT_HEADER* Header,
- IN ULONG ItemsCount,
- IN PKSOBJECT_CREATE_ITEM ItemsList OPTIONAL,
- IN PIRP Irp,
- IN const KSDISPATCH_TABLE* Table
- );
- KSDDKAPI
- VOID
- NTAPI
- KsFreeObjectHeader(
- IN KSOBJECT_HEADER Header
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsAddObjectCreateItemToDeviceHeader(
- IN KSDEVICE_HEADER Header,
- IN PDRIVER_DISPATCH Create,
- IN PVOID Context,
- IN PWCHAR ObjectClass,
- IN PSECURITY_DESCRIPTOR SecurityDescriptor OPTIONAL
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsAddObjectCreateItemToObjectHeader(
- IN KSOBJECT_HEADER Header,
- IN PDRIVER_DISPATCH Create,
- IN PVOID Context,
- IN PWCHAR ObjectClass,
- IN PSECURITY_DESCRIPTOR SecurityDescriptor OPTIONAL
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsAllocateObjectCreateItem(
- IN KSDEVICE_HEADER Header,
- IN PKSOBJECT_CREATE_ITEM CreateItem,
- IN BOOLEAN AllocateEntry,
- IN PFNKSITEMFREECALLBACK ItemFreeCallback OPTIONAL
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsFreeObjectCreateItem(
- IN KSDEVICE_HEADER Header,
- IN PUNICODE_STRING CreateItem
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsFreeObjectCreateItemsByContext(
- IN KSDEVICE_HEADER Header,
- IN PVOID Context
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsCreateDefaultSecurity(
- IN PSECURITY_DESCRIPTOR ParentSecurity OPTIONAL,
- OUT PSECURITY_DESCRIPTOR* DefaultSecurity
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsForwardIrp(
- IN PIRP Irp,
- IN PFILE_OBJECT FileObject,
- IN BOOLEAN ReuseStackLocation
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsForwardAndCatchIrp(
- IN PDEVICE_OBJECT DeviceObject,
- IN PIRP Irp,
- IN PFILE_OBJECT FileObject,
- IN KSSTACK_USE StackUse
- );
- 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
- NTSTATUS
- NTAPI
- KsUnserializeObjectPropertiesFromRegistry(
- IN PFILE_OBJECT FileObject,
- IN HANDLE ParentKey OPTIONAL,
- IN PUNICODE_STRING RegistryPath OPTIONAL
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsCacheMedium(
- IN PUNICODE_STRING SymbolicLink,
- IN PKSPIN_MEDIUM Medium,
- IN ULONG PinDirection
- );
- // thread.c:
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsRegisterWorker(
- IN WORK_QUEUE_TYPE WorkQueueType,
- OUT PKSWORKER* Worker
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsRegisterCountedWorker(
- IN WORK_QUEUE_TYPE WorkQueueType,
- IN PWORK_QUEUE_ITEM CountedWorkItem,
- OUT PKSWORKER* Worker
- );
- KSDDKAPI
- VOID
- NTAPI
- KsUnregisterWorker(
- IN PKSWORKER Worker
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsQueueWorkItem(
- IN PKSWORKER Worker,
- IN PWORK_QUEUE_ITEM WorkItem
- );
- KSDDKAPI
- ULONG
- NTAPI
- KsIncrementCountedWorker(
- IN PKSWORKER Worker
- );
- KSDDKAPI
- ULONG
- NTAPI
- KsDecrementCountedWorker(
- IN PKSWORKER Worker
- );
- // topology.c:
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsCreateTopologyNode(
- IN HANDLE ParentHandle,
- IN PKSNODE_CREATE NodeCreate,
- IN ACCESS_MASK DesiredAccess,
- OUT PHANDLE NodeHandle
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsValidateTopologyNodeCreateRequest(
- IN PIRP Irp,
- IN PKSTOPOLOGY Topology,
- OUT PKSNODE_CREATE* NodeCreate
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsMergeAutomationTables(
- OUT PKSAUTOMATION_TABLE* AutomationTableAB,
- IN PKSAUTOMATION_TABLE AutomationTableA OPTIONAL,
- IN PKSAUTOMATION_TABLE AutomationTableB OPTIONAL,
- IN KSOBJECT_BAG Bag OPTIONAL
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsInitializeDriver(
- IN PDRIVER_OBJECT DriverObject,
- IN PUNICODE_STRING RegistryPathName,
- IN const KSDEVICE_DESCRIPTOR* Descriptor OPTIONAL
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsAddDevice(
- IN PDRIVER_OBJECT DriverObject,
- IN PDEVICE_OBJECT PhysicalDeviceObject
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsCreateDevice(
- IN PDRIVER_OBJECT DriverObject,
- IN PDEVICE_OBJECT PhysicalDeviceObject,
- IN const KSDEVICE_DESCRIPTOR* Descriptor OPTIONAL,
- IN ULONG ExtensionSize OPTIONAL,
- OUT PKSDEVICE* Device OPTIONAL
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsInitializeDevice(
- IN PDEVICE_OBJECT FunctionalDeviceObject,
- IN PDEVICE_OBJECT PhysicalDeviceObject,
- IN PDEVICE_OBJECT NextDeviceObject,
- IN const KSDEVICE_DESCRIPTOR* Descriptor OPTIONAL
- );
- KSDDKAPI
- void
- NTAPI
- KsTerminateDevice(
- IN PDEVICE_OBJECT DeviceObject
- );
- KSDDKAPI
- PKSDEVICE
- NTAPI
- KsGetDeviceForDeviceObject(
- IN PDEVICE_OBJECT FunctionalDeviceObject
- );
- KSDDKAPI
- void
- NTAPI
- KsAcquireDevice(
- IN PKSDEVICE Device
- );
- KSDDKAPI
- void
- NTAPI
- KsReleaseDevice(
- IN PKSDEVICE Device
- );
- KSDDKAPI
- void
- NTAPI
- KsDeviceRegisterAdapterObject(
- IN PKSDEVICE Device,
- IN PADAPTER_OBJECT AdapterObject,
- IN ULONG MaxMappingsByteCount,
- IN ULONG MappingTableStride
- );
- KSDDKAPI
- ULONG
- NTAPI
- KsDeviceGetBusData(
- IN PKSDEVICE Device,
- IN ULONG DataType,
- IN PVOID Buffer,
- IN ULONG Offset,
- IN ULONG Length
- );
- KSDDKAPI
- ULONG
- NTAPI
- KsDeviceSetBusData(
- IN PKSDEVICE Device,
- IN ULONG DataType,
- IN PVOID Buffer,
- IN ULONG Offset,
- IN ULONG Length
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsCreateFilterFactory(
- IN PDEVICE_OBJECT DeviceObject,
- IN const KSFILTER_DESCRIPTOR* Descriptor,
- IN PWCHAR RefString OPTIONAL,
- IN PSECURITY_DESCRIPTOR SecurityDescriptor OPTIONAL,
- IN ULONG CreateItemFlags,
- IN PFNKSFILTERFACTORYPOWER SleepCallback OPTIONAL,
- IN PFNKSFILTERFACTORYPOWER WakeCallback OPTIONAL,
- OUT PKSFILTERFACTORY* FilterFactory OPTIONAL
- );
- #define KsDeleteFilterFactory(FilterFactory)
- KsFreeObjectCreateItemsByContext(
- *(KSDEVICE_HEADER *)(
- KsFilterFactoryGetParentDevice(FilterFactory)->FunctionalDeviceObject->
- DeviceExtension),
- FilterFactory)
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsFilterFactoryUpdateCacheData(
- IN PKSFILTERFACTORY FilterFactory,
- IN const KSFILTER_DESCRIPTOR *FilterDescriptor OPTIONAL
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsFilterFactoryAddCreateItem(
- IN PKSFILTERFACTORY FilterFactory,
- IN PWCHAR RefString,
- IN PSECURITY_DESCRIPTOR SecurityDescriptor OPTIONAL,
- IN ULONG CreateItemFlags
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsFilterFactorySetDeviceClassesState(
- IN PKSFILTERFACTORY FilterFactory,
- IN BOOLEAN NewState
- );
- KSDDKAPI
- PUNICODE_STRING
- NTAPI
- KsFilterFactoryGetSymbolicLink(
- IN PKSFILTERFACTORY FilterFactory
- );
- KSDDKAPI
- void
- NTAPI
- KsAddEvent(
- IN PVOID Object,
- IN PKSEVENT_ENTRY EventEntry
- );
- void _inline
- KsFilterAddEvent(
- IN PKSFILTER Filter,
- IN PKSEVENT_ENTRY EventEntry
- )
- {
- KsAddEvent(Filter,EventEntry);
- }
- void _inline
- KsPinAddEvent(
- IN PKSPIN Pin,
- IN PKSEVENT_ENTRY EventEntry
- )
- {
- KsAddEvent(Pin,EventEntry);
- }
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsDefaultAddEventHandler(
- IN PIRP Irp,
- IN PKSEVENTDATA EventData,
- IN OUT PKSEVENT_ENTRY EventEntry
- );
- KSDDKAPI
- void
- NTAPI
- KsGenerateEvents(
- IN PVOID Object,
- IN const GUID* EventSet OPTIONAL,
- IN ULONG EventId,
- IN ULONG DataSize,
- IN PVOID Data OPTIONAL,
- IN PFNKSGENERATEEVENTCALLBACK CallBack OPTIONAL,
- IN PVOID CallBackContext OPTIONAL
- );
- void _inline
- KsFilterGenerateEvents(
- IN PKSFILTER Filter,
- IN const GUID* EventSet OPTIONAL,
- IN ULONG EventId,
- IN ULONG DataSize,
- IN PVOID Data OPTIONAL,
- IN PFNKSGENERATEEVENTCALLBACK CallBack OPTIONAL,
- IN PVOID CallBackContext OPTIONAL
- )
- {
- KsGenerateEvents(
- Filter,
- EventSet,
- EventId,
- DataSize,
- Data,
- CallBack,
- CallBackContext);
- }
- void _inline
- KsPinGenerateEvents(
- IN PKSPIN Pin,
- IN const GUID* EventSet OPTIONAL,
- IN ULONG EventId,
- IN ULONG DataSize,
- IN PVOID Data OPTIONAL,
- IN PFNKSGENERATEEVENTCALLBACK CallBack OPTIONAL,
- IN PVOID CallBackContext OPTIONAL
- )
- {
- KsGenerateEvents(
- Pin,
- EventSet,
- EventId,
- DataSize,
- Data,
- CallBack,
- CallBackContext);
- }
- typedef enum {
- KSSTREAM_POINTER_STATE_UNLOCKED = 0,
- KSSTREAM_POINTER_STATE_LOCKED
- } KSSTREAM_POINTER_STATE;
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsPinGetAvailableByteCount(
- IN PKSPIN Pin,
- OUT PLONG InputDataBytes OPTIONAL,
- OUT PLONG OutputBufferBytes OPTIONAL
- );
- KSDDKAPI
- PKSSTREAM_POINTER
- NTAPI
- KsPinGetLeadingEdgeStreamPointer(
- IN PKSPIN Pin,
- IN KSSTREAM_POINTER_STATE State
- );
- KSDDKAPI
- PKSSTREAM_POINTER
- NTAPI
- KsPinGetTrailingEdgeStreamPointer(
- IN PKSPIN Pin,
- IN KSSTREAM_POINTER_STATE State
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsStreamPointerSetStatusCode(
- IN PKSSTREAM_POINTER StreamPointer,
- IN NTSTATUS Status
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsStreamPointerLock(
- IN PKSSTREAM_POINTER StreamPointer
- );
- KSDDKAPI
- void
- NTAPI
- KsStreamPointerUnlock(
- IN PKSSTREAM_POINTER StreamPointer,
- IN BOOLEAN Eject
- );
- KSDDKAPI
- void
- NTAPI
- KsStreamPointerAdvanceOffsetsAndUnlock(
- IN PKSSTREAM_POINTER StreamPointer,
- IN ULONG InUsed,
- IN ULONG OutUsed,
- IN BOOLEAN Eject
- );
- KSDDKAPI
- void
- NTAPI
- KsStreamPointerDelete(
- IN PKSSTREAM_POINTER StreamPointer
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsStreamPointerClone(
- IN PKSSTREAM_POINTER StreamPointer,
- IN PFNKSSTREAMPOINTER CancelCallback OPTIONAL,
- IN ULONG ContextSize,
- OUT PKSSTREAM_POINTER* CloneStreamPointer
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsStreamPointerAdvanceOffsets(
- IN PKSSTREAM_POINTER StreamPointer,
- IN ULONG InUsed,
- IN ULONG OutUsed,
- IN BOOLEAN Eject
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsStreamPointerAdvance(
- IN PKSSTREAM_POINTER StreamPointer
- );
- KSDDKAPI
- PMDL
- NTAPI
- KsStreamPointerGetMdl(
- IN PKSSTREAM_POINTER StreamPointer
- );
- KSDDKAPI
- PIRP
- NTAPI
- KsStreamPointerGetIrp(
- IN PKSSTREAM_POINTER StreamPointer,
- OUT PBOOLEAN FirstFrameInIrp OPTIONAL,
- OUT PBOOLEAN LastFrameInIrp OPTIONAL
- );
- KSDDKAPI
- void
- NTAPI
- KsStreamPointerScheduleTimeout(
- IN PKSSTREAM_POINTER StreamPointer,
- IN PFNKSSTREAMPOINTER Callback,
- IN ULONGLONG Interval
- );
- KSDDKAPI
- void
- NTAPI
- KsStreamPointerCancelTimeout(
- IN PKSSTREAM_POINTER StreamPointer
- );
- KSDDKAPI
- PKSSTREAM_POINTER
- NTAPI
- KsPinGetFirstCloneStreamPointer(
- IN PKSPIN Pin
- );
- KSDDKAPI
- PKSSTREAM_POINTER
- NTAPI
- KsStreamPointerGetNextClone(
- IN PKSSTREAM_POINTER StreamPointer
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsPinHandshake(
- IN PKSPIN Pin,
- IN PKSHANDSHAKE In,
- OUT PKSHANDSHAKE Out
- );
- KSDDKAPI
- void
- NTAPI
- KsCompletePendingRequest(
- IN PIRP Irp
- );
- KSDDKAPI
- KSOBJECTTYPE
- NTAPI
- KsGetObjectTypeFromIrp(
- IN PIRP Irp
- );
- KSDDKAPI
- PVOID
- NTAPI
- KsGetObjectFromFileObject(
- IN PFILE_OBJECT FileObject
- );
- KSDDKAPI
- KSOBJECTTYPE
- NTAPI
- KsGetObjectTypeFromFileObject(
- IN PFILE_OBJECT FileObject
- );
- PKSFILTER __inline
- KsGetFilterFromFileObject(
- IN PFILE_OBJECT FileObject
- )
- {
- return (PKSFILTER) KsGetObjectFromFileObject(FileObject);
- }
- PKSPIN __inline
- KsGetPinFromFileObject(
- IN PFILE_OBJECT FileObject
- )
- {
- return (PKSPIN) KsGetObjectFromFileObject(FileObject);
- }
- KSDDKAPI
- PKSGATE
- NTAPI
- KsFilterGetAndGate(
- IN PKSFILTER Filter
- );
- KSDDKAPI
- void
- NTAPI
- KsFilterAcquireProcessingMutex(
- IN PKSFILTER Filter
- );
- KSDDKAPI
- void
- NTAPI
- KsFilterReleaseProcessingMutex(
- IN PKSFILTER Filter
- );
- KSDDKAPI
- void
- NTAPI
- KsFilterAttemptProcessing(
- IN PKSFILTER Filter,
- IN BOOLEAN Asynchronous
- );
- KSDDKAPI
- PKSGATE
- NTAPI
- KsPinGetAndGate(
- IN PKSPIN Pin
- );
- KSDDKAPI
- void
- NTAPI
- KsPinAttachAndGate(
- IN PKSPIN Pin,
- IN PKSGATE AndGate OPTIONAL
- );
- KSDDKAPI
- void
- NTAPI
- KsPinAttachOrGate(
- IN PKSPIN Pin,
- IN PKSGATE OrGate OPTIONAL
- );
- KSDDKAPI
- void
- NTAPI
- KsPinAcquireProcessingMutex(
- IN PKSPIN Pin
- );
- KSDDKAPI
- void
- NTAPI
- KsPinReleaseProcessingMutex(
- IN PKSPIN Pin
- );
- KSDDKAPI
- BOOLEAN
- NTAPI
- KsProcessPinUpdate(
- IN PKSPROCESSPIN ProcessPin
- );
- KSDDKAPI
- void
- NTAPI
- KsPinGetCopyRelationships(
- IN PKSPIN Pin,
- OUT PKSPIN* CopySource,
- OUT PKSPIN* DelegateBranch
- );
- KSDDKAPI
- void
- NTAPI
- KsPinAttemptProcessing(
- IN PKSPIN Pin,
- IN BOOLEAN Asynchronous
- );
- KSDDKAPI
- PVOID
- NTAPI
- KsGetParent(
- IN PVOID Object
- );
- PKSDEVICE __inline
- KsFilterFactoryGetParentDevice(
- IN PKSFILTERFACTORY FilterFactory
- )
- {
- return (PKSDEVICE) KsGetParent((PVOID) FilterFactory);
- }
- PKSFILTERFACTORY __inline
- KsFilterGetParentFilterFactory(
- IN PKSFILTER Filter
- )
- {
- return (PKSFILTERFACTORY) KsGetParent((PVOID) Filter);
- }
- KSDDKAPI
- PKSFILTER
- NTAPI
- KsPinGetParentFilter(
- IN PKSPIN Pin
- );
- KSDDKAPI
- PVOID
- NTAPI
- KsGetFirstChild(
- IN PVOID Object
- );
- PKSFILTERFACTORY __inline
- KsDeviceGetFirstChildFilterFactory(
- IN PKSDEVICE Device
- )
- {
- return (PKSFILTERFACTORY) KsGetFirstChild((PVOID) Device);
- }
- PKSFILTER __inline
- KsFilterFactoryGetFirstChildFilter(
- IN PKSFILTERFACTORY FilterFactory
- )
- {
- return (PKSFILTER) KsGetFirstChild((PVOID) FilterFactory);
- }
- KSDDKAPI
- ULONG
- NTAPI
- KsFilterGetChildPinCount(
- IN PKSFILTER Filter,
- IN ULONG PinId
- );
- KSDDKAPI
- PKSPIN
- NTAPI
- KsFilterGetFirstChildPin(
- IN PKSFILTER Filter,
- IN ULONG PinId
- );
- KSDDKAPI
- PVOID
- NTAPI
- KsGetNextSibling(
- IN PVOID Object
- );
- KSDDKAPI
- PKSPIN
- NTAPI
- KsPinGetNextSiblingPin(
- IN PKSPIN Pin
- );
- PKSFILTERFACTORY __inline
- KsFilterFactoryGetNextSiblingFilterFactory(
- IN PKSFILTERFACTORY FilterFactory
- )
- {
- return (PKSFILTERFACTORY) KsGetNextSibling((PVOID) FilterFactory);
- }
- PKSFILTER __inline
- KsFilterGetNextSiblingFilter(
- IN PKSFILTER Filter
- )
- {
- return (PKSFILTER) KsGetNextSibling((PVOID) Filter);
- }
- KSDDKAPI
- PKSDEVICE
- NTAPI
- KsGetDevice(
- IN PVOID Object
- );
- PKSDEVICE __inline
- KsFilterFactoryGetDevice(
- IN PKSFILTERFACTORY FilterFactory
- )
- {
- return KsGetDevice((PVOID) FilterFactory);
- }
- PKSDEVICE __inline
- KsFilterGetDevice(
- IN PKSFILTER Filter
- )
- {
- return KsGetDevice((PVOID) Filter);
- }
- PKSDEVICE __inline
- KsPinGetDevice(
- IN PKSPIN Pin
- )
- {
- return KsGetDevice((PVOID) Pin);
- }
- KSDDKAPI
- PKSFILTER
- NTAPI
- KsGetFilterFromIrp(
- IN PIRP Irp
- );
- KSDDKAPI
- PKSPIN
- NTAPI
- KsGetPinFromIrp(
- IN PIRP Irp
- );
- KSDDKAPI
- ULONG
- NTAPI
- KsGetNodeIdFromIrp(
- IN PIRP Irp
- );
- KSDDKAPI
- void
- NTAPI
- KsAcquireControl(
- IN PVOID Object
- );
- KSDDKAPI
- void
- NTAPI
- KsReleaseControl(
- IN PVOID Object
- );
- void __inline
- KsFilterAcquireControl(
- IN PKSFILTER Filter
- )
- {
- KsAcquireControl((PVOID) Filter);
- }
- void __inline
- KsFilterReleaseControl(
- IN PKSFILTER Filter
- )
- {
- KsReleaseControl((PVOID) Filter);
- }
- void __inline
- KsPinAcquireControl(
- IN PKSPIN Pin
- )
- {
- KsAcquireControl((PVOID) Pin);
- }
- void __inline
- KsPinReleaseControl(
- IN PKSPIN Pin
- )
- {
- KsReleaseControl((PVOID) Pin);
- }
- KSDDKAPI
- 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
- );
- #define KsDiscard(Object,Pointer)
- KsRemoveItemFromObjectBag(
- (Object)->Bag,
- (PVOID)(Pointer),
- TRUE)
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsAllocateObjectBag(
- IN PKSDEVICE Device,
- OUT KSOBJECT_BAG* ObjectBag
- );
- KSDDKAPI
- void
- NTAPI
- KsFreeObjectBag(
- IN KSOBJECT_BAG ObjectBag
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsCopyObjectBagItems(
- IN KSOBJECT_BAG ObjectBagDestination,
- IN KSOBJECT_BAG ObjectBagSource
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- _KsEdit(
- IN KSOBJECT_BAG ObjectBag,
- IN OUT PVOID* PointerToPointerToItem,
- IN ULONG NewSize,
- IN ULONG OldSize,
- IN ULONG Tag
- );
- #define KsEdit(Object,PointerToPointer,Tag)
- _KsEdit(
- (Object)->Bag,
- (PVOID*)(PointerToPointer),
- sizeof(**(PointerToPointer)),
- sizeof(**(PointerToPointer)),
- (Tag))
- #define KsEditSized(Object,PointerToPointer,NewSize,OldSize,Tag)
- _KsEdit((Object)->Bag,(PVOID*)(PointerToPointer),(NewSize),(OldSize),(Tag))
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsRegisterFilterWithNoKSPins(
- IN PDEVICE_OBJECT DeviceObject,
- IN const GUID * InterfaceClassGUID,
- IN ULONG PinCount,
- IN BOOL * PinDirection,
- IN KSPIN_MEDIUM * MediumList,
- IN OPTIONAL GUID * CategoryList
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsFilterCreatePinFactory (
- IN PKSFILTER Filter,
- IN const KSPIN_DESCRIPTOR_EX *const PinDescriptor,
- OUT PULONG PinID
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsFilterCreateNode (
- IN PKSFILTER Filter,
- IN const KSNODE_DESCRIPTOR *const NodeDescriptor,
- OUT PULONG NodeID
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsFilterAddTopologyConnections (
- IN PKSFILTER Filter,
- IN ULONG NewConnectionsCount,
- IN const KSTOPOLOGY_CONNECTION *const NewTopologyConnections
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsPinGetConnectedPinInterface(
- IN PKSPIN Pin,
- IN const GUID* InterfaceId,
- OUT PVOID* Interface
- );
- KSDDKAPI
- PFILE_OBJECT
- NTAPI
- KsPinGetConnectedPinFileObject(
- IN PKSPIN Pin
- );
- KSDDKAPI
- PDEVICE_OBJECT
- NTAPI
- KsPinGetConnectedPinDeviceObject(
- IN PKSPIN Pin
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsPinGetConnectedFilterInterface(
- IN PKSPIN Pin,
- IN const GUID* InterfaceId,
- OUT PVOID* Interface
- );
- #if defined(_UNKNOWN_H_) || defined(__IUnknown_INTERFACE_DEFINED__)
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsPinGetReferenceClockInterface(
- IN PKSPIN Pin,
- OUT PIKSREFERENCECLOCK* Interface
- );
- #endif //defined(_UNKNOWN_H_) || defined(__IUnknown_INTERFACE_DEFINED__)
- KSDDKAPI
- VOID
- NTAPI
- KsPinSetPinClockTime(
- IN PKSPIN Pin,
- IN LONGLONG Time
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsPinSubmitFrame(
- IN PKSPIN Pin,
- IN PVOID Data OPTIONAL,
- IN ULONG Size OPTIONAL,
- IN PKSSTREAM_HEADER StreamHeader OPTIONAL,
- IN PVOID Context OPTIONAL
- );
- KSDDKAPI
- NTSTATUS
- NTAPI
- KsPinSubmitFrameMdl(
- IN PKSPIN Pin,
- IN PMDL Mdl OPTIONAL,
- IN PKSSTREAM_HEADER StreamHeader OPTIONAL,
- IN PVOID Context OPTIONAL
- );
- KSDDKAPI
- void
- NTAPI
- KsPinRegisterFrameReturnCallback(
- IN PKSPIN Pin,
- IN PFNKSPINFRAMERETURN FrameReturn
- );
- KSDDKAPI
- void
- NTAPI
- KsPinRegisterIrpCompletionCallback(
- IN PKSPIN Pin,
- IN PFNKSPINIRPCOMPLETION IrpCompletion
- );
- KSDDKAPI
- void
- NTAPI
- KsPinRegisterHandshakeCallback(
- IN PKSPIN Pin,
- IN PFNKSPINHANDSHAKE Handshake
- );
- KSDDKAPI
- void
- NTAPI
- KsFilterRegisterPowerCallbacks(
- IN PKSFILTER Filter,
- IN PFNKSFILTERPOWER Sleep OPTIONAL,
- IN PFNKSFILTERPOWER Wake OPTIONAL
- );
- KSDDKAPI
- void
- NTAPI
- KsPinRegisterPowerCallbacks(
- IN PKSPIN Pin,
- IN PFNKSPINPOWER Sleep OPTIONAL,
- IN PFNKSPINPOWER Wake OPTIONAL
- );
- #if defined(_UNKNOWN_H_) || defined(__IUnknown_INTERFACE_DEFINED__)
- KSDDKAPI
- PUNKNOWN
- NTAPI
- KsRegisterAggregatedClientUnknown(
- IN PVOID Object,
- IN PUNKNOWN ClientUnknown
- );
- KSDDKAPI
- PUNKNOWN
- NTAPI
- KsGetOuterUnknown(
- IN PVOID Object
- );
- PUNKNOWN __inline
- KsDeviceRegisterAggregatedClientUnknown(
- IN PKSDEVICE Device,
- IN PUNKNOWN ClientUnknown
- )
- {
- return KsRegisterAggregatedClientUnknown((PVOID) Device,ClientUnknown);
- }
- PUNKNOWN __inline
- KsDeviceGetOuterUnknown(
- IN PKSDEVICE Device
- )
- {
- return KsGetOuterUnknown((PVOID) Device);
- }
- PUNKNOWN __inline
- KsFilterFactoryRegisterAggregatedClientUnknown(
- IN PKSFILTERFACTORY FilterFactory,
- IN PUNKNOWN ClientUnknown
- )
- {
- return KsRegisterAggregatedClientUnknown((PVOID) FilterFactory,ClientUnknown);
- }
- PUNKNOWN __inline
- KsFilterFactoryGetOuterUnknown(
- IN PKSFILTERFACTORY FilterFactory
- )
- {
- return KsGetOuterUnknown((PVOID) FilterFactory);
- }
- PUNKNOWN __inline
- KsFilterRegisterAggregatedClientUnknown(
- IN PKSFILTER Filter,
- IN PUNKNOWN ClientUnknown
- )
- {
- return KsRegisterAggregatedClientUnknown((PVOID) Filter,ClientUnknown);
- }
- PUNKNOWN __inline
- KsFilterGetOuterUnknown(
- IN PKSFILTER Filter
- )
- {
- return KsGetOuterUnknown((PVOID) Filter);
- }
- PUNKNOWN __inline
- KsPinRegisterAggregatedClientUnknown(
- IN PKSPIN Pin,
- IN PUNKNOWN ClientUnknown
- )
- {
- return KsRegisterAggregatedClientUnknown((PVOID) Pin,ClientUnknown);
- }
- PUNKNOWN __inline
- KsPinGetOuterUnknown(
- IN PKSPIN Pin
- )
- {
- return KsGetOuterUnknown((PVOID) Pin);
- }
- #endif // defined(_UNKNOWN_H_) || defined(__IUnknown_INTERFACE_DEFINED__)
- #else // !defined(_NTDDK_)
- #if !defined( KS_NO_CREATE_FUNCTIONS )
- KSDDKAPI
- DWORD
- WINAPI
- KsCreateAllocator(
- IN HANDLE ConnectionHandle,
- IN PKSALLOCATOR_FRAMING AllocatorFraming,
- OUT PHANDLE AllocatorHandle
- );
- KSDDKAPI
- DWORD
- NTAPI
- KsCreateClock(
- IN HANDLE ConnectionHandle,
- IN PKSCLOCK_CREATE ClockCreate,
- OUT PHANDLE ClockHandle
- );
- KSDDKAPI
- DWORD
- WINAPI
- KsCreatePin(
- IN HANDLE FilterHandle,
- IN PKSPIN_CONNECT Connect,
- IN ACCESS_MASK DesiredAccess,
- OUT PHANDLE ConnectionHandle
- );
- KSDDKAPI
- DWORD
- WINAPI
- KsCreateTopologyNode(
- IN HANDLE ParentHandle,
- IN PKSNODE_CREATE NodeCreate,
- IN ACCESS_MASK DesiredAccess,
- OUT PHANDLE NodeHandle
- );
-
- #endif
- #endif // !defined(_NTDDK_)
- #if defined(__cplusplus)
- }
- #endif // defined(__cplusplus)
- #endif // !_KS_