2006-12-10 04:04:03 +00:00
|
|
|
/*
|
|
|
|
ReactOS
|
|
|
|
Kernel Streaming API
|
|
|
|
|
|
|
|
by Andrew Greenwood
|
|
|
|
|
|
|
|
NOTES:
|
|
|
|
This is a basic stubbing of the Kernel Streaming API header. It is
|
|
|
|
very incomplete - a lot of the #defines are not set to any value at all.
|
|
|
|
|
|
|
|
Some of the structs/funcs may be incorrectly grouped.
|
|
|
|
|
|
|
|
GUIDs need to be defined properly.
|
|
|
|
|
|
|
|
AVStream functionality (XP and above, DirectX 8.0 and above) will NOT
|
|
|
|
implemented for a while.
|
|
|
|
|
|
|
|
Some example code for interaction from usermode:
|
|
|
|
DeviceIoControl(
|
|
|
|
FilterHandle,
|
|
|
|
IOCTL_KS_PROPERTY,
|
|
|
|
&Property,
|
|
|
|
sizeof(KSPROPERTY),
|
|
|
|
&SeekingCapabilities,
|
|
|
|
sizeof(KS_SEEKING_CAPABILITIES),
|
|
|
|
&BytesReturned,
|
|
|
|
&Overlapped);
|
|
|
|
*/
|
|
|
|
|
2009-02-10 07:44:14 +00:00
|
|
|
#ifndef _KS_
|
2007-07-08 13:53:39 +00:00
|
|
|
#define _KS_
|
|
|
|
|
2006-12-10 04:04:03 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef BUILDING_KS
|
|
|
|
#define KSDDKAPI
|
|
|
|
#else
|
2008-11-18 19:33:22 +00:00
|
|
|
#define KSDDKAPI //DECLSPEC_IMPORT /* TODO */
|
2006-12-10 04:04:03 +00:00
|
|
|
#endif
|
|
|
|
|
2008-11-18 19:33:22 +00:00
|
|
|
|
2009-08-10 14:03:16 +00:00
|
|
|
#define KSFILTER_NODE ((ULONG)-1)
|
|
|
|
#define KSALL_NODES ((ULONG)-1)
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2008-04-17 18:00:39 +00:00
|
|
|
#define KSSTRING_Filter L"{9B365890-165F-11D0-A195-0020AFD156E4}"
|
|
|
|
#define KSSTRING_Pin L"{146F1A80-4791-11D0-A5D6-28DB04C10000}"
|
|
|
|
#define KSSTRING_Clock L"{53172480-4791-11D0-A5D6-28DB04C10000}"
|
|
|
|
#define KSSTRING_Allocator L"{642F5D00-4791-11D0-A5D6-28DB04C10000}"
|
|
|
|
#define KSSTRING_AllocatorEx L"{091BB63B-603F-11D1-B067-00A0C9062802}"
|
|
|
|
#define KSSTRING_TopologyNode L"{0621061A-EE75-11D0-B915-00A0C9223196}"
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
#define KSDATAFORMAT_BIT_ATTRIBUTES 1
|
|
|
|
#define KSDATAFORMAT_ATTRIBUTES (1 << KSDATAFORMAT_BIT_ATTRIBUTES)
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2009-02-21 20:10:21 +00:00
|
|
|
#if defined(_NTDDK_)
|
|
|
|
typedef PVOID PKSWORKER;
|
|
|
|
#endif
|
2009-03-01 12:45:32 +00:00
|
|
|
|
|
|
|
#ifndef SIZEOF_ARRAY
|
2013-08-17 23:51:10 +00:00
|
|
|
#define SIZEOF_ARRAY(a) (sizeof(a)/sizeof((a)[0]))
|
2009-03-01 12:45:32 +00:00
|
|
|
#endif
|
|
|
|
|
2007-07-08 13:53:39 +00:00
|
|
|
/* ===============================================================
|
|
|
|
GUID definition helpers
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _NTRTL_
|
2013-08-17 23:51:10 +00:00
|
|
|
|
|
|
|
#ifndef DEFINE_GUIDEX
|
|
|
|
#ifdef _MSC_VER
|
|
|
|
#define DEFINE_GUIDEX(name) EXTERN_C const CDECL GUID name
|
|
|
|
#else
|
|
|
|
#define DEFINE_GUIDEX(name) EXTERN_C const GUID name
|
|
|
|
#endif
|
|
|
|
#endif /* !DEFINE_GUIDEX */
|
|
|
|
|
|
|
|
#ifndef STATICGUIDOF
|
|
|
|
#define STATICGUIDOF(guid) STATIC_##guid
|
2007-07-08 13:53:39 +00:00
|
|
|
#endif
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
#endif /* !_NTRTL_ */
|
|
|
|
|
2013-04-02 11:52:12 +00:00
|
|
|
#if defined(__cplusplus)
|
2013-08-17 23:51:10 +00:00
|
|
|
|
|
|
|
#if _MSC_VER >= 1100
|
|
|
|
#define DEFINE_GUIDSTRUCT(guid, name) struct __declspec(uuid(guid)) name
|
|
|
|
#define DEFINE_GUIDNAMED(name) __uuidof(struct name)
|
2007-07-08 13:53:39 +00:00
|
|
|
#else
|
2013-08-17 23:51:10 +00:00
|
|
|
#define DEFINE_GUIDSTRUCT(guid, name) \
|
|
|
|
extern const DECLSPEC_SELECTANY GUID __uuid__##name={STATIC_##name};
|
|
|
|
#define DEFINE_GUIDNAMED(name) __uuid__##name
|
2007-07-08 13:53:39 +00:00
|
|
|
#endif
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
#else /* __cplusplus */
|
|
|
|
|
|
|
|
#define DEFINE_GUIDSTRUCT(guid, name) DEFINE_GUIDEX(name)
|
|
|
|
#define DEFINE_GUIDNAMED(name) name
|
|
|
|
|
|
|
|
#endif /* __cplusplus */
|
2007-07-08 13:53:39 +00:00
|
|
|
|
|
|
|
#define STATIC_GUID_NULL \
|
2009-08-11 14:52:22 +00:00
|
|
|
0x00000000L, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
2007-07-08 13:53:39 +00:00
|
|
|
DEFINE_GUIDSTRUCT("00000000-0000-0000-0000-000000000000", GUID_NULL);
|
|
|
|
#define GUID_NULL DEFINE_GUIDNAMED(GUID_NULL)
|
|
|
|
|
2009-08-11 14:52:22 +00:00
|
|
|
#define STATIC_KSNAME_Filter\
|
|
|
|
0x9b365890L, 0x165f, 0x11d0, {0xa1, 0x95, 0x00, 0x20, 0xaf, 0xd1, 0x56, 0xe4}
|
|
|
|
DEFINE_GUIDSTRUCT("9b365890-165f-11d0-a195-0020afd156e4", KSNAME_Filter);
|
|
|
|
#define KSNAME_Filter DEFINE_GUIDNAMED(KSNAME_Filter)
|
|
|
|
|
|
|
|
#define STATIC_KSMEMORY_TYPE_KERNEL_PAGED \
|
|
|
|
0xd833f8f8L, 0x7894, 0x11d1, {0xb0, 0x69, 0x00, 0xa0, 0xc9, 0x06, 0x28, 0x02}
|
|
|
|
DEFINE_GUIDSTRUCT("d833f8f8-7894-11d1-b069-00a0c9062802", KSMEMORY_TYPE_KERNEL_PAGED);
|
|
|
|
#define KSMEMORY_TYPE_KERNEL_PAGED DEFINE_GUIDNAMED(KSMEMORY_TYPE_KERNEL_PAGED)
|
|
|
|
|
2006-12-10 04:04:03 +00:00
|
|
|
/* ===============================================================
|
|
|
|
I/O Control Codes
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define IOCTL_KS_DISABLE_EVENT \
|
|
|
|
CTL_CODE( \
|
|
|
|
FILE_DEVICE_KS, \
|
|
|
|
0x000, \
|
|
|
|
METHOD_NEITHER, \
|
|
|
|
FILE_ANY_ACCESS)
|
|
|
|
|
|
|
|
#define IOCTL_KS_ENABLE_EVENT \
|
|
|
|
CTL_CODE( \
|
|
|
|
FILE_DEVICE_KS, \
|
|
|
|
0x001, \
|
|
|
|
METHOD_NEITHER, \
|
|
|
|
FILE_ANY_ACCESS)
|
|
|
|
|
2007-09-19 14:42:54 +00:00
|
|
|
// WAS 2
|
2006-12-10 04:04:03 +00:00
|
|
|
#define IOCTL_KS_METHOD \
|
|
|
|
CTL_CODE( \
|
|
|
|
FILE_DEVICE_KS, \
|
2007-09-19 14:42:54 +00:00
|
|
|
0x003, \
|
2006-12-10 04:04:03 +00:00
|
|
|
METHOD_NEITHER, \
|
|
|
|
FILE_ANY_ACCESS)
|
|
|
|
|
2007-09-19 14:42:54 +00:00
|
|
|
// WAS 3
|
2006-12-10 04:04:03 +00:00
|
|
|
#define IOCTL_KS_PROPERTY \
|
|
|
|
CTL_CODE( \
|
|
|
|
FILE_DEVICE_KS, \
|
2007-09-19 14:42:54 +00:00
|
|
|
0x000, \
|
2006-12-10 04:04:03 +00:00
|
|
|
METHOD_NEITHER, \
|
|
|
|
FILE_ANY_ACCESS)
|
|
|
|
|
|
|
|
#define IOCTL_KS_WRITE_STREAM \
|
|
|
|
CTL_CODE( \
|
|
|
|
FILE_DEVICE_KS, \
|
|
|
|
0x004, \
|
|
|
|
METHOD_NEITHER, \
|
|
|
|
FILE_WRITE_ACCESS)
|
|
|
|
|
|
|
|
#define IOCTL_KS_READ_STREAM \
|
|
|
|
CTL_CODE( \
|
|
|
|
FILE_DEVICE_KS, \
|
|
|
|
0x005, \
|
|
|
|
METHOD_NEITHER, \
|
|
|
|
FILE_READ_ACCESS)
|
|
|
|
|
|
|
|
#define IOCTL_KS_RESET_STATE \
|
|
|
|
CTL_CODE( \
|
|
|
|
FILE_DEVICE_KS, \
|
|
|
|
0x006, \
|
|
|
|
METHOD_NEITHER, \
|
|
|
|
FILE_ANY_ACCESS)
|
|
|
|
|
2007-07-08 13:53:39 +00:00
|
|
|
/* ===============================================================
|
|
|
|
Categories
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define STATIC_KSCATEGORY_BRIDGE \
|
2010-05-31 15:10:25 +00:00
|
|
|
0x085AFF00L, 0x62CE, 0x11CF, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}
|
2007-07-08 13:53:39 +00:00
|
|
|
DEFINE_GUIDSTRUCT("085AFF00-62CE-11CF-A5D6-28DB04C10000", KSCATEGORY_BRIDGE);
|
|
|
|
#define KSCATEGORY_BRIDGE DEFINE_GUIDNAMED(KSCATEGORY_BRIDGE)
|
|
|
|
|
|
|
|
#define STATIC_KSCATEGORY_CAPTURE \
|
2010-05-31 15:10:25 +00:00
|
|
|
0x65E8773DL, 0x8F56, 0x11D0, {0xA3, 0xB9, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96}
|
2007-07-08 13:53:39 +00:00
|
|
|
DEFINE_GUIDSTRUCT("65E8773D-8F56-11D0-A3B9-00A0C9223196", KSCATEGORY_CAPTURE);
|
|
|
|
#define KSCATEGORY_CAPTURE DEFINE_GUIDNAMED(KSCATEGORY_CAPTURE)
|
|
|
|
|
|
|
|
#define STATIC_KSCATEGORY_RENDER \
|
2010-05-31 15:10:25 +00:00
|
|
|
0x65E8773EL, 0x8F56, 0x11D0, {0xA3, 0xB9, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96}
|
2007-07-08 13:53:39 +00:00
|
|
|
DEFINE_GUIDSTRUCT("65E8773E-8F56-11D0-A3B9-00A0C9223196", KSCATEGORY_RENDER);
|
|
|
|
#define KSCATEGORY_RENDER DEFINE_GUIDNAMED(KSCATEGORY_RENDER)
|
|
|
|
|
|
|
|
#define STATIC_KSCATEGORY_MIXER \
|
2010-05-31 15:10:25 +00:00
|
|
|
0xAD809C00L, 0x7B88, 0x11D0, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}
|
2007-07-08 13:53:39 +00:00
|
|
|
DEFINE_GUIDSTRUCT("AD809C00-7B88-11D0-A5D6-28DB04C10000", KSCATEGORY_MIXER);
|
|
|
|
#define KSCATEGORY_MIXER DEFINE_GUIDNAMED(KSCATEGORY_MIXER)
|
|
|
|
|
|
|
|
#define STATIC_KSCATEGORY_SPLITTER \
|
2010-05-31 15:10:25 +00:00
|
|
|
0x0A4252A0L, 0x7E70, 0x11D0, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}
|
2007-07-08 13:53:39 +00:00
|
|
|
DEFINE_GUIDSTRUCT("0A4252A0-7E70-11D0-A5D6-28DB04C10000", KSCATEGORY_SPLITTER);
|
|
|
|
#define KSCATEGORY_SPLITTER DEFINE_GUIDNAMED(KSCATEGORY_SPLITTER)
|
|
|
|
|
|
|
|
#define STATIC_KSCATEGORY_DATACOMPRESSOR \
|
2010-05-31 15:10:25 +00:00
|
|
|
0x1E84C900L, 0x7E70, 0x11D0, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}
|
2007-07-08 13:53:39 +00:00
|
|
|
DEFINE_GUIDSTRUCT("1E84C900-7E70-11D0-A5D6-28DB04C10000", KSCATEGORY_DATACOMPRESSOR);
|
|
|
|
#define KSCATEGORY_DATACOMPRESSOR DEFINE_GUIDNAMED(KSCATEGORY_DATACOMPRESSOR)
|
|
|
|
|
|
|
|
#define STATIC_KSCATEGORY_DATADECOMPRESSOR \
|
2010-05-31 15:10:25 +00:00
|
|
|
0x2721AE20L, 0x7E70, 0x11D0, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}
|
2007-07-08 13:53:39 +00:00
|
|
|
DEFINE_GUIDSTRUCT("2721AE20-7E70-11D0-A5D6-28DB04C10000", KSCATEGORY_DATADECOMPRESSOR);
|
|
|
|
#define KSCATEGORY_DATADECOMPRESSOR DEFINE_GUIDNAMED(KSCATEGORY_DATADECOMPRESSOR)
|
|
|
|
|
|
|
|
#define STATIC_KSCATEGORY_DATATRANSFORM \
|
2010-05-31 15:10:25 +00:00
|
|
|
0x2EB07EA0L, 0x7E70, 0x11D0, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}
|
2007-07-08 13:53:39 +00:00
|
|
|
DEFINE_GUIDSTRUCT("2EB07EA0-7E70-11D0-A5D6-28DB04C10000", KSCATEGORY_DATATRANSFORM);
|
|
|
|
#define KSCATEGORY_DATATRANSFORM DEFINE_GUIDNAMED(KSCATEGORY_DATATRANSFORM)
|
|
|
|
|
|
|
|
#define STATIC_KSCATEGORY_COMMUNICATIONSTRANSFORM \
|
2010-05-31 15:10:25 +00:00
|
|
|
0xCF1DDA2CL, 0x9743, 0x11D0, {0xA3, 0xEE, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96}
|
2007-07-08 13:53:39 +00:00
|
|
|
DEFINE_GUIDSTRUCT("CF1DDA2C-9743-11D0-A3EE-00A0C9223196", KSCATEGORY_COMMUNICATIONSTRANSFORM);
|
|
|
|
#define KSCATEGORY_COMMUNICATIONSTRANSFORM DEFINE_GUIDNAMED(KSCATEGORY_COMMUNICATIONSTRANSFORM)
|
|
|
|
|
|
|
|
#define STATIC_KSCATEGORY_INTERFACETRANSFORM \
|
2010-05-31 15:10:25 +00:00
|
|
|
0xCF1DDA2DL, 0x9743, 0x11D0, {0xA3, 0xEE, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96}
|
2007-07-08 13:53:39 +00:00
|
|
|
DEFINE_GUIDSTRUCT("CF1DDA2D-9743-11D0-A3EE-00A0C9223196", KSCATEGORY_INTERFACETRANSFORM);
|
|
|
|
#define KSCATEGORY_INTERFACETRANSFORM DEFINE_GUIDNAMED(KSCATEGORY_INTERFACETRANSFORM)
|
|
|
|
|
|
|
|
#define STATIC_KSCATEGORY_MEDIUMTRANSFORM \
|
2010-05-31 15:10:25 +00:00
|
|
|
0xCF1DDA2EL, 0x9743, 0x11D0, {0xA3, 0xEE, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96}
|
2007-07-08 13:53:39 +00:00
|
|
|
DEFINE_GUIDSTRUCT("CF1DDA2E-9743-11D0-A3EE-00A0C9223196", KSCATEGORY_MEDIUMTRANSFORM);
|
|
|
|
#define KSCATEGORY_MEDIUMTRANSFORM DEFINE_GUIDNAMED(KSCATEGORY_MEDIUMTRANSFORM)
|
|
|
|
|
|
|
|
#define STATIC_KSCATEGORY_FILESYSTEM \
|
2010-05-31 15:10:25 +00:00
|
|
|
0x760FED5EL, 0x9357, 0x11D0, {0xA3, 0xCC, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96}
|
2007-07-08 13:53:39 +00:00
|
|
|
DEFINE_GUIDSTRUCT("760FED5E-9357-11D0-A3CC-00A0C9223196", KSCATEGORY_FILESYSTEM);
|
|
|
|
#define KSCATEGORY_FILESYSTEM DEFINE_GUIDNAMED(KSCATEGORY_FILESYSTEM)
|
|
|
|
|
|
|
|
#define STATIC_KSCATEGORY_CLOCK \
|
2010-05-31 15:10:25 +00:00
|
|
|
0x53172480L, 0x4791, 0x11D0, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}
|
2007-07-08 13:53:39 +00:00
|
|
|
DEFINE_GUIDSTRUCT("53172480-4791-11D0-A5D6-28DB04C10000", KSCATEGORY_CLOCK);
|
|
|
|
#define KSCATEGORY_CLOCK DEFINE_GUIDNAMED(KSCATEGORY_CLOCK)
|
|
|
|
|
|
|
|
#define STATIC_KSCATEGORY_PROXY \
|
2010-05-31 15:10:25 +00:00
|
|
|
0x97EBAACAL, 0x95BD, 0x11D0, {0xA3, 0xEA, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96}
|
2007-07-08 13:53:39 +00:00
|
|
|
DEFINE_GUIDSTRUCT("97EBAACA-95BD-11D0-A3EA-00A0C9223196", KSCATEGORY_PROXY);
|
|
|
|
#define KSCATEGORY_PROXY DEFINE_GUIDNAMED(KSCATEGORY_PROXY)
|
|
|
|
|
|
|
|
#define STATIC_KSCATEGORY_QUALITY \
|
2010-05-31 15:10:25 +00:00
|
|
|
0x97EBAACBL, 0x95BD, 0x11D0, {0xA3, 0xEA, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96}
|
2007-07-08 13:53:39 +00:00
|
|
|
DEFINE_GUIDSTRUCT("97EBAACB-95BD-11D0-A3EA-00A0C9223196", KSCATEGORY_QUALITY);
|
|
|
|
#define KSCATEGORY_QUALITY DEFINE_GUIDNAMED(KSCATEGORY_QUALITY)
|
|
|
|
|
2007-09-19 14:42:54 +00:00
|
|
|
/* ===============================================================
|
|
|
|
Common
|
|
|
|
*/
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
GUID Set;
|
|
|
|
ULONG Id;
|
|
|
|
ULONG Flags;
|
2007-09-19 14:42:54 +00:00
|
|
|
} KSIDENTIFIER, *PKSIDENTIFIER;
|
|
|
|
|
|
|
|
typedef KSIDENTIFIER KSPROPERTY, *PKSPROPERTY;
|
|
|
|
typedef KSIDENTIFIER KSMETHOD, *PKSMETHOD;
|
|
|
|
typedef KSIDENTIFIER KSEVENT, *PKSEVENT;
|
|
|
|
|
|
|
|
typedef KSIDENTIFIER KSDEGRADE, *PKSDEGRADE;
|
|
|
|
|
|
|
|
typedef KSIDENTIFIER KSPIN_INTERFACE, *PKSPIN_INTERFACE;
|
|
|
|
typedef KSIDENTIFIER KSPIN_MEDIUM, *PKSPIN_MEDIUM;
|
|
|
|
|
2009-06-19 12:07:17 +00:00
|
|
|
typedef union {
|
2013-08-17 23:51:10 +00:00
|
|
|
struct {
|
|
|
|
ULONG FormatSize;
|
|
|
|
ULONG Flags;
|
|
|
|
ULONG SampleSize;
|
|
|
|
ULONG Reserved;
|
|
|
|
GUID MajorFormat;
|
|
|
|
GUID SubFormat;
|
|
|
|
GUID Specifier;
|
|
|
|
};
|
|
|
|
LONGLONG Alignment;
|
2007-09-19 14:42:54 +00:00
|
|
|
} KSDATAFORMAT, *PKSDATAFORMAT, KSDATARANGE, *PKSDATARANGE;
|
2009-06-28 23:16:41 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
ULONG Size;
|
|
|
|
ULONG Flags;
|
|
|
|
GUID Attribute;
|
2007-09-19 14:42:54 +00:00
|
|
|
} KSATTRIBUTE, *PKSATTRIBUTE;
|
|
|
|
|
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
Interface Sets - TODO
|
|
|
|
*/
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
#define KSINTERFACESETID_Media
|
|
|
|
#define KSINTERFACE_STANDARD_STREAMING
|
|
|
|
#define KSINTERFACE_STANDARD_LOOPED_STREAMING
|
|
|
|
#define KSINTERFACE_STANDARD_CONTROL
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define STATIC_KSINTERFACESETID_Standard \
|
2013-08-17 23:51:10 +00:00
|
|
|
0x1A8766A0L, 0x62CE, 0x11CF, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}
|
2007-09-19 14:42:54 +00:00
|
|
|
DEFINE_GUIDSTRUCT("1A8766A0-62CE-11CF-A5D6-28DB04C10000", KSINTERFACESETID_Standard);
|
|
|
|
#define KSINTERFACESETID_Standard DEFINE_GUIDNAMED(KSINTERFACESETID_Standard)
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef enum {
|
|
|
|
KSINTERFACE_STANDARD_STREAMING,
|
|
|
|
KSINTERFACE_STANDARD_LOOPED_STREAMING,
|
|
|
|
KSINTERFACE_STANDARD_CONTROL
|
2007-09-19 14:42:54 +00:00
|
|
|
} KSINTERFACE_STANDARD;
|
|
|
|
|
|
|
|
#define STATIC_KSINTERFACESETID_FileIo \
|
2013-08-17 23:51:10 +00:00
|
|
|
0x8C6F932CL, 0xE771, 0x11D0, {0xB8, 0xFF, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96}
|
2007-09-19 14:42:54 +00:00
|
|
|
DEFINE_GUIDSTRUCT("8C6F932C-E771-11D0-B8FF-00A0C9223196", KSINTERFACESETID_FileIo);
|
|
|
|
#define KSINTERFACESETID_FileIo DEFINE_GUIDNAMED(KSINTERFACESETID_FileIo)
|
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
Mediums
|
|
|
|
*/
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef enum {
|
|
|
|
KSINTERFACE_FILEIO_STREAMING
|
2007-09-19 14:42:54 +00:00
|
|
|
} KSINTERFACE_FILEIO;
|
|
|
|
|
|
|
|
#define KSMEDIUM_TYPE_ANYINSTANCE 0
|
|
|
|
|
|
|
|
#define STATIC_KSMEDIUMSETID_Standard \
|
2013-08-17 23:51:10 +00:00
|
|
|
0x4747B320L, 0x62CE, 0x11CF, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}
|
2007-09-19 14:42:54 +00:00
|
|
|
DEFINE_GUIDSTRUCT("4747B320-62CE-11CF-A5D6-28DB04C10000", KSMEDIUMSETID_Standard);
|
|
|
|
#define KSMEDIUMSETID_Standard DEFINE_GUIDNAMED(KSMEDIUMSETID_Standard)
|
|
|
|
|
2006-12-10 04:04:03 +00:00
|
|
|
/* ===============================================================
|
|
|
|
Clock Properties/Methods/Events
|
|
|
|
*/
|
|
|
|
|
2010-03-13 12:09:24 +00:00
|
|
|
#define STATIC_KSPROPSETID_Clock \
|
2013-08-17 23:51:10 +00:00
|
|
|
0xDF12A4C0L, 0xAC17, 0x11CF, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}
|
2010-03-13 12:09:24 +00:00
|
|
|
DEFINE_GUIDSTRUCT("DF12A4C0-AC17-11CF-A5D6-28DB04C10000", KSPROPSETID_Clock);
|
|
|
|
#define KSPROPSETID_Clock DEFINE_GUIDNAMED(KSPROPSETID_Clock)
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef enum {
|
|
|
|
KSPROPERTY_CLOCK_TIME,
|
|
|
|
KSPROPERTY_CLOCK_PHYSICALTIME,
|
|
|
|
KSPROPERTY_CLOCK_CORRELATEDTIME,
|
|
|
|
KSPROPERTY_CLOCK_CORRELATEDPHYSICALTIME,
|
|
|
|
KSPROPERTY_CLOCK_RESOLUTION,
|
|
|
|
KSPROPERTY_CLOCK_STATE,
|
2010-03-13 12:09:24 +00:00
|
|
|
#if defined(_NTDDK_)
|
2013-08-17 23:51:10 +00:00
|
|
|
KSPROPERTY_CLOCK_FUNCTIONTABLE
|
2010-03-13 12:09:24 +00:00
|
|
|
#endif // defined(_NTDDK_)
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSPROPERTY_CLOCK;
|
|
|
|
|
2010-03-13 12:09:24 +00:00
|
|
|
#define STATIC_KSEVENTSETID_Clock \
|
2013-08-17 23:51:10 +00:00
|
|
|
0x364D8E20L, 0x62C7, 0x11CF, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}
|
2010-03-13 12:09:24 +00:00
|
|
|
DEFINE_GUIDSTRUCT("364D8E20-62C7-11CF-A5D6-28DB04C10000", KSEVENTSETID_Clock);
|
|
|
|
#define KSEVENTSETID_Clock DEFINE_GUIDNAMED(KSEVENTSETID_Clock)
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef enum {
|
|
|
|
KSEVENT_CLOCK_INTERVAL_MARK,
|
|
|
|
KSEVENT_CLOCK_POSITION_MARK
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSEVENT_CLOCK_POSITION;
|
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
Connection Properties/Methods/Events
|
|
|
|
*/
|
|
|
|
|
2009-01-26 10:18:53 +00:00
|
|
|
#define STATIC_KSPROPSETID_Connection \
|
2013-08-17 23:51:10 +00:00
|
|
|
0x1D58C920L, 0xAC9B, 0x11CF, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}
|
2009-01-26 10:18:53 +00:00
|
|
|
DEFINE_GUIDSTRUCT("1D58C920-AC9B-11CF-A5D6-28DB04C10000", KSPROPSETID_Connection);
|
|
|
|
#define KSPROPSETID_Connection DEFINE_GUIDNAMED(KSPROPSETID_Connection)
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef enum {
|
|
|
|
KSPROPERTY_CONNECTION_STATE,
|
|
|
|
KSPROPERTY_CONNECTION_PRIORITY,
|
|
|
|
KSPROPERTY_CONNECTION_DATAFORMAT,
|
|
|
|
KSPROPERTY_CONNECTION_ALLOCATORFRAMING,
|
|
|
|
KSPROPERTY_CONNECTION_PROPOSEDATAFORMAT,
|
|
|
|
KSPROPERTY_CONNECTION_ACQUIREORDERING,
|
|
|
|
KSPROPERTY_CONNECTION_ALLOCATORFRAMING_EX,
|
|
|
|
KSPROPERTY_CONNECTION_STARTAT
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSPROPERTY_CONNECTION;
|
|
|
|
|
2009-10-12 19:21:10 +00:00
|
|
|
#define DEFINE_KSPROPERTY_ITEM_CONNECTION_STATE(GetHandler, SetHandler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_CONNECTION_STATE,\
|
|
|
|
(GetHandler),\
|
|
|
|
sizeof(KSPROPERTY),\
|
|
|
|
sizeof(KSSTATE),\
|
|
|
|
(SetHandler),\
|
|
|
|
NULL, 0, NULL, NULL, 0)
|
|
|
|
|
2009-10-12 22:44:17 +00:00
|
|
|
#define DEFINE_KSPROPERTY_ITEM_CONNECTION_PRIORITY(GetHandler, SetHandler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_CONNECTION_PRIORITY,\
|
|
|
|
(GetHandler),\
|
|
|
|
sizeof(KSPROPERTY),\
|
|
|
|
sizeof(KSPRIORITY),\
|
|
|
|
(SetHandler),\
|
|
|
|
NULL, 0, NULL, NULL, 0)
|
|
|
|
|
2009-10-12 19:21:10 +00:00
|
|
|
#define DEFINE_KSPROPERTY_ITEM_CONNECTION_DATAFORMAT(GetHandler, SetHandler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_CONNECTION_DATAFORMAT,\
|
|
|
|
(GetHandler),\
|
|
|
|
sizeof(KSPROPERTY),\
|
|
|
|
0,\
|
|
|
|
(SetHandler),\
|
|
|
|
NULL, 0, NULL, NULL, 0)
|
|
|
|
|
2009-10-12 22:44:17 +00:00
|
|
|
#define DEFINE_KSPROPERTY_ITEM_CONNECTION_ALLOCATORFRAMING(Handler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_CONNECTION_ALLOCATORFRAMING,\
|
|
|
|
(Handler),\
|
|
|
|
sizeof(KSPROPERTY),\
|
|
|
|
sizeof(KSALLOCATOR_FRAMING),\
|
|
|
|
NULL, NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM_CONNECTION_ALLOCATORFRAMING_EX(Handler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_CONNECTION_ALLOCATORFRAMING_EX,\
|
|
|
|
(Handler),\
|
|
|
|
sizeof(KSPROPERTY),\
|
|
|
|
0,\
|
|
|
|
NULL, NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM_CONNECTION_PROPOSEDATAFORMAT(Handler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_CONNECTION_PROPOSEDATAFORMAT,\
|
|
|
|
NULL,\
|
|
|
|
sizeof(KSPROPERTY),\
|
|
|
|
sizeof(KSDATAFORMAT),\
|
|
|
|
(Handler),\
|
|
|
|
NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM_CONNECTION_ACQUIREORDERING(Handler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_CONNECTION_ACQUIREORDERING,\
|
|
|
|
(Handler),\
|
|
|
|
sizeof(KSPROPERTY),\
|
|
|
|
sizeof(int),\
|
|
|
|
NULL, NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM_CONNECTION_STARTAT(Handler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_CONNECTION_STARTAT,\
|
|
|
|
NULL,\
|
|
|
|
sizeof(KSPROPERTY),\
|
|
|
|
sizeof(KSRELATIVEEVENT),\
|
|
|
|
(Handler),\
|
|
|
|
NULL, 0, NULL, NULL, 0)
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef enum {
|
|
|
|
KSEVENT_CONNECTION_POSITIONUPDATE,
|
|
|
|
KSEVENT_CONNECTION_DATADISCONTINUITY,
|
|
|
|
KSEVENT_CONNECTION_TIMEDISCONTINUITY,
|
|
|
|
KSEVENT_CONNECTION_PRIORITY,
|
|
|
|
KSEVENT_CONNECTION_ENDOFSTREAM
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSEVENT_CONNECTION;
|
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
General
|
|
|
|
Properties/Methods/Events
|
|
|
|
*/
|
|
|
|
|
2009-02-20 14:50:26 +00:00
|
|
|
#define STATIC_KSPROPSETID_General\
|
2013-08-17 23:51:10 +00:00
|
|
|
0x1464EDA5L, 0x6A8F, 0x11D1, {0x9A, 0xA7, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96}
|
2009-02-20 14:50:26 +00:00
|
|
|
DEFINE_GUIDSTRUCT("1464EDA5-6A8F-11D1-9AA7-00A0C9223196", KSPROPSETID_General);
|
|
|
|
#define KSPROPSETID_General DEFINE_GUIDNAMED(KSPROPSETID_General)
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef enum {
|
|
|
|
KSPROPERTY_GENERAL_COMPONENTID
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSPROPERTY_GENERAL;
|
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
Graph Manager
|
|
|
|
Properties/Methods/Events
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define KSPROPSETID_GM \
|
2013-08-17 23:51:10 +00:00
|
|
|
0xAF627536L, 0xE719, 0x11D2, {0x8A, 0x1D, 0x00, 0x60, 0x97, 0xD2, 0xDF, 0x5D}
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef enum {
|
|
|
|
KSPROPERTY_GM_GRAPHMANAGER,
|
|
|
|
KSPROPERTY_GM_TIMESTAMP_CLOCK,
|
|
|
|
KSPROPERTY_GM_RATEMATCH,
|
|
|
|
KSPROPERTY_GM_RENDERCLOCK
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSPROPERTY_GM;
|
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
Media Seeking
|
|
|
|
Properties/Methods/Events
|
|
|
|
*/
|
|
|
|
|
2010-03-11 21:15:46 +00:00
|
|
|
#define STATIC_KSPROPSETID_MediaSeeking\
|
2013-08-17 23:51:10 +00:00
|
|
|
0xEE904F0CL, 0xD09B, 0x11D0, {0xAB, 0xE9, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96}
|
2010-03-11 21:15:46 +00:00
|
|
|
DEFINE_GUIDSTRUCT("EE904F0C-D09B-11D0-ABE9-00A0C9223196", KSPROPSETID_MediaSeeking);
|
|
|
|
#define KSPROPSETID_MediaSeeking DEFINE_GUIDNAMED(KSPROPSETID_MediaSeeking)
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2010-03-11 21:15:46 +00:00
|
|
|
typedef enum {
|
2013-08-17 23:51:10 +00:00
|
|
|
KSPROPERTY_MEDIASEEKING_CAPABILITIES,
|
|
|
|
KSPROPERTY_MEDIASEEKING_FORMATS,
|
|
|
|
KSPROPERTY_MEDIASEEKING_TIMEFORMAT,
|
|
|
|
KSPROPERTY_MEDIASEEKING_POSITION,
|
|
|
|
KSPROPERTY_MEDIASEEKING_STOPPOSITION,
|
|
|
|
KSPROPERTY_MEDIASEEKING_POSITIONS,
|
|
|
|
KSPROPERTY_MEDIASEEKING_DURATION,
|
|
|
|
KSPROPERTY_MEDIASEEKING_AVAILABLE,
|
|
|
|
KSPROPERTY_MEDIASEEKING_PREROLL,
|
|
|
|
KSPROPERTY_MEDIASEEKING_CONVERTTIMEFORMAT
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSPROPERTY_MEDIASEEKING;
|
|
|
|
|
2010-03-11 21:15:46 +00:00
|
|
|
typedef enum {
|
2013-08-17 23:51:10 +00:00
|
|
|
KS_SEEKING_NoPositioning,
|
|
|
|
KS_SEEKING_AbsolutePositioning,
|
|
|
|
KS_SEEKING_RelativePositioning,
|
|
|
|
KS_SEEKING_IncrementalPositioning,
|
|
|
|
KS_SEEKING_PositioningBitsMask = 0x3,
|
|
|
|
KS_SEEKING_SeekToKeyFrame,
|
|
|
|
KS_SEEKING_ReturnTime = 0x8
|
2010-03-11 21:15:46 +00:00
|
|
|
} KS_SEEKING_FLAGS;
|
|
|
|
|
|
|
|
typedef enum {
|
2013-08-17 23:51:10 +00:00
|
|
|
KS_SEEKING_CanSeekAbsolute = 0x1,
|
|
|
|
KS_SEEKING_CanSeekForwards = 0x2,
|
|
|
|
KS_SEEKING_CanSeekBackwards = 0x4,
|
|
|
|
KS_SEEKING_CanGetCurrentPos = 0x8,
|
|
|
|
KS_SEEKING_CanGetStopPos = 0x10,
|
|
|
|
KS_SEEKING_CanGetDuration = 0x20,
|
|
|
|
KS_SEEKING_CanPlayBackwards = 0x40
|
2010-03-11 21:15:46 +00:00
|
|
|
} KS_SEEKING_CAPABILITIES;
|
|
|
|
|
|
|
|
typedef struct {
|
2013-08-17 23:51:10 +00:00
|
|
|
LONGLONG Current;
|
|
|
|
LONGLONG Stop;
|
|
|
|
KS_SEEKING_FLAGS CurrentFlags;
|
|
|
|
KS_SEEKING_FLAGS StopFlags;
|
2010-03-11 21:15:46 +00:00
|
|
|
} KSPROPERTY_POSITIONS, *PKSPROPERTY_POSITIONS;
|
|
|
|
|
|
|
|
typedef struct {
|
2013-08-17 23:51:10 +00:00
|
|
|
LONGLONG Earliest;
|
|
|
|
LONGLONG Latest;
|
2010-03-11 21:15:46 +00:00
|
|
|
} KSPROPERTY_MEDIAAVAILABLE, *PKSPROPERTY_MEDIAAVAILABLE;
|
|
|
|
|
|
|
|
typedef struct {
|
2013-08-17 23:51:10 +00:00
|
|
|
KSPROPERTY Property;
|
|
|
|
GUID SourceFormat;
|
|
|
|
GUID TargetFormat;
|
|
|
|
LONGLONG Time;
|
2010-03-11 21:15:46 +00:00
|
|
|
} KSP_TIMEFORMAT, *PKSP_TIMEFORMAT;
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM_MEDIASEEKING_CAPABILITIES(Handler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_MEDIASEEKING_CAPABILITIES,\
|
|
|
|
(Handler),\
|
|
|
|
sizeof(KSPROPERTY),\
|
|
|
|
sizeof(KS_SEEKING_CAPABILITIES),\
|
|
|
|
NULL, NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM_MEDIASEEKING_FORMATS(Handler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_MEDIASEEKING_FORMATS,\
|
|
|
|
(Handler),\
|
|
|
|
sizeof(KSPROPERTY),\
|
|
|
|
0,\
|
|
|
|
NULL, NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM_MEDIASEEKING_TIMEFORMAT(GetHandler, SetHandler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_MEDIASEEKING_TIMEFORMAT,\
|
|
|
|
(GetHandler),\
|
|
|
|
sizeof(KSPROPERTY),\
|
|
|
|
sizeof(GUID),\
|
|
|
|
(SetHandler),\
|
|
|
|
NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM_MEDIASEEKING_POSITION(Handler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_MEDIASEEKING_POSITION,\
|
|
|
|
(Handler),\
|
|
|
|
sizeof(KSPROPERTY),\
|
|
|
|
sizeof(LONGLONG),\
|
|
|
|
NULL, NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM_MEDIASEEKING_STOPPOSITION(Handler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_MEDIASEEKING_STOPPOSITION,\
|
|
|
|
(Handler),\
|
|
|
|
sizeof(KSPROPERTY),\
|
|
|
|
sizeof(LONGLONG),\
|
|
|
|
NULL, NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM_MEDIASEEKING_POSITIONS(Handler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_MEDIASEEKING_POSITIONS,\
|
|
|
|
NULL,\
|
|
|
|
sizeof(KSPROPERTY),\
|
|
|
|
sizeof(KSPROPERTY_POSITIONS),\
|
|
|
|
(Handler),\
|
|
|
|
NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM_MEDIASEEKING_DURATION(Handler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_MEDIASEEKING_DURATION,\
|
|
|
|
(Handler),\
|
|
|
|
sizeof(KSPROPERTY),\
|
|
|
|
sizeof(LONGLONG),\
|
|
|
|
NULL, NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM_MEDIASEEKING_AVAILABLE(Handler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_MEDIASEEKING_AVAILABLE,\
|
|
|
|
(Handler),\
|
|
|
|
sizeof(KSPROPERTY),\
|
|
|
|
sizeof(KSPROPERTY_MEDIAAVAILABLE),\
|
|
|
|
NULL, NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM_MEDIASEEKING_PREROLL(Handler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_MEDIASEEKING_PREROLL,\
|
|
|
|
(Handler),\
|
|
|
|
sizeof(KSPROPERTY),\
|
|
|
|
sizeof(LONGLONG),\
|
|
|
|
NULL, NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM_MEDIASEEKING_CONVERTTIMEFORMAT(Handler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_MEDIASEEKING_CONVERTTIMEFORMAT,\
|
|
|
|
(Handler),\
|
|
|
|
sizeof(KSP_TIMEFORMAT),\
|
|
|
|
sizeof(LONGLONG),\
|
|
|
|
NULL, NULL, 0, NULL, NULL, 0)
|
2006-12-10 04:04:03 +00:00
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
Pin
|
|
|
|
Properties/Methods/Events
|
|
|
|
*/
|
|
|
|
|
2007-09-19 14:42:54 +00:00
|
|
|
#define STATIC_KSPROPSETID_Pin\
|
2013-08-17 23:51:10 +00:00
|
|
|
0x8C134960L, 0x51AD, 0x11CF, {0x87, 0x8A, 0x94, 0xF8, 0x01, 0xC1, 0x00, 0x00}
|
2007-09-19 14:42:54 +00:00
|
|
|
DEFINE_GUIDSTRUCT("8C134960-51AD-11CF-878A-94F801C10000", KSPROPSETID_Pin);
|
|
|
|
#define KSPROPSETID_Pin DEFINE_GUIDNAMED(KSPROPSETID_Pin)
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2009-02-18 17:59:30 +00:00
|
|
|
#define STATIC_KSNAME_Pin\
|
2013-08-17 23:51:10 +00:00
|
|
|
0x146F1A80L, 0x4791, 0x11D0, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}
|
2009-02-18 17:59:30 +00:00
|
|
|
DEFINE_GUIDSTRUCT("146F1A80-4791-11D0-A5D6-28DB04C10000", KSNAME_Pin);
|
|
|
|
#define KSNAME_Pin DEFINE_GUIDNAMED(KSNAME_Pin)
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef enum {
|
|
|
|
KSPROPERTY_PIN_CINSTANCES,
|
|
|
|
KSPROPERTY_PIN_CTYPES,
|
|
|
|
KSPROPERTY_PIN_DATAFLOW,
|
|
|
|
KSPROPERTY_PIN_DATARANGES,
|
|
|
|
KSPROPERTY_PIN_DATAINTERSECTION,
|
|
|
|
KSPROPERTY_PIN_INTERFACES,
|
|
|
|
KSPROPERTY_PIN_MEDIUMS,
|
|
|
|
KSPROPERTY_PIN_COMMUNICATION,
|
|
|
|
KSPROPERTY_PIN_GLOBALCINSTANCES,
|
|
|
|
KSPROPERTY_PIN_NECESSARYINSTANCES,
|
|
|
|
KSPROPERTY_PIN_PHYSICALCONNECTION,
|
|
|
|
KSPROPERTY_PIN_CATEGORY,
|
|
|
|
KSPROPERTY_PIN_NAME,
|
|
|
|
KSPROPERTY_PIN_CONSTRAINEDDATARANGES,
|
|
|
|
KSPROPERTY_PIN_PROPOSEDATAFORMAT
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSPROPERTY_PIN;
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
KSPROPERTY Property;
|
|
|
|
ULONG PinId;
|
|
|
|
ULONG Reserved;
|
2007-09-19 14:42:54 +00:00
|
|
|
} KSP_PIN, *PKSP_PIN;
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
#define KSINSTANCE_INDETERMINATE ((ULONG)-1)
|
2007-09-19 14:42:54 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
ULONG PossibleCount;
|
|
|
|
ULONG CurrentCount;
|
2007-09-19 14:42:54 +00:00
|
|
|
} KSPIN_CINSTANCES, *PKSPIN_CINSTANCES;
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
ULONG Size;
|
|
|
|
ULONG Pin;
|
|
|
|
WCHAR SymbolicLinkName[1];
|
2007-09-19 14:42:54 +00:00
|
|
|
} KSPIN_PHYSICALCONNECTION, *PKSPIN_PHYSICALCONNECTION;
|
|
|
|
|
2006-12-10 04:04:03 +00:00
|
|
|
/* ===============================================================
|
|
|
|
Quality
|
|
|
|
Properties/Methods/Events
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define KSPROPSETID_Quality \
|
2013-08-17 23:51:10 +00:00
|
|
|
0xD16AD380L, 0xAC1A, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef enum {
|
|
|
|
KSPROPERTY_QUALITY_REPORT,
|
|
|
|
KSPROPERTY_QUALITY_ERROR
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSPROPERTY_QUALITY;
|
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
Stream
|
|
|
|
Properties/Methods/Events
|
|
|
|
*/
|
|
|
|
|
2010-03-13 17:36:30 +00:00
|
|
|
#define STATIC_KSPROPSETID_Stream\
|
2013-08-17 23:51:10 +00:00
|
|
|
0x65aaba60L, 0x98ae, 0x11cf, {0xa1, 0x0d, 0x00, 0x20, 0xaf, 0xd1, 0x56, 0xe4}
|
2010-03-13 17:36:30 +00:00
|
|
|
DEFINE_GUIDSTRUCT("65aaba60-98ae-11cf-a10d-0020afd156e4", KSPROPSETID_Stream);
|
|
|
|
#define KSPROPSETID_Stream DEFINE_GUIDNAMED(KSPROPSETID_Stream)
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef enum {
|
|
|
|
KSPROPERTY_STREAM_ALLOCATOR,
|
|
|
|
KSPROPERTY_STREAM_QUALITY,
|
|
|
|
KSPROPERTY_STREAM_DEGRADATION,
|
|
|
|
KSPROPERTY_STREAM_MASTERCLOCK,
|
|
|
|
KSPROPERTY_STREAM_TIMEFORMAT,
|
|
|
|
KSPROPERTY_STREAM_PRESENTATIONTIME,
|
|
|
|
KSPROPERTY_STREAM_PRESENTATIONEXTENT,
|
|
|
|
KSPROPERTY_STREAM_FRAMETIME,
|
|
|
|
KSPROPERTY_STREAM_RATECAPABILITY,
|
|
|
|
KSPROPERTY_STREAM_RATE,
|
|
|
|
KSPROPERTY_STREAM_PIPE_ID
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSPROPERTY_STREAM;
|
|
|
|
|
2010-04-02 17:19:57 +00:00
|
|
|
#define DEFINE_KSPROPERTY_ITEM_STREAM_ALLOCATOR(GetHandler, SetHandler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_STREAM_ALLOCATOR,\
|
|
|
|
(GetHandler),\
|
|
|
|
sizeof(KSPROPERTY),\
|
|
|
|
sizeof(HANDLE),\
|
|
|
|
(SetHandler),\
|
|
|
|
NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM_STREAM_QUALITY(Handler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_STREAM_QUALITY,\
|
|
|
|
(Handler),\
|
|
|
|
sizeof(KSPROPERTY),\
|
|
|
|
sizeof(KSQUALITY_MANAGER),\
|
|
|
|
NULL, NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM_STREAM_DEGRADATION(GetHandler, SetHandler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_STREAM_DEGRADATION,\
|
|
|
|
(GetHandler),\
|
|
|
|
sizeof(KSPROPERTY),\
|
|
|
|
0,\
|
|
|
|
(SetHandler),\
|
|
|
|
NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM_STREAM_MASTERCLOCK(GetHandler, SetHandler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_STREAM_MASTERCLOCK,\
|
|
|
|
(GetHandler),\
|
|
|
|
sizeof(KSPROPERTY),\
|
|
|
|
sizeof(HANDLE),\
|
|
|
|
(SetHandler),\
|
|
|
|
NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM_STREAM_TIMEFORMAT(Handler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_STREAM_TIMEFORMAT,\
|
|
|
|
(Handler),\
|
|
|
|
sizeof(KSPROPERTY),\
|
|
|
|
sizeof(GUID),\
|
|
|
|
NULL, NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM_STREAM_PRESENTATIONTIME(GetHandler, SetHandler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_STREAM_PRESENTATIONTIME,\
|
|
|
|
(GetHandler),\
|
|
|
|
sizeof(KSPROPERTY),\
|
|
|
|
sizeof(KSTIME),\
|
|
|
|
(SetHandler),\
|
|
|
|
NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM_STREAM_PRESENTATIONEXTENT(Handler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_STREAM_PRESENTATIONEXTENT,\
|
|
|
|
(Handler),\
|
|
|
|
sizeof(KSPROPERTY),\
|
|
|
|
sizeof(LONGLONG),\
|
|
|
|
NULL, NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM_STREAM_FRAMETIME(Handler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_STREAM_FRAMETIME,\
|
|
|
|
(Handler),\
|
|
|
|
sizeof(KSPROPERTY),\
|
|
|
|
sizeof(KSFRAMETIME),\
|
|
|
|
NULL, NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM_STREAM_RATECAPABILITY(Handler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_STREAM_RATECAPABILITY,\
|
|
|
|
(Handler),\
|
|
|
|
sizeof(KSRATE_CAPABILITY),\
|
|
|
|
sizeof(KSRATE),\
|
|
|
|
NULL, NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM_STREAM_RATE(GetHandler, SetHandler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_STREAM_RATE,\
|
|
|
|
(GetHandler),\
|
|
|
|
sizeof(KSPROPERTY),\
|
|
|
|
sizeof(KSRATE),\
|
|
|
|
(SetHandler),\
|
|
|
|
NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM_STREAM_PIPE_ID(GetHandler, SetHandler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_STREAM_PIPE_ID,\
|
|
|
|
(GetHandler),\
|
|
|
|
sizeof(KSPROPERTY),\
|
|
|
|
sizeof(HANDLE),\
|
|
|
|
(SetHandler),\
|
|
|
|
NULL, 0, NULL, NULL, 0)
|
2006-12-10 04:04:03 +00:00
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
StreamAllocator
|
|
|
|
Properties/Methods/Events
|
|
|
|
*/
|
|
|
|
|
2009-07-20 17:14:21 +00:00
|
|
|
#define STATIC_KSPROPSETID_StreamAllocator\
|
2013-08-17 23:51:10 +00:00
|
|
|
0xcf6e4342L, 0xec87, 0x11cf, {0xa1, 0x30, 0x00, 0x20, 0xaf, 0xd1, 0x56, 0xe4}
|
2009-07-20 17:14:21 +00:00
|
|
|
DEFINE_GUIDSTRUCT("cf6e4342-ec87-11cf-a130-0020afd156e4", KSPROPSETID_StreamAllocator);
|
|
|
|
#define KSPROPSETID_StreamAllocator DEFINE_GUIDNAMED(KSPROPSETID_StreamAllocator)
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef enum {
|
|
|
|
KSPROPERTY_STREAMALLOCATOR_FUNCTIONTABLE,
|
|
|
|
KSPROPERTY_STREAMALLOCATOR_STATUS
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSPROPERTY_STREAMALLOCATOR;
|
|
|
|
|
|
|
|
#define KSMETHODSETID_StreamAllocator \
|
2013-08-17 23:51:10 +00:00
|
|
|
0xcf6e4341L, 0xec87, 0x11cf, {0xa1, 0x30, 0x00, 0x20, 0xaf, 0xd1, 0x56, 0xe4}
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef enum {
|
|
|
|
KSMETHOD_STREAMALLOCATOR_ALLOC,
|
|
|
|
KSMETHOD_STREAMALLOCATOR_FREE
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSMETHOD_STREAMALLOCATOR;
|
|
|
|
|
|
|
|
#define KSEVENTSETID_StreamAllocator
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef enum {
|
|
|
|
KSEVENT_STREAMALLOCATOR_INTERNAL_FREEFRAME,
|
|
|
|
KSEVENT_STREAMALLOCATOR_FREEFRAME
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSEVENT_STREAMALLOCATOR;
|
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
StreamInterface
|
|
|
|
Properties/Methods/Events
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define KSPROPSETID_StreamInterface \
|
2013-08-17 23:51:10 +00:00
|
|
|
0x1fdd8ee1L, 0x9cd3, 0x11d0, 0x82, 0xaa, 0x00, 0x00, 0xf8, 0x22, 0xfe, 0x8a
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef enum {
|
|
|
|
KSPROPERTY_STREAMINTERFACE_HEADERSIZE
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSPROPERTY_STREAMINTERFACE;
|
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
Topology
|
|
|
|
Properties/Methods/Events
|
|
|
|
*/
|
|
|
|
|
2009-02-16 23:29:13 +00:00
|
|
|
#define STATIC_KSPROPSETID_Topology\
|
2013-08-17 23:51:10 +00:00
|
|
|
0x720D4AC0L, 0x7533, 0x11D0, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}
|
2009-02-16 23:29:13 +00:00
|
|
|
DEFINE_GUIDSTRUCT("720D4AC0-7533-11D0-A5D6-28DB04C10000", KSPROPSETID_Topology);
|
|
|
|
#define KSPROPSETID_Topology DEFINE_GUIDNAMED(KSPROPSETID_Topology)
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2009-08-23 22:31:30 +00:00
|
|
|
typedef enum {
|
2013-08-17 23:51:10 +00:00
|
|
|
KSPROPERTY_TOPOLOGY_CATEGORIES,
|
|
|
|
KSPROPERTY_TOPOLOGY_NODES,
|
|
|
|
KSPROPERTY_TOPOLOGY_CONNECTIONS,
|
|
|
|
KSPROPERTY_TOPOLOGY_NAME
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSPROPERTY_TOPOLOGY;
|
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
Property Sets for audio drivers - TODO
|
|
|
|
*/
|
|
|
|
|
2009-03-01 12:45:32 +00:00
|
|
|
#define STATIC_KSPROPTYPESETID_General \
|
2013-08-17 23:51:10 +00:00
|
|
|
0x97E99BA0L, 0xBDEA, 0x11CF, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}
|
2009-03-01 12:45:32 +00:00
|
|
|
DEFINE_GUIDSTRUCT("97E99BA0-BDEA-11CF-A5D6-28DB04C10000", KSPROPTYPESETID_General);
|
|
|
|
#define KSPROPTYPESETID_General DEFINE_GUIDNAMED(KSPROPTYPESETID_General)
|
|
|
|
|
2006-12-10 04:04:03 +00:00
|
|
|
/*
|
2007-10-19 23:21:45 +00:00
|
|
|
KSPROPERTY_AC3_ALTERNATE_AUDIO
|
|
|
|
KSPROPERTY_AC3_BIT_STREAM_MODE
|
|
|
|
KSPROPERTY_AC3_DIALOGUE_LEVEL
|
|
|
|
KSPROPERTY_AC3_DOWNMIX
|
|
|
|
KSPROPERTY_AC3_ERROR_CONCEALMENT
|
|
|
|
KSPROPERTY_AC3_LANGUAGE_CODE
|
2006-12-10 04:04:03 +00:00
|
|
|
KSPROPERTY_AC3_ROOM_TYPE
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define KSPROPSETID_Acoustic_Echo_Cancel
|
|
|
|
/*
|
2007-10-19 23:21:45 +00:00
|
|
|
KSPROPERTY_AEC_MODE
|
|
|
|
KSPROPERTY_AEC_NOISE_FILL_ENABLE
|
2006-12-10 04:04:03 +00:00
|
|
|
KSPROPERTY_AEC_STATUS
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
KSPROPERTY_AUDIO_3D_INTERFACE
|
2007-10-19 23:21:45 +00:00
|
|
|
KSPROPERTY_AUDIO_AGC
|
|
|
|
KSPROPERTY_AUDIO_ALGORITHM_INSTANCE
|
|
|
|
KSPROPERTY_AUDIO_BASS
|
|
|
|
KSPROPERTY_AUDIO_BASS_BOOST
|
|
|
|
KSPROPERTY_AUDIO_CHANNEL_CONFIG
|
|
|
|
KSPROPERTY_AUDIO_CHORUS_LEVEL
|
|
|
|
KSPROPERTY_AUDIO_COPY_PROTECTION
|
|
|
|
KSPROPERTY_AUDIO_CPU_RESOURCES
|
|
|
|
KSPROPERTY_AUDIO_DELAY
|
|
|
|
KSPROPERTY_AUDIO_DEMUX_DEST
|
|
|
|
KSPROPERTY_AUDIO_DEV_SPECIFIC
|
|
|
|
KSPROPERTY_AUDIO_DYNAMIC_RANGE
|
|
|
|
KSPROPERTY_AUDIO_DYNAMIC_SAMPLING_RATE
|
|
|
|
KSPROPERTY_AUDIO_EQ_BANDS
|
|
|
|
KSPROPERTY_AUDIO_EQ_LEVEL
|
|
|
|
KSPROPERTY_AUDIO_FILTER_STATE
|
|
|
|
KSPROPERTY_AUDIO_LATENCY
|
|
|
|
KSPROPERTY_AUDIO_LOUDNESS
|
|
|
|
KSPROPERTY_AUDIO_MANUFACTURE_GUID
|
|
|
|
KSPROPERTY_AUDIO_MID
|
|
|
|
KSPROPERTY_AUDIO_MIX_LEVEL_CAPS
|
|
|
|
KSPROPERTY_AUDIO_MIX_LEVEL_TABLE
|
|
|
|
KSPROPERTY_AUDIO_MUTE
|
|
|
|
KSPROPERTY_AUDIO_MUX_SOURCE
|
|
|
|
KSPROPERTY_AUDIO_NUM_EQ_BANDS
|
2006-12-10 04:04:03 +00:00
|
|
|
KSPROPERTY_AUDIO_PEAKMETER
|
2007-10-19 23:21:45 +00:00
|
|
|
KSPROPERTY_AUDIO_POSITION
|
|
|
|
KSPROPERTY_AUDIO_PREFERRED_STATUS
|
|
|
|
KSPROPERTY_AUDIO_PRODUCT_GUID
|
|
|
|
KSPROPERTY_AUDIO_QUALITY
|
|
|
|
KSPROPERTY_AUDIO_REVERB_LEVEL
|
|
|
|
KSPROPERTY_AUDIO_SAMPLING_RATE
|
|
|
|
KSPROPERTY_AUDIO_STEREO_ENHANCE
|
|
|
|
KSPROPERTY_AUDIO_STEREO_SPEAKER_GEOMETRY
|
|
|
|
KSPROPERTY_AUDIO_SURROUND_ENCODE
|
|
|
|
KSPROPERTY_AUDIO_TREBLE
|
|
|
|
KSPROPERTY_AUDIO_VOLUMELEVEL
|
|
|
|
KSPROPERTY_AUDIO_WIDE_MODE
|
2006-12-10 04:04:03 +00:00
|
|
|
KSPROPERTY_AUDIO_WIDENESS
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define KSPROPSETID_AudioGfx
|
|
|
|
/*
|
|
|
|
KSPROPERTY_AUDIOGFX_CAPTURETARGETDEVICEID
|
|
|
|
KSPROPERTY_AUDIOGFX_RENDERTARGETDEVICEID
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define KSPROPSETID_DirectSound3DBuffer
|
|
|
|
/*
|
2007-10-19 23:21:45 +00:00
|
|
|
KSPROPERTY_DIRECTSOUND3DBUFFER_ALL
|
|
|
|
KSPROPERTY_DIRECTSOUND3DBUFFER_CONEANGLES
|
|
|
|
KSPROPERTY_DIRECTSOUND3DBUFFER_CONEORIENTATION
|
|
|
|
KSPROPERTY_DIRECTSOUND3DBUFFER_CONEOUTSIDEVOLUME
|
|
|
|
KSPROPERTY_DIRECTSOUND3DBUFFER_MAXDISTANCE
|
|
|
|
KSPROPERTY_DIRECTSOUND3DBUFFER_MINDISTANCE
|
|
|
|
KSPROPERTY_DIRECTSOUND3DBUFFER_MODE
|
|
|
|
KSPROPERTY_DIRECTSOUND3DBUFFER_POSITION
|
2006-12-10 04:04:03 +00:00
|
|
|
KSPROPERTY_DIRECTSOUND3DBUFFER_VELOCITY
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define KSPROPSETID_DirectSound3DListener
|
|
|
|
/*
|
2007-10-19 23:21:45 +00:00
|
|
|
KSPROPERTY_DIRECTSOUND3DLISTENER_ALL
|
2006-12-10 04:04:03 +00:00
|
|
|
KSPROPERTY_DIRECTSOUND3DLISTENER_ALLOCATION
|
2007-10-19 23:21:45 +00:00
|
|
|
KSPROPERTY_DIRECTSOUND3DLISTENER_BATCH
|
|
|
|
KSPROPERTY_DIRECTSOUND3DLISTENER_DISTANCEFACTOR
|
|
|
|
KSPROPERTY_DIRECTSOUND3DLISTENER_DOPPLERFACTOR
|
|
|
|
KSPROPERTY_DIRECTSOUND3DLISTENER_ORIENTATION
|
|
|
|
KSPROPERTY_DIRECTSOUND3DLISTENER_POSITION
|
|
|
|
KSPROPERTY_DIRECTSOUND3DLISTENER_ROLLOFFFACTOR
|
2006-12-10 04:04:03 +00:00
|
|
|
KSPROPERTY_DIRECTSOUND3DLISTENER_VELOCITY
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define KSPROPSETID_Hrtf3d
|
|
|
|
/*
|
2007-10-19 23:21:45 +00:00
|
|
|
KSPROPERTY_HRTF3D_FILTER_FORMAT
|
|
|
|
KSPROPERTY_HRTF3D_INITIALIZE
|
2006-12-10 04:04:03 +00:00
|
|
|
KSPROPERTY_HRTF3D_PARAMS
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define KSPROPSETID_Itd3d
|
|
|
|
/*
|
|
|
|
KSPROPERTY_ITD3D_PARAMS
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define KSPROPSETID_TopologyNode
|
|
|
|
/*
|
2007-10-19 23:21:45 +00:00
|
|
|
KSPROPERTY_TOPOLOGYNODE_ENABLE
|
2006-12-10 04:04:03 +00:00
|
|
|
KSPROPERTY_TOPOLOGYNODE_RESET
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
Node Types
|
|
|
|
*/
|
|
|
|
/*
|
2007-10-19 23:21:45 +00:00
|
|
|
KSNODETYPE_3D_EFFECTS
|
2006-12-10 04:04:03 +00:00
|
|
|
KSNODETYPE_ACOUSTIC_ECHO_CANCEL
|
2007-10-19 23:21:45 +00:00
|
|
|
KSNODETYPE_ADC
|
|
|
|
KSNODETYPE_AGC
|
|
|
|
KSNODETYPE_CHORUS
|
|
|
|
KSNODETYPE_DAC
|
|
|
|
KSNODETYPE_DELAY
|
|
|
|
KSNODETYPE_DEMUX
|
|
|
|
KSNODETYPE_DEV_SPECIFIC
|
|
|
|
KSNODETYPE_DMSYNTH
|
|
|
|
KSNODETYPE_DMSYNTH_CAPS
|
|
|
|
KSNODETYPE_DRM_DESCRAMBLE
|
|
|
|
KSNODETYPE_EQUALIZER
|
|
|
|
KSNODETYPE_LOUDNESS
|
|
|
|
KSNODETYPE_MUTE
|
|
|
|
KSNODETYPE_MUX
|
2006-12-10 04:04:03 +00:00
|
|
|
KSNODETYPE_PEAKMETER
|
2007-10-19 23:21:45 +00:00
|
|
|
KSNODETYPE_PROLOGIC_DECODER
|
|
|
|
KSNODETYPE_PROLOGIC_ENCODER
|
|
|
|
KSNODETYPE_REVERB
|
|
|
|
KSNODETYPE_SRC
|
2006-12-10 04:04:03 +00:00
|
|
|
KSNODETYPE_STEREO_ENHANCE
|
2007-10-19 23:21:45 +00:00
|
|
|
KSNODETYPE_STEREO_WIDE
|
|
|
|
KSNODETYPE_SUM
|
|
|
|
KSNODETYPE_SUPERMIX
|
|
|
|
KSNODETYPE_SWMIDI
|
|
|
|
KSNODETYPE_SWSYNTH
|
|
|
|
KSNODETYPE_SYNTHESIZER
|
|
|
|
KSNODETYPE_TONE
|
2006-12-10 04:04:03 +00:00
|
|
|
KSNODETYPE_VOLUME
|
|
|
|
*/
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef PVOID KSDEVICE_HEADER, KSOBJECT_HEADER, KSOBJECT_BAG;
|
2006-12-10 04:04:03 +00:00
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
Method Types
|
|
|
|
*/
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
#define KSMETHOD_TYPE_NONE 0x00000000
|
|
|
|
#define KSMETHOD_TYPE_READ 0x00000001
|
|
|
|
#define KSMETHOD_TYPE_WRITE 0x00000002
|
|
|
|
#define KSMETHOD_TYPE_MODIFY 0x00000003
|
|
|
|
#define KSMETHOD_TYPE_SOURCE 0x00000004
|
|
|
|
#define KSMETHOD_TYPE_SEND 0x00000001
|
|
|
|
#define KSMETHOD_TYPE_SETSUPPORT 0x00000100
|
|
|
|
#define KSMETHOD_TYPE_BASICSUPPORT 0x00000200
|
2006-12-10 04:04:03 +00:00
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
Property Types
|
|
|
|
*/
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
#define KSPROPERTY_TYPE_GET 0x00000001
|
|
|
|
#define KSPROPERTY_TYPE_SET 0x00000002
|
|
|
|
#define KSPROPERTY_TYPE_SETSUPPORT 0x00000100
|
|
|
|
#define KSPROPERTY_TYPE_BASICSUPPORT 0x00000200
|
|
|
|
#define KSPROPERTY_TYPE_RELATIONS 0x00000400
|
|
|
|
#define KSPROPERTY_TYPE_SERIALIZESET 0x00000800
|
|
|
|
#define KSPROPERTY_TYPE_UNSERIALIZESET 0x00001000
|
|
|
|
#define KSPROPERTY_TYPE_SERIALIZERAW 0x00002000
|
|
|
|
#define KSPROPERTY_TYPE_UNSERIALIZERAW 0x00004000
|
|
|
|
#define KSPROPERTY_TYPE_SERIALIZESIZE 0x00008000
|
|
|
|
#define KSPROPERTY_TYPE_DEFAULT_VALUES 0x00010000
|
2006-12-10 04:04:03 +00:00
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
Topology Methods/Properties
|
|
|
|
*/
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
#define KSMETHOD_TYPE_TOPOLOGY 0x10000000
|
|
|
|
#define KSPROPERTY_TYPE_TOPOLOGY 0x10000000
|
2006-12-10 04:04:03 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
#define DEFINE_KS_GUID(GA,GB,GC,GD,GE,GF,GG,GH,GI,GJ,GK) \
|
|
|
|
DEFINE_GUID(??, 0x#GA#L, 0xGB, 0xGC, 0xGD, 0xGE, 0xGF, 0xGG, 0xGH, 0xGI, 0xGJ, 0xGK) \
|
|
|
|
"GA-GB-GC-GDGE-GFGGGHGIGJGK"
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
KS Category GUIDs
|
|
|
|
|
|
|
|
BRIDGE - 0x085AFF00L, 0x62CE, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
|
|
|
|
CAPTURE - 0x65E8773DL, 0x8F56, 0x11D0, 0xA3, 0xB9, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
|
|
|
|
RENDER - 0x65E8773EL, 0x8F56, 0x11D0, 0xA3, 0xB9, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
|
|
|
|
MIXER - 0xAD809C00L, 0x7B88, 0x11D0, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
|
|
|
|
SPLITTER - 0x0A4252A0L, 0x7E70, 0x11D0, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
|
|
|
|
DATACOMPRESSOR - 0x1E84C900L, 0x7E70, 0x11D0, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
|
|
|
|
DATADECOMPRESSOR - 0x2721AE20L, 0x7E70, 0x11D0, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
|
|
|
|
DATATRANSFORM - 0x2EB07EA0L, 0x7E70, 0x11D0, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
|
|
|
|
COMMUNICATIONSTRANSFORM - 0xCF1DDA2CL, 0x9743, 0x11D0, 0xA3, 0xEE, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
|
|
|
|
INTERFACETRANSFORM - 0xCF1DDA2DL, 0x9743, 0x11D0, 0xA3, 0xEE, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
|
|
|
|
MEDIUMTRANSFORM - 0xCF1DDA2EL, 0x9743, 0x11D0, 0xA3, 0xEE, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
|
|
|
|
FILESYSTEM - 0x760FED5EL, 0x9357, 0x11D0, 0xA3, 0xCC, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
|
|
|
|
CLOCK - 0x53172480L, 0x4791, 0x11D0, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
|
|
|
|
PROXY - 0x97EBAACAL, 0x95BD, 0x11D0, 0xA3, 0xEA, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
|
|
|
|
QUALITY - 0x97EBAACBL, 0x95BD, 0x11D0, 0xA3, 0xEA, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
KSNAME GUIDs (defined also as KSSTRING_Xxx L"{...}"
|
|
|
|
|
|
|
|
Filter - 0x9b365890L, 0x165f, 0x11d0, 0xa1, 0x95, 0x00, 0x20, 0xaf, 0xd1, 0x56, 0xe4
|
|
|
|
Pin - 0x146F1A80L, 0x4791, 0x11D0, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
|
|
|
|
Clock - 0x53172480L, 0x4791, 0x11D0, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
|
|
|
|
Allocator - 0x642F5D00L, 0x4791, 0x11D0, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
|
|
|
|
TopologyNode - 0x0621061AL, 0xEE75, 0x11D0, 0xB9, 0x15, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
Interface GUIDs
|
|
|
|
|
|
|
|
Standard - 0x1A8766A0L, 0x62CE, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
|
|
|
|
FileIo - 0x8C6F932CL, 0xE771, 0x11D0, 0xB8, 0xFF, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
Medium Type GUIDs
|
|
|
|
|
|
|
|
Standard - 0x4747B320L, 0x62CE, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
Property Set GUIDs
|
|
|
|
|
|
|
|
General - 0x1464EDA5L, 0x6A8F, 0x11D1, 0x9A, 0xA7, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
|
|
|
|
StreamIo - 0x65D003CAL, 0x1523, 0x11D2, 0xB2, 0x7A, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
|
|
|
|
MediaSeeking - 0xEE904F0CL, 0xD09B, 0x11D0, 0xAB, 0xE9, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
|
|
|
|
Topology - 0x720D4AC0L, 0x7533, 0x11D0, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
|
|
|
|
GM - 0xAF627536L, 0xE719, 0x11D2, 0x8A, 0x1D, 0x00, 0x60, 0x97, 0xD2, 0xDF, 0x5D
|
|
|
|
Quality - 0xD16AD380L, 0xAC1A, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
|
|
|
|
Connection - 0x1D58C920L, 0xAC9B, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
StreamAllocator Sets
|
|
|
|
|
|
|
|
Event set - 0x75d95571L, 0x073c, 0x11d0, 0xa1, 0x61, 0x00, 0x20, 0xaf, 0xd1, 0x56, 0xe4
|
|
|
|
Method set - 0xcf6e4341L, 0xec87, 0x11cf, 0xa1, 0x30, 0x00, 0x20, 0xaf, 0xd1, 0x56, 0xe4
|
|
|
|
Property set - 0xcf6e4342L, 0xec87, 0x11cf, 0xa1, 0x30, 0x00, 0x20, 0xaf, 0xd1, 0x56, 0xe4
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
StreamInterface Sets
|
|
|
|
|
|
|
|
Property set - 0x1fdd8ee1L, 0x9cd3, 0x11d0, 0x82, 0xaa, 0x00, 0x00, 0xf8, 0x22, 0xfe, 0x8a
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
Clock Sets
|
|
|
|
|
|
|
|
Property set - 0xDF12A4C0L, 0xAC17, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
|
|
|
|
Event sets - 0x364D8E20L, 0x62C7, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
Connection Sets
|
|
|
|
|
|
|
|
Event set - 0x7f4bcbe0L, 0x9ea5, 0x11cf, 0xa5, 0xd6, 0x28, 0xdb, 0x04, 0xc1, 0x00, 0x00
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
Time Format GUIDs
|
|
|
|
|
|
|
|
KSTIME_FORMAT_NONE (null guid)
|
|
|
|
FRAME - 0x7b785570L, 0x8c82, 0x11cf, 0xbc, 0x0c, 0x00, 0xaa, 0x00, 0xac, 0x74, 0xf6
|
|
|
|
BYTE - 0x7b785571L, 0x8c82, 0x11cf, 0xbc, 0x0c, 0x00, 0xaa, 0x00, 0xac, 0x74, 0xf6
|
|
|
|
SAMPLE - 0x7b785572L, 0x8c82, 0x11cf, 0xbc, 0x0c, 0x00, 0xaa, 0x00, 0xac, 0x74, 0xf6
|
|
|
|
FIELD - 0x7b785573L, 0x8c82, 0x11cf, 0xbc, 0x0c, 0x00, 0xaa, 0x00, 0xac, 0x74, 0xf6
|
|
|
|
MEDIA_TIME - 0x7b785574L, 0x8c82, 0x11cf, 0xbc, 0x0c, 0x00, 0xaa, 0x00, 0xac, 0x74, 0xf6
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
Media Type GUIDs
|
|
|
|
|
|
|
|
NULL
|
|
|
|
Stream -
|
|
|
|
None -
|
|
|
|
|
|
|
|
TODO ...
|
|
|
|
*/
|
|
|
|
|
2009-03-01 12:45:32 +00:00
|
|
|
#define STATIC_KSDATAFORMAT_SPECIFIER_NONE\
|
2013-08-17 23:51:10 +00:00
|
|
|
0x0F6417D6L, 0xC318, 0x11D0, {0xA4, 0x3F, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96}
|
2009-03-01 12:45:32 +00:00
|
|
|
DEFINE_GUIDSTRUCT("0F6417D6-C318-11D0-A43F-00A0C9223196", KSDATAFORMAT_SPECIFIER_NONE);
|
|
|
|
#define KSDATAFORMAT_SPECIFIER_NONE DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_NONE)
|
|
|
|
|
2006-12-10 04:04:03 +00:00
|
|
|
/* ===============================================================
|
|
|
|
KSMEMORY_TYPE_xxx
|
|
|
|
|
|
|
|
WILDCARD, DONT_CARE = NULL
|
|
|
|
SYSTEM - 0x091bb638L, 0x603f, 0x11d1, 0xb0, 0x67, 0x00, 0xa0, 0xc9, 0x06, 0x28, 0x02
|
|
|
|
USER - 0x8cb0fc28L, 0x7893, 0x11d1, 0xb0, 0x69, 0x00, 0xa0, 0xc9, 0x06, 0x28, 0x02
|
|
|
|
KERNEL_PAGED - 0xd833f8f8L, 0x7894, 0x11d1, 0xb0, 0x69, 0x00, 0xa0, 0xc9, 0x06, 0x28, 0x02
|
|
|
|
KERNEL_NONPAGED - 0x4a6d5fc4L, 0x7895, 0x11d1, 0xb0, 0x69, 0x00, 0xa0, 0xc9, 0x06, 0x28, 0x02
|
|
|
|
DEVICE_UNKNOWN - 0x091bb639L, 0x603f, 0x11d1, 0xb0, 0x67, 0x00, 0xa0, 0xc9, 0x06, 0x28, 0x02
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
Enums
|
|
|
|
(values have been checked)
|
|
|
|
*/
|
|
|
|
|
2009-02-16 23:29:13 +00:00
|
|
|
#ifndef _MSC_VER
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM(PropertyId, GetHandler,\
|
|
|
|
MinProperty,\
|
|
|
|
MinData,\
|
|
|
|
SetHandler,\
|
|
|
|
Values, RelationsCount, Relations, SupportHandler,\
|
|
|
|
SerializedSize)\
|
|
|
|
{\
|
|
|
|
PropertyId, {(PFNKSHANDLER)GetHandler}, MinProperty, MinData,\
|
|
|
|
{(PFNKSHANDLER)SetHandler},\
|
|
|
|
(PKSPROPERTY_VALUES)Values, RelationsCount, (PKSPROPERTY)Relations,\
|
|
|
|
(PFNKSHANDLER)SupportHandler, (ULONG)SerializedSize\
|
|
|
|
}
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM(PropertyId, GetHandler,\
|
|
|
|
MinProperty,\
|
|
|
|
MinData,\
|
|
|
|
SetHandler,\
|
|
|
|
Values, RelationsCount, Relations, SupportHandler,\
|
|
|
|
SerializedSize)\
|
|
|
|
{\
|
|
|
|
PropertyId, (PFNKSHANDLER)GetHandler, MinProperty, MinData,\
|
|
|
|
(PFNKSHANDLER)SetHandler,\
|
|
|
|
(PKSPROPERTY_VALUES)Values, RelationsCount, (PKSPROPERTY)Relations,\
|
|
|
|
(PFNKSHANDLER)SupportHandler, (ULONG)SerializedSize\
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef enum {
|
|
|
|
KsObjectTypeDevice,
|
|
|
|
KsObjectTypeFilterFactory,
|
|
|
|
KsObjectTypeFilter,
|
|
|
|
KsObjectTypePin
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSOBJECTTYPE;
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef enum {
|
|
|
|
KSSTATE_STOP,
|
|
|
|
KSSTATE_ACQUIRE,
|
|
|
|
KSSTATE_PAUSE,
|
|
|
|
KSSTATE_RUN
|
2009-02-19 00:47:00 +00:00
|
|
|
} KSSTATE, *PKSSTATE;
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef enum {
|
|
|
|
KSTARGET_STATE_DISABLED,
|
|
|
|
KSTARGET_STATE_ENABLED
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSTARGET_STATE;
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef enum {
|
|
|
|
KSRESET_BEGIN,
|
|
|
|
KSRESET_END
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSRESET;
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef enum {
|
|
|
|
KSEVENTS_NONE,
|
|
|
|
KSEVENTS_SPINLOCK,
|
|
|
|
KSEVENTS_MUTEX,
|
|
|
|
KSEVENTS_FMUTEX,
|
|
|
|
KSEVENTS_FMUTEXUNSAFE,
|
|
|
|
KSEVENTS_INTERRUPT,
|
|
|
|
KSEVENTS_ERESOURCE
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSEVENTS_LOCKTYPE;
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef enum {
|
|
|
|
KSDEGRADE_STANDARD_SIMPLE,
|
|
|
|
KSDEGRADE_STANDARD_QUALITY,
|
|
|
|
KSDEGRADE_STANDARD_COMPUTATION,
|
|
|
|
KSDEGRADE_STANDARD_SKIP
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSDEGRADE_STANDARD;
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef enum {
|
|
|
|
KSPIN_DATAFLOW_IN = 1,
|
|
|
|
KSPIN_DATAFLOW_OUT
|
2009-10-27 15:33:58 +00:00
|
|
|
} KSPIN_DATAFLOW, *PKSPIN_DATAFLOW;
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef enum {
|
|
|
|
KSPIN_COMMUNICATION_NONE,
|
|
|
|
KSPIN_COMMUNICATION_SINK,
|
|
|
|
KSPIN_COMMUNICATION_SOURCE,
|
|
|
|
KSPIN_COMMUNICATION_BOTH,
|
|
|
|
KSPIN_COMMUNICATION_BRIDGE
|
2009-10-27 15:33:58 +00:00
|
|
|
} KSPIN_COMMUNICATION, *PKSPIN_COMMUNICATION;
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef enum {
|
|
|
|
KsListEntryTail,
|
|
|
|
KsListEntryHead
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSLIST_ENTRY_LOCATION;
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef enum {
|
|
|
|
KsStackCopyToNewLocation,
|
|
|
|
KsStackReuseCurrentLocation,
|
|
|
|
KsStackUseNewLocation
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSSTACK_USE;
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef enum {
|
|
|
|
KsAcquireOnly,
|
|
|
|
KsAcquireAndRemove,
|
|
|
|
KsAcquireOnlySingleItem,
|
|
|
|
KsAcquireAndRemoveOnlySingleItem
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSIRP_REMOVAL_OPERATION;
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef enum {
|
|
|
|
KsInvokeOnSuccess = 1,
|
|
|
|
KsInvokeOnError = 2,
|
|
|
|
KsInvokeOnCancel = 4
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSCOMPLETION_INVOCATION;
|
|
|
|
|
2009-03-01 12:45:32 +00:00
|
|
|
#if defined(_NTDDK_) && !defined(__wtypes_h__)
|
|
|
|
enum VARENUM {
|
2013-08-17 23:51:10 +00:00
|
|
|
VT_EMPTY = 0,
|
|
|
|
VT_NULL = 1,
|
|
|
|
VT_I2 = 2,
|
|
|
|
VT_I4 = 3,
|
|
|
|
VT_R4 = 4,
|
|
|
|
VT_R8 = 5,
|
|
|
|
VT_CY = 6,
|
|
|
|
VT_DATE = 7,
|
|
|
|
VT_BSTR = 8,
|
|
|
|
VT_DISPATCH = 9,
|
|
|
|
VT_ERROR = 10,
|
|
|
|
VT_BOOL = 11,
|
|
|
|
VT_VARIANT = 12,
|
|
|
|
VT_UNKNOWN = 13,
|
|
|
|
VT_DECIMAL = 14,
|
|
|
|
VT_I1 = 16,
|
|
|
|
VT_UI1 = 17,
|
|
|
|
VT_UI2 = 18,
|
|
|
|
VT_UI4 = 19,
|
|
|
|
VT_I8 = 20,
|
|
|
|
VT_UI8 = 21,
|
|
|
|
VT_INT = 22,
|
|
|
|
VT_UINT = 23,
|
|
|
|
VT_VOID = 24,
|
|
|
|
VT_HRESULT = 25,
|
|
|
|
VT_PTR = 26,
|
|
|
|
VT_SAFEARRAY = 27,
|
|
|
|
VT_CARRAY = 28,
|
|
|
|
VT_USERDEFINED = 29,
|
|
|
|
VT_LPSTR = 30,
|
|
|
|
VT_LPWSTR = 31,
|
|
|
|
VT_FILETIME = 64,
|
|
|
|
VT_BLOB = 65,
|
|
|
|
VT_STREAM = 66,
|
|
|
|
VT_STORAGE = 67,
|
|
|
|
VT_STREAMED_OBJECT = 68,
|
|
|
|
VT_STORED_OBJECT = 69,
|
|
|
|
VT_BLOB_OBJECT = 70,
|
|
|
|
VT_CF = 71,
|
|
|
|
VT_CLSID = 72,
|
|
|
|
VT_VECTOR = 0x1000,
|
|
|
|
VT_ARRAY = 0x2000,
|
|
|
|
VT_BYREF = 0x4000,
|
|
|
|
VT_RESERVED = 0x8000,
|
|
|
|
VT_ILLEGAL = 0xffff,
|
|
|
|
VT_ILLEGALMASKED = 0xfff,
|
|
|
|
VT_TYPEMASK = 0xfff
|
2009-03-01 12:45:32 +00:00
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
#define STATIC_KSDATAFORMAT_TYPE_WILDCARD STATIC_GUID_NULL
|
|
|
|
#define KSDATAFORMAT_TYPE_WILDCARD GUID_NULL
|
2009-03-01 12:45:32 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
#define STATIC_KSDATAFORMAT_SUBTYPE_WILDCARD STATIC_GUID_NULL
|
|
|
|
#define KSDATAFORMAT_SUBTYPE_WILDCARD GUID_NULL
|
2009-03-01 12:45:32 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
#define STATIC_KSDATAFORMAT_SPECIFIER_WILDCARD STATIC_GUID_NULL
|
|
|
|
#define KSDATAFORMAT_SPECIFIER_WILDCARD GUID_NULL
|
2009-03-01 12:45:32 +00:00
|
|
|
|
2006-12-10 04:04:03 +00:00
|
|
|
/* ===============================================================
|
|
|
|
Framing
|
|
|
|
*/
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
ULONG MinFrameSize;
|
|
|
|
ULONG MaxFrameSize;
|
|
|
|
ULONG Stepping;
|
2009-06-19 12:07:17 +00:00
|
|
|
} KS_FRAMING_RANGE, *PKS_FRAMING_RANGE;
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
KS_FRAMING_RANGE Range;
|
|
|
|
ULONG InPlaceWeight;
|
|
|
|
ULONG NotInPlaceWeight;
|
2009-06-19 12:07:17 +00:00
|
|
|
} KS_FRAMING_RANGE_WEIGHTED, *PKS_FRAMING_RANGE_WEIGHTED;
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
GUID MemoryType;
|
|
|
|
GUID BusType;
|
|
|
|
ULONG MemoryFlags;
|
|
|
|
ULONG BusFlags;
|
|
|
|
ULONG Flags;
|
|
|
|
ULONG Frames;
|
|
|
|
ULONG FileAlignment;
|
|
|
|
ULONG MemoryTypeWeight;
|
|
|
|
KS_FRAMING_RANGE PhysicalRange;
|
|
|
|
KS_FRAMING_RANGE_WEIGHTED FramingRange;
|
2009-06-19 12:07:17 +00:00
|
|
|
} KS_FRAMING_ITEM, *PKS_FRAMING_ITEM;
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
ULONG RatioNumerator;
|
|
|
|
ULONG RatioDenominator;
|
|
|
|
ULONG RatioConstantMargin;
|
2006-12-10 04:04:03 +00:00
|
|
|
} KS_COMPRESSION, *PKS_COMPRESSION;
|
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
Priorities
|
|
|
|
*/
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
#define KSPRIORITY_LOW 0x00000001
|
|
|
|
#define KSPRIORITY_NORMAL 0x40000000
|
|
|
|
#define KSPRIORITY_HIGH 0x80000000
|
|
|
|
#define KSPRIORITY_EXCLUSIVE 0xFFFFFFFF
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
ULONG PriorityClass;
|
|
|
|
ULONG PrioritySubClass;
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSPRIORITY, *PKSPRIORITY;
|
|
|
|
|
2007-03-17 13:21:33 +00:00
|
|
|
/* ===============================================================
|
|
|
|
Dispatch Table
|
|
|
|
http://www.osronline.com/DDKx/stream/ks-struct_494j.htm
|
|
|
|
*/
|
2013-08-17 23:51:10 +00:00
|
|
|
|
2009-02-09 22:50:40 +00:00
|
|
|
#if defined(_NTDDK_)
|
2009-01-31 12:59:56 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
PDRIVER_DISPATCH DeviceIoControl;
|
|
|
|
PDRIVER_DISPATCH Read;
|
|
|
|
PDRIVER_DISPATCH Write;
|
|
|
|
PDRIVER_DISPATCH Flush;
|
|
|
|
PDRIVER_DISPATCH Close;
|
|
|
|
PDRIVER_DISPATCH QuerySecurity;
|
|
|
|
PDRIVER_DISPATCH SetSecurity;
|
|
|
|
PFAST_IO_DEVICE_CONTROL FastDeviceIoControl;
|
|
|
|
PFAST_IO_READ FastRead;
|
|
|
|
PFAST_IO_WRITE FastWrite;
|
|
|
|
} KSDISPATCH_TABLE, *PKSDISPATCH_TABLE;
|
2009-01-31 12:59:56 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
#define KSCREATE_ITEM_IRP_STORAGE(Irp) (*(PKSOBJECT_CREATE_ITEM*)&(Irp)->Tail.Overlay.DriverContext[0])
|
|
|
|
#define KSEVENT_SET_IRP_STORAGE(Irp) (*(const KSEVENT_SET**)&(Irp)->Tail.Overlay.DriverContext[0])
|
|
|
|
#define KSEVENT_ITEM_IRP_STORAGE(Irp) (*(const KSEVENT_ITEM**)&(Irp)->Tail.Overlay.DriverContext[3])
|
|
|
|
#define KSEVENT_ENTRY_IRP_STORAGE(Irp) (*(PKSEVENT_ENTRY*)&(Irp)->Tail.Overlay.DriverContext[0])
|
|
|
|
#define KSMETHOD_SET_IRP_STORAGE(Irp) (*(const KSMETHOD_SET**)&(Irp)->Tail.Overlay.DriverContext[0])
|
|
|
|
#define KSMETHOD_ITEM_IRP_STORAGE(Irp) (*(const KSMETHOD_ITEM**)&(Irp)->Tail.Overlay.DriverContext[3])
|
|
|
|
#define KSMETHOD_TYPE_IRP_STORAGE(Irp) (*(ULONG_PTR*)(&(Irp)->Tail.Overlay.DriverContext[2]))
|
|
|
|
#define KSQUEUE_SPINLOCK_IRP_STORAGE(Irp) (*(PKSPIN_LOCK*)&(Irp)->Tail.Overlay.DriverContext[1])
|
|
|
|
#define KSPROPERTY_SET_IRP_STORAGE(Irp) (*(const KSPROPERTY_SET**)&(Irp)->Tail.Overlay.DriverContext[0])
|
|
|
|
#define KSPROPERTY_ITEM_IRP_STORAGE(Irp) (*(const KSPROPERTY_ITEM**)&(Irp)->Tail.Overlay.DriverContext[3])
|
2009-01-31 12:59:56 +00:00
|
|
|
#define KSPROPERTY_ATTRIBUTES_IRP_STORAGE(Irp) (*(PKSATTRIBUTE_LIST*)&(Irp)->Tail.Overlay.DriverContext[2])
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
typedef VOID
|
|
|
|
(NTAPI *PFNREFERENCEDEVICEOBJECT)(
|
|
|
|
_In_ PVOID Context);
|
|
|
|
|
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
typedef VOID
|
|
|
|
(NTAPI *PFNDEREFERENCEDEVICEOBJECT)(
|
|
|
|
_In_ PVOID Context);
|
|
|
|
|
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
typedef NTSTATUS
|
|
|
|
(NTAPI *PFNQUERYREFERENCESTRING)(
|
|
|
|
_In_ PVOID Context,
|
|
|
|
_Inout_ PWCHAR *String);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
INTERFACE Interface;
|
|
|
|
PFNREFERENCEDEVICEOBJECT ReferenceDeviceObject;
|
|
|
|
PFNDEREFERENCEDEVICEOBJECT DereferenceDeviceObject;
|
|
|
|
PFNQUERYREFERENCESTRING QueryReferenceString;
|
2006-12-10 04:04:03 +00:00
|
|
|
} BUS_INTERFACE_REFERENCE, *PBUS_INTERFACE_REFERENCE;
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
KDPC Dpc;
|
|
|
|
ULONG ReferenceCount;
|
|
|
|
KSPIN_LOCK AccessLock;
|
2009-06-19 12:07:17 +00:00
|
|
|
} KSDPC_ITEM, *PKSDPC_ITEM;
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
KSDPC_ITEM DpcItem;
|
|
|
|
LIST_ENTRY BufferList;
|
2009-06-19 12:07:17 +00:00
|
|
|
} KSBUFFER_ITEM, *PKSBUFFER_ITEM;
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
#endif /* _NTDDK_ */
|
2009-06-19 12:07:17 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
GUID Manufacturer;
|
|
|
|
GUID Product;
|
|
|
|
GUID Component;
|
|
|
|
GUID Name;
|
|
|
|
ULONG Version;
|
|
|
|
ULONG Revision;
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSCOMPONENTID, *PKSCOMPONENTID;
|
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
Properties
|
|
|
|
*/
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
GUID PropertySet;
|
|
|
|
ULONG Count;
|
2009-06-19 12:07:17 +00:00
|
|
|
} KSPROPERTY_SERIALHDR, *PKSPROPERTY_SERIALHDR;
|
2009-02-17 00:39:40 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
KSIDENTIFIER PropTypeSet;
|
|
|
|
ULONG Id;
|
|
|
|
ULONG PropertyLength;
|
2009-06-19 12:07:17 +00:00
|
|
|
} KSPROPERTY_SERIAL, *PKSPROPERTY_SERIAL;
|
2009-02-17 00:39:40 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef union {
|
|
|
|
struct {
|
|
|
|
LONG SignedMinimum;
|
|
|
|
LONG SignedMaximum;
|
2009-03-01 12:45:32 +00:00
|
|
|
#if defined( _KS_NO_ANONYMOUS_STRUCTURES_ )
|
2013-08-17 23:51:10 +00:00
|
|
|
} _SIGNED;
|
2009-03-01 12:45:32 +00:00
|
|
|
#else
|
2013-08-17 23:51:10 +00:00
|
|
|
};
|
2009-06-19 12:07:17 +00:00
|
|
|
#endif
|
2013-08-17 23:51:10 +00:00
|
|
|
struct {
|
|
|
|
ULONG UnsignedMinimum;
|
|
|
|
ULONG UnsignedMaximum;
|
2009-06-19 12:07:17 +00:00
|
|
|
#if defined( _KS_NO_ANONYMOUS_STRUCTURES_ )
|
2013-08-17 23:51:10 +00:00
|
|
|
} _UNSIGNED;
|
2009-06-19 12:07:17 +00:00
|
|
|
#else
|
2013-08-17 23:51:10 +00:00
|
|
|
};
|
2009-06-19 12:07:17 +00:00
|
|
|
#endif
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSPROPERTY_BOUNDS_LONG, *PKSPROPERTY_BOUNDS_LONG;
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef union {
|
|
|
|
struct {
|
|
|
|
LONGLONG SignedMinimum;
|
|
|
|
LONGLONG SignedMaximum;
|
2009-06-19 12:07:17 +00:00
|
|
|
#if defined( _KS_NO_ANONYMOUS_STRUCTURES_ )
|
2013-08-17 23:51:10 +00:00
|
|
|
} _SIGNED64;
|
2009-06-19 12:07:17 +00:00
|
|
|
#else
|
2013-08-17 23:51:10 +00:00
|
|
|
};
|
2009-06-19 12:07:17 +00:00
|
|
|
#endif
|
2013-08-17 23:51:10 +00:00
|
|
|
struct {
|
2009-06-19 12:07:17 +00:00
|
|
|
#if defined(_NTDDK_)
|
2013-08-17 23:51:10 +00:00
|
|
|
ULONGLONG UnsignedMinimum;
|
|
|
|
ULONGLONG UnsignedMaximum;
|
2009-06-19 12:07:17 +00:00
|
|
|
#else
|
2013-08-17 23:51:10 +00:00
|
|
|
DWORDLONG UnsignedMinimum;
|
|
|
|
DWORDLONG UnsignedMaximum;
|
2009-06-19 12:07:17 +00:00
|
|
|
#endif
|
|
|
|
#if defined( _KS_NO_ANONYMOUS_STRUCTURES_ )
|
2013-08-17 23:51:10 +00:00
|
|
|
} _UNSIGNED64;
|
2009-06-19 12:07:17 +00:00
|
|
|
#else
|
2013-08-17 23:51:10 +00:00
|
|
|
};
|
2009-06-19 12:07:17 +00:00
|
|
|
#endif
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSPROPERTY_BOUNDS_LONGLONG, *PKSPROPERTY_BOUNDS_LONGLONG;
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
ULONG AccessFlags;
|
|
|
|
ULONG DescriptionSize;
|
|
|
|
KSIDENTIFIER PropTypeSet;
|
|
|
|
ULONG MembersListCount;
|
|
|
|
ULONG Reserved;
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSPROPERTY_DESCRIPTION, *PKSPROPERTY_DESCRIPTION;
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
ULONG MembersFlags;
|
|
|
|
ULONG MembersSize;
|
|
|
|
ULONG MembersCount;
|
|
|
|
ULONG Flags;
|
2009-02-16 23:29:13 +00:00
|
|
|
} KSPROPERTY_MEMBERSHEADER, *PKSPROPERTY_MEMBERSHEADER;
|
|
|
|
|
|
|
|
typedef struct {
|
2013-08-17 23:51:10 +00:00
|
|
|
KSPROPERTY_MEMBERSHEADER MembersHeader;
|
|
|
|
const VOID *Members;
|
2009-02-16 23:29:13 +00:00
|
|
|
} KSPROPERTY_MEMBERSLIST, *PKSPROPERTY_MEMBERSLIST;
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
#define KSPROPERTY_MEMBER_RANGES 0x00000001
|
|
|
|
#define KSPROPERTY_MEMBER_STEPPEDRANGES 0x00000002
|
|
|
|
#define KSPROPERTY_MEMBER_VALUES 0x00000003
|
2011-01-28 10:25:07 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
#define KSPROPERTY_MEMBER_FLAG_DEFAULT 0x00000001
|
2011-01-28 10:25:07 +00:00
|
|
|
#if (NTDDI_VERSION >= NTDDI_WINXP)
|
2013-08-17 23:51:10 +00:00
|
|
|
#define KSPROPERTY_MEMBER_FLAG_BASICSUPPORT_MULTICHANNEL 0x00000002
|
|
|
|
#define KSPROPERTY_MEMBER_FLAG_BASICSUPPORT_UNIFORM 0x00000004
|
2011-01-28 10:25:07 +00:00
|
|
|
#endif
|
|
|
|
|
2009-02-16 23:29:13 +00:00
|
|
|
typedef struct {
|
2013-08-17 22:29:40 +00:00
|
|
|
KSIDENTIFIER PropTypeSet;
|
|
|
|
ULONG MembersListCount;
|
|
|
|
_Field_size_(MembersListCount) const KSPROPERTY_MEMBERSLIST *MembersList;
|
2009-02-16 23:29:13 +00:00
|
|
|
} KSPROPERTY_VALUES, *PKSPROPERTY_VALUES;
|
|
|
|
|
2009-02-17 00:39:40 +00:00
|
|
|
#if defined(_NTDDK_)
|
2009-02-16 23:29:13 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
typedef NTSTATUS
|
|
|
|
(NTAPI *PFNKSCONTEXT_DISPATCH)(
|
|
|
|
_In_ PVOID Context,
|
|
|
|
_In_ PIRP Irp);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
typedef NTSTATUS
|
|
|
|
(NTAPI *PFNKSHANDLER)(
|
|
|
|
_In_ PIRP Irp,
|
|
|
|
_In_ PKSIDENTIFIER Request,
|
|
|
|
_Inout_ PVOID Data);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
typedef struct {
|
|
|
|
ULONG PropertyId;
|
|
|
|
union {
|
|
|
|
PFNKSHANDLER GetPropertyHandler;
|
|
|
|
BOOLEAN GetSupported;
|
|
|
|
};
|
|
|
|
ULONG MinProperty;
|
|
|
|
ULONG MinData;
|
|
|
|
union {
|
|
|
|
PFNKSHANDLER SetPropertyHandler;
|
|
|
|
BOOLEAN SetSupported;
|
|
|
|
};
|
|
|
|
const KSPROPERTY_VALUES *Values;
|
|
|
|
ULONG RelationsCount;
|
|
|
|
_Field_size_(RelationsCount) const KSPROPERTY *Relations;
|
|
|
|
PFNKSHANDLER SupportHandler;
|
|
|
|
ULONG SerializedSize;
|
|
|
|
} KSPROPERTY_ITEM, *PKSPROPERTY_ITEM;
|
|
|
|
|
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
typedef BOOLEAN
|
2009-07-25 14:06:06 +00:00
|
|
|
(NTAPI *PFNKSFASTHANDLER)(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PFILE_OBJECT FileObject,
|
|
|
|
_In_reads_bytes_(RequestLength) PKSIDENTIFIER Request,
|
|
|
|
_In_ ULONG RequestLength,
|
|
|
|
_Inout_updates_bytes_(DataLength) PVOID Data,
|
|
|
|
_In_ ULONG DataLength,
|
|
|
|
_Out_ PIO_STATUS_BLOCK IoStatus);
|
2009-02-16 23:29:13 +00:00
|
|
|
|
|
|
|
typedef struct {
|
2013-08-17 23:51:10 +00:00
|
|
|
ULONG PropertyId;
|
|
|
|
union {
|
|
|
|
PFNKSFASTHANDLER GetPropertyHandler;
|
|
|
|
BOOLEAN GetSupported;
|
|
|
|
};
|
|
|
|
union {
|
|
|
|
PFNKSFASTHANDLER SetPropertyHandler;
|
|
|
|
BOOLEAN SetSupported;
|
|
|
|
};
|
|
|
|
ULONG Reserved;
|
2009-02-16 23:29:13 +00:00
|
|
|
} KSFASTPROPERTY_ITEM, *PKSFASTPROPERTY_ITEM;
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
typedef struct {
|
|
|
|
const GUID *Set;
|
|
|
|
ULONG PropertiesCount;
|
|
|
|
_Field_size_(PropertiesCount) const KSPROPERTY_ITEM *PropertyItem;
|
|
|
|
ULONG FastIoCount;
|
|
|
|
const KSFASTPROPERTY_ITEM *FastIoTable;
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSPROPERTY_SET, *PKSPROPERTY_SET;
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
#endif /* _NTDDK_ */
|
2009-02-17 00:39:40 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
ULONG SteppingDelta;
|
|
|
|
ULONG Reserved;
|
|
|
|
KSPROPERTY_BOUNDS_LONG Bounds;
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSPROPERTY_STEPPING_LONG, *PKSPROPERTY_STEPPING_LONG;
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
2009-06-19 12:07:17 +00:00
|
|
|
#if defined(_NTDDK_)
|
2013-08-17 23:51:10 +00:00
|
|
|
ULONGLONG SteppingDelta;
|
2009-06-19 12:07:17 +00:00
|
|
|
#else
|
2013-08-17 23:51:10 +00:00
|
|
|
DWORDLONG SteppingDelta;
|
2009-06-19 12:07:17 +00:00
|
|
|
#endif
|
2013-08-17 23:51:10 +00:00
|
|
|
KSPROPERTY_BOUNDS_LONGLONG Bounds;
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSPROPERTY_STEPPING_LONGLONG, *PKSPROPERTY_STEPPING_LONGLONG;
|
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
Allocator Framing
|
|
|
|
*/
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
union {
|
|
|
|
ULONG OptionsFlags;
|
|
|
|
ULONG RequirementsFlags;
|
|
|
|
};
|
2009-04-27 00:15:52 +00:00
|
|
|
#if defined(_NTDDK_)
|
2013-08-17 23:51:10 +00:00
|
|
|
POOL_TYPE PoolType;
|
2009-04-27 00:15:52 +00:00
|
|
|
#else
|
2013-08-17 23:51:10 +00:00
|
|
|
ULONG PoolType;
|
|
|
|
#endif
|
|
|
|
ULONG Frames;
|
|
|
|
ULONG FrameSize;
|
|
|
|
ULONG FileAlignment;
|
|
|
|
ULONG Reserved;
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSALLOCATOR_FRAMING, *PKSALLOCATOR_FRAMING;
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
ULONG CountItems;
|
|
|
|
ULONG PinFlags;
|
|
|
|
KS_COMPRESSION OutputCompression;
|
|
|
|
ULONG PinWeight;
|
|
|
|
KS_FRAMING_ITEM FramingItem[1];
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSALLOCATOR_FRAMING_EX, *PKSALLOCATOR_FRAMING_EX;
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
#define KSALLOCATOR_REQUIREMENTF_INPLACE_MODIFIER 0x00000001
|
|
|
|
#define KSALLOCATOR_REQUIREMENTF_SYSTEM_MEMORY 0x00000002
|
|
|
|
#define KSALLOCATOR_REQUIREMENTF_FRAME_INTEGRITY 0x00000004
|
|
|
|
#define KSALLOCATOR_REQUIREMENTF_MUST_ALLOCATE 0x00000008
|
|
|
|
#define KSALLOCATOR_REQUIREMENTF_PREFERENCES_ONLY 0x80000000
|
2009-07-22 19:05:58 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
#define KSALLOCATOR_OPTIONF_COMPATIBLE 0x00000001
|
|
|
|
#define KSALLOCATOR_OPTIONF_SYSTEM_MEMORY 0x00000002
|
|
|
|
#define KSALLOCATOR_OPTIONF_VALID 0x00000003
|
2009-07-22 19:05:58 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
#define KSALLOCATOR_FLAG_PARTIAL_READ_SUPPORT 0x00000010
|
|
|
|
#define KSALLOCATOR_FLAG_DEVICE_SPECIFIC 0x00000020
|
|
|
|
#define KSALLOCATOR_FLAG_CAN_ALLOCATE 0x00000040
|
|
|
|
#define KSALLOCATOR_FLAG_INSIST_ON_FRAMESIZE_RATIO 0x00000080
|
2006-12-10 04:04:03 +00:00
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
Quality
|
|
|
|
*/
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
PVOID Context;
|
|
|
|
ULONG Proportion;
|
|
|
|
LONGLONG DeltaTime;
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSQUALITY, *PKSQUALITY;
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
HANDLE QualityManager;
|
|
|
|
PVOID Context;
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSQUALITY_MANAGER, *PKSQUALITY_MANAGER;
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
LONGLONG PresentationStart;
|
|
|
|
LONGLONG Duration;
|
|
|
|
KSPIN_INTERFACE Interface;
|
|
|
|
LONG Rate;
|
|
|
|
ULONG Flags;
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSRATE, *PKSRATE;
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
KSPROPERTY Property;
|
|
|
|
KSRATE Rate;
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSRATE_CAPABILITY, *PKSRATE_CAPABILITY;
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
LONGLONG Granularity;
|
|
|
|
LONGLONG Error;
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSRESOLUTION, *PKSRESOLUTION;
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
ULONG NotificationType;
|
|
|
|
union {
|
|
|
|
struct {
|
|
|
|
HANDLE Event;
|
|
|
|
ULONG_PTR Reserved[2];
|
|
|
|
} EventHandle;
|
|
|
|
struct {
|
|
|
|
HANDLE Semaphore;
|
|
|
|
ULONG Reserved;
|
|
|
|
LONG Adjustment;
|
|
|
|
} SemaphoreHandle;
|
2009-06-19 12:07:17 +00:00
|
|
|
#if defined(_NTDDK_)
|
2013-08-17 23:51:10 +00:00
|
|
|
struct {
|
|
|
|
PVOID Event;
|
|
|
|
KPRIORITY Increment;
|
|
|
|
ULONG_PTR Reserved;
|
|
|
|
} EventObject;
|
|
|
|
struct {
|
|
|
|
PVOID Semaphore;
|
|
|
|
KPRIORITY Increment;
|
|
|
|
LONG Adjustment;
|
|
|
|
} SemaphoreObject;
|
|
|
|
struct {
|
|
|
|
PKDPC Dpc;
|
|
|
|
ULONG ReferenceCount;
|
|
|
|
ULONG_PTR Reserved;
|
|
|
|
} Dpc;
|
|
|
|
struct {
|
|
|
|
PWORK_QUEUE_ITEM WorkQueueItem;
|
|
|
|
WORK_QUEUE_TYPE WorkQueueType;
|
|
|
|
ULONG_PTR Reserved;
|
|
|
|
} WorkItem;
|
|
|
|
struct {
|
|
|
|
PWORK_QUEUE_ITEM WorkQueueItem;
|
|
|
|
PKSWORKER KsWorkerObject;
|
|
|
|
ULONG_PTR Reserved;
|
|
|
|
} KsWorkItem;
|
2009-06-19 12:07:17 +00:00
|
|
|
#endif
|
2013-08-17 23:51:10 +00:00
|
|
|
struct {
|
|
|
|
PVOID Unused;
|
|
|
|
LONG_PTR Alignment[2];
|
|
|
|
} Alignment;
|
|
|
|
};
|
2009-06-19 12:07:17 +00:00
|
|
|
} KSEVENTDATA, *PKSEVENTDATA;
|
|
|
|
|
2009-11-07 12:57:07 +00:00
|
|
|
#define KSEVENTF_EVENT_HANDLE 0x00000001
|
|
|
|
#define KSEVENTF_SEMAPHORE_HANDLE 0x00000002
|
|
|
|
#if defined(_NTDDK_)
|
|
|
|
#define KSEVENTF_EVENT_OBJECT 0x00000004
|
|
|
|
#define KSEVENTF_SEMAPHORE_OBJECT 0x00000008
|
|
|
|
#define KSEVENTF_DPC 0x00000010
|
|
|
|
#define KSEVENTF_WORKITEM 0x00000020
|
|
|
|
#define KSEVENTF_KSWORKITEM 0x00000080
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#define KSEVENT_TYPE_ENABLE 0x00000001
|
|
|
|
#define KSEVENT_TYPE_ONESHOT 0x00000002
|
|
|
|
#define KSEVENT_TYPE_ENABLEBUFFERED 0x00000004
|
|
|
|
#define KSEVENT_TYPE_SETSUPPORT 0x00000100
|
|
|
|
#define KSEVENT_TYPE_BASICSUPPORT 0x00000200
|
|
|
|
#define KSEVENT_TYPE_QUERYBUFFER 0x00000400
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
#define KSEVENT_TYPE_TOPOLOGY 0x10000000
|
2009-11-07 12:57:07 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
ULONG Size;
|
|
|
|
ULONG Flags;
|
|
|
|
union {
|
|
|
|
HANDLE ObjectHandle;
|
|
|
|
PVOID ObjectPointer;
|
|
|
|
};
|
|
|
|
PVOID Reserved;
|
|
|
|
KSEVENT Event;
|
|
|
|
KSEVENTDATA EventData;
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSRELATIVEEVENT, *PKSRELATIVEEVENT;
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
#define KSRELATIVEEVENT_FLAG_HANDLE 0x00000001
|
2010-03-13 12:09:24 +00:00
|
|
|
#define KSRELATIVEEVENT_FLAG_POINTER 0x00000002
|
2006-12-10 04:04:03 +00:00
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
Timing
|
|
|
|
*/
|
|
|
|
|
2010-03-13 12:09:24 +00:00
|
|
|
typedef struct {
|
2013-08-17 23:51:10 +00:00
|
|
|
KSEVENTDATA EventData;
|
|
|
|
LONGLONG MarkTime;
|
2010-03-13 12:09:24 +00:00
|
|
|
} KSEVENT_TIME_MARK, *PKSEVENT_TIME_MARK;
|
|
|
|
|
|
|
|
typedef struct {
|
2013-08-17 23:51:10 +00:00
|
|
|
KSEVENTDATA EventData;
|
|
|
|
LONGLONG TimeBase;
|
|
|
|
LONGLONG Interval;
|
2010-03-13 12:09:24 +00:00
|
|
|
} KSEVENT_TIME_INTERVAL, *PKSEVENT_TIME_INTERVAL;
|
|
|
|
|
|
|
|
typedef struct {
|
2013-08-17 23:51:10 +00:00
|
|
|
LONGLONG TimeBase;
|
|
|
|
LONGLONG Interval;
|
2010-03-13 12:09:24 +00:00
|
|
|
} KSINTERVAL, *PKSINTERVAL;
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
LONGLONG Time;
|
|
|
|
ULONG Numerator;
|
|
|
|
ULONG Denominator;
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSTIME, *PKSTIME;
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
LONGLONG Time;
|
|
|
|
LONGLONG SystemTime;
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSCORRELATED_TIME, *PKSCORRELATED_TIME;
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
LONGLONG Duration;
|
|
|
|
ULONG FrameFlags;
|
|
|
|
ULONG Reserved;
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSFRAMETIME, *PKSFRAMETIME;
|
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
Clocks
|
|
|
|
*/
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef PVOID PKSDEFAULTCLOCK;
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
ULONG CreateFlags;
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSCLOCK_CREATE, *PKSCLOCK_CREATE;
|
|
|
|
|
2009-06-19 12:07:17 +00:00
|
|
|
#if defined(_NTDDK_)
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
typedef LONGLONG
|
2009-06-19 12:07:17 +00:00
|
|
|
(FASTCALL *PFNKSCLOCK_GETTIME)(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PFILE_OBJECT FileObject);
|
|
|
|
|
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
typedef LONGLONG
|
2009-06-19 12:07:17 +00:00
|
|
|
(FASTCALL *PFNKSCLOCK_CORRELATEDTIME)(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PFILE_OBJECT FileObject,
|
|
|
|
_Out_ PLONGLONG SystemTime);
|
2009-06-19 12:07:17 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
PFNKSCLOCK_GETTIME GetTime;
|
|
|
|
PFNKSCLOCK_GETTIME GetPhysicalTime;
|
|
|
|
PFNKSCLOCK_CORRELATEDTIME GetCorrelatedTime;
|
|
|
|
PFNKSCLOCK_CORRELATEDTIME GetCorrelatedPhysicalTime;
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSCLOCK_FUNCTIONTABLE, *PKSCLOCK_FUNCTIONTABLE;
|
|
|
|
|
2010-04-15 09:44:03 +00:00
|
|
|
#define DEFINE_KSPROPERTY_ITEM_CLOCK_TIME(Handler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_CLOCK_TIME,\
|
|
|
|
(Handler),\
|
|
|
|
sizeof(KSPROPERTY),\
|
|
|
|
sizeof(LONGLONG),\
|
|
|
|
NULL, NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM_CLOCK_PHYSICALTIME(Handler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_CLOCK_PHYSICALTIME,\
|
|
|
|
(Handler),\
|
|
|
|
sizeof(KSPROPERTY),\
|
|
|
|
sizeof(LONGLONG),\
|
|
|
|
NULL, NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM_CLOCK_CORRELATEDTIME(Handler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_CLOCK_CORRELATEDTIME,\
|
|
|
|
(Handler),\
|
|
|
|
sizeof(KSPROPERTY),\
|
|
|
|
sizeof(KSCORRELATED_TIME),\
|
|
|
|
NULL, NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM_CLOCK_CORRELATEDPHYSICALTIME(Handler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_CLOCK_CORRELATEDPHYSICALTIME,\
|
|
|
|
(Handler),\
|
|
|
|
sizeof(KSPROPERTY),\
|
|
|
|
sizeof(KSCORRELATED_TIME),\
|
|
|
|
NULL, NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM_CLOCK_RESOLUTION(Handler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_CLOCK_RESOLUTION,\
|
|
|
|
(Handler),\
|
|
|
|
sizeof(KSPROPERTY),\
|
|
|
|
sizeof(KSRESOLUTION),\
|
|
|
|
NULL, NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM_CLOCK_STATE(Handler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_CLOCK_STATE,\
|
|
|
|
(Handler),\
|
|
|
|
sizeof(KSPROPERTY),\
|
|
|
|
sizeof(KSSTATE),\
|
|
|
|
NULL, NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM_CLOCK_FUNCTIONTABLE(Handler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_CLOCK_FUNCTIONTABLE,\
|
|
|
|
(Handler),\
|
|
|
|
sizeof(KSPROPERTY),\
|
|
|
|
sizeof(KSCLOCK_FUNCTIONTABLE),\
|
|
|
|
NULL, NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_CLOCKSET(ClockSet,\
|
|
|
|
PropTime, PropPhysicalTime,\
|
|
|
|
PropCorrelatedTime, PropCorrelatedPhysicalTime,\
|
|
|
|
PropResolution, PropState, PropFunctionTable)\
|
|
|
|
DEFINE_KSPROPERTY_TABLE(ClockSet) {\
|
|
|
|
DEFINE_KSPROPERTY_ITEM_CLOCK_TIME(PropTime),\
|
|
|
|
DEFINE_KSPROPERTY_ITEM_CLOCK_PHYSICALTIME(PropPhysicalTime),\
|
|
|
|
DEFINE_KSPROPERTY_ITEM_CLOCK_CORRELATEDTIME(PropCorrelatedTime),\
|
|
|
|
DEFINE_KSPROPERTY_ITEM_CLOCK_CORRELATEDPHYSICALTIME(PropCorrelatedPhysicalTime),\
|
|
|
|
DEFINE_KSPROPERTY_ITEM_CLOCK_RESOLUTION(PropResolution),\
|
|
|
|
DEFINE_KSPROPERTY_ITEM_CLOCK_STATE(PropState),\
|
|
|
|
DEFINE_KSPROPERTY_ITEM_CLOCK_FUNCTIONTABLE(PropFunctionTable)\
|
|
|
|
}
|
|
|
|
|
2006-12-10 04:04:03 +00:00
|
|
|
/* ===============================================================
|
|
|
|
Objects ??? SORT ME!
|
|
|
|
*/
|
2009-06-19 12:07:17 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
#define KSCREATE_ITEM_SECURITYCHANGED 0x1
|
|
|
|
#define KSCREATE_ITEM_WILDCARD 0x2
|
|
|
|
#define KSCREATE_ITEM_NOPARAMETERS 0x4
|
|
|
|
#define KSCREATE_ITEM_FREEONSTOP 0x8
|
2009-07-10 14:41:14 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
PDRIVER_DISPATCH Create;
|
|
|
|
PVOID Context;
|
|
|
|
UNICODE_STRING ObjectClass;
|
|
|
|
PSECURITY_DESCRIPTOR SecurityDescriptor;
|
|
|
|
ULONG Flags;
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSOBJECT_CREATE_ITEM, *PKSOBJECT_CREATE_ITEM;
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
typedef struct {
|
|
|
|
ULONG CreateItemsCount;
|
|
|
|
_Field_size_(CreateItemsCount) PKSOBJECT_CREATE_ITEM CreateItemsList;
|
2009-02-18 17:59:30 +00:00
|
|
|
} KSOBJECT_CREATE, *PKSOBJECT_CREATE;
|
2009-01-26 10:41:59 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
typedef VOID
|
|
|
|
(NTAPI *PFNKSITEMFREECALLBACK)(
|
|
|
|
_In_ PKSOBJECT_CREATE_ITEM CreateItem);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
#endif /* _NTDDK_ */
|
2009-01-26 10:41:59 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
ULONG Size;
|
|
|
|
ULONG Count;
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSMULTIPLE_ITEM, *PKSMULTIPLE_ITEM;
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
KSEVENT Event;
|
|
|
|
PKSEVENTDATA EventData;
|
|
|
|
PVOID Reserved;
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSQUERYBUFFER, *PKSQUERYBUFFER;
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
PVOID Context;
|
|
|
|
ULONG Status;
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSERROR, *PKSERROR;
|
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
Methods
|
|
|
|
*/
|
2013-08-17 23:51:10 +00:00
|
|
|
|
2009-06-19 12:07:17 +00:00
|
|
|
#if defined(_NTDDK_)
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
ULONG MethodId;
|
|
|
|
union {
|
|
|
|
PFNKSHANDLER MethodHandler;
|
|
|
|
BOOLEAN MethodSupported;
|
|
|
|
};
|
|
|
|
ULONG MinMethod;
|
|
|
|
ULONG MinData;
|
|
|
|
PFNKSHANDLER SupportHandler;
|
|
|
|
ULONG Flags;
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSMETHOD_ITEM, *PKSMETHOD_ITEM;
|
|
|
|
|
2009-08-20 11:39:54 +00:00
|
|
|
#ifndef _MSC_VER
|
|
|
|
|
|
|
|
#define DEFINE_KSMETHOD_ITEM(MethodId, Flags,\
|
|
|
|
MethodHandler,\
|
|
|
|
MinMethod, MinData, SupportHandler)\
|
|
|
|
{\
|
|
|
|
MethodId, {(PFNKSHANDLER)MethodHandler}, MinMethod, MinData,\
|
|
|
|
SupportHandler, Flags\
|
|
|
|
}
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
#define DEFINE_KSMETHOD_ITEM(MethodId, Flags,\
|
|
|
|
MethodHandler,\
|
|
|
|
MinMethod, MinData, SupportHandler)\
|
|
|
|
{\
|
|
|
|
MethodId, (PFNKSHANDLER)MethodHandler, MinMethod, MinData,\
|
|
|
|
SupportHandler, Flags\
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
ULONG MethodId;
|
|
|
|
union {
|
|
|
|
PFNKSFASTHANDLER MethodHandler;
|
|
|
|
BOOLEAN MethodSupported;
|
|
|
|
};
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSFASTMETHOD_ITEM, *PKSFASTMETHOD_ITEM;
|
|
|
|
|
2009-08-20 11:39:54 +00:00
|
|
|
#define DEFINE_KSFASTMETHOD_ITEM(MethodId, MethodHandler)\
|
|
|
|
{\
|
|
|
|
MethodId, (PFNKSFASTHANDLER)MethodHandler\
|
|
|
|
}
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
typedef struct {
|
|
|
|
const GUID *Set;
|
|
|
|
ULONG MethodsCount;
|
|
|
|
_Field_size_(MethodsCount) const KSMETHOD_ITEM *MethodItem;
|
|
|
|
ULONG FastIoCount;
|
|
|
|
_Field_size_(FastIoCount) const KSFASTMETHOD_ITEM *FastIoTable;
|
2009-06-19 12:07:17 +00:00
|
|
|
} KSMETHOD_SET, *PKSMETHOD_SET;
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2009-08-20 11:39:54 +00:00
|
|
|
#define DEFINE_KSMETHOD_SET(Set,\
|
|
|
|
MethodsCount,\
|
|
|
|
MethodItem,\
|
|
|
|
FastIoCount,\
|
|
|
|
FastIoTable)\
|
|
|
|
{\
|
|
|
|
Set,\
|
|
|
|
MethodsCount,\
|
|
|
|
MethodItem,\
|
|
|
|
FastIoCount,\
|
|
|
|
FastIoTable\
|
|
|
|
}
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
#endif /* _NTDDK_ */
|
|
|
|
|
2006-12-10 04:04:03 +00:00
|
|
|
/* ===============================================================
|
|
|
|
Nodes
|
|
|
|
*/
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
KSPROPERTY Property;
|
|
|
|
ULONG NodeId;
|
|
|
|
ULONG Reserved;
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSP_NODE, *PKSP_NODE;
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
KSMETHOD Method;
|
|
|
|
ULONG NodeID;
|
|
|
|
ULONG Reserved;
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSM_NODE, *PKSM_NODE;
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
KSEVENT Event;
|
|
|
|
ULONG NodeId;
|
|
|
|
ULONG Reserved;
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSE_NODE, *PKSE_NODE;
|
|
|
|
|
2009-06-19 12:07:17 +00:00
|
|
|
typedef struct {
|
2013-08-17 23:51:10 +00:00
|
|
|
ULONG CreateFlags;
|
|
|
|
ULONG Node;
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSNODE_CREATE, *PKSNODE_CREATE;
|
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
Events
|
|
|
|
*/
|
2013-08-17 23:51:10 +00:00
|
|
|
|
2009-06-19 12:07:17 +00:00
|
|
|
typedef struct _KSEVENT_ENTRY KSEVENT_ENTRY, *PKSEVENT_ENTRY;
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2009-06-19 12:07:17 +00:00
|
|
|
#if defined(_NTDDK_)
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
typedef NTSTATUS
|
|
|
|
(NTAPI *PFNKSADDEVENT)(
|
|
|
|
_In_ PIRP Irp,
|
|
|
|
_In_ PKSEVENTDATA EventData,
|
|
|
|
_In_ struct _KSEVENT_ENTRY *EventEntry);
|
|
|
|
|
|
|
|
typedef VOID
|
2009-07-25 14:06:06 +00:00
|
|
|
(NTAPI *PFNKSREMOVEEVENT)(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PFILE_OBJECT FileObject,
|
|
|
|
_In_ struct _KSEVENT_ENTRY *EventEntry);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
ULONG EventId;
|
|
|
|
ULONG DataInput;
|
|
|
|
ULONG ExtraEntryData;
|
|
|
|
PFNKSADDEVENT AddHandler;
|
|
|
|
PFNKSREMOVEEVENT RemoveHandler;
|
|
|
|
PFNKSHANDLER SupportHandler;
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSEVENT_ITEM, *PKSEVENT_ITEM;
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
typedef struct {
|
|
|
|
const GUID *Set;
|
|
|
|
ULONG EventsCount;
|
|
|
|
_Field_size_(EventsCount) const KSEVENT_ITEM *EventItem;
|
2009-06-19 12:07:17 +00:00
|
|
|
} KSEVENT_SET, *PKSEVENT_SET;
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
struct _KSEVENT_ENTRY {
|
|
|
|
LIST_ENTRY ListEntry;
|
|
|
|
PVOID Object;
|
|
|
|
union {
|
|
|
|
PKSDPC_ITEM DpcItem;
|
|
|
|
PKSBUFFER_ITEM BufferItem;
|
|
|
|
};
|
|
|
|
PKSEVENTDATA EventData;
|
|
|
|
ULONG NotificationType;
|
|
|
|
const KSEVENT_SET *EventSet;
|
|
|
|
const KSEVENT_ITEM *EventItem;
|
|
|
|
PFILE_OBJECT FileObject;
|
|
|
|
ULONG SemaphoreAdjustment;
|
|
|
|
ULONG Reserved;
|
|
|
|
ULONG Flags;
|
2009-06-19 12:07:17 +00:00
|
|
|
};
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
#endif /* _NTDDK_ */
|
|
|
|
|
2006-12-10 04:04:03 +00:00
|
|
|
/* ===============================================================
|
|
|
|
Pins
|
|
|
|
*/
|
|
|
|
|
2009-06-19 12:07:17 +00:00
|
|
|
#if defined(_NTDDK_)
|
|
|
|
|
|
|
|
typedef struct _KSPIN KSPIN, *PKSPIN;
|
|
|
|
typedef struct _KSSTREAM_POINTER KSSTREAM_POINTER, *PKSSTREAM_POINTER;
|
|
|
|
typedef struct _KSSTREAM_POINTER_OFFSET KSSTREAM_POINTER_OFFSET, *PKSSTREAM_POINTER_OFFSET;
|
|
|
|
typedef struct _KSMAPPING KSMAPPING, *PKSMAPPING;
|
|
|
|
typedef struct _KSPROCESSPIN KSPROCESSPIN, *PKSPROCESSPIN;
|
|
|
|
|
2009-07-23 14:18:22 +00:00
|
|
|
#define IOCTL_KS_HANDSHAKE CTL_CODE(FILE_DEVICE_KS, 0x007, METHOD_NEITHER, FILE_ANY_ACCESS)
|
|
|
|
|
|
|
|
typedef struct {
|
2013-08-17 23:51:10 +00:00
|
|
|
GUID ProtocolId;
|
|
|
|
PVOID Argument1;
|
|
|
|
PVOID Argument2;
|
2009-07-23 14:18:22 +00:00
|
|
|
} KSHANDSHAKE, *PKSHANDSHAKE;
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
typedef NTSTATUS
|
2009-07-25 14:06:06 +00:00
|
|
|
(NTAPI *PFNKSPINHANDSHAKE)(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSPIN Pin,
|
|
|
|
_In_ PKSHANDSHAKE In,
|
|
|
|
_In_ PKSHANDSHAKE Out);
|
2009-07-23 14:18:22 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
typedef void
|
2009-07-25 14:06:06 +00:00
|
|
|
(NTAPI *PFNKSPINPOWER)(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSPIN Pin,
|
|
|
|
_In_ DEVICE_POWER_STATE State);
|
2009-07-23 14:18:22 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
typedef void
|
2009-07-25 14:06:06 +00:00
|
|
|
(NTAPI *PFNKSPINFRAMERETURN)(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSPIN Pin,
|
|
|
|
_In_reads_bytes_opt_(Size) PVOID Data,
|
|
|
|
_In_opt_ ULONG Size,
|
|
|
|
_In_opt_ PMDL Mdl,
|
|
|
|
_In_opt_ PVOID Context,
|
|
|
|
_In_ NTSTATUS Status);
|
|
|
|
|
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
|
|
|
typedef void
|
2009-07-25 14:06:06 +00:00
|
|
|
(NTAPI *PFNKSPINIRPCOMPLETION)(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSPIN Pin,
|
|
|
|
_In_ PIRP Irp);
|
2009-07-23 14:18:22 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
typedef NTSTATUS
|
2009-07-25 14:06:06 +00:00
|
|
|
(NTAPI *PFNKSPINIRP)(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSPIN Pin,
|
|
|
|
_In_ PIRP Irp);
|
2009-06-19 12:07:17 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
typedef NTSTATUS
|
2009-07-25 14:06:06 +00:00
|
|
|
(NTAPI *PFNKSPIN)(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSPIN Pin);
|
2009-06-19 12:07:17 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
typedef void
|
2009-07-25 14:06:06 +00:00
|
|
|
(NTAPI *PFNKSPINVOID)(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSPIN Pin);
|
2009-06-19 12:07:17 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
|
|
|
typedef void
|
2009-07-25 14:06:06 +00:00
|
|
|
(NTAPI *PFNKSSTREAMPOINTER)(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSSTREAM_POINTER StreamPointer);
|
2009-06-19 12:07:17 +00:00
|
|
|
|
|
|
|
typedef struct {
|
2013-08-17 22:29:40 +00:00
|
|
|
ULONG Count;
|
|
|
|
_Field_size_(Count) PKSATTRIBUTE *Attributes;
|
2009-06-19 12:07:17 +00:00
|
|
|
} KSATTRIBUTE_LIST, *PKSATTRIBUTE_LIST;
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
typedef NTSTATUS
|
2009-07-25 14:06:06 +00:00
|
|
|
(NTAPI *PFNKSPINSETDATAFORMAT)(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSPIN Pin,
|
|
|
|
_In_opt_ PKSDATAFORMAT OldFormat,
|
|
|
|
_In_opt_ PKSMULTIPLE_ITEM OldAttributeList,
|
|
|
|
_In_ const KSDATARANGE* DataRange,
|
|
|
|
_In_opt_ const KSATTRIBUTE_LIST* AttributeRange);
|
|
|
|
|
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
typedef NTSTATUS
|
2009-07-25 14:06:06 +00:00
|
|
|
(NTAPI *PFNKSPINSETDEVICESTATE)(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSPIN Pin,
|
|
|
|
_In_ KSSTATE ToState,
|
|
|
|
_In_ KSSTATE FromState);
|
2009-06-19 12:07:17 +00:00
|
|
|
|
|
|
|
typedef struct _KSCLOCK_DISPATCH KSCLOCK_DISPATCH, *PKSCLOCK_DISPATCH;
|
|
|
|
typedef struct _KSALLOCATOR_DISPATCH KSALLOCATOR_DISPATCH, *PKSALLOCATOR_DISPATCH;
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
PFNKSPINIRP Create;
|
|
|
|
PFNKSPINIRP Close;
|
|
|
|
PFNKSPIN Process;
|
|
|
|
PFNKSPINVOID Reset;
|
|
|
|
PFNKSPINSETDATAFORMAT SetDataFormat;
|
|
|
|
PFNKSPINSETDEVICESTATE SetDeviceState;
|
|
|
|
PFNKSPIN Connect;
|
|
|
|
PFNKSPINVOID Disconnect;
|
|
|
|
const KSCLOCK_DISPATCH* Clock;
|
|
|
|
const KSALLOCATOR_DISPATCH* Allocator;
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSPIN_DISPATCH, *PKSPIN_DISPATCH;
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
|
|
|
typedef BOOLEAN
|
2009-07-25 14:06:06 +00:00
|
|
|
(NTAPI *PFNKSPINSETTIMER)(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSPIN Pin,
|
|
|
|
_In_ PKTIMER Timer,
|
|
|
|
_In_ LARGE_INTEGER DueTime,
|
|
|
|
_In_ PKDPC Dpc);
|
2009-06-19 12:07:17 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
|
|
|
typedef BOOLEAN
|
2009-07-25 14:06:06 +00:00
|
|
|
(NTAPI *PFNKSPINCANCELTIMER)(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSPIN Pin,
|
|
|
|
_In_ PKTIMER Timer);
|
2009-06-19 12:07:17 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
|
|
|
typedef LONGLONG
|
2009-06-19 12:07:17 +00:00
|
|
|
(FASTCALL *PFNKSPINCORRELATEDTIME)(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSPIN Pin,
|
|
|
|
_Out_ PLONGLONG SystemTime);
|
2009-06-19 12:07:17 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
|
|
|
typedef void
|
2009-07-25 14:06:06 +00:00
|
|
|
(NTAPI *PFNKSPINRESOLUTION)(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSPIN Pin,
|
|
|
|
_Out_ PKSRESOLUTION Resolution);
|
2009-06-19 12:07:17 +00:00
|
|
|
|
|
|
|
struct _KSCLOCK_DISPATCH {
|
2013-08-17 23:51:10 +00:00
|
|
|
PFNKSPINSETTIMER SetTimer;
|
|
|
|
PFNKSPINCANCELTIMER CancelTimer;
|
|
|
|
PFNKSPINCORRELATEDTIME CorrelatedTime;
|
|
|
|
PFNKSPINRESOLUTION Resolution;
|
2009-06-19 12:07:17 +00:00
|
|
|
};
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
typedef NTSTATUS
|
2009-07-25 14:06:06 +00:00
|
|
|
(NTAPI *PFNKSPININITIALIZEALLOCATOR)(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSPIN Pin,
|
|
|
|
_In_ PKSALLOCATOR_FRAMING AllocatorFraming,
|
|
|
|
_Out_ PVOID *Context);
|
2009-06-19 12:07:17 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
typedef PVOID
|
|
|
|
(NTAPI *PFNKSDELETEALLOCATOR)(
|
|
|
|
_In_ PVOID Context);
|
2009-06-19 12:07:17 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
typedef PVOID
|
|
|
|
(NTAPI *PFNKSDEFAULTALLOCATE)(
|
|
|
|
_In_ PVOID Context);
|
2009-06-19 12:07:17 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
typedef PVOID
|
|
|
|
(NTAPI *PFNKSDEFAULTFREE)(
|
|
|
|
_In_ PVOID Context,
|
|
|
|
_In_ PVOID Buffer);
|
2009-06-19 12:07:17 +00:00
|
|
|
|
|
|
|
struct _KSALLOCATOR_DISPATCH {
|
2013-08-17 23:51:10 +00:00
|
|
|
PFNKSPININITIALIZEALLOCATOR InitializeAllocator;
|
|
|
|
PFNKSDELETEALLOCATOR DeleteAllocator;
|
|
|
|
PFNKSDEFAULTALLOCATE Allocate;
|
|
|
|
PFNKSDEFAULTFREE Free;
|
2009-06-19 12:07:17 +00:00
|
|
|
};
|
2009-02-17 00:39:40 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
typedef struct KSAUTOMATION_TABLE_ {
|
|
|
|
ULONG PropertySetsCount;
|
|
|
|
ULONG PropertyItemSize;
|
|
|
|
_Field_size_bytes_(PropertySetsCount * PropertyItemSize) const KSPROPERTY_SET *PropertySets;
|
|
|
|
ULONG MethodSetsCount;
|
|
|
|
ULONG MethodItemSize;
|
|
|
|
_Field_size_bytes_(MethodSetsCount * MethodItemSize) const KSMETHOD_SET *MethodSets;
|
|
|
|
ULONG EventSetsCount;
|
|
|
|
ULONG EventItemSize;
|
|
|
|
_Field_size_bytes_(EventSetsCount * EventItemSize) const KSEVENT_SET *EventSets;
|
2009-01-31 12:59:56 +00:00
|
|
|
#if !defined(_WIN64)
|
2013-08-17 22:29:40 +00:00
|
|
|
PVOID Alignment;
|
2009-01-31 12:59:56 +00:00
|
|
|
#endif
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSAUTOMATION_TABLE, *PKSAUTOMATION_TABLE;
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
typedef struct {
|
|
|
|
ULONG InterfacesCount;
|
|
|
|
_Field_size_(InterfacesCount) const KSPIN_INTERFACE *Interfaces;
|
|
|
|
ULONG MediumsCount;
|
|
|
|
_Field_size_(MediumsCount) const KSPIN_MEDIUM *Mediums;
|
|
|
|
ULONG DataRangesCount;
|
|
|
|
_Field_size_(DataRangesCount) const PKSDATARANGE *DataRanges;
|
|
|
|
KSPIN_DATAFLOW DataFlow;
|
|
|
|
KSPIN_COMMUNICATION Communication;
|
|
|
|
const GUID *Category;
|
|
|
|
const GUID *Name;
|
|
|
|
union {
|
|
|
|
LONGLONG Reserved;
|
|
|
|
struct {
|
|
|
|
ULONG ConstrainedDataRangesCount;
|
|
|
|
_Field_size_(ConstrainedDataRangesCount) PKSDATARANGE *ConstrainedDataRanges;
|
2009-02-17 00:39:40 +00:00
|
|
|
};
|
2013-08-17 22:29:40 +00:00
|
|
|
};
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSPIN_DESCRIPTOR, *PKSPIN_DESCRIPTOR;
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_Must_inspect_result_
|
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
typedef NTSTATUS
|
2009-07-25 14:06:06 +00:00
|
|
|
(NTAPI *PFNKSINTERSECTHANDLER)(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PIRP Irp,
|
|
|
|
_In_ PKSP_PIN Pin,
|
|
|
|
_In_ PKSDATARANGE DataRange,
|
|
|
|
_Out_opt_ PVOID Data);
|
|
|
|
|
|
|
|
_Must_inspect_result_
|
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
typedef NTSTATUS
|
2009-07-25 14:06:06 +00:00
|
|
|
(NTAPI *PFNKSINTERSECTHANDLEREX)(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PVOID Context,
|
|
|
|
_In_ PIRP Irp,
|
|
|
|
_In_ PKSP_PIN Pin,
|
|
|
|
_In_ PKSDATARANGE DataRange,
|
|
|
|
_In_ PKSDATARANGE MatchingDataRange,
|
|
|
|
_In_ ULONG DataBufferSize,
|
|
|
|
_Out_writes_bytes_to_opt_(DataBufferSize, *DataSize) PVOID Data,
|
|
|
|
_Out_ PULONG DataSize);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
const KSPIN_DISPATCH* Dispatch;
|
|
|
|
const KSAUTOMATION_TABLE* AutomationTable;
|
|
|
|
KSPIN_DESCRIPTOR PinDescriptor;
|
|
|
|
ULONG Flags;
|
|
|
|
ULONG InstancesPossible;
|
|
|
|
ULONG InstancesNecessary;
|
|
|
|
const KSALLOCATOR_FRAMING_EX* AllocatorFraming;
|
|
|
|
PFNKSINTERSECTHANDLEREX IntersectHandler;
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSPIN_DESCRIPTOR_EX, *PKSPIN_DESCRIPTOR_EX;
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
#define KSFILTER_FLAG_DISPATCH_LEVEL_PROCESSING 0x00000001
|
|
|
|
#define KSFILTER_FLAG_CRITICAL_PROCESSING 0x00000002
|
|
|
|
#define KSFILTER_FLAG_HYPERCRITICAL_PROCESSING 0x00000004
|
2009-08-11 14:52:22 +00:00
|
|
|
#define KSFILTER_FLAG_RECEIVE_ZERO_LENGTH_SAMPLES 0x00000008
|
|
|
|
#if (NTDDI_VERSION >= NTDDI_WINXPSP2)
|
2013-08-17 23:51:10 +00:00
|
|
|
#define KSFILTER_FLAG_DENY_USERMODE_ACCESS 0x80000000
|
2009-08-11 14:52:22 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#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
|
2013-08-17 23:51:10 +00:00
|
|
|
|
|
|
|
#define KSPIN_FLAG_ASYNCHRONOUS_PROCESSING 0x00000008
|
|
|
|
#define KSPIN_FLAG_DO_NOT_INITIATE_PROCESSING 0x00000010
|
2009-08-11 14:52:22 +00:00
|
|
|
#define KSPIN_FLAG_INITIATE_PROCESSING_ON_EVERY_ARRIVAL 0x00000020
|
2013-08-17 23:51:10 +00:00
|
|
|
#define KSPIN_FLAG_FRAMES_NOT_REQUIRED_FOR_PROCESSING 0x00000040
|
|
|
|
#define KSPIN_FLAG_ENFORCE_FIFO 0x00000080
|
2009-08-11 14:52:22 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
#define KSPIN_FLAG_GENERATE_MAPPINGS 0x00000100
|
2009-08-11 14:52:22 +00:00
|
|
|
#define KSPIN_FLAG_DISTINCT_TRAILING_EDGE 0x00000200
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
#define KSPIN_FLAG_PROCESS_IN_RUN_STATE_ONLY 0x00010000
|
|
|
|
#define KSPIN_FLAG_SPLITTER 0x00020000
|
|
|
|
#define KSPIN_FLAG_USE_STANDARD_TRANSPORT 0x00040000
|
2009-08-11 14:52:22 +00:00
|
|
|
#define KSPIN_FLAG_DO_NOT_USE_STANDARD_TRANSPORT 0x00080000
|
2013-08-17 23:51:10 +00:00
|
|
|
#define KSPIN_FLAG_FIXED_FORMAT 0x00100000
|
|
|
|
#define KSPIN_FLAG_GENERATE_EOS_EVENTS 0x00200000
|
|
|
|
|
2009-08-11 14:52:22 +00:00
|
|
|
#define KSPIN_FLAG_RENDERER (KSPIN_FLAG_PROCESS_IN_RUN_STATE_ONLY|KSPIN_FLAG_GENERATE_EOS_EVENTS)
|
2013-08-17 23:51:10 +00:00
|
|
|
|
|
|
|
#define KSPIN_FLAG_IMPLEMENT_CLOCK 0x00400000
|
2009-08-11 14:52:22 +00:00
|
|
|
#define KSPIN_FLAG_SOME_FRAMES_REQUIRED_FOR_PROCESSING 0x00800000
|
2013-08-17 23:51:10 +00:00
|
|
|
#define KSPIN_FLAG_PROCESS_IF_ANY_IN_RUN_STATE 0x01000000
|
2009-08-11 14:52:22 +00:00
|
|
|
#if (NTDDI_VERSION >= NTDDI_WINXPSP2)
|
2013-08-17 23:51:10 +00:00
|
|
|
#define KSPIN_FLAG_DENY_USERMODE_ACCESS 0x80000000
|
2009-08-11 14:52:22 +00:00
|
|
|
#endif
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
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;
|
2009-06-19 12:07:17 +00:00
|
|
|
};
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2009-02-16 23:29:13 +00:00
|
|
|
#define DEFINE_KSPROPERTY_ITEM_PIN_CINSTANCES(Handler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_PIN_CINSTANCES,\
|
|
|
|
(Handler),\
|
|
|
|
sizeof(KSP_PIN),\
|
|
|
|
sizeof(KSPIN_CINSTANCES),\
|
|
|
|
NULL, NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM_PIN_CTYPES(Handler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_PIN_CTYPES,\
|
|
|
|
(Handler),\
|
|
|
|
sizeof(KSPROPERTY),\
|
|
|
|
sizeof(ULONG),\
|
|
|
|
NULL, NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM_PIN_DATAFLOW(Handler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_PIN_DATAFLOW,\
|
|
|
|
(Handler),\
|
|
|
|
sizeof(KSP_PIN),\
|
|
|
|
sizeof(KSPIN_DATAFLOW),\
|
|
|
|
NULL, NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM_PIN_DATARANGES(Handler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_PIN_DATARANGES,\
|
|
|
|
(Handler),\
|
|
|
|
sizeof(KSP_PIN),\
|
|
|
|
0,\
|
|
|
|
NULL, NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM_PIN_DATAINTERSECTION(Handler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_PIN_DATAINTERSECTION,\
|
|
|
|
(Handler),\
|
|
|
|
sizeof(KSP_PIN) + sizeof(KSMULTIPLE_ITEM),\
|
|
|
|
0,\
|
|
|
|
NULL, NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM_PIN_INTERFACES(Handler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_PIN_INTERFACES,\
|
|
|
|
(Handler),\
|
|
|
|
sizeof(KSP_PIN),\
|
|
|
|
0,\
|
|
|
|
NULL, NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM_PIN_MEDIUMS(Handler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_PIN_MEDIUMS,\
|
|
|
|
(Handler),\
|
|
|
|
sizeof(KSP_PIN),\
|
|
|
|
0,\
|
|
|
|
NULL, NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM_PIN_COMMUNICATION(Handler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_PIN_COMMUNICATION,\
|
|
|
|
(Handler),\
|
|
|
|
sizeof(KSP_PIN),\
|
|
|
|
sizeof(KSPIN_COMMUNICATION),\
|
|
|
|
NULL, NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM_PIN_GLOBALCINSTANCES(Handler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_PIN_GLOBALCINSTANCES,\
|
|
|
|
(Handler),\
|
|
|
|
sizeof(KSP_PIN),\
|
|
|
|
sizeof(KSPIN_CINSTANCES),\
|
|
|
|
NULL, NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM_PIN_NECESSARYINSTANCES(Handler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_PIN_NECESSARYINSTANCES,\
|
|
|
|
(Handler),\
|
|
|
|
sizeof(KSP_PIN),\
|
|
|
|
sizeof(ULONG),\
|
|
|
|
NULL, NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM_PIN_PHYSICALCONNECTION(Handler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_PIN_PHYSICALCONNECTION,\
|
|
|
|
(Handler),\
|
|
|
|
sizeof(KSP_PIN),\
|
|
|
|
0,\
|
|
|
|
NULL, NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM_PIN_CATEGORY(Handler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_PIN_CATEGORY,\
|
|
|
|
(Handler),\
|
|
|
|
sizeof(KSP_PIN),\
|
|
|
|
sizeof(GUID),\
|
|
|
|
NULL, NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM_PIN_NAME(Handler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_PIN_NAME,\
|
|
|
|
(Handler),\
|
|
|
|
sizeof(KSP_PIN),\
|
|
|
|
0,\
|
|
|
|
NULL, NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM_PIN_CONSTRAINEDDATARANGES(Handler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_PIN_CONSTRAINEDDATARANGES,\
|
|
|
|
(Handler),\
|
|
|
|
sizeof(KSP_PIN),\
|
|
|
|
0,\
|
|
|
|
NULL, NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM_PIN_PROPOSEDATAFORMAT(Handler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_PIN_PROPOSEDATAFORMAT,\
|
|
|
|
NULL,\
|
|
|
|
sizeof(KSP_PIN),\
|
|
|
|
sizeof(KSDATAFORMAT),\
|
|
|
|
(Handler), NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_PINSET(PinSet,\
|
|
|
|
PropGeneral, PropInstances, PropIntersection)\
|
|
|
|
DEFINE_KSPROPERTY_TABLE(PinSet) {\
|
|
|
|
DEFINE_KSPROPERTY_ITEM_PIN_CINSTANCES(PropInstances),\
|
|
|
|
DEFINE_KSPROPERTY_ITEM_PIN_CTYPES(PropGeneral),\
|
|
|
|
DEFINE_KSPROPERTY_ITEM_PIN_DATAFLOW(PropGeneral),\
|
|
|
|
DEFINE_KSPROPERTY_ITEM_PIN_DATARANGES(PropGeneral),\
|
|
|
|
DEFINE_KSPROPERTY_ITEM_PIN_DATAINTERSECTION(PropIntersection),\
|
|
|
|
DEFINE_KSPROPERTY_ITEM_PIN_INTERFACES(PropGeneral),\
|
|
|
|
DEFINE_KSPROPERTY_ITEM_PIN_MEDIUMS(PropGeneral),\
|
|
|
|
DEFINE_KSPROPERTY_ITEM_PIN_COMMUNICATION(PropGeneral),\
|
|
|
|
DEFINE_KSPROPERTY_ITEM_PIN_CATEGORY(PropGeneral),\
|
|
|
|
DEFINE_KSPROPERTY_ITEM_PIN_NAME(PropGeneral)\
|
|
|
|
}
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_PINSETCONSTRAINED(PinSet,\
|
|
|
|
PropGeneral, PropInstances, PropIntersection)\
|
|
|
|
DEFINE_KSPROPERTY_TABLE(PinSet) {\
|
|
|
|
DEFINE_KSPROPERTY_ITEM_PIN_CINSTANCES(PropInstances),\
|
|
|
|
DEFINE_KSPROPERTY_ITEM_PIN_CTYPES(PropGeneral),\
|
|
|
|
DEFINE_KSPROPERTY_ITEM_PIN_DATAFLOW(PropGeneral),\
|
|
|
|
DEFINE_KSPROPERTY_ITEM_PIN_DATARANGES(PropGeneral),\
|
|
|
|
DEFINE_KSPROPERTY_ITEM_PIN_DATAINTERSECTION(PropIntersection),\
|
|
|
|
DEFINE_KSPROPERTY_ITEM_PIN_INTERFACES(PropGeneral),\
|
|
|
|
DEFINE_KSPROPERTY_ITEM_PIN_MEDIUMS(PropGeneral),\
|
|
|
|
DEFINE_KSPROPERTY_ITEM_PIN_COMMUNICATION(PropGeneral),\
|
|
|
|
DEFINE_KSPROPERTY_ITEM_PIN_CATEGORY(PropGeneral),\
|
|
|
|
DEFINE_KSPROPERTY_ITEM_PIN_NAME(PropGeneral),\
|
|
|
|
DEFINE_KSPROPERTY_ITEM_PIN_CONSTRAINEDDATARANGES(PropGeneral)\
|
|
|
|
}
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
typedef void
|
2009-07-25 14:06:06 +00:00
|
|
|
(NTAPI *PFNKSFREE)(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PVOID Data);
|
2009-02-16 23:29:13 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
#define DEFINE_KSPROPERTY_TABLE(tablename) \
|
|
|
|
const KSPROPERTY_ITEM tablename[] =
|
2009-02-16 23:29:13 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
#endif /* _NTDDK_ */
|
2009-02-17 00:39:40 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
KSPIN_INTERFACE Interface;
|
|
|
|
KSPIN_MEDIUM Medium;
|
|
|
|
ULONG PinId;
|
|
|
|
HANDLE PinToHandle;
|
|
|
|
KSPRIORITY Priority;
|
2009-02-17 00:39:40 +00:00
|
|
|
} KSPIN_CONNECT, *PKSPIN_CONNECT;
|
|
|
|
|
2006-12-10 04:04:03 +00:00
|
|
|
/* ===============================================================
|
|
|
|
Topology
|
|
|
|
*/
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
ULONG FromNode;
|
|
|
|
ULONG FromNodePin;
|
|
|
|
ULONG ToNode;
|
|
|
|
ULONG ToNodePin;
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSTOPOLOGY_CONNECTION, *PKSTOPOLOGY_CONNECTION;
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
typedef struct {
|
|
|
|
ULONG CategoriesCount;
|
|
|
|
_Field_size_(CategoriesCount) const GUID *Categories;
|
|
|
|
ULONG TopologyNodesCount;
|
|
|
|
_Field_size_(TopologyNodesCount) const GUID *TopologyNodes;
|
|
|
|
ULONG TopologyConnectionsCount;
|
|
|
|
_Field_size_(TopologyConnectionsCount) const KSTOPOLOGY_CONNECTION *TopologyConnections;
|
|
|
|
_Field_size_(TopologyNodesCount) const GUID *TopologyNodesNames;
|
|
|
|
ULONG Reserved;
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSTOPOLOGY, *PKSTOPOLOGY;
|
|
|
|
|
|
|
|
|
2009-02-16 23:29:13 +00:00
|
|
|
#define DEFINE_KSPROPERTY_ITEM_TOPOLOGY_CATEGORIES(Handler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_TOPOLOGY_CATEGORIES,\
|
|
|
|
(Handler),\
|
|
|
|
sizeof(KSPROPERTY),\
|
|
|
|
0,\
|
|
|
|
NULL, NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM_TOPOLOGY_NODES(Handler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_TOPOLOGY_NODES,\
|
|
|
|
(Handler),\
|
|
|
|
sizeof(KSPROPERTY),\
|
|
|
|
0,\
|
|
|
|
NULL, NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM_TOPOLOGY_CONNECTIONS(Handler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_TOPOLOGY_CONNECTIONS,\
|
|
|
|
(Handler),\
|
|
|
|
sizeof(KSPROPERTY),\
|
|
|
|
0,\
|
|
|
|
NULL, NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_ITEM_TOPOLOGY_NAME(Handler)\
|
|
|
|
DEFINE_KSPROPERTY_ITEM(\
|
|
|
|
KSPROPERTY_TOPOLOGY_NAME,\
|
|
|
|
(Handler),\
|
|
|
|
sizeof(KSP_NODE),\
|
|
|
|
0,\
|
|
|
|
NULL, NULL, 0, NULL, NULL, 0)
|
|
|
|
|
|
|
|
#define DEFINE_KSPROPERTY_TOPOLOGYSET(TopologySet, Handler)\
|
|
|
|
DEFINE_KSPROPERTY_TABLE(TopologySet) {\
|
|
|
|
DEFINE_KSPROPERTY_ITEM_TOPOLOGY_CATEGORIES(Handler),\
|
|
|
|
DEFINE_KSPROPERTY_ITEM_TOPOLOGY_NODES(Handler),\
|
|
|
|
DEFINE_KSPROPERTY_ITEM_TOPOLOGY_CONNECTIONS(Handler),\
|
|
|
|
DEFINE_KSPROPERTY_ITEM_TOPOLOGY_NAME(Handler)\
|
|
|
|
}
|
|
|
|
|
2006-12-10 04:04:03 +00:00
|
|
|
/* ===============================================================
|
|
|
|
??? SORT ME
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* TODO */
|
|
|
|
typedef void* UNKNOWN;
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
typedef PVOID
|
|
|
|
(NTAPI *PFNKSINITIALIZEALLOCATOR)(
|
|
|
|
_In_ PVOID InitialContext,
|
|
|
|
_In_ PKSALLOCATOR_FRAMING AllocatorFraming,
|
|
|
|
_Outptr_ PVOID *Context);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2009-02-09 22:50:40 +00:00
|
|
|
#if defined(_NTDDK_)
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
typedef NTSTATUS
|
|
|
|
(NTAPI *PFNKSALLOCATOR)(
|
|
|
|
_In_ PIRP Irp,
|
|
|
|
_In_ ULONG BufferSize,
|
|
|
|
_In_ BOOLEAN InputOperation);
|
|
|
|
|
|
|
|
_Must_inspect_result_
|
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
typedef NTSTATUS
|
|
|
|
(NTAPI *PFNKINTERSECTHANDLEREX)(
|
|
|
|
_In_ PVOID Context,
|
|
|
|
_In_ PIRP Irp,
|
|
|
|
_In_ PKSP_PIN Pin,
|
|
|
|
_In_ PKSDATARANGE DataRange,
|
|
|
|
_In_ PKSDATARANGE MatchingDataRange,
|
|
|
|
_In_ ULONG DataBufferSize,
|
|
|
|
_Out_writes_bytes_to_opt_(DataBufferSize, *DataSize) PVOID Data,
|
|
|
|
_Out_ PULONG DataSize);
|
|
|
|
|
|
|
|
typedef NTSTATUS
|
2009-07-25 14:06:06 +00:00
|
|
|
(NTAPI *PFNALLOCATOR_ALLOCATEFRAME)(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PFILE_OBJECT FileObject,
|
|
|
|
_Outptr_ PVOID *Frame);
|
2009-07-20 17:14:21 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
typedef VOID
|
2009-07-25 14:06:06 +00:00
|
|
|
(NTAPI *PFNALLOCATOR_FREEFRAME)(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PFILE_OBJECT FileObject,
|
|
|
|
_In_ PVOID Frame);
|
2009-07-20 17:14:21 +00:00
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
PFNALLOCATOR_ALLOCATEFRAME AllocateFrame;
|
|
|
|
PFNALLOCATOR_FREEFRAME FreeFrame;
|
|
|
|
} KSSTREAMALLOCATOR_FUNCTIONTABLE, *PKSSTREAMALLOCATOR_FUNCTIONTABLE;
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
#endif /* _NTDDK_ */
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
KSALLOCATOR_FRAMING Framing;
|
|
|
|
ULONG AllocatedFrames;
|
|
|
|
ULONG Reserved;
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSSTREAMALLOCATOR_STATUS, *PKSSTREAMALLOCATOR_STATUS;
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
KSALLOCATOR_FRAMING_EX Framing;
|
|
|
|
ULONG AllocatedFrames;
|
|
|
|
ULONG Reserved;
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSSTREAMALLOCATOR_STATUS_EX, *PKSSTREAMALLOCATOR_STATUS_EX;
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
typedef struct {
|
|
|
|
ULONG Size;
|
|
|
|
ULONG TypeSpecificFlags;
|
|
|
|
KSTIME PresentationTime;
|
|
|
|
LONGLONG Duration;
|
|
|
|
ULONG FrameExtent;
|
|
|
|
ULONG DataUsed;
|
|
|
|
PVOID Data;
|
|
|
|
ULONG OptionsFlags;
|
2009-08-19 12:19:56 +00:00
|
|
|
#ifdef _WIN64
|
2013-08-17 23:51:10 +00:00
|
|
|
ULONG Reserved;
|
2009-08-19 12:14:42 +00:00
|
|
|
#endif
|
2006-12-10 04:04:03 +00:00
|
|
|
} KSSTREAM_HEADER, *PKSSTREAM_HEADER;
|
|
|
|
|
2009-08-19 12:14:42 +00:00
|
|
|
#define KSSTREAM_HEADER_OPTIONSF_SPLICEPOINT 0x00000001
|
|
|
|
#define KSSTREAM_HEADER_OPTIONSF_PREROLL 0x00000002
|
|
|
|
#define KSSTREAM_HEADER_OPTIONSF_DATADISCONTINUITY 0x00000004
|
|
|
|
#define KSSTREAM_HEADER_OPTIONSF_TYPECHANGED 0x00000008
|
|
|
|
#define KSSTREAM_HEADER_OPTIONSF_TIMEVALID 0x00000010
|
|
|
|
#define KSSTREAM_HEADER_OPTIONSF_TIMEDISCONTINUITY 0x00000040
|
|
|
|
#define KSSTREAM_HEADER_OPTIONSF_FLUSHONPAUSE 0x00000080
|
|
|
|
#define KSSTREAM_HEADER_OPTIONSF_DURATIONVALID 0x00000100
|
|
|
|
#define KSSTREAM_HEADER_OPTIONSF_ENDOFSTREAM 0x00000200
|
|
|
|
#define KSSTREAM_HEADER_OPTIONSF_BUFFEREDTRANSFER 0x00000400
|
|
|
|
#define KSSTREAM_HEADER_OPTIONSF_VRAM_DATA_TRANSFER 0x00000800
|
|
|
|
#define KSSTREAM_HEADER_OPTIONSF_LOOPEDDATA 0x80000000
|
2006-12-10 04:04:03 +00:00
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
XP / DX8
|
|
|
|
*/
|
2013-08-17 23:51:10 +00:00
|
|
|
|
2009-06-19 13:59:27 +00:00
|
|
|
#if defined(_NTDDK_)
|
2011-01-28 10:25:07 +00:00
|
|
|
|
|
|
|
typedef struct _KSGATE KSGATE, *PKSGATE;
|
|
|
|
|
|
|
|
struct _KSGATE {
|
2013-08-17 23:51:10 +00:00
|
|
|
LONG Count;
|
|
|
|
PKSGATE NextGate;
|
2011-01-28 10:25:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#ifndef _NTOS_
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(HIGH_LEVEL)
|
2011-01-28 10:25:07 +00:00
|
|
|
static
|
|
|
|
__inline
|
2014-04-27 13:11:19 +00:00
|
|
|
void
|
2011-01-28 10:25:07 +00:00
|
|
|
KsGateTurnInputOn(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_opt_ PKSGATE Gate)
|
2011-01-28 10:25:07 +00:00
|
|
|
{
|
|
|
|
while (Gate && (InterlockedIncrement(&Gate->Count) == 1))
|
|
|
|
{
|
|
|
|
Gate = Gate->NextGate;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(HIGH_LEVEL)
|
2011-01-28 10:25:07 +00:00
|
|
|
static
|
|
|
|
__inline
|
2014-04-27 13:11:19 +00:00
|
|
|
void
|
2011-01-28 10:25:07 +00:00
|
|
|
KsGateTurnInputOff(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_opt_ PKSGATE Gate)
|
2011-01-28 10:25:07 +00:00
|
|
|
{
|
|
|
|
while (Gate && (InterlockedDecrement(&Gate->Count) == 0))
|
|
|
|
{
|
|
|
|
Gate = Gate->NextGate;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(HIGH_LEVEL)
|
2011-01-28 10:25:07 +00:00
|
|
|
static
|
|
|
|
__inline
|
2014-04-27 13:11:19 +00:00
|
|
|
BOOLEAN
|
2011-01-28 10:25:07 +00:00
|
|
|
KsGateGetStateUnsafe(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSGATE Gate)
|
2011-01-28 10:25:07 +00:00
|
|
|
{
|
|
|
|
ASSERT(Gate);
|
|
|
|
return((BOOLEAN)(Gate->Count > 0));
|
|
|
|
}
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(HIGH_LEVEL)
|
2011-01-28 10:25:07 +00:00
|
|
|
static
|
|
|
|
__inline
|
2014-04-27 13:11:19 +00:00
|
|
|
BOOLEAN
|
2011-01-28 10:25:07 +00:00
|
|
|
KsGateCaptureThreshold(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSGATE Gate)
|
2011-01-28 10:25:07 +00:00
|
|
|
{
|
|
|
|
BOOLEAN captured;
|
|
|
|
|
|
|
|
ASSERT(Gate);
|
|
|
|
|
|
|
|
captured = (BOOLEAN)(InterlockedCompareExchange(&Gate->Count,0,1) == 1);
|
|
|
|
|
|
|
|
if (captured)
|
|
|
|
{
|
|
|
|
KsGateTurnInputOff(Gate->NextGate);
|
|
|
|
}
|
|
|
|
|
|
|
|
return captured;
|
|
|
|
}
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(HIGH_LEVEL)
|
2011-01-28 10:25:07 +00:00
|
|
|
static
|
|
|
|
__inline
|
2014-04-27 13:11:19 +00:00
|
|
|
void
|
2011-01-28 10:25:07 +00:00
|
|
|
KsGateInitialize(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSGATE Gate,
|
|
|
|
_In_ LONG InitialCount,
|
|
|
|
_In_opt_ PKSGATE NextGate,
|
|
|
|
_In_ BOOLEAN StateToPropagate)
|
2011-01-28 10:25:07 +00:00
|
|
|
{
|
|
|
|
ASSERT(Gate);
|
|
|
|
Gate->Count = InitialCount;
|
|
|
|
Gate->NextGate = NextGate;
|
|
|
|
|
|
|
|
if (NextGate)
|
|
|
|
{
|
|
|
|
if (InitialCount > 0)
|
|
|
|
{
|
|
|
|
if (StateToPropagate)
|
|
|
|
{
|
|
|
|
KsGateTurnInputOn(NextGate);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (!StateToPropagate)
|
|
|
|
{
|
|
|
|
KsGateTurnInputOff(NextGate);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(HIGH_LEVEL)
|
2011-01-28 10:25:07 +00:00
|
|
|
static
|
|
|
|
__inline
|
2014-04-27 13:11:19 +00:00
|
|
|
void
|
2011-01-28 10:25:07 +00:00
|
|
|
KsGateInitializeAnd(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSGATE AndGate,
|
|
|
|
_In_opt_ PKSGATE NextOrGate)
|
2011-01-28 10:25:07 +00:00
|
|
|
{
|
|
|
|
KsGateInitialize(AndGate,1,NextOrGate,TRUE);
|
|
|
|
}
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(HIGH_LEVEL)
|
2011-01-28 10:25:07 +00:00
|
|
|
static
|
|
|
|
__inline
|
2014-04-27 13:11:19 +00:00
|
|
|
void
|
2011-01-28 10:25:07 +00:00
|
|
|
KsGateInitializeOr(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSGATE OrGate,
|
|
|
|
_In_opt_ PKSGATE NextAndGate)
|
2011-01-28 10:25:07 +00:00
|
|
|
{
|
|
|
|
KsGateInitialize(OrGate,0,NextAndGate,FALSE);
|
|
|
|
}
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(HIGH_LEVEL)
|
2011-01-28 10:25:07 +00:00
|
|
|
static
|
|
|
|
__inline
|
2014-04-27 13:11:19 +00:00
|
|
|
void
|
2011-01-28 10:25:07 +00:00
|
|
|
KsGateAddOnInputToAnd(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSGATE AndGate)
|
2011-01-28 10:25:07 +00:00
|
|
|
{
|
|
|
|
UNREFERENCED_PARAMETER (AndGate);
|
|
|
|
}
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(HIGH_LEVEL)
|
2011-01-28 10:25:07 +00:00
|
|
|
static
|
|
|
|
__inline
|
2014-04-27 13:11:19 +00:00
|
|
|
void
|
2011-01-28 10:25:07 +00:00
|
|
|
KsGateAddOffInputToAnd(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSGATE AndGate)
|
2011-01-28 10:25:07 +00:00
|
|
|
{
|
|
|
|
KsGateTurnInputOff(AndGate);
|
|
|
|
}
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(HIGH_LEVEL)
|
2011-01-28 10:25:07 +00:00
|
|
|
static
|
|
|
|
__inline
|
2014-04-27 13:11:19 +00:00
|
|
|
void
|
2011-01-28 10:25:07 +00:00
|
|
|
KsGateRemoveOnInputFromAnd(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSGATE AndGate)
|
2011-01-28 10:25:07 +00:00
|
|
|
{
|
|
|
|
UNREFERENCED_PARAMETER (AndGate);
|
|
|
|
}
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(HIGH_LEVEL)
|
2011-01-28 10:25:07 +00:00
|
|
|
static
|
|
|
|
__inline
|
2014-04-27 13:11:19 +00:00
|
|
|
void
|
2011-01-28 10:25:07 +00:00
|
|
|
KsGateRemoveOffInputFromAnd(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSGATE AndGate)
|
2011-01-28 10:25:07 +00:00
|
|
|
{
|
|
|
|
KsGateTurnInputOn(AndGate);
|
|
|
|
}
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(HIGH_LEVEL)
|
2011-01-28 10:25:07 +00:00
|
|
|
static
|
|
|
|
__inline
|
2014-04-27 13:11:19 +00:00
|
|
|
void
|
2011-01-28 10:25:07 +00:00
|
|
|
KsGateAddOnInputToOr(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSGATE OrGate)
|
2011-01-28 10:25:07 +00:00
|
|
|
{
|
|
|
|
KsGateTurnInputOn(OrGate);
|
|
|
|
}
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(HIGH_LEVEL)
|
2011-01-28 10:25:07 +00:00
|
|
|
static
|
|
|
|
__inline
|
2014-04-27 13:11:19 +00:00
|
|
|
void
|
2011-01-28 10:25:07 +00:00
|
|
|
KsGateAddOffInputToOr(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSGATE OrGate)
|
2011-01-28 10:25:07 +00:00
|
|
|
{
|
|
|
|
UNREFERENCED_PARAMETER (OrGate);
|
|
|
|
}
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(HIGH_LEVEL)
|
2011-01-28 10:25:07 +00:00
|
|
|
static
|
|
|
|
__inline
|
2014-04-27 13:11:19 +00:00
|
|
|
void
|
2011-01-28 10:25:07 +00:00
|
|
|
KsGateRemoveOnInputFromOr(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSGATE OrGate)
|
2011-01-28 10:25:07 +00:00
|
|
|
{
|
|
|
|
KsGateTurnInputOff(OrGate);
|
|
|
|
}
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(HIGH_LEVEL)
|
2011-01-28 10:25:07 +00:00
|
|
|
static
|
|
|
|
__inline
|
2014-04-27 13:11:19 +00:00
|
|
|
void
|
2011-01-28 10:25:07 +00:00
|
|
|
KsGateRemoveOffInputFromOr(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSGATE OrGate)
|
2011-01-28 10:25:07 +00:00
|
|
|
{
|
|
|
|
UNREFERENCED_PARAMETER (OrGate);
|
|
|
|
}
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(HIGH_LEVEL)
|
2011-01-28 10:25:07 +00:00
|
|
|
static
|
|
|
|
__inline
|
2014-04-27 13:11:19 +00:00
|
|
|
void
|
2011-01-28 10:25:07 +00:00
|
|
|
KsGateTerminateAnd(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSGATE AndGate)
|
2011-01-28 10:25:07 +00:00
|
|
|
{
|
|
|
|
ASSERT(AndGate);
|
|
|
|
if (KsGateGetStateUnsafe(AndGate))
|
|
|
|
{
|
|
|
|
KsGateRemoveOnInputFromOr(AndGate->NextGate);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
KsGateRemoveOffInputFromOr(AndGate->NextGate);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(HIGH_LEVEL)
|
2011-01-28 10:25:07 +00:00
|
|
|
static
|
|
|
|
__inline
|
2014-04-27 13:11:19 +00:00
|
|
|
void
|
2011-01-28 10:25:07 +00:00
|
|
|
KsGateTerminateOr(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSGATE OrGate)
|
2011-01-28 10:25:07 +00:00
|
|
|
{
|
|
|
|
ASSERT(OrGate);
|
|
|
|
if (KsGateGetStateUnsafe(OrGate))
|
|
|
|
{
|
|
|
|
KsGateRemoveOnInputFromAnd(OrGate->NextGate);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
KsGateRemoveOffInputFromAnd(OrGate->NextGate);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
#endif /* !_NTOS_ */
|
2011-01-28 10:25:07 +00:00
|
|
|
|
2009-06-19 12:07:17 +00:00
|
|
|
struct _KSMAPPING {
|
2013-08-17 23:51:10 +00:00
|
|
|
PHYSICAL_ADDRESS PhysicalAddress;
|
|
|
|
ULONG ByteCount;
|
|
|
|
ULONG Alignment;
|
2009-06-19 12:07:17 +00:00
|
|
|
};
|
2013-08-17 23:51:10 +00:00
|
|
|
|
|
|
|
#endif /* _NTDDK_ */
|
2009-06-19 12:07:17 +00:00
|
|
|
|
2009-07-23 14:18:22 +00:00
|
|
|
typedef enum {
|
2013-08-17 23:51:10 +00:00
|
|
|
KSSTREAM_POINTER_STATE_UNLOCKED = 0,
|
|
|
|
KSSTREAM_POINTER_STATE_LOCKED
|
2009-07-23 14:18:22 +00:00
|
|
|
} KSSTREAM_POINTER_STATE;
|
2009-07-20 17:14:21 +00:00
|
|
|
|
|
|
|
typedef struct _KSPROCESSPIN_INDEXENTRY KSPROCESSPIN_INDEXENTRY, *PKSPROCESSPIN_INDEXENTRY;
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
struct _KSSTREAM_POINTER_OFFSET {
|
2009-06-19 12:07:17 +00:00
|
|
|
#if defined(_NTDDK_)
|
2013-08-17 23:51:10 +00:00
|
|
|
union {
|
2009-06-19 12:07:17 +00:00
|
|
|
PUCHAR Data;
|
2013-08-17 23:51:10 +00:00
|
|
|
PKSMAPPING Mappings;
|
|
|
|
};
|
|
|
|
#else
|
|
|
|
PUCHAR Data;
|
2009-06-19 12:07:17 +00:00
|
|
|
#endif
|
|
|
|
#if !defined(_WIN64)
|
2013-08-17 23:51:10 +00:00
|
|
|
PVOID Alignment;
|
2009-06-19 12:07:17 +00:00
|
|
|
#endif
|
2013-08-17 23:51:10 +00:00
|
|
|
ULONG Count;
|
|
|
|
ULONG Remaining;
|
2009-06-19 12:07:17 +00:00
|
|
|
};
|
2013-08-17 22:29:40 +00:00
|
|
|
|
2009-06-19 12:07:17 +00:00
|
|
|
#if defined(_NTDDK_)
|
2013-08-17 22:29:40 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
struct _KSSTREAM_POINTER {
|
|
|
|
PVOID Context;
|
|
|
|
PKSPIN Pin;
|
|
|
|
PKSSTREAM_HEADER StreamHeader;
|
|
|
|
PKSSTREAM_POINTER_OFFSET Offset;
|
|
|
|
KSSTREAM_POINTER_OFFSET OffsetIn;
|
|
|
|
KSSTREAM_POINTER_OFFSET OffsetOut;
|
2009-06-19 12:07:17 +00:00
|
|
|
};
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
struct _KSPROCESSPIN {
|
|
|
|
PKSPIN Pin;
|
|
|
|
PKSSTREAM_POINTER StreamPointer;
|
|
|
|
PKSPROCESSPIN InPlaceCounterpart;
|
|
|
|
PKSPROCESSPIN DelegateBranch;
|
|
|
|
PKSPROCESSPIN CopySource;
|
|
|
|
_Field_size_bytes_(BytesAvailable) PVOID Data;
|
|
|
|
ULONG BytesAvailable;
|
|
|
|
ULONG BytesUsed;
|
|
|
|
ULONG Flags;
|
|
|
|
BOOLEAN Terminate;
|
2009-06-19 12:07:17 +00:00
|
|
|
};
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
struct _KSPROCESSPIN_INDEXENTRY {
|
|
|
|
_Field_size_(Count) PKSPROCESSPIN *Pins;
|
|
|
|
ULONG Count;
|
2009-07-20 17:14:21 +00:00
|
|
|
};
|
2013-08-17 22:29:40 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
#endif /* _NTDDK_ */
|
2006-12-10 04:04:03 +00:00
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
Device Dispatch
|
|
|
|
*/
|
2009-01-31 12:59:56 +00:00
|
|
|
|
2007-04-20 16:45:18 +00:00
|
|
|
#if defined(_NTDDK_)
|
2009-01-31 12:59:56 +00:00
|
|
|
|
|
|
|
typedef struct _KSFILTER_DISPATCH KSFILTER_DISPATCH, *PKSFILTER_DISPATCH;
|
|
|
|
typedef struct _KSDEVICE KSDEVICE, *PKSDEVICE;
|
|
|
|
typedef struct _KSFILTER KSFILTER, *PKSFILTER;
|
|
|
|
typedef struct _KSNODE_DESCRIPTOR KSNODE_DESCRIPTOR, *PKSNODE_DESCRIPTOR;
|
|
|
|
typedef struct _KSFILTER_DESCRIPTOR KSFILTER_DESCRIPTOR, *PKSFILTER_DESCRIPTOR;
|
|
|
|
typedef struct _KSDEVICE_DESCRIPTOR KSDEVICE_DESCRIPTOR, *PKSDEVICE_DESCRIPTOR;
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
typedef NTSTATUS
|
|
|
|
(NTAPI *PFNKSDEVICECREATE)(
|
|
|
|
_In_ PKSDEVICE Device);
|
|
|
|
|
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
typedef NTSTATUS
|
|
|
|
(NTAPI *PFNKSDEVICEPNPSTART)(
|
|
|
|
_In_ PKSDEVICE Device,
|
|
|
|
_In_ PIRP Irp,
|
|
|
|
_In_opt_ PCM_RESOURCE_LIST TranslatedResourceList,
|
|
|
|
_In_opt_ PCM_RESOURCE_LIST UntranslatedResourceList);
|
|
|
|
|
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
typedef NTSTATUS
|
|
|
|
(NTAPI *PFNKSDEVICE)(
|
|
|
|
_In_ PKSDEVICE Device);
|
|
|
|
|
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
typedef NTSTATUS
|
|
|
|
(NTAPI *PFNKSDEVICEIRP)(
|
|
|
|
_In_ PKSDEVICE Device,
|
|
|
|
_In_ PIRP Irp);
|
|
|
|
|
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
typedef VOID
|
|
|
|
(NTAPI *PFNKSDEVICEIRPVOID)(
|
|
|
|
_In_ PKSDEVICE Device,
|
|
|
|
_In_ PIRP Irp);
|
|
|
|
|
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
typedef NTSTATUS
|
|
|
|
(NTAPI *PFNKSDEVICEQUERYCAPABILITIES)(
|
|
|
|
_In_ PKSDEVICE Device,
|
|
|
|
_In_ PIRP Irp,
|
|
|
|
_Inout_ PDEVICE_CAPABILITIES Capabilities);
|
|
|
|
|
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
typedef NTSTATUS
|
|
|
|
(NTAPI *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);
|
|
|
|
|
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
typedef VOID
|
|
|
|
(NTAPI *PFNKSDEVICESETPOWER)(
|
|
|
|
_In_ PKSDEVICE Device,
|
|
|
|
_In_ PIRP Irp,
|
|
|
|
_In_ DEVICE_POWER_STATE To,
|
|
|
|
_In_ DEVICE_POWER_STATE From);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2009-01-31 12:59:56 +00:00
|
|
|
typedef struct _KSDEVICE_DISPATCH {
|
2013-08-17 23:51:10 +00:00
|
|
|
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;
|
|
|
|
} KSDEVICE_DISPATCH, *PKSDEVICE_DISPATCH;
|
2009-01-31 12:59:56 +00:00
|
|
|
|
|
|
|
#if (NTDDI_VERSION >= NTDDI_LONGHORN)
|
|
|
|
#define KSDEVICE_DESCRIPTOR_VERSION_2 (0x110)
|
2013-08-17 23:51:10 +00:00
|
|
|
#define MIN_DEV_VER_FOR_FLAGS (0x110)
|
2009-01-31 12:59:56 +00:00
|
|
|
#endif
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
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;
|
2009-01-31 12:59:56 +00:00
|
|
|
};
|
2013-08-17 23:51:10 +00:00
|
|
|
|
|
|
|
#endif /* _NTDDK_ */
|
2006-12-10 04:04:03 +00:00
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
Filter Dispatch
|
|
|
|
*/
|
2013-08-17 23:51:10 +00:00
|
|
|
|
2007-04-20 16:45:18 +00:00
|
|
|
#if defined(_NTDDK_)
|
2013-08-17 23:51:10 +00:00
|
|
|
|
|
|
|
struct _KSFILTER {
|
|
|
|
const KSFILTER_DESCRIPTOR* Descriptor;
|
|
|
|
KSOBJECT_BAG Bag;
|
|
|
|
PVOID Context;
|
2009-01-31 12:59:56 +00:00
|
|
|
};
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
typedef void
|
2009-07-25 14:06:06 +00:00
|
|
|
(NTAPI *PFNKSFILTERPOWER)(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSFILTER Filter,
|
|
|
|
_In_ DEVICE_POWER_STATE State);
|
2009-07-23 14:18:22 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
typedef NTSTATUS
|
|
|
|
(NTAPI *PFNKSFILTERIRP)(
|
|
|
|
_In_ PKSFILTER Filter,
|
|
|
|
_In_ PIRP Irp);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
typedef NTSTATUS
|
|
|
|
(NTAPI *PFNKSFILTERPROCESS)(
|
|
|
|
_In_ PKSFILTER Filter,
|
|
|
|
_In_ PKSPROCESSPIN_INDEXENTRY ProcessPinsIndex);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
typedef NTSTATUS
|
|
|
|
(NTAPI *PFNKSFILTERVOID)(
|
|
|
|
_In_ PKSFILTER Filter);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
struct _KSFILTER_DISPATCH {
|
|
|
|
PFNKSFILTERIRP Create;
|
|
|
|
PFNKSFILTERIRP Close;
|
|
|
|
PFNKSFILTERPROCESS Process;
|
|
|
|
PFNKSFILTERVOID Reset;
|
2009-01-31 12:59:56 +00:00
|
|
|
};
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
struct _KSNODE_DESCRIPTOR {
|
|
|
|
const KSAUTOMATION_TABLE *AutomationTable;
|
|
|
|
const GUID *Type;
|
|
|
|
const GUID *Name;
|
2010-04-01 00:41:09 +00:00
|
|
|
#if !defined(_WIN64)
|
2013-08-17 23:51:10 +00:00
|
|
|
PVOID Alignment;
|
2010-04-01 00:41:09 +00:00
|
|
|
#endif
|
2009-01-31 12:59:56 +00:00
|
|
|
};
|
2007-03-18 17:12:18 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
struct _KSFILTER_DESCRIPTOR {
|
|
|
|
const KSFILTER_DISPATCH *Dispatch;
|
|
|
|
const KSAUTOMATION_TABLE *AutomationTable;
|
|
|
|
ULONG Version;
|
|
|
|
ULONG Flags;
|
|
|
|
const GUID *ReferenceGuid;
|
|
|
|
ULONG PinDescriptorsCount;
|
|
|
|
ULONG PinDescriptorSize;
|
|
|
|
_Field_size_bytes_(PinDescriptorsCount * PinDescriptorSize) const KSPIN_DESCRIPTOR_EX *PinDescriptors;
|
|
|
|
ULONG CategoriesCount;
|
|
|
|
_Field_size_(CategoriesCount) const GUID *Categories;
|
|
|
|
ULONG NodeDescriptorsCount;
|
|
|
|
ULONG NodeDescriptorSize;
|
|
|
|
_Field_size_bytes_(NodeDescriptorsCount * NodeDescriptorSize) const KSNODE_DESCRIPTOR *NodeDescriptors;
|
|
|
|
ULONG ConnectionsCount;
|
|
|
|
_Field_size_(ConnectionsCount) const KSTOPOLOGY_CONNECTION *Connections;
|
|
|
|
const KSCOMPONENTID *ComponentId;
|
2009-01-31 12:59:56 +00:00
|
|
|
};
|
2007-03-18 17:12:18 +00:00
|
|
|
|
2009-08-11 14:52:22 +00:00
|
|
|
#define KSFILTER_DESCRIPTOR_VERSION ((ULONG)-1)
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
struct _KSDEVICE_DESCRIPTOR {
|
|
|
|
const KSDEVICE_DISPATCH *Dispatch;
|
|
|
|
ULONG FilterDescriptorsCount;
|
|
|
|
_Field_size_(FilterDescriptorsCount) const KSFILTER_DESCRIPTOR * const *FilterDescriptors;
|
|
|
|
ULONG Version;
|
|
|
|
ULONG Flags;
|
2009-01-31 12:59:56 +00:00
|
|
|
};
|
2009-02-10 07:44:14 +00:00
|
|
|
|
|
|
|
struct _KSFILTERFACTORY {
|
2013-08-17 23:51:10 +00:00
|
|
|
const KSFILTER_DESCRIPTOR* FilterDescriptor;
|
|
|
|
KSOBJECT_BAG Bag;
|
|
|
|
PVOID Context;
|
2009-02-10 07:44:14 +00:00
|
|
|
};
|
|
|
|
|
2009-08-11 14:52:22 +00:00
|
|
|
#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
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
#endif /* _NTDDK_ */
|
|
|
|
|
2006-12-10 04:04:03 +00:00
|
|
|
/* ===============================================================
|
|
|
|
Minidriver Callbacks
|
|
|
|
*/
|
2013-08-17 23:51:10 +00:00
|
|
|
|
2007-04-20 16:45:18 +00:00
|
|
|
#if defined(_NTDDK_)
|
2013-08-17 23:51:10 +00:00
|
|
|
|
|
|
|
typedef NTSTATUS
|
|
|
|
(NTAPI *KStrMethodHandler)(
|
|
|
|
IN PIRP Irp,
|
|
|
|
IN PKSIDENTIFIER Request,
|
|
|
|
IN OUT PVOID Data);
|
|
|
|
|
|
|
|
typedef NTSTATUS
|
|
|
|
(NTAPI *KStrSupportHandler)(
|
|
|
|
IN PIRP Irp,
|
|
|
|
IN PKSIDENTIFIER Request,
|
|
|
|
IN OUT PVOID Data);
|
|
|
|
|
2007-04-20 16:45:18 +00:00
|
|
|
#endif
|
2006-12-10 04:04:03 +00:00
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
Allocator Functions
|
|
|
|
*/
|
2013-08-17 23:51:10 +00:00
|
|
|
|
2007-04-20 16:45:18 +00:00
|
|
|
#if defined(_NTDDK_)
|
2013-08-17 22:29:40 +00:00
|
|
|
|
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsCreateAllocator(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ HANDLE ConnectionHandle,
|
|
|
|
_In_ PKSALLOCATOR_FRAMING AllocatorFraming,
|
|
|
|
_Out_ PHANDLE AllocatorHandle);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsCreateDefaultAllocator(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PIRP Irp);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsValidateAllocatorCreateRequest(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PIRP Irp,
|
|
|
|
_Out_ PKSALLOCATOR_FRAMING *AllocatorFraming);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsCreateDefaultAllocatorEx(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PIRP Irp,
|
|
|
|
_In_opt_ PVOID InitializeContext,
|
|
|
|
_In_opt_ PFNKSDEFAULTALLOCATE DefaultAllocate,
|
|
|
|
_In_opt_ PFNKSDEFAULTFREE DefaultFree,
|
|
|
|
_In_opt_ PFNKSINITIALIZEALLOCATOR InitializeAllocator,
|
|
|
|
_In_opt_ PFNKSDELETEALLOCATOR DeleteAllocator);
|
|
|
|
|
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsValidateAllocatorFramingEx(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSALLOCATOR_FRAMING_EX Framing,
|
|
|
|
_In_ ULONG BufferSize,
|
|
|
|
_In_ const KSALLOCATOR_FRAMING_EX *PinFraming);
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
#endif /* _NTDDK_ */
|
2006-12-10 04:04:03 +00:00
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
Clock Functions
|
|
|
|
*/
|
2013-08-17 23:51:10 +00:00
|
|
|
|
2007-04-20 16:45:18 +00:00
|
|
|
#if defined(_NTDDK_)
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
|
|
|
typedef BOOLEAN
|
|
|
|
(NTAPI *PFNKSSETTIMER)(
|
|
|
|
_In_ PVOID Context,
|
|
|
|
_In_ PKTIMER Timer,
|
|
|
|
_In_ LARGE_INTEGER DueTime,
|
|
|
|
_In_ PKDPC Dpc);
|
|
|
|
|
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
|
|
|
typedef BOOLEAN
|
|
|
|
(NTAPI *PFNKSCANCELTIMER)(
|
|
|
|
_In_ PVOID Context,
|
|
|
|
_In_ PKTIMER Timer);
|
|
|
|
|
|
|
|
typedef LONGLONG
|
|
|
|
(FASTCALL *PFNKSCORRELATEDTIME)(
|
|
|
|
_In_ PVOID Context,
|
|
|
|
_Out_ PLONGLONG SystemTime);
|
|
|
|
|
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsCreateClock(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ HANDLE ConnectionHandle,
|
|
|
|
_In_ PKSCLOCK_CREATE ClockCreate,
|
|
|
|
_Out_ PHANDLE ClockHandle);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsCreateDefaultClock(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PIRP Irp,
|
|
|
|
_In_ PKSDEFAULTCLOCK DefaultClock);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsAllocateDefaultClock(
|
2013-08-17 22:29:40 +00:00
|
|
|
_Out_ PKSDEFAULTCLOCK *DefaultClock);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsAllocateDefaultClockEx(
|
2013-08-17 22:29:40 +00:00
|
|
|
_Out_ PKSDEFAULTCLOCK *DefaultClock,
|
|
|
|
_In_opt_ PVOID Context,
|
|
|
|
_In_opt_ PFNKSSETTIMER SetTimer,
|
|
|
|
_In_opt_ PFNKSCANCELTIMER CancelTimer,
|
|
|
|
_In_opt_ PFNKSCORRELATEDTIME CorrelatedTime,
|
|
|
|
_In_opt_ const KSRESOLUTION *Resolution,
|
|
|
|
_In_ ULONG Flags);
|
|
|
|
|
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
VOID
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsFreeDefaultClock(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSDEFAULTCLOCK DefaultClock);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsValidateClockCreateRequest(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PIRP Irp,
|
|
|
|
_Outptr_ PKSCLOCK_CREATE *ClockCreate);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
KSSTATE
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsGetDefaultClockState(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSDEFAULTCLOCK DefaultClock);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
VOID
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsSetDefaultClockState(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSDEFAULTCLOCK DefaultClock,
|
|
|
|
_In_ KSSTATE State);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
LONGLONG
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsGetDefaultClockTime(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSDEFAULTCLOCK DefaultClock);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
VOID
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsSetDefaultClockTime(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSDEFAULTCLOCK DefaultClock,
|
|
|
|
_In_ LONGLONG Time);
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
#endif /* _NTDDK_ */
|
2006-12-10 04:04:03 +00:00
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
Method Functions
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* Method sets - TODO: Make into macros! */
|
2007-04-20 16:45:18 +00:00
|
|
|
#if defined(_NTDDK_)
|
2013-08-17 22:29:40 +00:00
|
|
|
|
2006-12-10 04:04:03 +00:00
|
|
|
#if 0
|
2013-08-17 23:51:10 +00:00
|
|
|
|
2006-12-10 04:04:03 +00:00
|
|
|
VOID
|
|
|
|
KSMETHOD_SET_IRP_STORAGE(
|
2013-08-17 23:51:10 +00:00
|
|
|
IN IRP Irp);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
|
|
|
VOID
|
|
|
|
KSMETHOD_ITEM_IRP_STORAGE(
|
2013-08-17 23:51:10 +00:00
|
|
|
IN IRP Irp);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
|
|
|
VOID
|
|
|
|
KSMETHOD_TYPE_IRP_STORAGE(
|
2013-08-17 23:51:10 +00:00
|
|
|
IN IRP Irp);
|
|
|
|
|
2006-12-10 04:04:03 +00:00
|
|
|
#endif
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsMethodHandler(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PIRP Irp,
|
|
|
|
_In_ ULONG MethodSetsCount,
|
2014-05-10 10:02:09 +00:00
|
|
|
_In_reads_(MethodSetsCount) const KSMETHOD_SET* MethodSet);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsMethodHandlerWithAllocator(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PIRP Irp,
|
|
|
|
_In_ ULONG MethodSetsCount,
|
2014-05-10 10:02:09 +00:00
|
|
|
_In_reads_(MethodSetsCount) const KSMETHOD_SET* MethodSet,
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_opt_ PFNKSALLOCATOR Allocator,
|
|
|
|
_In_opt_ ULONG MethodItemSize);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
BOOLEAN
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsFastMethodHandler(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PFILE_OBJECT FileObject,
|
|
|
|
_In_reads_bytes_(MethodLength) PKSMETHOD UNALIGNED Method,
|
|
|
|
_In_ ULONG MethodLength,
|
|
|
|
_Inout_updates_bytes_(DataLength) PVOID UNALIGNED Data,
|
|
|
|
_In_ ULONG DataLength,
|
|
|
|
_Out_ PIO_STATUS_BLOCK IoStatus,
|
|
|
|
_In_ ULONG MethodSetsCount,
|
|
|
|
_In_reads_(MethodSetsCount) const KSMETHOD_SET *MethodSet);
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
#endif /* _NTDDK_ */
|
2006-12-10 04:04:03 +00:00
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
Property Functions
|
|
|
|
*/
|
2013-08-17 22:29:40 +00:00
|
|
|
|
2007-04-20 16:45:18 +00:00
|
|
|
#if defined(_NTDDK_)
|
2013-08-17 22:29:40 +00:00
|
|
|
|
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsPropertyHandler(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PIRP Irp,
|
|
|
|
_In_ ULONG PropertySetsCount,
|
|
|
|
_In_reads_(PropertySetsCount) const KSPROPERTY_SET *PropertySet);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsPropertyHandlerWithAllocator(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PIRP Irp,
|
|
|
|
_In_ ULONG PropertySetsCount,
|
2014-05-10 10:02:09 +00:00
|
|
|
_In_reads_(PropertySetsCount) const KSPROPERTY_SET* PropertySet,
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_opt_ PFNKSALLOCATOR Allocator,
|
|
|
|
_In_opt_ ULONG PropertyItemSize);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsUnserializeObjectPropertiesFromRegistry(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PFILE_OBJECT FileObject,
|
|
|
|
_In_opt_ HANDLE ParentKey,
|
|
|
|
_In_opt_ PUNICODE_STRING RegistryPath);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
BOOLEAN
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsFastPropertyHandler(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PFILE_OBJECT FileObject,
|
|
|
|
_In_reads_bytes_(PropertyLength) PKSPROPERTY UNALIGNED Property,
|
|
|
|
_In_ ULONG PropertyLength,
|
|
|
|
_In_reads_bytes_(DataLength) PVOID UNALIGNED Data,
|
|
|
|
_In_ ULONG DataLength,
|
|
|
|
_Out_ PIO_STATUS_BLOCK IoStatus,
|
|
|
|
_In_ ULONG PropertySetsCount,
|
|
|
|
_In_reads_(PropertySetsCount) const KSPROPERTY_SET *PropertySet);
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
#endif /* _NTDDK_ */
|
2006-12-10 04:04:03 +00:00
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
Event Functions
|
|
|
|
*/
|
2009-08-23 22:31:30 +00:00
|
|
|
|
2007-04-20 16:45:18 +00:00
|
|
|
#if defined(_NTDDK_)
|
2009-02-21 20:10:21 +00:00
|
|
|
|
|
|
|
#define KSPROBE_STREAMREAD 0x00000000
|
|
|
|
#define KSPROBE_STREAMWRITE 0x00000001
|
|
|
|
#define KSPROBE_ALLOCATEMDL 0x00000010
|
|
|
|
#define KSPROBE_PROBEANDLOCK 0x00000020
|
|
|
|
#define KSPROBE_SYSTEMADDRESS 0x00000040
|
|
|
|
#define KSPROBE_MODIFY 0x00000200
|
|
|
|
#define KSPROBE_STREAMWRITEMODIFY (KSPROBE_MODIFY | KSPROBE_STREAMWRITE)
|
2013-08-17 23:51:10 +00:00
|
|
|
#define KSPROBE_ALLOWFORMATCHANGE 0x00000080
|
2009-02-21 20:10:21 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
#define KSSTREAM_READ KSPROBE_STREAMREAD
|
|
|
|
#define KSSTREAM_WRITE KSPROBE_STREAMWRITE
|
|
|
|
#define KSSTREAM_PAGED_DATA 0x00000000
|
|
|
|
#define KSSTREAM_NONPAGED_DATA 0x00000100
|
|
|
|
#define KSSTREAM_SYNCHRONOUS 0x00001000
|
2009-02-21 20:10:21 +00:00
|
|
|
#define KSSTREAM_FAILUREEXCEPTION 0x00002000
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
|
|
|
typedef BOOLEAN
|
2009-07-25 14:06:06 +00:00
|
|
|
(NTAPI *PFNKSGENERATEEVENTCALLBACK)(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PVOID Context,
|
|
|
|
_In_ PKSEVENT_ENTRY EventEntry);
|
2009-07-23 14:18:22 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsGenerateEvent(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSEVENT_ENTRY EntryEvent);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
void
|
|
|
|
NTAPI
|
2009-07-23 14:18:22 +00:00
|
|
|
KsGenerateEvents(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PVOID Object,
|
|
|
|
_In_opt_ const GUID *EventSet,
|
|
|
|
_In_ ULONG EventId,
|
|
|
|
_In_ ULONG DataSize,
|
|
|
|
_In_reads_bytes_opt_(DataSize) PVOID Data,
|
|
|
|
_In_opt_ PFNKSGENERATEEVENTCALLBACK CallBack,
|
|
|
|
_In_opt_ PVOID CallBackContext);
|
|
|
|
|
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsEnableEventWithAllocator(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PIRP Irp,
|
|
|
|
_In_ ULONG EventSetsCount,
|
2014-05-10 10:02:09 +00:00
|
|
|
_In_reads_(EventSetsCount) const KSEVENT_SET* EventSet,
|
2013-08-17 22:29:40 +00:00
|
|
|
_Inout_opt_ PLIST_ENTRY EventsList,
|
|
|
|
_In_opt_ KSEVENTS_LOCKTYPE EventsFlags,
|
|
|
|
_In_opt_ PVOID EventsLock,
|
|
|
|
_In_opt_ PFNKSALLOCATOR Allocator,
|
|
|
|
_In_opt_ ULONG EventItemSize);
|
|
|
|
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsGenerateDataEvent(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSEVENT_ENTRY EventEntry,
|
|
|
|
_In_ ULONG DataSize,
|
|
|
|
_In_reads_bytes_(DataSize) PVOID Data);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsEnableEvent(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PIRP Irp,
|
|
|
|
_In_ ULONG EventSetsCount,
|
|
|
|
_In_reads_(EventSetsCount) KSEVENT_SET *EventSet,
|
|
|
|
_Inout_opt_ PLIST_ENTRY EventsList,
|
|
|
|
_In_opt_ KSEVENTS_LOCKTYPE EventsFlags,
|
|
|
|
_In_opt_ PVOID EventsLock);
|
|
|
|
|
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
VOID
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsDiscardEvent(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSEVENT_ENTRY EventEntry);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsDisableEvent(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PIRP Irp,
|
|
|
|
_Inout_ PLIST_ENTRY EventsList,
|
|
|
|
_In_ KSEVENTS_LOCKTYPE EventsFlags,
|
|
|
|
_In_ PVOID EventsLock);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
VOID
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsFreeEventList(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PFILE_OBJECT FileObject,
|
|
|
|
_Inout_ PLIST_ENTRY EventsList,
|
|
|
|
_In_ KSEVENTS_LOCKTYPE EventsFlags,
|
|
|
|
_In_ PVOID EventsLock);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
Topology Functions
|
|
|
|
*/
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsValidateTopologyNodeCreateRequest(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PIRP Irp,
|
|
|
|
_In_ PKSTOPOLOGY Topology,
|
|
|
|
_Out_ PKSNODE_CREATE *NodeCreate);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsCreateTopologyNode(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ HANDLE ParentHandle,
|
|
|
|
_In_ PKSNODE_CREATE NodeCreate,
|
|
|
|
_In_ ACCESS_MASK DesiredAccess,
|
|
|
|
_Out_ PHANDLE NodeHandle);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsTopologyPropertyHandler(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PIRP Irp,
|
|
|
|
_In_ PKSPROPERTY Property,
|
|
|
|
_Inout_ PVOID Data,
|
|
|
|
_In_ const KSTOPOLOGY *Topology);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
Connectivity Functions
|
|
|
|
*/
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2009-08-23 22:56:06 +00:00
|
|
|
KsCreatePin(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ HANDLE FilterHandle,
|
|
|
|
_In_ PKSPIN_CONNECT Connect,
|
|
|
|
_In_ ACCESS_MASK DesiredAccess,
|
|
|
|
_Out_ PHANDLE ConnectionHandle);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsValidateConnectRequest(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PIRP Irp,
|
|
|
|
_In_ ULONG DescriptorsCount,
|
|
|
|
_In_reads_(DescriptorsCount) KSPIN_DESCRIPTOR *Descriptor,
|
|
|
|
_Out_ PKSPIN_CONNECT *Connect);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsPinPropertyHandler(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PIRP Irp,
|
|
|
|
_In_ PKSPROPERTY Property,
|
|
|
|
_Inout_ PVOID Data,
|
|
|
|
_In_ ULONG DescriptorsCount,
|
|
|
|
_In_reads_(DescriptorsCount) const KSPIN_DESCRIPTOR *Descriptor);
|
|
|
|
|
|
|
|
_Must_inspect_result_
|
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsPinDataIntersection(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PIRP Irp,
|
|
|
|
_In_ PKSP_PIN Pin,
|
|
|
|
_Out_opt_ PVOID Data,
|
|
|
|
_In_ ULONG DescriptorsCount,
|
|
|
|
_In_reads_(DescriptorsCount) const KSPIN_DESCRIPTOR *Descriptor,
|
|
|
|
_In_ PFNKSINTERSECTHANDLER IntersectHandler);
|
|
|
|
|
|
|
|
_Must_inspect_result_
|
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsPinDataIntersectionEx(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PIRP Irp,
|
|
|
|
_In_ PKSP_PIN Pin,
|
|
|
|
_Out_ PVOID Data,
|
|
|
|
_In_ ULONG DescriptorsCount,
|
|
|
|
_In_reads_bytes_(DescriptorsCount * DescriptorSize) const KSPIN_DESCRIPTOR *Descriptor,
|
|
|
|
_In_ ULONG DescriptorSize,
|
|
|
|
_In_opt_ PFNKSINTERSECTHANDLEREX IntersectHandler,
|
|
|
|
_In_opt_ PVOID HandlerContext);
|
|
|
|
|
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
PKSFILTER
|
|
|
|
NTAPI
|
2009-07-28 16:42:36 +00:00
|
|
|
KsPinGetParentFilter(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSPIN Pin);
|
2009-07-28 16:42:36 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
PKSPIN
|
|
|
|
NTAPI
|
2009-08-15 13:38:15 +00:00
|
|
|
KsPinGetNextSiblingPin(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSPIN Pin);
|
2009-08-15 13:38:15 +00:00
|
|
|
|
2006-12-10 04:04:03 +00:00
|
|
|
/* Does this belong here? */
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsHandleSizedListQuery(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PIRP Irp,
|
|
|
|
_In_ ULONG DataItemsCount,
|
|
|
|
_In_ ULONG DataItemSize,
|
|
|
|
_In_reads_bytes_(DataItemsCount * DataItemSize) const VOID *DataItems);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
IRP Helper Functions
|
|
|
|
*/
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
|
|
|
typedef NTSTATUS
|
|
|
|
(NTAPI *PFNKSIRPLISTCALLBACK)(
|
|
|
|
_In_ PIRP Irp,
|
|
|
|
_In_ PVOID Context);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsAcquireResetValue(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PIRP Irp,
|
|
|
|
_Out_ KSRESET *ResetValue);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
VOID
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsAddIrpToCancelableQueue(
|
2013-08-17 22:29:40 +00:00
|
|
|
_Inout_ PLIST_ENTRY QueueHead,
|
|
|
|
_In_ PKSPIN_LOCK SpinLock,
|
|
|
|
_In_ PIRP Irp,
|
|
|
|
_In_ KSLIST_ENTRY_LOCATION ListLocation,
|
|
|
|
_In_opt_ PDRIVER_CANCEL DriverCancel);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsAddObjectCreateItemToDeviceHeader(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ KSDEVICE_HEADER Header,
|
|
|
|
_In_ PDRIVER_DISPATCH Create,
|
|
|
|
_In_ PVOID Context,
|
|
|
|
_In_ PWSTR ObjectClass,
|
|
|
|
_In_opt_ PSECURITY_DESCRIPTOR SecurityDescriptor);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsAddObjectCreateItemToObjectHeader(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ KSOBJECT_HEADER Header,
|
|
|
|
_In_ PDRIVER_DISPATCH Create,
|
|
|
|
_In_ PVOID Context,
|
|
|
|
_In_ PWSTR ObjectClass,
|
|
|
|
_In_opt_ PSECURITY_DESCRIPTOR SecurityDescriptor);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(APC_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsAllocateDeviceHeader(
|
2013-08-17 22:29:40 +00:00
|
|
|
_Out_ KSDEVICE_HEADER *Header,
|
|
|
|
_In_ ULONG ItemsCount,
|
|
|
|
_In_reads_opt_(ItemsCount) PKSOBJECT_CREATE_ITEM ItemsList);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsAllocateExtraData(
|
2013-08-17 22:29:40 +00:00
|
|
|
_Inout_ PIRP Irp,
|
|
|
|
_In_ ULONG ExtraSize,
|
|
|
|
_Out_ PVOID *ExtraBuffer);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsAllocateObjectCreateItem(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ KSDEVICE_HEADER Header,
|
|
|
|
_In_ PKSOBJECT_CREATE_ITEM CreateItem,
|
|
|
|
_In_ BOOLEAN AllocateEntry,
|
|
|
|
_In_opt_ PFNKSITEMFREECALLBACK ItemFreeCallback);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(APC_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsAllocateObjectHeader(
|
2013-08-17 22:29:40 +00:00
|
|
|
_Out_ KSOBJECT_HEADER *Header,
|
|
|
|
_In_ ULONG ItemsCount,
|
|
|
|
_In_reads_opt_(ItemsCount) PKSOBJECT_CREATE_ITEM ItemsList,
|
|
|
|
_In_ PIRP Irp,
|
|
|
|
_In_ KSDISPATCH_TABLE *Table);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
VOID
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsCancelIo(
|
2013-08-17 22:29:40 +00:00
|
|
|
_Inout_ PLIST_ENTRY QueueHead,
|
|
|
|
_In_ PKSPIN_LOCK SpinLock);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
VOID
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsCancelRoutine(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PDEVICE_OBJECT DeviceObject,
|
|
|
|
_In_ PIRP Irp);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsDefaultDeviceIoCompletion(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PDEVICE_OBJECT DeviceObject,
|
|
|
|
_In_ PIRP Irp);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
BOOLEAN
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsDispatchFastIoDeviceControlFailure(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PFILE_OBJECT FileObject,
|
|
|
|
_In_ BOOLEAN Wait,
|
|
|
|
_In_reads_bytes_opt_(InputBufferLength) PVOID InputBuffer,
|
|
|
|
_In_ ULONG InputBufferLength,
|
|
|
|
_Out_writes_bytes_opt_(OutputBufferLength) PVOID OutputBuffer,
|
|
|
|
_In_ ULONG OutputBufferLength,
|
|
|
|
_In_ ULONG IoControlCode,
|
|
|
|
_Out_ PIO_STATUS_BLOCK IoStatus,
|
|
|
|
_In_ PDEVICE_OBJECT DeviceObject); /* always return false */
|
|
|
|
|
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
BOOLEAN
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsDispatchFastReadFailure(
|
2013-08-17 22:29:40 +00:00
|
|
|
_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); /* always return false */
|
2006-12-10 04:04:03 +00:00
|
|
|
|
|
|
|
/* This function does the same as the above */
|
|
|
|
#define KsDispatchFastWriteFailure KsDispatchFastReadFailure
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsDispatchInvalidDeviceRequest(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PDEVICE_OBJECT DeviceObject,
|
|
|
|
_In_ PIRP Irp);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsDispatchIrp(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PDEVICE_OBJECT DeviceObject,
|
|
|
|
_In_ PIRP Irp);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsDispatchSpecificMethod(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PIRP Irp,
|
|
|
|
_In_ PFNKSHANDLER Handler);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsDispatchSpecificProperty(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PIRP Irp,
|
|
|
|
_In_ PFNKSHANDLER Handler);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsForwardAndCatchIrp(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PDEVICE_OBJECT DeviceObject,
|
|
|
|
_In_ PIRP Irp,
|
|
|
|
_In_ PFILE_OBJECT FileObject,
|
|
|
|
_In_ KSSTACK_USE StackUse);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsForwardIrp(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PIRP Irp,
|
|
|
|
_In_ PFILE_OBJECT FileObject,
|
|
|
|
_In_ BOOLEAN ReuseStackLocation);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(APC_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
VOID
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsFreeDeviceHeader(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ KSDEVICE_HEADER Header);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(APC_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
VOID
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsFreeObjectHeader(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PVOID Header);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsGetChildCreateParameter(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PIRP Irp,
|
|
|
|
_Out_ PVOID *CreateParameter);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsMoveIrpsOnCancelableQueue(
|
2013-08-17 22:29:40 +00:00
|
|
|
_Inout_ PLIST_ENTRY SourceList,
|
|
|
|
_In_ PKSPIN_LOCK SourceLock,
|
|
|
|
_Inout_ PLIST_ENTRY DestinationList,
|
|
|
|
_In_opt_ PKSPIN_LOCK DestinationLock,
|
|
|
|
_In_ KSLIST_ENTRY_LOCATION ListLocation,
|
|
|
|
_In_ PFNKSIRPLISTCALLBACK ListCallback,
|
|
|
|
_In_ PVOID Context);
|
|
|
|
|
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsProbeStreamIrp(
|
2013-08-17 22:29:40 +00:00
|
|
|
_Inout_ PIRP Irp,
|
|
|
|
_In_ ULONG ProbeFlags,
|
|
|
|
_In_ ULONG HeaderSize);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsQueryInformationFile(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PFILE_OBJECT FileObject,
|
|
|
|
_Out_writes_bytes_(Length) PVOID FileInformation,
|
|
|
|
_In_ ULONG Length,
|
|
|
|
_In_ FILE_INFORMATION_CLASS FileInformationClass);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
ACCESS_MASK
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsQueryObjectAccessMask(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ KSOBJECT_HEADER Header);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
PKSOBJECT_CREATE_ITEM
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsQueryObjectCreateItem(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ KSOBJECT_HEADER Header);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsReadFile(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PFILE_OBJECT FileObject,
|
|
|
|
_In_opt_ PKEVENT Event,
|
|
|
|
_In_opt_ PVOID PortContext,
|
|
|
|
_Out_ PIO_STATUS_BLOCK IoStatusBlock,
|
|
|
|
_Out_writes_bytes_(Length) PVOID Buffer,
|
|
|
|
_In_ ULONG Length,
|
|
|
|
_In_opt_ ULONG Key,
|
|
|
|
_In_ KPROCESSOR_MODE RequestorMode);
|
|
|
|
|
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
VOID
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsReleaseIrpOnCancelableQueue(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PIRP Irp,
|
|
|
|
_In_opt_ PDRIVER_CANCEL DriverCancel);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
PIRP
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsRemoveIrpFromCancelableQueue(
|
2013-08-17 22:29:40 +00:00
|
|
|
_Inout_ PLIST_ENTRY QueueHead,
|
|
|
|
_In_ PKSPIN_LOCK SpinLock,
|
|
|
|
_In_ KSLIST_ENTRY_LOCATION ListLocation,
|
|
|
|
_In_ KSIRP_REMOVAL_OPERATION RemovalOperation);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
VOID
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsRemoveSpecificIrpFromCancelableQueue(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PIRP Irp);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsSetInformationFile(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PFILE_OBJECT FileObject,
|
|
|
|
_In_reads_bytes_(Length) PVOID FileInformation,
|
|
|
|
_In_ ULONG Length,
|
|
|
|
_In_ FILE_INFORMATION_CLASS FileInformationClass);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsSetMajorFunctionHandler(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PDRIVER_OBJECT DriverObject,
|
|
|
|
_In_ ULONG MajorFunction);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsStreamIo(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PFILE_OBJECT FileObject,
|
|
|
|
_In_opt_ PKEVENT Event,
|
|
|
|
_In_opt_ PVOID PortContext,
|
|
|
|
_In_opt_ PIO_COMPLETION_ROUTINE CompletionRoutine,
|
|
|
|
_In_opt_ PVOID CompletionContext,
|
|
|
|
_In_opt_ KSCOMPLETION_INVOCATION CompletionInvocationFlags,
|
|
|
|
_Out_ PIO_STATUS_BLOCK IoStatusBlock,
|
|
|
|
_Inout_updates_bytes_(Length) PVOID StreamHeaders,
|
|
|
|
_In_ ULONG Length,
|
|
|
|
_In_ ULONG Flags,
|
|
|
|
_In_ KPROCESSOR_MODE RequestorMode);
|
|
|
|
|
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
KsWriteFile(
|
|
|
|
_In_ PFILE_OBJECT FileObject,
|
|
|
|
_In_opt_ PKEVENT Event,
|
|
|
|
_In_opt_ PVOID PortContext,
|
|
|
|
_Out_ PIO_STATUS_BLOCK IoStatusBlock,
|
|
|
|
_In_reads_bytes_(Length) PVOID Buffer,
|
|
|
|
_In_ ULONG Length,
|
|
|
|
_In_opt_ ULONG Key,
|
|
|
|
_In_ KPROCESSOR_MODE RequestorMode);
|
|
|
|
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
KsDefaultForwardIrp(
|
|
|
|
_In_ PDEVICE_OBJECT DeviceObject,
|
|
|
|
_In_ PIRP Irp);
|
2009-01-26 10:18:53 +00:00
|
|
|
|
2006-12-10 04:04:03 +00:00
|
|
|
/* ===============================================================
|
|
|
|
Worker Management Functions
|
|
|
|
*/
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsRegisterWorker(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ WORK_QUEUE_TYPE WorkQueueType,
|
|
|
|
_Out_ PKSWORKER* Worker);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
VOID
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsUnregisterWorker(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSWORKER Worker);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsRegisterCountedWorker(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ WORK_QUEUE_TYPE WorkQueueType,
|
|
|
|
_In_ PWORK_QUEUE_ITEM CountedWorkItem,
|
|
|
|
_Out_ PKSWORKER *Worker);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
ULONG
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsDecrementCountedWorker(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSWORKER Worker);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
ULONG
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsIncrementCountedWorker(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSWORKER Worker);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsQueueWorkItem(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSWORKER Worker,
|
|
|
|
_In_ PWORK_QUEUE_ITEM WorkItem);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
Resources / Images
|
|
|
|
*/
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsLoadResource(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PVOID ImageBase,
|
|
|
|
_In_ POOL_TYPE PoolType,
|
|
|
|
_In_ ULONG_PTR ResourceName,
|
|
|
|
_In_ ULONG ResourceType,
|
2013-09-03 11:59:51 +00:00
|
|
|
_Outptr_result_bytebuffer_(*ResourceSize) PVOID *Resource,
|
2013-08-17 22:29:40 +00:00
|
|
|
_Out_opt_ PULONG ResourceSize);
|
|
|
|
|
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsGetImageNameAndResourceId(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ HANDLE RegKey,
|
|
|
|
_Out_ PUNICODE_STRING ImageName,
|
|
|
|
_Out_ PULONG_PTR ResourceId,
|
|
|
|
_Out_ PULONG ValueType);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsMapModuleName(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PDEVICE_OBJECT PhysicalDeviceObject,
|
|
|
|
_In_ PUNICODE_STRING ModuleName,
|
|
|
|
_Out_ PUNICODE_STRING ImageName,
|
|
|
|
_Out_ PULONG_PTR ResourceId,
|
|
|
|
_Out_ PULONG ValueType);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
Misc. Helper Functions
|
|
|
|
*/
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
PVOID
|
|
|
|
NTAPI
|
2009-07-29 09:33:40 +00:00
|
|
|
KsGetNextSibling(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PVOID Object);
|
2009-07-29 09:33:40 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsCacheMedium(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PUNICODE_STRING SymbolicLink,
|
|
|
|
_In_ PKSPIN_MEDIUM Medium,
|
|
|
|
_In_ ULONG PinDirection);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsDefaultDispatchPnp(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PDEVICE_OBJECT DeviceObject,
|
|
|
|
_In_ PIRP Irp);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
VOID
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsSetDevicePnpAndBaseObject(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ KSDEVICE_HEADER Header,
|
|
|
|
_In_ PDEVICE_OBJECT PnpDeviceObject,
|
|
|
|
_In_ PDEVICE_OBJECT BaseDevice);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsDefaultDispatchPower(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PDEVICE_OBJECT DeviceObject,
|
|
|
|
_In_ PIRP Irp);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
VOID
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsSetPowerDispatch(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ KSOBJECT_HEADER Header,
|
|
|
|
_In_opt_ PFNKSCONTEXT_DISPATCH PowerDispatch,
|
|
|
|
_In_opt_ PVOID PowerContext);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsReferenceBusObject(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ KSDEVICE_HEADER Header);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
VOID
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsDereferenceBusObject(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ KSDEVICE_HEADER Header);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsFreeObjectCreateItem(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ KSDEVICE_HEADER Header,
|
|
|
|
_In_ PUNICODE_STRING CreateItem);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsFreeObjectCreateItemsByContext(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ KSDEVICE_HEADER Header,
|
|
|
|
_In_ PVOID Context);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
VOID
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsNullDriverUnload(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PDRIVER_OBJECT DriverObject);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
PDEVICE_OBJECT
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsQueryDevicePnpObject(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ KSDEVICE_HEADER Header);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
VOID
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsRecalculateStackDepth(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ KSDEVICE_HEADER Header,
|
|
|
|
_In_ BOOLEAN ReuseStackLocation);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
VOID
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsSetTargetDeviceObject(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ KSOBJECT_HEADER Header,
|
|
|
|
_In_opt_ PDEVICE_OBJECT TargetDevice);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
VOID
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsSetTargetState(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ KSOBJECT_HEADER Header,
|
|
|
|
_In_ KSTARGET_STATE TargetState);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_Must_inspect_result_
|
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsSynchronousIoControlDevice(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PFILE_OBJECT FileObject,
|
|
|
|
_In_ KPROCESSOR_MODE RequestorMode,
|
|
|
|
_In_ ULONG IoControl,
|
|
|
|
_In_reads_bytes_(InSize) PVOID InBuffer,
|
|
|
|
_In_ ULONG InSize,
|
|
|
|
_Out_writes_bytes_to_(OutSize, *BytesReturned) PVOID OutBuffer,
|
|
|
|
_In_ ULONG OutSize,
|
|
|
|
_Out_ PULONG BytesReturned);
|
|
|
|
|
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
2009-08-14 09:26:05 +00:00
|
|
|
KSDDKAPI
|
|
|
|
PKSPIN
|
|
|
|
NTAPI
|
|
|
|
KsFilterGetFirstChildPin(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSFILTER Filter,
|
|
|
|
_In_ ULONG PinId);
|
2009-08-14 09:26:05 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
2009-08-14 09:26:05 +00:00
|
|
|
KSDDKAPI
|
|
|
|
PFILE_OBJECT
|
|
|
|
NTAPI
|
|
|
|
KsPinGetConnectedPinFileObject(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSPIN Pin);
|
2009-08-14 09:26:05 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
#else /* _NTDDK_ */
|
2009-08-23 22:56:06 +00:00
|
|
|
|
2010-03-13 10:36:46 +00:00
|
|
|
#if !defined( KS_NO_CREATE_FUNCTIONS )
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
2010-03-13 10:36:46 +00:00
|
|
|
KSDDKAPI
|
|
|
|
DWORD
|
|
|
|
WINAPI
|
|
|
|
KsCreateAllocator(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ HANDLE ConnectionHandle,
|
|
|
|
_In_ PKSALLOCATOR_FRAMING AllocatorFraming,
|
|
|
|
_Out_ PHANDLE AllocatorHandle);
|
2010-03-13 10:36:46 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
2010-03-13 10:36:46 +00:00
|
|
|
KSDDKAPI
|
|
|
|
DWORD
|
|
|
|
NTAPI
|
|
|
|
KsCreateClock(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ HANDLE ConnectionHandle,
|
|
|
|
_In_ PKSCLOCK_CREATE ClockCreate,
|
|
|
|
_Out_ PHANDLE ClockHandle);
|
2010-03-13 10:36:46 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
2009-08-23 22:56:06 +00:00
|
|
|
KSDDKAPI
|
|
|
|
DWORD
|
|
|
|
WINAPI
|
|
|
|
KsCreatePin(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ HANDLE FilterHandle,
|
|
|
|
_In_ PKSPIN_CONNECT Connect,
|
|
|
|
_In_ ACCESS_MASK DesiredAccess,
|
|
|
|
_Out_ PHANDLE ConnectionHandle);
|
2009-08-23 22:56:06 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
2010-03-13 10:36:46 +00:00
|
|
|
KSDDKAPI
|
|
|
|
DWORD
|
|
|
|
WINAPI
|
|
|
|
KsCreateTopologyNode(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ HANDLE ParentHandle,
|
|
|
|
_In_ PKSNODE_CREATE NodeCreate,
|
|
|
|
_In_ ACCESS_MASK DesiredAccess,
|
|
|
|
_Out_ PHANDLE NodeHandle);
|
|
|
|
|
2010-03-13 10:36:46 +00:00
|
|
|
#endif
|
2009-08-14 09:26:05 +00:00
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
#endif /* _NTDDK_ */
|
2006-12-10 04:04:03 +00:00
|
|
|
|
|
|
|
/* ===============================================================
|
|
|
|
AVStream Functions (XP / DirectX 8)
|
|
|
|
NOT IMPLEMENTED YET
|
|
|
|
http://www.osronline.com/ddkx/stream/avstream_5q9f.htm
|
|
|
|
*/
|
|
|
|
|
2007-07-08 13:53:39 +00:00
|
|
|
#if defined(_NTDDK_)
|
2009-08-20 12:11:36 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
2009-08-20 12:11:36 +00:00
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
KsMergeAutomationTables(
|
2013-08-17 22:29:40 +00:00
|
|
|
_Out_ PKSAUTOMATION_TABLE *AutomationTableAB,
|
|
|
|
_In_opt_ PKSAUTOMATION_TABLE AutomationTableA,
|
|
|
|
_In_opt_ PKSAUTOMATION_TABLE AutomationTableB,
|
|
|
|
_In_opt_ KSOBJECT_BAG Bag);
|
2009-08-20 12:11:36 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_Must_inspect_result_
|
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
2009-02-10 07:44:14 +00:00
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2007-03-18 17:12:18 +00:00
|
|
|
KsInitializeDriver(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PDRIVER_OBJECT DriverObject,
|
|
|
|
_In_ PUNICODE_STRING RegistryPath,
|
|
|
|
_In_opt_ const KSDEVICE_DESCRIPTOR *Descriptor);
|
2007-03-18 17:12:18 +00:00
|
|
|
|
2009-02-10 07:44:14 +00:00
|
|
|
typedef struct _KSFILTERFACTORY KSFILTERFACTORY, *PKSFILTERFACTORY; //FIXME
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
2009-07-20 17:14:21 +00:00
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
KsInitializeDevice (
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PDEVICE_OBJECT FunctionalDeviceObject,
|
|
|
|
_In_ PDEVICE_OBJECT PhysicalDeviceObject,
|
|
|
|
_In_ PDEVICE_OBJECT NextDeviceObject,
|
|
|
|
_In_opt_ const KSDEVICE_DESCRIPTOR *Descriptor);
|
|
|
|
|
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
typedef void
|
|
|
|
(NTAPI *PFNKSFILTERFACTORYPOWER)(
|
|
|
|
_In_ PKSFILTERFACTORY FilterFactory,
|
|
|
|
_In_ DEVICE_POWER_STATE State);
|
|
|
|
|
|
|
|
_Must_inspect_result_
|
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
2009-02-10 07:44:14 +00:00
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
_KsEdit(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ KSOBJECT_BAG ObjectBag,
|
|
|
|
_Inout_ PVOID *PointerToPointerToItem,
|
|
|
|
_In_ ULONG NewSize,
|
|
|
|
_In_ ULONG OldSize,
|
|
|
|
_In_ ULONG Tag);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
2009-02-10 07:44:14 +00:00
|
|
|
KSDDKAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
VOID
|
2009-02-10 07:44:14 +00:00
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsAcquireControl(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PVOID Object);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
2009-02-10 07:44:14 +00:00
|
|
|
KSDDKAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
VOID
|
2009-02-10 07:44:14 +00:00
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsAcquireDevice(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSDEVICE Device);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
2009-02-10 07:44:14 +00:00
|
|
|
KSDDKAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
NTSTATUS
|
2009-02-10 07:44:14 +00:00
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsAddDevice(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PDRIVER_OBJECT DriverObject,
|
|
|
|
_In_ PDEVICE_OBJECT PhysicalDeviceObject);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
2009-02-10 07:44:14 +00:00
|
|
|
KSDDKAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
VOID
|
2009-02-10 07:44:14 +00:00
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsAddEvent(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PVOID Object,
|
|
|
|
_In_ PKSEVENT_ENTRY EventEntry);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_Must_inspect_result_
|
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
2009-02-10 07:44:14 +00:00
|
|
|
KSDDKAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
NTSTATUS
|
2009-02-10 07:44:14 +00:00
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsAddItemToObjectBag(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ KSOBJECT_BAG ObjectBag,
|
|
|
|
_In_ __drv_aliasesMem PVOID Item,
|
|
|
|
_In_opt_ PFNKSFREE Free);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
2009-08-04 23:30:09 +00:00
|
|
|
KSDDKAPI
|
|
|
|
ULONG
|
|
|
|
NTAPI
|
|
|
|
KsRemoveItemFromObjectBag(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ KSOBJECT_BAG ObjectBag,
|
|
|
|
_In_ PVOID Item,
|
|
|
|
_In_ BOOLEAN Free);
|
2009-08-04 23:30:09 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
2009-02-10 07:44:14 +00:00
|
|
|
KSDDKAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
NTSTATUS
|
2009-02-10 07:44:14 +00:00
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsAllocateObjectBag(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSDEVICE Device,
|
|
|
|
_Out_ KSOBJECT_BAG *ObjectBag);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
2009-07-29 09:33:40 +00:00
|
|
|
KSDDKAPI
|
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
KsFreeObjectBag(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ KSOBJECT_BAG ObjectBag);
|
2009-07-29 09:33:40 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
2009-02-10 07:44:14 +00:00
|
|
|
KSDDKAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
VOID
|
2009-02-10 07:44:14 +00:00
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsCompletePendingRequest(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PIRP Irp);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
2009-02-10 07:44:14 +00:00
|
|
|
KSDDKAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
NTSTATUS
|
2009-02-10 07:44:14 +00:00
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsCopyObjectBagItems(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ KSOBJECT_BAG ObjectBagDestination,
|
|
|
|
_In_ KSOBJECT_BAG ObjectBagSource);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
2009-02-10 07:44:14 +00:00
|
|
|
KSDDKAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
NTSTATUS
|
2009-02-10 07:44:14 +00:00
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsCreateDevice(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PDRIVER_OBJECT DriverObject,
|
|
|
|
_In_ PDEVICE_OBJECT PhysicalDeviceObject,
|
|
|
|
_In_opt_ const KSDEVICE_DESCRIPTOR *Descriptor,
|
|
|
|
_In_ ULONG ExtensionSize,
|
|
|
|
_Out_opt_ PKSDEVICE *Device);
|
|
|
|
|
|
|
|
_Must_inspect_result_
|
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
2009-02-10 07:44:14 +00:00
|
|
|
KSDDKAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
NTSTATUS
|
2009-02-10 07:44:14 +00:00
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsCreateFilterFactory(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PDEVICE_OBJECT DeviceObject,
|
|
|
|
_In_ const KSFILTER_DESCRIPTOR *Descriptor,
|
|
|
|
_In_opt_ PWSTR RefString,
|
|
|
|
_In_opt_ PSECURITY_DESCRIPTOR SecurityDescriptor,
|
|
|
|
_In_ ULONG CreateItemFlags,
|
|
|
|
_In_opt_ PFNKSFILTERFACTORYPOWER SleepCallback,
|
|
|
|
_In_opt_ PFNKSFILTERFACTORYPOWER WakeCallback,
|
|
|
|
_Out_opt_ PKSFILTERFACTORY *FilterFactory);
|
|
|
|
|
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
2010-03-31 17:13:41 +00:00
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
KsFilterFactorySetDeviceClassesState(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSFILTERFACTORY FilterFactory,
|
|
|
|
_In_ BOOLEAN NewState);
|
2010-03-31 17:13:41 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_Must_inspect_result_
|
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
2009-08-10 11:10:37 +00:00
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
KsFilterFactoryUpdateCacheData(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSFILTERFACTORY FilterFactory,
|
|
|
|
_In_opt_ const KSFILTER_DESCRIPTOR *FilterDescriptor);
|
2009-08-10 11:10:37 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
2009-08-10 16:09:45 +00:00
|
|
|
KSDDKAPI
|
|
|
|
PKSPIN
|
|
|
|
NTAPI
|
|
|
|
KsGetPinFromIrp(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PIRP Irp);
|
2009-08-10 11:10:37 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
2009-08-10 11:10:37 +00:00
|
|
|
KSDDKAPI
|
|
|
|
PKSFILTER
|
|
|
|
NTAPI
|
|
|
|
KsGetFilterFromIrp(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PIRP Irp);
|
2009-08-10 11:10:37 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
2009-02-10 07:44:14 +00:00
|
|
|
KSDDKAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
NTSTATUS
|
2009-02-10 07:44:14 +00:00
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsDefaultAddEventHandler(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PIRP Irp,
|
|
|
|
_In_ PKSEVENTDATA EventData,
|
|
|
|
_Inout_ PKSEVENT_ENTRY EventEntry);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
2009-07-20 17:14:21 +00:00
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
KsDispatchQuerySecurity(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PDEVICE_OBJECT DeviceObject,
|
|
|
|
_In_ PIRP Irp);
|
2009-07-20 17:14:21 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
2009-07-20 17:14:21 +00:00
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
KsDispatchSetSecurity(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PDEVICE_OBJECT DeviceObject,
|
|
|
|
_In_ PIRP Irp);
|
2009-07-20 17:14:21 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
2009-08-10 11:10:37 +00:00
|
|
|
KSDDKAPI
|
|
|
|
PVOID
|
|
|
|
NTAPI
|
|
|
|
KsGetParent(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PVOID Object);
|
2009-08-10 11:10:37 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
2009-08-10 11:10:37 +00:00
|
|
|
static
|
|
|
|
__inline
|
2014-04-27 13:11:19 +00:00
|
|
|
PKSFILTERFACTORY
|
2009-08-10 11:10:37 +00:00
|
|
|
KsFilterGetParentFilterFactory(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSFILTER Filter)
|
2009-08-10 11:10:37 +00:00
|
|
|
{
|
|
|
|
return (PKSFILTERFACTORY) KsGetParent((PVOID) Filter);
|
|
|
|
}
|
2009-07-20 17:14:21 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
2009-08-10 11:27:23 +00:00
|
|
|
static
|
|
|
|
__inline
|
2014-04-27 13:11:19 +00:00
|
|
|
PKSDEVICE
|
2009-08-10 11:27:23 +00:00
|
|
|
KsFilterFactoryGetParentDevice(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSFILTERFACTORY FilterFactory)
|
2009-08-10 11:27:23 +00:00
|
|
|
{
|
|
|
|
return (PKSDEVICE) KsGetParent((PVOID) FilterFactory);
|
|
|
|
}
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
#define KsDeleteFilterFactory(FilterFactory) \
|
|
|
|
KsFreeObjectCreateItemsByContext( \
|
|
|
|
*(KSDEVICE_HEADER *)( \
|
|
|
|
KsFilterFactoryGetParentDevice(FilterFactory)->FunctionalDeviceObject-> \
|
|
|
|
DeviceExtension), \
|
2009-02-10 07:44:14 +00:00
|
|
|
FilterFactory)
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
2009-02-10 07:44:14 +00:00
|
|
|
KSDDKAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
ULONG
|
2009-02-10 07:44:14 +00:00
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsDeviceGetBusData(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSDEVICE Device,
|
|
|
|
_In_ ULONG DataType,
|
|
|
|
_In_reads_bytes_(Length) PVOID Buffer,
|
|
|
|
_In_ ULONG Offset,
|
|
|
|
_In_ ULONG Length);
|
2009-02-10 07:44:14 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
2009-02-10 07:44:14 +00:00
|
|
|
KSDDKAPI
|
|
|
|
PVOID
|
|
|
|
NTAPI
|
|
|
|
KsGetFirstChild(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PVOID Object);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
2009-02-10 07:44:14 +00:00
|
|
|
KSDDKAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
PKSFILTERFACTORY
|
2009-02-10 07:44:14 +00:00
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsDeviceGetFirstChildFilterFactory(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSDEVICE Device);
|
2009-02-10 07:44:14 +00:00
|
|
|
|
|
|
|
#if defined(_UNKNOWN_H_) || defined(__IUnknown_INTERFACE_DEFINED__)
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
2009-03-01 12:45:32 +00:00
|
|
|
KSDDKAPI
|
|
|
|
PUNKNOWN
|
|
|
|
NTAPI
|
|
|
|
KsGetOuterUnknown(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PVOID Object);
|
2009-03-01 12:45:32 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
2009-07-22 19:05:58 +00:00
|
|
|
static
|
|
|
|
__inline
|
2006-12-10 04:04:03 +00:00
|
|
|
PUNKNOWN
|
|
|
|
KsDeviceGetOuterUnknown(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSDEVICE Device)
|
2009-07-22 19:05:58 +00:00
|
|
|
{
|
|
|
|
return KsGetOuterUnknown((PVOID) Device);
|
|
|
|
}
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
2009-02-10 07:44:14 +00:00
|
|
|
KSDDKAPI
|
|
|
|
PUNKNOWN
|
|
|
|
NTAPI
|
|
|
|
KsDeviceRegisterAggregatedClientUnknown(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSDEVICE Device,
|
|
|
|
_In_ PUNKNOWN ClientUnknown);
|
2009-07-20 17:14:21 +00:00
|
|
|
|
2009-02-10 07:44:14 +00:00
|
|
|
#endif
|
|
|
|
|
2009-07-23 19:27:53 +00:00
|
|
|
#if defined(_UNKNOWN_H_) || defined(__IUnknown_INTERFACE_DEFINED__)
|
|
|
|
|
2009-07-23 14:18:22 +00:00
|
|
|
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_
|
2013-08-17 22:29:40 +00:00
|
|
|
_Out_ PLONGLONG SystemTime
|
2009-07-23 14:18:22 +00:00
|
|
|
) PURE;
|
|
|
|
STDMETHOD_(LONGLONG,GetCorrelatedPhysicalTime)(THIS_
|
2013-08-17 22:29:40 +00:00
|
|
|
_Out_ PLONGLONG SystemTime
|
2009-07-23 14:18:22 +00:00
|
|
|
) PURE;
|
|
|
|
STDMETHOD_(NTSTATUS, GetResolution)(THIS_
|
2013-08-17 22:29:40 +00:00
|
|
|
_Out_ PKSRESOLUTION Resolution
|
2009-07-23 14:18:22 +00:00
|
|
|
) PURE;
|
|
|
|
STDMETHOD_(NTSTATUS, GetState)(THIS_
|
2013-08-17 22:29:40 +00:00
|
|
|
_Out_ PKSSTATE State
|
2009-07-23 14:18:22 +00:00
|
|
|
) PURE;
|
|
|
|
};
|
|
|
|
|
2009-07-20 17:14:21 +00:00
|
|
|
#undef INTERFACE
|
|
|
|
#define INTERFACE IKsControl
|
|
|
|
|
|
|
|
DEFINE_GUID(IID_IKsControl, 0x28F54685L, 0x06FD, 0x11D2, 0xB2, 0x7A, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96);
|
|
|
|
|
|
|
|
DECLARE_INTERFACE_(IKsControl,IUnknown)
|
|
|
|
{
|
2014-05-10 10:02:09 +00:00
|
|
|
STDMETHOD_(NTSTATUS, QueryInterface)( THIS_
|
2009-07-20 17:14:21 +00:00
|
|
|
REFIID InterfaceId,
|
|
|
|
PVOID* Interface)PURE;
|
|
|
|
|
|
|
|
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
|
|
|
|
|
|
|
|
STDMETHOD_(ULONG, Release)(THIS) PURE;
|
|
|
|
|
|
|
|
STDMETHOD_(NTSTATUS, KsProperty)(THIS_
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_reads_bytes_(PropertyLength) PKSPROPERTY Property,
|
|
|
|
_In_ ULONG PropertyLength,
|
|
|
|
_Inout_updates_bytes_(DataLength) PVOID PropertyData,
|
|
|
|
_In_ ULONG DataLength,
|
|
|
|
_Out_ ULONG *BytesReturned
|
2009-07-20 17:14:21 +00:00
|
|
|
) PURE;
|
|
|
|
STDMETHOD_(NTSTATUS, KsMethod)(THIS_
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_reads_bytes_(MethodLength) PKSMETHOD Method,
|
|
|
|
_In_ ULONG MethodLength,
|
|
|
|
_Inout_updates_bytes_(DataLength) PVOID MethodData,
|
|
|
|
_In_ ULONG DataLength,
|
|
|
|
_Out_ ULONG *BytesReturned
|
2009-07-20 17:14:21 +00:00
|
|
|
) PURE;
|
|
|
|
STDMETHOD_(NTSTATUS, KsEvent)(THIS_
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_reads_bytes_opt_(EventLength) PKSEVENT Event,
|
|
|
|
_In_ ULONG EventLength,
|
|
|
|
_Inout_updates_bytes_(DataLength) PVOID EventData,
|
|
|
|
_In_ ULONG DataLength,
|
|
|
|
_Out_ ULONG *BytesReturned
|
2009-07-20 17:14:21 +00:00
|
|
|
) PURE;
|
|
|
|
};
|
|
|
|
|
|
|
|
#undef INTERFACE
|
|
|
|
typedef IKsControl* PIKSCONTROL;
|
|
|
|
|
2009-07-23 19:27:53 +00:00
|
|
|
#endif
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
2009-02-10 07:44:14 +00:00
|
|
|
KSDDKAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
VOID
|
2009-02-10 07:44:14 +00:00
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsDeviceRegisterAdapterObject(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSDEVICE Device,
|
|
|
|
_In_ PADAPTER_OBJECT AdapterObject,
|
|
|
|
_In_ ULONG MaxMappingByteCount,
|
|
|
|
_In_ ULONG MappingTableStride);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
2009-02-10 07:44:14 +00:00
|
|
|
KSDDKAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
ULONG
|
2009-02-10 07:44:14 +00:00
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsDeviceSetBusData(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSDEVICE Device,
|
|
|
|
_In_ ULONG DataType,
|
|
|
|
_In_reads_bytes_(Length) PVOID Buffer,
|
|
|
|
_In_ ULONG Offset,
|
|
|
|
_In_ ULONG Length);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
2009-08-14 09:26:05 +00:00
|
|
|
KSDDKAPI
|
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
KsReleaseControl(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PVOID Object);
|
2009-08-14 09:26:05 +00:00
|
|
|
|
2006-12-10 04:04:03 +00:00
|
|
|
#define KsDiscard(object, pointer) \
|
|
|
|
KsRemoveItemFromObjectBag(object->Bag, pointer, TRUE)
|
|
|
|
|
2009-02-10 07:44:14 +00:00
|
|
|
#define KsFilterAcquireControl(Filter) \
|
|
|
|
KsAcquireControl((PVOID) Filter);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2009-08-14 09:26:05 +00:00
|
|
|
#define KsFilterReleaseControl(Filter) \
|
|
|
|
KsReleaseControl((PVOID) Filter);
|
|
|
|
|
2009-02-10 07:44:14 +00:00
|
|
|
#define KsFilterAddEvent(Filter, EventEntry) \
|
|
|
|
KsAddEvent(Filter,EventEntry);
|
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
2009-02-10 07:44:14 +00:00
|
|
|
KSDDKAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
VOID
|
2009-02-10 07:44:14 +00:00
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsFilterAcquireProcessingMutex(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSFILTER Filter);
|
2009-07-28 16:42:36 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
2009-02-10 07:44:14 +00:00
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsFilterAddTopologyConnections(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSFILTER Filter,
|
|
|
|
_In_ ULONG NewConnectionsCount,
|
|
|
|
_In_reads_(NewConnectionsCount) const KSTOPOLOGY_CONNECTION *const NewTopologyConnections);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
2009-02-10 07:44:14 +00:00
|
|
|
KSDDKAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
VOID
|
2009-02-10 07:44:14 +00:00
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsFilterAttemptProcessing(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSFILTER Filter,
|
|
|
|
_In_ BOOLEAN Asynchronous);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
2009-02-10 07:44:14 +00:00
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsFilterCreateNode(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSFILTER Filter,
|
|
|
|
_In_ const KSNODE_DESCRIPTOR *const NodeDescriptor,
|
|
|
|
_Out_ PULONG NodeID);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
2009-02-10 07:44:14 +00:00
|
|
|
KSDDKAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-12-10 04:04:03 +00:00
|
|
|
KsFilterCreatePinFactory(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSFILTER Filter,
|
|
|
|
_In_ const KSPIN_DESCRIPTOR_EX *const PinDescriptor,
|
|
|
|
_Out_ PULONG PinID);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
2013-08-17 22:29:40 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
2009-02-10 07:44:14 +00:00
|
|
|
KSDDKAPI
|
|
|
|
__inline
|
2014-04-27 13:11:19 +00:00
|
|
|
PKSDEVICE
|
2006-12-10 04:04:03 +00:00
|
|
|
KsFilterFactoryGetDevice(
|
2013-08-17 22:29:40 +00:00
|
|
|
_In_ PKSFILTERFACTORY FilterFactory);
|
2006-12-10 04:04:03 +00:00
|
|
|
|
|
|
|
/* etc. */
|
|
|
|
#endif /* avstream */
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2013-08-17 23:51:10 +00:00
|
|
|
#endif /* _KS_ */
|