1 #pragma once 2 3 #define TAG_KSDEVICE 'DESK' 4 #define TAG_KSOBJECT_TAG 'HOSK' 5 6 VOID 7 CompleteRequest( 8 PIRP Irp, 9 CCHAR PriorityBoost); 10 11 12 13 NTSTATUS 14 NTAPI 15 KspCreateObjectType( 16 IN HANDLE ParentHandle, 17 IN LPWSTR ObjectType, 18 PVOID CreateParameters, 19 UINT CreateParametersSize, 20 IN ACCESS_MASK DesiredAccess, 21 OUT PHANDLE NodeHandle); 22 23 NTSTATUS 24 NTAPI 25 KspCreateFilterFactory( 26 IN PDEVICE_OBJECT DeviceObject, 27 IN const KSFILTER_DESCRIPTOR *Descriptor, 28 IN PWSTR RefString OPTIONAL, 29 IN PSECURITY_DESCRIPTOR SecurityDescriptor OPTIONAL, 30 IN ULONG CreateItemFlags, 31 IN PFNKSFILTERFACTORYPOWER SleepCallback OPTIONAL, 32 IN PFNKSFILTERFACTORYPOWER WakeCallback OPTIONAL, 33 OUT PKSFILTERFACTORY *FilterFactory OPTIONAL); 34 35 NTSTATUS 36 NTAPI 37 IKsDevice_Create( 38 IN PDEVICE_OBJECT DeviceObject, 39 IN PIRP Irp); 40 41 NTSTATUS 42 NTAPI 43 IKsDevice_Pnp( 44 IN PDEVICE_OBJECT DeviceObject, 45 IN PIRP Irp); 46 47 NTSTATUS 48 NTAPI 49 IKsDevice_Power( 50 IN PDEVICE_OBJECT DeviceObject, 51 IN PIRP Irp); 52 53 NTSTATUS 54 NTAPI 55 KspCreateFilter( 56 IN PDEVICE_OBJECT DeviceObject, 57 IN PIRP Irp, 58 IN IKsFilterFactory *iface); 59 60 NTSTATUS 61 KspSetDeviceInterfacesState( 62 IN PLIST_ENTRY ListHead, 63 IN BOOL Enable); 64 65 NTSTATUS 66 KspFreeDeviceInterfaces( 67 IN PLIST_ENTRY ListHead); 68 69 NTSTATUS 70 KspRegisterDeviceInterfaces( 71 IN PDEVICE_OBJECT PhysicalDeviceObject, 72 IN ULONG CategoriesCount, 73 IN GUID const*Categories, 74 IN PUNICODE_STRING ReferenceString, 75 OUT PLIST_ENTRY SymbolicLinkList); 76 77 PVOID 78 AllocateItem( 79 IN POOL_TYPE PoolType, 80 IN SIZE_T NumberOfBytes); 81 82 VOID 83 FreeItem( 84 IN PVOID Item); 85 86 KSDDKAPI 87 NTSTATUS 88 NTAPI 89 KspPinPropertyHandler( 90 IN PIRP Irp, 91 IN PKSPROPERTY Property, 92 IN OUT PVOID Data, 93 IN ULONG DescriptorsCount, 94 IN const KSPIN_DESCRIPTOR* Descriptors, 95 IN ULONG DescriptorSize); 96 97 98 NTSTATUS 99 FindMatchingCreateItem( 100 PLIST_ENTRY ListHead, 101 PUNICODE_STRING String, 102 OUT PCREATE_ITEM_ENTRY *OutCreateItem); 103 104 NTSTATUS 105 KspCopyCreateRequest( 106 IN PIRP Irp, 107 IN LPWSTR ObjectClass, 108 IN OUT PULONG Size, 109 OUT PVOID * Result); 110 111 NTSTATUS 112 KspCreatePin( 113 IN PDEVICE_OBJECT DeviceObject, 114 IN PIRP Irp, 115 IN PKSDEVICE KsDevice, 116 IN IKsFilterFactory * FilterFactory, 117 IN IKsFilter* Filter, 118 IN PKSPIN_CONNECT Connect, 119 IN KSPIN_DESCRIPTOR_EX* Descriptor); 120 121 NTSTATUS 122 KspAddCreateItemToList( 123 OUT PLIST_ENTRY ListHead, 124 IN ULONG ItemsCount, 125 IN PKSOBJECT_CREATE_ITEM ItemsList); 126 127 VOID 128 KspFreeCreateItems( 129 IN PLIST_ENTRY ListHead); 130 131 NTSTATUS 132 KspPropertyHandler( 133 IN PIRP Irp, 134 IN ULONG PropertySetsCount, 135 IN const KSPROPERTY_SET* PropertySet, 136 IN PFNKSALLOCATOR Allocator OPTIONAL, 137 IN ULONG PropertyItemSize OPTIONAL); 138 139 NTSTATUS 140 NTAPI 141 IKsFilterFactory_Create( 142 IN PDEVICE_OBJECT DeviceObject, 143 IN PIRP Irp); 144 145 NTSTATUS 146 KspSetFilterFactoriesState( 147 IN PKSIDEVICE_HEADER DeviceHeader, 148 IN BOOLEAN NewState); 149 150 NTSTATUS 151 NTAPI 152 KspMethodHandlerWithAllocator( 153 IN PIRP Irp, 154 IN ULONG MethodSetsCount, 155 IN const KSMETHOD_SET *MethodSet, 156 IN PFNKSALLOCATOR Allocator OPTIONAL, 157 IN ULONG MethodItemSize OPTIONAL); 158 159 VOID 160 IKsFilter_AddPin( 161 PKSFILTER Filter, 162 PKSPIN Pin); 163 164 VOID 165 IKsFilter_RemovePin( 166 PKSFILTER Filter, 167 PKSPIN Pin); 168 169 NTSTATUS 170 KspEnableEvent( 171 IN PIRP Irp, 172 IN ULONG EventSetsCount, 173 IN const KSEVENT_SET* EventSet, 174 IN OUT PLIST_ENTRY EventsList OPTIONAL, 175 IN KSEVENTS_LOCKTYPE EventsFlags OPTIONAL, 176 IN PVOID EventsLock OPTIONAL, 177 IN PFNKSALLOCATOR Allocator OPTIONAL, 178 IN ULONG EventItemSize OPTIONAL); 179 180 NTSTATUS 181 KspValidateConnectRequest( 182 IN PIRP Irp, 183 IN ULONG DescriptorsCount, 184 IN PVOID Descriptors, 185 IN ULONG DescriptorSize, 186 OUT PKSPIN_CONNECT* Connect); 187 188 NTSTATUS 189 KspReadMediaCategory( 190 IN LPGUID Category, 191 PKEY_VALUE_PARTIAL_INFORMATION *OutInformation); 192 193