ReactOS 0.4.16-dev-401-g45b008d
portcls.h
Go to the documentation of this file.
1/*
2 ReactOS Kernel Streaming
3 Port Class
4
5 This file is in the public domain.
6
7 Andrew Greenwood
8
9 NOTES:
10 Does not support PC_OLD_NAMES (which is required for backwards-compatibility
11 with older code)
12
13 Obsolete macros are not implemented. For more info:
14 http://www.osronline.com/ddkx/stream/audpc-struct_167n.htm
15
16
17 == EXPORTS ==
18 DRM (new in XP):
19 * PcAddContentHandlers
20 * PcCreateContentMixed
21 * PcDestroyContent
22 * PcForwardContentToDeviceObject
23 * PcForwardContentToFileObject
24 * PcForwardContentToInterface
25 * PcGetContentRights
26
27 IRP HANDLING:
28 * PcCompleteIrp
29 * PcDispatchIrp
30 * PcForwardIrpSynchronous
31
32 ADAPTER:
33 * PcAddAdapterDevice
34 * PcInitializeAdapterDriver
35
36 FACTORIES:
37 * PcNewDmaChannel
38 * PcNewInterruptSync
39 * PcNewMiniport
40 * PcNewPort
41 * PcNewRegistryKey
42 * PcNewResourceList
43 * PcNewResourceSublist
44 * PcNewServiceGroup
45
46 POWER MANAGEMENT:
47 * PcRegisterAdapterPowerManagement
48 * PcRequestNewPowerState
49
50 PROPERTIES:
51 * PcCompletePendingPropertyRequest
52 * PcGetDeviceProperty
53
54 IO TIMEOUTS:
55 * PcRegisterIoTimeout
56 * PcUnregisterIoTimeout
57
58 PHYSICAL CONNECTIONS:
59 * PcRegisterPhysicalConnection
60 * PcRegisterPhysicalConnectionFromExternal
61 * PcRegisterPhysicalConnectionToExternal
62
63 MISC:
64 * PcGetTimeInterval
65 * PcRegisterSubdevice
66
67
68 == AUDIO HELPER OBJECT INTERFACES ==
69 IDmaChannel
70 IDmaChannelSlave
71 IDmaOperations
72 IDrmPort (XP)
73 IDrmPort2 (XP)
74 IInterruptSync
75 IMasterClock
76 IPortClsVersion (XP)
77 IPortEvents
78 IPreFetchOffset (XP)
79 IRegistryKey
80 IResourceList
81 IServiceGroup
82 IServiceSink
83 IUnregisterPhysicalConnection (Vista)
84 IUnregisterSubdevice (Vista)
85
86 == AUDIO PORT OBJECT INTERFACES ==
87 IPort
88 IPortDMus
89 IPortMidi
90 IPortTopology
91 IPortWaveCyclic
92 IPortWavePci
93
94 == AUDIO MINIPORT OBJECT INTERFACES ==
95 IMiniport
96 IMiniportDMus
97 IMiniportMidi
98 IMiniportTopology
99 IMiniportWaveCyclic
100 IMiniportWavePci
101
102 == AUDIO MINIPORT AUXILIARY INTERFACES ==
103 IMusicTechnology (XP)
104 IPinCount (XP)
105
106 == AUDIO STREAM OBJECT INTERFACES ==
107 IAllocatorMXF
108 IDrmAudioStream (XP)
109 IMiniportMidiStream
110 IMiniportWaveCyclicStream
111 IMiniportWavePciStream
112 IMXF
113 IPortWavePciStream
114 ISynthSinkDMus
115
116 == DIRECTMUSIC USERMODE SYNTH AND SYNTH SINK INTERFACES ==
117 IDirectMusicSynth
118 IDirectMusicSynthSink
119
120 == AUDIO POWER MANAGEMENT INTERFACES ==
121 IAdapterPowerManagement
122 IPowerNotify
123*/
124
125#ifndef PORTCLS_H
126#define PORTCLS_H
127
128#ifdef __cplusplus
129extern "C" {
130#include <wdm.h>
131}
132#else
133#include <wdm.h>
134#endif
135
136#include <windef.h>
137
138#define NOBITMAP
139#include <mmreg.h>
140#undef NOBITMAP
141
142#include <punknown.h>
143#include <ks.h>
144#include <ksmedia.h>
145#include <drmk.h>
146
147#ifndef PC_NO_IMPORTS
148#define PORTCLASSAPI EXTERN_C __declspec(dllimport)
149#else
150#define PORTCLASSAPI EXTERN_C
151#endif
152
153/* TODO */
154#define PCFILTER_NODE ((ULONG) -1)
155
156/* HACK */
157/* typedef PVOID CM_RESOURCE_TYPE; */
158
159#define _100NS_UNITS_PER_SECOND 10000000L
160#define PORT_CLASS_DEVICE_EXTENSION_SIZE ( 64 * sizeof(ULONG_PTR) )
161
162
163DEFINE_GUID(CLSID_MiniportDriverFmSynth, 0xb4c90ae0L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
164DEFINE_GUID(CLSID_MiniportDriverFmSynthWithVol, 0xe5a3c139L, 0xf0f2, 0x11d1, 0x81, 0xaf, 0x00, 0x60, 0x08, 0x33, 0x16, 0xc1);
165
166/* ===============================================================
167 Event Item Flags - TODO
168*/
169#define PCEVENT_ITEM_FLAG_ENABLE KSEVENT_TYPE_ENABLE
170#define PCEVENT_ITEM_FLAG_ONESHOT KSEVENT_TYPE_ONESHOT
171#define PCEVENT_ITEM_FLAG_BASICSUPPORT KSEVENT_TYPE_BASICSUPPORT
172
173
174/* ===============================================================
175 Event Verbs - TODO
176*/
177#define PCEVENT_VERB_NONE 0
178#define PCEVENT_VERB_ADD 1
179#define PCEVENT_VERB_REMOVE 2
180#define PCEVENT_VERB_SUPPORT 4
181
182
183/* ===============================================================
184 Method Item Flags - TODO
185*/
186#define PCMETHOD_ITEM_FLAG_NONE KSMETHOD_TYPE_NONE
187#define PCMETHOD_ITEM_FLAG_READ KSMETHOD_TYPE_READ
188#define PCMETHOD_ITEM_FLAG_WRITE KSMETHOD_TYPE_WRITE
189#define PCMETHOD_ITEM_FLAG_MODIFY KSMETHOD_TYPE_MODIFY
190#define PCMETHOD_ITEM_FLAG_SOURCE KSMETHOD_TYPE_SOURCE
191
192
193/* ===============================================================
194 Method Verbs - TODO
195*/
196#define PCMETHOD_ITEM_FLAG_BASICSUPPORT KSMETHOD_TYPE_BASICSUPPORT
197#define PCMETHOD_ITEM_FLAG_SEND
198#define PCMETHOD_ITEM_FLAG_SETSUPPORT
199
200
201/* ===============================================================
202 Versions
203 IoIsWdmVersionAvailable may also be used by older drivers.
204*/
205
206enum {
219 kVersionWin2K_UAAQFE, /* These support IUnregister* interface */
223
224/* ===============================================================
225 Properties
226*/
227
229
231
232typedef NTSTATUS
234 IN PPCPROPERTY_REQUEST PropertyRequest);
235
236typedef struct {
237 const GUID *Set;
240#define PCPROPERTY_ITEM_FLAG_GET KSPROPERTY_TYPE_GET
241#define PCPROPERTY_ITEM_FLAG_SET KSPROPERTY_TYPE_SET
242#define PCPROPERTY_ITEM_FLAG_BASICSUPPORT KSPROPERTY_TYPE_BASICSUPPORT
243 //not supported #define PCPROPERTY_ITEM_FLAG_RELATIONS KSPROPERTY_TYPE_RELATIONS
244#define PCPROPERTY_ITEM_FLAG_SERIALIZERAW KSPROPERTY_TYPE_SERIALIZERAW
245#define PCPROPERTY_ITEM_FLAG_UNSERIALIZERAW KSPROPERTY_TYPE_UNSERIALIZERAW
246#define PCPROPERTY_ITEM_FLAG_SERIALIZESIZE KSPROPERTY_TYPE_SERIALIZESIZE
247#define PCPROPERTY_ITEM_FLAG_SERIALIZE\
248 (PCPROPERTY_ITEM_FLAG_SERIALIZERAW\
249 |PCPROPERTY_ITEM_FLAG_UNSERIALIZERAW\
250 |PCPROPERTY_ITEM_FLAG_SERIALIZESIZE\
251 )
252#define PCPROPERTY_ITEM_FLAG_DEFAULTVALUES KSPROPERTY_TYPE_DEFAULTVALUES
254}
256
268};
269
270struct _PCEVENT_REQUEST;
271
272typedef NTSTATUS
274 IN struct _PCEVENT_REQUEST* EventRequest);
275
276typedef struct _PCEVENT_ITEM {
277 const GUID* Set;
282
283typedef struct _PCEVENT_REQUEST {
292
293struct _PCMETHOD_REQUEST;
294
295typedef NTSTATUS
297 IN struct _PCMETHOD_REQUEST* MethodRequest);
298
299typedef struct _PCMETHOD_ITEM {
300 const GUID* Set;
305
306typedef struct _PCMETHOD_REQUEST {
313
314/* ===============================================================
315 Structures (unsorted)
316*/
317
318typedef struct {
330
331typedef struct {
337
338typedef struct {
343 KSPIN_DESCRIPTOR KsPinDescriptor;
345
346typedef struct {
349 const GUID* Type;
350 const GUID* Name;
352
353typedef struct {
367
368#define DEFINE_PCAUTOMATION_TABLE_PROP(AutomationTable,PropertyTable) \
369 const PCAUTOMATION_TABLE AutomationTable = { \
370 sizeof(PropertyTable[0]), \
371 SIZEOF_ARRAY(PropertyTable), \
372 (const PCPROPERTY_ITEM *) PropertyTable, \
373 0,0,NULL, \
374 0,0,NULL, \
375 0 \
376 }
377
378/* ===============================================================
379 IResourceList Interface
380*/
381
382#undef INTERFACE
383#define INTERFACE IResourceList
384
385DEFINE_GUID(IID_IResourceList, 0x22C6AC60L, 0x851B, 0x11D0, 0x9A, 0x7F, 0x00, 0xAA, 0x00, 0x38, 0xAC, 0xFE);
386
389
390 STDMETHOD_(ULONG, NumberOfEntries)( THIS ) PURE;
391
392 STDMETHOD_(ULONG, NumberOfEntriesOfType)( THIS_
393 IN CM_RESOURCE_TYPE Type) PURE;
394
396 IN CM_RESOURCE_TYPE Type,
398
399 STDMETHOD_(PCM_PARTIAL_RESOURCE_DESCRIPTOR, FindUntranslatedEntry)( THIS_
400 IN CM_RESOURCE_TYPE Type,
402
406
407 STDMETHOD_(NTSTATUS, AddEntryFromParent)( THIS_
408 IN IResourceList* Parent,
409 IN CM_RESOURCE_TYPE Type,
411
412 STDMETHOD_(PCM_RESOURCE_LIST, TranslatedList)( THIS ) PURE;
413 STDMETHOD_(PCM_RESOURCE_LIST, UntranslatedList)( THIS ) PURE;
414};
415
416#define IMP_IResourceList \
417 STDMETHODIMP_(ULONG) NumberOfEntries(void); \
418\
419 STDMETHODIMP_(ULONG) NumberOfEntriesOfType( \
420 IN CM_RESOURCE_TYPE Type); \
421\
422 STDMETHODIMP_(PCM_PARTIAL_RESOURCE_DESCRIPTOR) FindTranslatedEntry( \
423 IN CM_RESOURCE_TYPE Type, \
424 IN ULONG Index); \
425\
426 STDMETHODIMP_(PCM_PARTIAL_RESOURCE_DESCRIPTOR) FindUntranslatedEntry( \
427 IN CM_RESOURCE_TYPE Type, \
428 IN ULONG Index); \
429\
430 STDMETHODIMP_(NTSTATUS) AddEntry( \
431 IN PCM_PARTIAL_RESOURCE_DESCRIPTOR Translated, \
432 IN PCM_PARTIAL_RESOURCE_DESCRIPTOR Untranslated); \
433\
434 STDMETHODIMP_(NTSTATUS) AddEntryFromParent( \
435 IN IResourceList* Parent, \
436 IN CM_RESOURCE_TYPE Type, \
437 IN ULONG Index); \
438\
439 STDMETHODIMP_(PCM_RESOURCE_LIST) TranslatedList(void); \
440 STDMETHODIMP_(PCM_RESOURCE_LIST) UntranslatedList(void);
441
442typedef IResourceList *PRESOURCELIST;
443
444#define NumberOfPorts() \
445 NumberOfEntriesOfType(CmResourceTypePort)
446
447#define FindTranslatedPort(n) \
448 FindTranslatedEntry(CmResourceTypePort, (n))
449
450#define FindUntranslatedPort(n) \
451 FindUntranslatedEntry(CmResourceTypePort, (n))
452
453#define AddPortFromParent(p, n) \
454 AddEntryFromParent((p), CmResourceTypePort, (n))
455
456#define NumberOfInterrupts() \
457 NumberOfEntriesOfType(CmResourceTypeInterrupt)
458
459#define FindTranslatedInterrupt(n) \
460 FindTranslatedEntry(CmResourceTypeInterrupt, (n))
461
462#define FindUntranslatedInterrupt(n) \
463 FindUntranslatedEntry(CmResourceTypeInterrupt, (n))
464
465#define AddInterruptFromParent(p, n) \
466 AddEntryFromParent((p), CmResourceTypeInterrupt, (n))
467
468#define NumberOfMemories() \
469 NumberOfEntriesOfType(CmResourceTypeMemory)
470
471#define FindTranslatedMemory(n) \
472 FindTranslatedEntry(CmResourceTypeMemory, (n))
473
474#define FindUntranslatedMemory(n) \
475 FindUntranslatedEntry(CmResourceTypeMemory, (n))
476
477#define AddMemoryFromParent(p, n) \
478 AddEntryFromParent((p), CmResourceTypeMemory, (n))
479
480#define NumberOfDmas() \
481 NumberOfEntriesOfType(CmResourceTypeDma)
482
483#define FindTranslatedDma(n) \
484 FindTranslatedEntry(CmResourceTypeDma, (n))
485
486#define FindUntranslatedDma(n) \
487 FindUntranslatedEntry(CmResourceTypeDma, (n))
488
489#define AddDmaFromParent(p, n) \
490 AddEntryFromParent((p), CmResourceTypeInterrupt, (n))
491
492#define NumberOfDeviceSpecifics() \
493 NumberOfEntriesOfType(CmResourceTypeDeviceSpecific)
494
495#define FindTranslatedDeviceSpecific(n) \
496 FindTranslatedEntry(CmResourceTypeDeviceSpecific, (n))
497
498#define FindUntranslatedDeviceSpecific(n) \
499 FindUntranslatedEntry(CmResourceTypeDeviceSpecific, (n))
500
501#define AddDeviceSpecificFromParent(p, n) \
502 AddEntryFromParent((p), CmResourceTypeDeviceSpecific, (n))
503
504#define NumberOfBusNumbers() \
505 NumberOfEntriesOfType(CmResourceTypeBusNumber)
506
507#define FindTranslatedBusNumber(n) \
508 FindTranslatedEntry(CmResourceTypeBusNumber, (n))
509
510#define FindUntranslatedBusNumber(n) \
511 FindUntranslatedEntry(CmResourceTypeBusNumber, (n))
512
513#define AddBusNumberFromParent(p, n) \
514 AddEntryFromParent((p), CmResourceTypeBusNumber, (n))
515
516#define NumberOfDevicePrivates() \
517 NumberOfEntriesOfType(CmResourceTypeDevicePrivate)
518
519#define FindTranslatedDevicePrivate(n) \
520 FindTranslatedEntry(CmResourceTypeDevicePrivate, (n))
521
522#define FindUntranslatedDevicePrivate(n) \
523 FindUntranslatedEntry(CmResourceTypeDevicePrivate, (n))
524
525#define AddDevicePrivateFromParent(p, n) \
526 AddEntryFromParent((p), CmResourceTypeDevicePrivate, (n))
527
528#define NumberOfAssignedResources() \
529 NumberOfEntriesOfType(CmResourceTypeAssignedResource)
530
531#define FindTranslatedAssignedResource(n) \
532 FindTranslatedEntry(CmResourceTypeAssignedResource, (n))
533
534#define FindUntranslatedAssignedResource(n) \
535 FindUntranslatedEntry(CmResourceTypeAssignedResource, (n))
536
537#define AddAssignedResourceFromParent(p, n) \
538 AddEntryFromParent((p), CmResourceTypeAssignedResource, (n))
539
540#define NumberOfSubAllocateFroms() \
541 NumberOfEntriesOfType(CmResourceTypeSubAllocateFrom)
542
543#define FindTranslatedSubAllocateFrom(n) \
544 FindTranslatedEntry(CmResourceTypeSubAllocateFrom, (n))
545
546#define FindUntranslatedSubAllocateFrom(n) \
547 FindUntranslatedEntry(CmResourceTypeSubAllocateFrom, (n))
548
549#define AddSubAllocateFromFromParent(p, n) \
550 AddEntryFromParent((p), CmResourceTypeSubAllocateFrom, (n))
551
552#undef INTERFACE
553
554/* ===============================================================
555 IServiceSink Interface
556*/
557#define INTERFACE IServiceSink
558
559DEFINE_GUID(IID_IServiceSink, 0x22C6AC64L, 0x851B, 0x11D0, 0x9A, 0x7F, 0x00, 0xAA, 0x00, 0x38, 0xAC, 0xFE);
560
563 STDMETHOD_(void, RequestService)( THIS ) PURE;
564};
565
566#define IMP_IServiceSink \
567 STDMETHODIMP_(void) RequestService(void);
568
569typedef IServiceSink *PSERVICESINK;
570
571/* ===============================================================
572 IServiceGroup Interface
573*/
574#undef INTERFACE
575#define INTERFACE IServiceGroup
576
577DEFINE_GUID(IID_IServiceGroup, 0x22C6AC65L, 0x851B, 0x11D0, 0x9A, 0x7F, 0x00, 0xAA, 0x00, 0x38, 0xAC, 0xFE);
578
579DECLARE_INTERFACE_(IServiceGroup, IServiceSink) {
581
582 STDMETHOD_(void, RequestService)( THIS ) PURE; /* IServiceSink */
583
584 STDMETHOD_(NTSTATUS, AddMember)( THIS_
585 IN PSERVICESINK pServiceSink) PURE;
586
587 STDMETHOD_(void, RemoveMember)( THIS_
588 IN PSERVICESINK pServiceSink) PURE;
589
590 STDMETHOD_(void, SupportDelayedService)( THIS ) PURE;
591
592 STDMETHOD_(void, RequestDelayedService)( THIS_
593 IN ULONGLONG ullDelay) PURE;
594
595 STDMETHOD_(void, CancelDelayedService)( THIS ) PURE;
596};
597
598#define IMP_IServiceGroup \
599 IMP_IServiceSink; \
600\
601 STDMETHODIMP_(NTSTATUS) AddMember( \
602 IN PSERVICESINK pServiceSink); \
603\
604 STDMETHODIMP_(void) RemoveMember( \
605 IN PSERVICESINK pServiceSink); \
606\
607 STDMETHODIMP_(void) SupportDelayedService(void); \
608\
609 STDMETHODIMP_(void) RequestDelayedService( \
610 IN ULONGLONG ullDelay); \
611\
612 STDMETHODIMP_(void) CancelDelayedService(void);
613
614typedef IServiceGroup *PSERVICEGROUP;
615
616
617#if (NTDDI_VERSION >= NTDDI_WS03)
618/* ===============================================================
619 IUnregisterSubdevice Interface
620*/
621
622DEFINE_GUID(IID_IUnregisterSubdevice, 0x16738177L, 0xe199, 0x41f9, 0x9a, 0x87, 0xab, 0xb2, 0xa5, 0x43, 0x2f, 0x21);
623
624#undef INTERFACE
625#define INTERFACE IUnregisterSubdevice
626
627DECLARE_INTERFACE_(IUnregisterSubdevice,IUnknown) {
629
630 STDMETHOD_(NTSTATUS,UnregisterSubdevice)(THIS_
633};
634
635typedef IUnregisterSubdevice *PUNREGISTERSUBDEVICE;
636
637#define IMP_IUnregisterSubdevice \
638 STDMETHODIMP_(NTSTATUS) UnregisterSubdevice(THIS_ \
639 IN PDEVICE_OBJECT DeviceObject, \
640 IN PUNKNOWN Unknown)
641
642/* ===============================================================
643 IUnregisterPhysicalConnection Interface
644*/
645
646#undef INTERFACE
647#define INTERFACE IUnregisterPhysicalConnection
648
649DEFINE_GUID(IID_IUnregisterPhysicalConnection, 0x6c38e231L, 0x2a0d, 0x428d, 0x81, 0xf8, 0x07, 0xcc, 0x42, 0x8b, 0xb9, 0xa4);
650
651DECLARE_INTERFACE_(IUnregisterPhysicalConnection,IUnknown)
652{
654
655 STDMETHOD_(NTSTATUS,UnregisterPhysicalConnection)(THIS_
657 IN PUNKNOWN FromUnknown,
658 IN ULONG FromPin,
659 IN PUNKNOWN ToUnknown,
660 IN ULONG ToPin)PURE;
661
662 STDMETHOD_(NTSTATUS,UnregisterPhysicalConnectionToExternal)(THIS_
664 IN PUNKNOWN FromUnknown,
665 IN ULONG FromPin,
667 IN ULONG ToPin)PURE;
668
669 STDMETHOD_(NTSTATUS,UnregisterPhysicalConnectionFromExternal)(THIS_
671 IN PUNICODE_STRING FromString,
672 IN ULONG FromPin,
673 IN PUNKNOWN ToUnknown,
674 IN ULONG ToPin)PURE;
675};
676
677typedef IUnregisterPhysicalConnection *PUNREGISTERPHYSICALCONNECTION;
678#endif
679
680#define IMP_IUnregisterPhysicalConnection \
681 STDMETHODIMP_(NTSTATUS) UnregisterPhysicalConnection( \
682 IN PDEVICE_OBJECT DeviceObject, \
683 IN PUNKNOWN FromUnknown, \
684 IN ULONG FromPin, \
685 IN PUNKNOWN ToUnknown, \
686 IN ULONG ToPin); \
687 \
688 STDMETHODIMP_(NTSTATUS) UnregisterPhysicalConnectionToExternal( \
689 IN PDEVICE_OBJECT DeviceObject, \
690 IN PUNKNOWN FromUnknown, \
691 IN ULONG FromPin, \
692 IN PUNICODE_STRING ToString, \
693 IN ULONG ToPin); \
694 \
695 STDMETHODIMP_(NTSTATUS) UnregisterPhysicalConnectionFromExternal( \
696 IN PDEVICE_OBJECT DeviceObject, \
697 IN PUNICODE_STRING FromString, \
698 IN ULONG FromPin, \
699 IN PUNKNOWN ToUnknown, \
700 IN ULONG ToPin)
701
702
703/* ===============================================================
704 IDmaChannel Interface
705*/
706
707/* C++ ABI HACK: IDmaChannel::PhysicalAddress */
708#if defined(__cplusplus) && !defined(_MSC_VER)
709#define DEFINE_ABSTRACT_DMACHANNEL_PhysicalAddress \
710 STDMETHOD_(PHYSICAL_ADDRESS*, PhysicalAddress)( THIS_ PHYSICAL_ADDRESS* pRet ) PURE; \
711 PHYSICAL_ADDRESS PhysicalAddress() { PHYSICAL_ADDRESS tmp; PhysicalAddress(&tmp); return tmp; }
712#else
713#define DEFINE_ABSTRACT_DMACHANNEL_PhysicalAddress \
714 STDMETHOD_(PHYSICAL_ADDRESS, PhysicalAddress)( THIS ) PURE
715#endif
716
717#define DEFINE_ABSTRACT_DMACHANNEL() \
718 STDMETHOD_(NTSTATUS, AllocateBuffer)( THIS_ \
719 IN ULONG BufferSize, \
720 IN PPHYSICAL_ADDRESS PhysicalAddressConstraint OPTIONAL) PURE; \
721\
722 STDMETHOD_(void, FreeBuffer)( THIS ) PURE; \
723 STDMETHOD_(ULONG, TransferCount)( THIS ) PURE; \
724 STDMETHOD_(ULONG, MaximumBufferSize)( THIS ) PURE; \
725 STDMETHOD_(ULONG, AllocatedBufferSize)( THIS ) PURE; \
726 STDMETHOD_(ULONG, BufferSize)( THIS ) PURE; \
727\
728 STDMETHOD_(void, SetBufferSize)( THIS_ \
729 IN ULONG BufferSize) PURE; \
730\
731 STDMETHOD_(PVOID, SystemAddress)( THIS ) PURE; \
732 DEFINE_ABSTRACT_DMACHANNEL_PhysicalAddress; \
733 STDMETHOD_(PADAPTER_OBJECT, GetAdapterObject)( THIS ) PURE; \
734\
735 STDMETHOD_(void, CopyTo)( THIS_ \
736 IN PVOID Destination, \
737 IN PVOID Source, \
738 IN ULONG ByteCount) PURE; \
739\
740 STDMETHOD_(void, CopyFrom)( THIS_ \
741 IN PVOID Destination, \
742 IN PVOID Source, \
743 IN ULONG ByteCount) PURE;
744
745#define IMP_IDmaChannel \
746 STDMETHODIMP_(NTSTATUS) AllocateBuffer( \
747 IN ULONG BufferSize, \
748 IN PPHYSICAL_ADDRESS PhysicalAddressConstraint OPTIONAL); \
749 \
750 STDMETHODIMP_(void) FreeBuffer(void); \
751 STDMETHODIMP_(ULONG) TransferCount(void); \
752 STDMETHODIMP_(ULONG) MaximumBufferSize(void); \
753 STDMETHODIMP_(ULONG) AllocatedBufferSize(void); \
754 STDMETHODIMP_(ULONG) BufferSize(void); \
755 \
756 STDMETHODIMP_(void) SetBufferSize( \
757 IN ULONG BufferSize); \
758 \
759 STDMETHODIMP_(PVOID) SystemAddress(void); \
760 STDMETHODIMP_(PHYSICAL_ADDRESS) PhysicalAddress(void); \
761 STDMETHODIMP_(PADAPTER_OBJECT) GetAdapterObject(void); \
762 \
763 STDMETHODIMP_(void) CopyTo( \
764 IN PVOID Destination, \
765 IN PVOID Source, \
766 IN ULONG ByteCount); \
767 \
768 STDMETHODIMP_(void) CopyFrom( \
769 IN PVOID Destination, \
770 IN PVOID Source, \
771 IN ULONG ByteCount)
772
773#undef INTERFACE
774#define INTERFACE IDmaChannel
775
776DEFINE_GUID(IID_IDmaChannel, 0x22C6AC61L, 0x851B, 0x11D0, 0x9A, 0x7F, 0x00, 0xAA, 0x00, 0x38, 0xAC, 0xFE);
777
779{
782};
783
784typedef IDmaChannel *PDMACHANNEL;
785
786
787/* ===============================================================
788 IDmaChannelSlave Interface
789*/
790
791#define DEFINE_ABSTRACT_DMACHANNELSLAVE() \
792 STDMETHOD_(NTSTATUS, Start)( THIS_ \
793 IN ULONG MapSize, \
794 IN BOOLEAN WriteToDevice) PURE; \
795\
796 STDMETHOD_(NTSTATUS, Stop)( THIS ) PURE; \
797 STDMETHOD_(ULONG, ReadCounter)( THIS ) PURE; \
798\
799 STDMETHOD_(NTSTATUS, WaitForTC)( THIS_ \
800 ULONG Timeout) PURE;
801
802#define IMP_IDmaChannelSlave \
803 IMP_IDmaChannel; \
804 STDMETHODIMP_(NTSTATUS) Start( \
805 IN ULONG MapSize, \
806 IN BOOLEAN WriteToDevice); \
807 \
808 STDMETHODIMP_(NTSTATUS) Stop(void); \
809 STDMETHODIMP_(ULONG) ReadCounter(void); \
810 \
811 STDMETHODIMP_(NTSTATUS) WaitForTC( \
812 ULONG Timeout)
813
814#undef INTERFACE
815#define INTERFACE IDmaChannelSlave
816
817#if (NTDDI_VERSION < NTDDI_LONGHORN)
818DEFINE_GUID(IID_IDmaChannelSlave, 0x22C6AC62L, 0x851B, 0x11D0, 0x9A, 0x7F, 0x00, 0xAA, 0x00, 0x38, 0xAC, 0xFE);
819#endif
820
821#undef INTERFACE
822#define INTERFACE IDmaChannelSlave
823
824DECLARE_INTERFACE_(IDmaChannelSlave, IDmaChannel)
825{
829};
830
831typedef IDmaChannelSlave *PDMACHANNELSLAVE;
832
833
834/* ===============================================================
835 IInterruptSync Interface
836*/
837
838typedef enum
839{
844
845struct IInterruptSync;
846
848 IN struct IInterruptSync* InterruptSync,
849 IN PVOID DynamicContext);
850
851#undef INTERFACE
852#define INTERFACE IInterruptSync
853
855{
857
858 STDMETHOD_(NTSTATUS, CallSynchronizedRoutine)( THIS_
860 IN PVOID DynamicContext) PURE;
861
862 STDMETHOD_(PKINTERRUPT, GetKInterrupt)( THIS ) PURE;
864 STDMETHOD_(void, Disconnect)( THIS ) PURE;
865
866 STDMETHOD_(NTSTATUS, RegisterServiceRoutine)( THIS_
868 IN PVOID DynamicContext,
870};
871
872DEFINE_GUID(IID_IInterruptSync, 0x22C6AC63L, 0x851B, 0x11D0, 0x9A, 0x7F, 0x00, 0xAA, 0x00, 0x38, 0xAC, 0xFE);
873
874#define IMP_IInterruptSync \
875 STDMETHODIMP_(NTSTATUS) CallSynchronizedRoutine( \
876 IN PINTERRUPTSYNCROUTINE Routine, \
877 IN PVOID DynamicContext); \
878 \
879 STDMETHODIMP_(PKINTERRUPT) GetKInterrupt(void); \
880 STDMETHODIMP_(NTSTATUS) Connect(void); \
881 STDMETHODIMP_(void) Disconnect(void); \
882 \
883 STDMETHODIMP_(NTSTATUS) RegisterServiceRoutine( \
884 IN PINTERRUPTSYNCROUTINE Routine, \
885 IN PVOID DynamicContext, \
886 IN BOOLEAN First)
887
888typedef IInterruptSync *PINTERRUPTSYNC;
889
890
891/* ===============================================================
892 IRegistryKey Interface
893*/
894
895#undef INTERFACE
896#define INTERFACE IRegistryKey
897
898enum
899{
906
907DEFINE_GUID(IID_IRegistryKey, 0xE8DA4302l, 0xF304, 0x11D0, 0x95, 0x8B, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3);
908
910{
912
913 STDMETHOD_(NTSTATUS, QueryKey)( THIS_
915 OUT PVOID KeyInformation,
918
919 STDMETHOD_(NTSTATUS, EnumerateKey)( THIS_
920 IN ULONG Index,
922 OUT PVOID KeyInformation,
925
926 STDMETHOD_(NTSTATUS, QueryValueKey)( THIS_
929 OUT PVOID KeyValueInformation,
932
933 STDMETHOD_(NTSTATUS, EnumerateValueKey)( THIS_
934 IN ULONG Index,
936 OUT PVOID KeyValueInformation,
939
940 STDMETHOD_(NTSTATUS, SetValueKey)( THIS_
942 IN ULONG Type,
943 IN PVOID Data,
945
946 STDMETHOD_(NTSTATUS, QueryRegistryValues)( THIS_
949
950 STDMETHOD_(NTSTATUS, NewSubKey)( THIS_
951 OUT IRegistryKey** RegistrySubKey,
952 IN PUNKNOWN OuterUnknown,
957
959};
960
961#define IMP_IRegistryKey \
962 STDMETHODIMP_(NTSTATUS) QueryKey( \
963 IN KEY_INFORMATION_CLASS KeyInformationClass, \
964 OUT PVOID KeyInformation, \
965 IN ULONG Length, \
966 OUT PULONG ResultLength); \
967\
968 STDMETHODIMP_(NTSTATUS) EnumerateKey( \
969 IN ULONG Index, \
970 IN KEY_INFORMATION_CLASS KeyInformationClass, \
971 OUT PVOID KeyInformation, \
972 IN ULONG Length, \
973 OUT PULONG ResultLength); \
974\
975 STDMETHODIMP_(NTSTATUS) QueryValueKey( \
976 IN PUNICODE_STRING ValueName, \
977 IN KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass, \
978 OUT PVOID KeyValueInformation, \
979 IN ULONG Length, \
980 OUT PULONG ResultLength); \
981\
982 STDMETHODIMP_(NTSTATUS) EnumerateValueKey( \
983 IN ULONG Index, \
984 IN KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass, \
985 OUT PVOID KeyValueInformation, \
986 IN ULONG Length, \
987 OUT PULONG ResultLength); \
988\
989 STDMETHODIMP_(NTSTATUS) SetValueKey( \
990 IN PUNICODE_STRING ValueName OPTIONAL, \
991 IN ULONG Type, \
992 IN PVOID Data, \
993 IN ULONG DataSize); \
994\
995 STDMETHODIMP_(NTSTATUS) QueryRegistryValues( \
996 IN PRTL_QUERY_REGISTRY_TABLE QueryTable, \
997 IN PVOID Context OPTIONAL); \
998\
999 STDMETHODIMP_(NTSTATUS) NewSubKey( \
1000 OUT IRegistryKey** RegistrySubKey, \
1001 IN PUNKNOWN OuterUnknown, \
1002 IN ACCESS_MASK DesiredAccess, \
1003 IN PUNICODE_STRING SubKeyName, \
1004 IN ULONG CreateOptions, \
1005 OUT PULONG Disposition OPTIONAL); \
1006\
1007 STDMETHODIMP_(NTSTATUS) DeleteKey(void);
1008
1009typedef IRegistryKey *PREGISTRYKEY;
1010
1011
1012/* ===============================================================
1013 IMusicTechnology Interface
1014*/
1015
1017{
1019
1020 STDMETHOD_(NTSTATUS, SetTechnology)( THIS_
1021 IN const GUID* Technology) PURE;
1022};
1023
1024#define IMP_IMusicTechnology \
1025 STDMETHODIMP_(NTSTATUS) SetTechnology( \
1026 IN const GUID* Technology);
1027
1028typedef IMusicTechnology *PMUSICTECHNOLOGY;
1029
1030
1031/* ===============================================================
1032 IPort Interface
1033*/
1034
1035#if 0
1036#define STATIC_IPort 0xb4c90a25L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44
1037DEFINE_GUIDSTRUCT("0xB4C90A25-5791-11d0-86f9-00a0c911b544", IID_IPort);
1038#define IID_IPort DEFINE_GUIDNAMED(IID_IPort)
1039#endif
1040
1041DEFINE_GUID(IID_IMiniport,
1042 0xb4c90a24L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
1043
1044DEFINE_GUID(IID_IPort,
1045 0xb4c90a25L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
1046
1047#define DEFINE_ABSTRACT_PORT() \
1048 STDMETHOD_(NTSTATUS, Init)( THIS_ \
1049 IN PDEVICE_OBJECT DeviceObject, \
1050 IN PIRP Irp, \
1051 IN PUNKNOWN UnknownMiniport, \
1052 IN PUNKNOWN UnknownAdapter OPTIONAL, \
1053 IN PRESOURCELIST ResourceList) PURE; \
1054\
1055 STDMETHOD_(NTSTATUS, GetDeviceProperty)( THIS_ \
1056 IN DEVICE_REGISTRY_PROPERTY DeviceProperty, \
1057 IN ULONG BufferLength, \
1058 OUT PVOID PropertyBuffer, \
1059 OUT PULONG ResultLength) PURE; \
1060\
1061 STDMETHOD_(NTSTATUS, NewRegistryKey)( THIS_ \
1062 OUT PREGISTRYKEY* OutRegistryKey, \
1063 IN PUNKNOWN OuterUnknown OPTIONAL, \
1064 IN ULONG RegistryKeyType, \
1065 IN ACCESS_MASK DesiredAccess, \
1066 IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, \
1067 IN ULONG CreateOptiona OPTIONAL, \
1068 OUT PULONG Disposition OPTIONAL) PURE;
1069
1070#ifdef PC_IMPLEMENTATION
1071#define IMP_IPort\
1072 STDMETHODIMP_(NTSTATUS) Init\
1073 ( IN PDEVICE_OBJECT DeviceObject,\
1074 IN PIRP Irp,\
1075 IN PUNKNOWN UnknownMiniport,\
1076 IN PUNKNOWN UnknownAdapter OPTIONAL,\
1077 IN PRESOURCELIST ResourceList\
1078 );\
1079 STDMETHODIMP_(NTSTATUS) GetDeviceProperty\
1080 ( IN DEVICE_REGISTRY_PROPERTY DeviceProperty,\
1081 IN ULONG BufferLength,\
1082 OUT PVOID PropertyBuffer,\
1083 OUT PULONG ResultLength\
1084 );\
1085 STDMETHODIMP_(NTSTATUS) NewRegistryKey\
1086 ( OUT PREGISTRYKEY * OutRegistryKey,\
1087 IN PUNKNOWN OuterUnknown OPTIONAL,\
1088 IN ULONG RegistryKeyType,\
1089 IN ACCESS_MASK DesiredAccess,\
1090 IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,\
1091 IN ULONG CreateOptions OPTIONAL,\
1092 OUT PULONG Disposition OPTIONAL\
1093 )
1094#endif
1095
1096#undef INTERFACE
1097#define INTERFACE IPort
1098
1100{
1103};
1104
1105typedef IPort *PPORT;
1106
1107
1108/* ===============================================================
1109 IPortMidi Interface
1110*/
1111
1112DEFINE_GUID(IID_IPortMidi,
1113 0xb4c90a40L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
1114DEFINE_GUID(CLSID_PortMidi,
1115 0xb4c90a43L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
1116
1117#undef INTERFACE
1118#define INTERFACE IPortMidi
1119
1120DECLARE_INTERFACE_(IPortMidi, IPort)
1121{
1124
1126 IN PSERVICEGROUP ServiceGroup OPTIONAL) PURE;
1127
1128 STDMETHOD_(NTSTATUS, RegisterServiceGroup)(THIS_
1129 IN PSERVICEGROUP ServiceGroup) PURE;
1130};
1131
1132typedef IPortMidi *PPORTMIDI;
1133
1134#define IMP_IPortMidi() \
1135 STDMETHODIMP_(VOID) Notify( \
1136 IN PSERVICEGROUP ServiceGroup OPTIONAL); \
1137\
1138 STDMETHODIMP_(NTSTATUS) RegisterServiceGroup( \
1139 IN PSERVICEGROUP ServiceGroup);
1140
1141#undef INTERFACE
1142
1143/* ===============================================================
1144 IPortWaveCyclic Interface
1145*/
1146
1147DEFINE_GUID(IID_IPortWaveCyclic,
1148 0xb4c90a26L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
1149DEFINE_GUID(CLSID_PortWaveCyclic,
1150 0xb4c90a2aL, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
1151
1152#define INTERFACE IPortWaveCyclic
1153
1154DECLARE_INTERFACE_(IPortWaveCyclic, IPort)
1155{
1157
1159
1161 IN PSERVICEGROUP ServiceGroup) PURE;
1162
1163 STDMETHOD_(NTSTATUS, NewSlaveDmaChannel)(THIS_
1164 OUT PDMACHANNELSLAVE* DmaChannel,
1165 IN PUNKNOWN OuterUnknown,
1167 IN ULONG DmaIndex,
1169 IN BOOLEAN DemandMode,
1170 IN DMA_SPEED DmaSpeed) PURE;
1171
1172 STDMETHOD_(NTSTATUS, NewMasterDmaChannel)(THIS_
1173 OUT PDMACHANNEL* DmaChannel,
1174 IN PUNKNOWN OuterUnknown,
1177 IN BOOLEAN Dma32BitAddresses,
1179 IN DMA_WIDTH DmaWidth,
1180 IN DMA_SPEED DmaSpeed) PURE;
1181
1182};
1183
1184typedef IPortWaveCyclic *PPORTWAVECYCLIC;
1185
1186#ifdef PC_IMPLEMENTATION
1187#define IMP_IPortWaveCyclic \
1188 IMP_IPort; \
1189 STDMETHODIMP_(VOID) Notify( \
1190 IN PSERVICEGROUP ServiceGroup); \
1191 \
1192 STDMETHODIMP_(NTSTATUS) NewSlaveDmaChannel( \
1193 OUT PDMACHANNELSLAVE* DmaChannel, \
1194 IN PUNKNOWN OuterUnknown, \
1195 IN PRESOURCELIST ResourceList OPTIONAL, \
1196 IN ULONG DmaIndex, \
1197 IN ULONG MaximumLength, \
1198 IN BOOLEAN DemandMode, \
1199 IN DMA_SPEED DmaSpeed); \
1200 \
1201 STDMETHODIMP_(NTSTATUS) NewMasterDmaChannel( \
1202 OUT PDMACHANNEL* DmaChannel, \
1203 IN PUNKNOWN OuterUnknown, \
1204 IN PRESOURCELIST ResourceList OPTIONAL, \
1205 IN ULONG MaximumLength, \
1206 IN BOOLEAN Dma32BitAddresses, \
1207 IN BOOLEAN Dma64BitAddresses, \
1208 IN DMA_WIDTH DmaWidth, \
1209 IN DMA_SPEED DmaSpeed)
1210#endif
1211
1212
1213#undef INTERFACE
1214/* ===============================================================
1215 IPortWavePci Interface
1216*/
1217#undef INTERFACE
1218#define INTERFACE IPortWavePci
1219
1220DEFINE_GUID(IID_IPortWavePci,
1221 0xb4c90a50L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
1222DEFINE_GUID(CLSID_PortWavePci,
1223 0xb4c90a54L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
1224
1225DECLARE_INTERFACE_(IPortWavePci, IPort)
1226{
1229
1231 IN PSERVICEGROUP ServiceGroup) PURE;
1232
1233 STDMETHOD_(NTSTATUS, NewMasterDmaChannel)(THIS_
1234 OUT PDMACHANNEL* DmaChannel,
1235 IN PUNKNOWN OuterUnknown,
1239 IN BOOLEAN Dma32BitAddresses,
1241 IN BOOLEAN IgnoreCount,
1242 IN DMA_WIDTH DmaWidth,
1243 IN DMA_SPEED DmaSpeed,
1245 IN ULONG DmaPort) PURE;
1246};
1247
1248typedef IPortWavePci *PPORTWAVEPCI;
1249#undef INTERFACE
1250
1251#ifdef PC_IMPLEMENTATION
1252#define IMP_IPortWavePci \
1253 IMP_IPort; \
1254 STDMETHODIMP_(VOID) Notify( \
1255 IN PSERVICEGROUP ServiceGroup); \
1256 \
1257 STDMETHODIMP_(NTSTATUS) NewMasterDmaChannel( \
1258 OUT PDMACHANNEL* DmaChannel, \
1259 IN PUNKNOWN OuterUnknown, \
1260 IN POOL_TYPE PoolType, \
1261 IN PRESOURCELIST ResourceList OPTIONAL, \
1262 IN BOOLEAN ScatterGather, \
1263 IN BOOLEAN Dma32BitAddresses, \
1264 IN BOOLEAN Dma64BitAddresses, \
1265 IN BOOLEAN IgnoreCount, \
1266 IN DMA_WIDTH DmaWidth, \
1267 IN DMA_SPEED DmaSpeed, \
1268 IN ULONG MaximumLength, \
1269 IN ULONG DmaPort);
1270#endif
1271
1272/* ===============================================================
1273 IMiniPort Interface
1274*/
1275
1276DEFINE_GUID(IID_IMiniPort,
1277 0xb4c90a24L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
1278
1279#define DEFINE_ABSTRACT_MINIPORT() \
1280 STDMETHOD_(NTSTATUS, GetDescription)( THIS_ \
1281 OUT PPCFILTER_DESCRIPTOR* Description) PURE; \
1282\
1283 STDMETHOD_(NTSTATUS, DataRangeIntersection)( THIS_ \
1284 IN ULONG PinId, \
1285 IN PKSDATARANGE DataRange, \
1286 IN PKSDATARANGE MatchingDataRange, \
1287 IN ULONG OutputBufferLength, \
1288 OUT PVOID ResultantFormat OPTIONAL, \
1289 OUT PULONG ResultantFormatLength) PURE;
1290
1291#define IMP_IMiniport \
1292 STDMETHODIMP_(NTSTATUS) GetDescription( \
1293 OUT PPCFILTER_DESCRIPTOR* Description); \
1294 \
1295 STDMETHODIMP_(NTSTATUS) DataRangeIntersection( \
1296 IN ULONG PinId, \
1297 IN PKSDATARANGE DataRange, \
1298 IN PKSDATARANGE MatchingDataRange, \
1299 IN ULONG OutputBufferLength, \
1300 OUT PVOID ResultantFormat OPTIONAL, \
1301 OUT PULONG ResultantFormatLength)
1302
1304{
1307};
1308
1309typedef IMiniport *PMINIPORT;
1310
1311
1312/* ===============================================================
1313 IMiniportMidiStream Interface
1314*/
1315#undef INTERFACE
1316#define INTERFACE IMiniportMidiStream
1317
1318DEFINE_GUID(IID_IMiniportMidiStream,
1319 0xb4c90a42L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
1320
1321DECLARE_INTERFACE_(IMiniportMidiStream, IUnknown)
1322{
1324
1325 STDMETHOD_(NTSTATUS,SetFormat)(THIS_
1327
1328 STDMETHOD_(NTSTATUS,SetState)(THIS_
1330
1335
1338 IN ULONG BytesToWrite,
1340};
1341
1342typedef IMiniportMidiStream* PMINIPORTMIDISTREAM;
1343#undef INTERFACE
1344
1345/* ===============================================================
1346 IMiniportMidi Interface
1347*/
1348#undef INTERFACE
1349#define INTERFACE IMiniportMidi
1350
1351DEFINE_GUID(IID_IMiniportMidi,
1352 0xb4c90a41L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
1353
1354DECLARE_INTERFACE_(IMiniportMidi, IMiniport)
1355{
1358
1360 IN PUNKNOWN UnknownAdapter,
1363 OUT PSERVICEGROUP* ServiceGroup) PURE;
1364
1365 STDMETHOD_(void, Service)(THIS) PURE;
1366
1367 STDMETHOD_(NTSTATUS, NewStream)(THIS_
1369 IN PUNKNOWN OuterUnknown OPTIONAL,
1371 IN ULONG Pin,
1374 OUT PSERVICEGROUP* ServiceGroup) PURE;
1375
1376};
1377
1378typedef IMiniportMidi *PMINIPORTMIDI;
1379#undef INTERFACE
1380
1381/* ===============================================================
1382 IMiniportDriverUart Interface
1383*/
1384
1385DEFINE_GUID(IID_MiniportDriverUart,
1386 0xb4c90ae1L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
1387DEFINE_GUID(CLSID_MiniportDriverUart,
1388 0xb4c90ae1L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
1389
1390/* ===============================================================
1391 IPortTopology Interface
1392*/
1393#if 0
1394#define STATIC_IPortTopology \
1395 0xb4c90a30L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44
1396DEFINE_GUIDSTRUCT("0xB4C90A30-5791-11d0-86f9-00a0c911b544", IID_IPortTopology);
1397#define IID_IPortTopology DEFINE_GUIDNAMED(IID_IPortTopology)
1398#endif
1399
1400#undef INTERFACE
1401#define INTERFACE IPortTopology
1402
1403DEFINE_GUID(IID_IPortTopology, 0xb4c90a30L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
1404DEFINE_GUID(CLSID_PortTopology, 0xb4c90a32L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
1405
1406#undef INTERFACE
1407#define INTERFACE IPortTopology
1408
1409DECLARE_INTERFACE_(IPortTopology, IPort)
1410{
1413};
1414
1415typedef IPortTopology *PPORTTOPOLOGY;
1416
1417#define IMP_IPortTopology IMP_IPort
1418
1419
1420/* ===============================================================
1421 IMiniportTopology Interface
1422*/
1423
1424#undef INTERFACE
1425#define INTERFACE IMiniportTopology
1426
1427DEFINE_GUID(IID_IMiniportTopology, 0xb4c90a31L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
1428
1429#undef INTERFACE
1430#define INTERFACE IMiniportTopology
1431
1432DECLARE_INTERFACE_(IMiniportTopology,IMiniport)
1433{
1436
1438 IN PUNKNOWN UnknownAdapter,
1441};
1442
1443typedef IMiniportTopology *PMINIPORTTOPOLOGY;
1444
1445#define IMP_IMiniportTopology\
1446 IMP_IMiniport;\
1447 STDMETHODIMP_(NTSTATUS) Init(\
1448 IN PUNKNOWN UnknownAdapter,\
1449 IN PRESOURCELIST ResourceList,\
1450 IN PPORTTOPOLOGY Port);
1451
1452/* ===============================================================
1453 IMiniportWaveCyclicStream Interface
1454*/
1455
1456#undef INTERFACE
1457#define INTERFACE IMiniportWaveCyclicStream
1458
1459DEFINE_GUID(IID_IMiniportWaveCyclicStream,
14600xb4c90a28L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
1461
1462DECLARE_INTERFACE_(IMiniportWaveCyclicStream,IUnknown)
1463{
1465
1466 STDMETHOD_(NTSTATUS,SetFormat)(THIS_
1468
1469 STDMETHOD_(ULONG,SetNotificationFreq)(THIS_
1471 OUT PULONG FrameSize) PURE;
1472
1473 STDMETHOD_(NTSTATUS,SetState)(THIS_
1475
1478
1479 STDMETHOD_(NTSTATUS,NormalizePhysicalPosition)(THIS_
1480 IN OUT PLONGLONG PhysicalPosition) PURE;
1481
1482 STDMETHOD_(void, Silence)( THIS_
1483 IN PVOID Buffer,
1485};
1486
1487typedef IMiniportWaveCyclicStream *PMINIPORTWAVECYCLICSTREAM;
1488
1489#define IMP_IMiniportWaveCyclicStream\
1490 STDMETHODIMP_(NTSTATUS) SetFormat\
1491 ( IN PKSDATAFORMAT DataFormat\
1492 );\
1493 STDMETHODIMP_(ULONG) SetNotificationFreq\
1494 ( IN ULONG Interval,\
1495 OUT PULONG FrameSize\
1496 );\
1497 STDMETHODIMP_(NTSTATUS) SetState\
1498 ( IN KSSTATE State\
1499 );\
1500 STDMETHODIMP_(NTSTATUS) GetPosition\
1501 ( OUT PULONG Position\
1502 );\
1503 STDMETHODIMP_(NTSTATUS) NormalizePhysicalPosition\
1504 ( IN OUT PLONGLONG PhysicalPosition\
1505 );\
1506 STDMETHODIMP_(void) Silence\
1507 ( IN PVOID Buffer,\
1508 IN ULONG ByteCount\
1509 )
1510
1511
1512/* ===============================================================
1513 IMiniportWaveCyclic Interface
1514*/
1515#undef INTERFACE
1516
1517DEFINE_GUID(IID_IMiniportWaveCyclic,
1518 0xb4c90a27L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
1519
1520#define INTERFACE IMiniportWaveCyclic
1521
1522DECLARE_INTERFACE_(IMiniportWaveCyclic, IMiniport)
1523{
1526
1528 IN PUNKNOWN UnknownAdapter,
1531
1532 STDMETHOD_(NTSTATUS, NewStream)(THIS_
1534 IN PUNKNOWN OuterUnknown OPTIONAL,
1536 IN ULONG Pin,
1539 OUT PDMACHANNEL *DmaChannel,
1540 OUT PSERVICEGROUP *ServiceGroup) PURE;
1541};
1542
1543typedef IMiniportWaveCyclic *PMINIPORTWAVECYCLIC;
1544#undef INTERFACE
1545
1546#define IMP_IMiniportWaveCyclic\
1547 IMP_IMiniport;\
1548 STDMETHODIMP_(NTSTATUS) Init\
1549 ( IN PUNKNOWN UnknownAdapter,\
1550 IN PRESOURCELIST ResourceList,\
1551 IN PPORTWAVECYCLIC Port\
1552 );\
1553 STDMETHODIMP_(NTSTATUS) NewStream\
1554 ( OUT PMINIPORTWAVECYCLICSTREAM * Stream,\
1555 IN PUNKNOWN OuterUnknown OPTIONAL,\
1556 IN POOL_TYPE PoolType,\
1557 IN ULONG Pin,\
1558 IN BOOLEAN Capture,\
1559 IN PKSDATAFORMAT DataFormat,\
1560 OUT PDMACHANNEL * DmaChannel,\
1561 OUT PSERVICEGROUP * ServiceGroup\
1562 )
1563
1564
1565/* ===============================================================
1566 IPortWavePciStream Interface
1567*/
1568#undef INTERFACE
1569#define INTERFACE IPortWavePciStream
1570
1571DEFINE_GUID(IID_IPortWavePciStream, 0xb4c90a51L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
1572
1573DECLARE_INTERFACE_(IPortWavePciStream,IUnknown)
1574{
1575 DEFINE_ABSTRACT_UNKNOWN() // For IUnknown
1576
1577 STDMETHOD_(NTSTATUS,GetMapping)(THIS_
1578 IN PVOID Tag,
1583
1584 STDMETHOD_(NTSTATUS,ReleaseMapping)(THIS_
1585 IN PVOID Tag)PURE;
1586
1587 STDMETHOD_(NTSTATUS,TerminatePacket)(THIS)PURE;
1588};
1589
1590typedef IPortWavePciStream *PPORTWAVEPCISTREAM;
1591
1592#define IMP_IPortWavePciStream \
1593 STDMETHODIMP_(NTSTATUS) GetMapping( \
1594 IN PVOID Tag, \
1595 OUT PPHYSICAL_ADDRESS PhysicalAddress, \
1596 OUT PVOID * VirtualAddress, \
1597 OUT PULONG ByteCount, \
1598 OUT PULONG Flags); \
1599 \
1600 STDMETHODIMP_(NTSTATUS) ReleaseMapping( \
1601 IN PVOID Tag); \
1602 \
1603 STDMETHODIMP_(NTSTATUS) TerminatePacket(THIS)
1604
1605
1606/* ===============================================================
1607 IMiniportWavePciStream Interface
1608*/
1609#undef INTERFACE
1610#define INTERFACE IMiniportWavePciStream
1611
1612DEFINE_GUID(IID_IMiniportWavePciStream, 0xb4c90a53L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
1613
1614DECLARE_INTERFACE_(IMiniportWavePciStream,IUnknown)
1615{
1617
1618 STDMETHOD_(NTSTATUS,SetFormat)(THIS_
1620
1621 STDMETHOD_(NTSTATUS,SetState)(THIS_
1623
1626
1627 STDMETHOD_(NTSTATUS,NormalizePhysicalPosition)(THIS_
1628 IN OUT PLONGLONG PhysicalPosition)PURE;
1629
1630 STDMETHOD_(NTSTATUS,GetAllocatorFraming)(THIS_
1632
1633 STDMETHOD_(NTSTATUS,RevokeMappings)(THIS_
1634 IN PVOID FirstTag,
1635 IN PVOID LastTag,
1636 OUT PULONG MappingsRevoked)PURE;
1637
1638 STDMETHOD_(void,MappingAvailable)(THIS)PURE;
1639
1641};
1642
1643typedef IMiniportWavePciStream *PMINIPORTWAVEPCISTREAM;
1644
1645#define IMP_IMiniportWavePciStream\
1646 STDMETHODIMP_(NTSTATUS) SetFormat(\
1647 IN PKSDATAFORMAT DataFormat);\
1648 STDMETHODIMP_(NTSTATUS) SetState(\
1649 IN KSSTATE State);\
1650 STDMETHODIMP_(NTSTATUS) GetPosition(\
1651 OUT PULONGLONG Position);\
1652 STDMETHODIMP_(NTSTATUS) NormalizePhysicalPosition(\
1653 IN OUT PLONGLONG PhysicalPosition);\
1654 STDMETHODIMP_(NTSTATUS) GetAllocatorFraming(\
1655 OUT PKSALLOCATOR_FRAMING AllocatorFraming);\
1656 STDMETHODIMP_(NTSTATUS) RevokeMappings(\
1657 IN PVOID FirstTag,\
1658 IN PVOID LastTag,\
1659 OUT PULONG MappingsRevoked);\
1660 STDMETHODIMP_(void) MappingAvailable(void);\
1661 STDMETHODIMP_(void) Service(void);
1662
1663/* ===============================================================
1664 IMiniportWavePci Interface
1665*/
1666#undef INTERFACE
1667#define INTERFACE IMiniportWavePci
1668
1669DEFINE_GUID(IID_IMiniportWavePci, 0xb4c90a52L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
1670
1671DECLARE_INTERFACE_(IMiniportWavePci,IMiniport)
1672{
1674
1676
1678 IN PUNKNOWN UnknownAdapter,
1681 OUT PSERVICEGROUP * ServiceGroup)PURE;
1682
1683 STDMETHOD_(NTSTATUS,NewStream)(THIS_
1685 IN PUNKNOWN OuterUnknown OPTIONAL,
1687 IN PPORTWAVEPCISTREAM PortStream,
1688 IN ULONG Pin,
1691 OUT PDMACHANNEL * DmaChannel,
1692 OUT PSERVICEGROUP * ServiceGroup)PURE;
1693
1695};
1696
1697typedef IMiniportWavePci *PMINIPORTWAVEPCI;
1698
1699#define IMP_IMiniportWavePci\
1700 IMP_IMiniport;\
1701 STDMETHODIMP_(NTSTATUS) Init(\
1702 IN PUNKNOWN UnknownAdapter,\
1703 IN PRESOURCELIST ResourceList,\
1704 IN PPORTWAVEPCI Port,\
1705 OUT PSERVICEGROUP * ServiceGroup);\
1706 STDMETHODIMP_(NTSTATUS) NewStream(\
1707 OUT PMINIPORTWAVEPCISTREAM * Stream,\
1708 IN PUNKNOWN OuterUnknown ,\
1709 IN POOL_TYPE PoolType,\
1710 IN PPORTWAVEPCISTREAM PortStream,\
1711 IN ULONG Pin,\
1712 IN BOOLEAN Capture,\
1713 IN PKSDATAFORMAT DataFormat,\
1714 OUT PDMACHANNEL * DmaChannel,\
1715 OUT PSERVICEGROUP * ServiceGroup);\
1716 STDMETHODIMP_(void) Service(void);
1717
1718
1719#if !defined(DEFINE_ABSTRACT_MINIPORTWAVERTSTREAM)
1720
1721#define DEFINE_ABSTRACT_MINIPORTWAVERTSTREAM() \
1722 STDMETHOD_(NTSTATUS,SetFormat) \
1723 ( THIS_ \
1724 IN PKSDATAFORMAT DataFormat \
1725 ) PURE; \
1726 STDMETHOD_(NTSTATUS,SetState) \
1727 ( THIS_ \
1728 IN KSSTATE State \
1729 ) PURE; \
1730 STDMETHOD_(NTSTATUS,GetPosition) \
1731 ( THIS_ \
1732 OUT PKSAUDIO_POSITION Position \
1733 ) PURE; \
1734 STDMETHOD_(NTSTATUS,AllocateAudioBuffer) \
1735 ( THIS_ \
1736 IN ULONG RequestedSize, \
1737 OUT PMDL *AudioBufferMdl, \
1738 OUT ULONG *ActualSize, \
1739 OUT ULONG *OffsetFromFirstPage, \
1740 OUT MEMORY_CACHING_TYPE *CacheType \
1741 ) PURE; \
1742 STDMETHOD_(VOID,FreeAudioBuffer) \
1743 ( THIS_ \
1744 IN PMDL AudioBufferMdl, \
1745 IN ULONG BufferSize \
1746 ) PURE; \
1747 STDMETHOD_(VOID,GetHWLatency) \
1748 ( THIS_ \
1749 OUT KSRTAUDIO_HWLATENCY *hwLatency \
1750 ) PURE; \
1751 STDMETHOD_(NTSTATUS,GetPositionRegister) \
1752 ( THIS_ \
1753 OUT KSRTAUDIO_HWREGISTER *Register \
1754 ) PURE; \
1755 STDMETHOD_(NTSTATUS,GetClockRegister) \
1756 ( THIS_ \
1757 OUT KSRTAUDIO_HWREGISTER *Register \
1758 ) PURE;
1759
1760#endif
1761
1762
1763/* ===============================================================
1764 IAdapterPowerManagement Interface
1765*/
1766
1767#if (NTDDI_VERSION >= NTDDI_VISTA)
1768/* ===============================================================
1769 IPortWaveRT Interface
1770*/
1771
1772DEFINE_GUID(CLSID_PortWaveRT, 0xcc9be57a, 0xeb9e, 0x42b4, 0x94, 0xfc, 0xc, 0xad, 0x3d, 0xbc, 0xe7, 0xfa);
1773DEFINE_GUID(IID_IPortWaveRT, 0x339ff909, 0x68a9, 0x4310, 0xb0, 0x9b, 0x27, 0x4e, 0x96, 0xee, 0x4c, 0xbd);
1774
1775#undef INTERFACE
1776#define INTERFACE IPortWaveRT
1777
1778DECLARE_INTERFACE_(IPortWaveRT,IPort)
1779{
1780 DEFINE_ABSTRACT_UNKNOWN() // For IUnknown
1781
1782 DEFINE_ABSTRACT_PORT() // For IPort
1783};
1784
1785typedef IPortWaveRT *PPORTWAVERT;
1786
1787#ifdef PC_IMPLEMENTATION
1788#define IMP_IPortWaveRT IMP_IPort
1789#endif
1790
1791
1792/* ===============================================================
1793 IPortWaveRTStream Interface
1794*/
1795
1796#undef INTERFACE
1797#define INTERFACE IPortWaveRTStream
1798
1799DEFINE_GUID(IID_IPortWaveRTStream, 0x1809ce5a, 0x64bc, 0x4e62, 0xbd, 0x7d, 0x95, 0xbc, 0xe4, 0x3d, 0xe3, 0x93);
1800
1801DECLARE_INTERFACE_(IPortWaveRTStream, IUnknown)
1802{
1804
1805 STDMETHOD_(PMDL, AllocatePagesForMdl)
1806 ( THIS_
1809 ) PURE;
1810
1811 STDMETHOD_(PMDL, AllocateContiguousPagesForMdl)
1812 ( THIS_
1813 IN PHYSICAL_ADDRESS LowAddress,
1816 ) PURE;
1817
1818 STDMETHOD_(PVOID, MapAllocatedPages)
1819 ( THIS_
1822 ) PURE;
1823
1824 STDMETHOD_(VOID, UnmapAllocatedPages)
1825 ( THIS_
1828 ) PURE;
1829
1830 STDMETHOD_(VOID, FreePagesFromMdl)
1831 ( THIS_
1833 ) PURE;
1834
1835 STDMETHOD_(ULONG, GetPhysicalPagesCount)
1836 ( THIS_
1838 ) PURE;
1839
1840 STDMETHOD_(PHYSICAL_ADDRESS, GetPhysicalPageAddress)
1841 ( THIS_
1843 IN ULONG Index
1844 ) PURE;
1845};
1846
1847typedef IPortWaveRTStream *PPORTWAVERTSTREAM;
1848
1849
1850/* ===============================================================
1851 IMiniportWaveRTStream Interface
1852*/
1853
1854#undef INTERFACE
1855#define INTERFACE IMiniportWaveRTStream
1856
1857DEFINE_GUID(IID_IMiniportWaveRTStream, 0xac9ab, 0xfaab, 0x4f3d, 0x94, 0x55, 0x6f, 0xf8, 0x30, 0x6a, 0x74, 0xa0);
1858
1859DECLARE_INTERFACE_(IMiniportWaveRTStream, IUnknown)
1860{
1863};
1864
1865typedef IMiniportWaveRTStream *PMINIPORTWAVERTSTREAM;
1866
1867#define IMP_IMiniportWaveRTStream\
1868 STDMETHODIMP_(NTSTATUS) SetFormat\
1869 ( IN PKSDATAFORMAT DataFormat\
1870 );\
1871 STDMETHODIMP_(NTSTATUS) SetState\
1872 ( IN KSSTATE State\
1873 );\
1874 STDMETHODIMP_(NTSTATUS) GetPosition\
1875 ( OUT PKSAUDIO_POSITION Position\
1876 );\
1877 STDMETHODIMP_(NTSTATUS) AllocateAudioBuffer\
1878 (\
1879 IN ULONG RequestedSize,\
1880 OUT PMDL *AudioBufferMdl,\
1881 OUT ULONG *ActualSize,\
1882 OUT ULONG *OffsetFromFirstPage,\
1883 OUT MEMORY_CACHING_TYPE *CacheType\
1884 );\
1885 STDMETHODIMP_(VOID) FreeAudioBuffer\
1886 (\
1887 IN PMDL AudioBufferMdl,\
1888 IN ULONG BufferSize\
1889 );\
1890 STDMETHODIMP_(VOID) GetHWLatency\
1891 (\
1892 OUT KSRTAUDIO_HWLATENCY *hwLatency\
1893 );\
1894 STDMETHODIMP_(NTSTATUS) GetPositionRegister\
1895 (\
1896 OUT KSRTAUDIO_HWREGISTER *Register\
1897 );\
1898 STDMETHODIMP_(NTSTATUS) GetClockRegister\
1899 (\
1900 OUT KSRTAUDIO_HWREGISTER *Register\
1901 )
1902
1903
1904/* ===============================================================
1905 IMiniportWaveRTStreamNotification Interface
1906*/
1907
1908#undef INTERFACE
1909#define INTERFACE IMiniportWaveRTStreamNotification
1910
1911DEFINE_GUID(IID_IMiniportWaveRTStreamNotification, 0x23759128, 0x96f1, 0x423b, 0xab, 0x4d, 0x81, 0x63, 0x5b, 0xcf, 0x8c, 0xa1);
1912
1913DECLARE_INTERFACE_(IMiniportWaveRTStreamNotification, IMiniportWaveRTStream)
1914{
1916
1918
1919 STDMETHOD_(NTSTATUS,AllocateBufferWithNotification)
1920 ( THIS_
1921 IN ULONG NotificationCount,
1922 IN ULONG RequestedSize,
1923 OUT PMDL *AudioBufferMdl,
1924 OUT ULONG *ActualSize,
1925 OUT ULONG *OffsetFromFirstPage,
1927 ) PURE;
1928
1929 STDMETHOD_(VOID,FreeBufferWithNotification)
1930 ( THIS_
1931 IN PMDL AudioBufferMdl,
1933 ) PURE;
1934
1935 STDMETHOD_(NTSTATUS,RegisterNotificationEvent)
1936 ( THIS_
1938 ) PURE;
1939
1940 STDMETHOD_(NTSTATUS,UnregisterNotificationEvent)
1941 ( THIS_
1943 ) PURE;
1944};
1945
1946/* ===============================================================
1947 IMiniportWaveRT Interface
1948*/
1949
1950#undef INTERFACE
1951#define INTERFACE IMiniportWaveRT
1952
1953DEFINE_GUID(IID_IMiniportWaveRT, 0xf9fc4d6, 0x6061, 0x4f3c, 0xb1, 0xfc, 0x7, 0x5e, 0x35, 0xf7, 0x96, 0xa);
1954
1955DECLARE_INTERFACE_(IMiniportWaveRT, IMiniport)
1956{
1958
1960
1962 ( THIS_
1963 IN PUNKNOWN UnknownAdapter,
1966 ) PURE;
1967
1968 STDMETHOD_(NTSTATUS,NewStream)
1969 ( THIS_
1971 IN PPORTWAVERTSTREAM PortStream,
1972 IN ULONG Pin,
1975 ) PURE;
1976
1977 STDMETHOD_(NTSTATUS,GetDeviceDescription)
1978 ( THIS_
1980 ) PURE;
1981};
1982
1983typedef IMiniportWaveRT *PMINIPORTWAVERT;
1984
1985#define IMP_IMiniportWaveRT\
1986 IMP_IMiniport;\
1987 STDMETHODIMP_(NTSTATUS) Init\
1988 ( IN PUNKNOWN UnknownAdapter,\
1989 IN PRESOURCELIST ResourceList,\
1990 IN PPORTWAVERT Port\
1991 );\
1992 STDMETHODIMP_(NTSTATUS) NewStream\
1993 ( OUT PMINIPORTWAVERTSTREAM * Stream,\
1994 IN PPORTWAVERTSTREAM PortStream,\
1995 IN ULONG Pin,\
1996 IN BOOLEAN Capture,\
1997 IN PKSDATAFORMAT DataFormat\
1998 );\
1999 STDMETHODIMP_(NTSTATUS) GetDeviceDescription\
2000 ( OUT PDEVICE_DESCRIPTION DeviceDescription\
2001 )
2002
2003#endif
2004
2005/* ===============================================================
2006 IAdapterPowerManagement Interface
2007*/
2008
2009#undef INTERFACE
2010#define INTERFACE IAdapterPowerManagement
2011
2012DEFINE_GUID(IID_IAdapterPowerManagement, 0x793417D0L, 0x35FE, 0x11D1, 0xAD, 0x08, 0x00, 0xA0, 0xC9, 0x0A, 0xB1, 0xB0);
2013
2014DECLARE_INTERFACE_(IAdapterPowerManagement, IUnknown)
2015{
2017
2018 STDMETHOD_(void,PowerChangeState)(THIS_
2019 IN POWER_STATE NewState) PURE;
2020
2021 STDMETHOD_(NTSTATUS,QueryPowerChangeState)(THIS_
2022 IN POWER_STATE NewStateQuery) PURE;
2023
2024 STDMETHOD_(NTSTATUS,QueryDeviceCapabilities)(THIS_
2025 IN PDEVICE_CAPABILITIES PowerDeviceCaps) PURE;
2026};
2027
2028#define IMP_IAdapterPowerManagement \
2029 STDMETHODIMP_(void) PowerChangeState \
2030 ( IN POWER_STATE NewState \
2031 ); \
2032 STDMETHODIMP_(NTSTATUS) QueryPowerChangeState \
2033 ( IN POWER_STATE NewStateQuery \
2034 ); \
2035 STDMETHODIMP_(NTSTATUS) QueryDeviceCapabilities \
2036 ( IN PDEVICE_CAPABILITIES PowerDeviceCaps \
2037 )
2038
2039typedef IAdapterPowerManagement *PADAPTERPOWERMANAGEMENT;
2040
2041
2042/* ===============================================================
2043 IPowerNotify Interface
2044*/
2045
2046#undef INTERFACE
2047#define INTERFACE IPowerNotify
2048
2049DEFINE_GUID(IID_IPowerNotify, 0x3DD648B8L, 0x969F, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3);
2050
2052{
2054
2055 STDMETHOD_(void, PowerChangeNotify)(THIS_
2057};
2058
2059typedef IPowerNotify *PPOWERNOTIFY;
2060
2061#define IMP_IPowerNotify\
2062 STDMETHODIMP_(void) PowerChangeNotify\
2063 ( IN POWER_STATE PowerState\
2064 )
2065
2066
2067#undef INTERFACE
2068
2069/* ===============================================================
2070 IPinCount Interface
2071*/
2072#if (NTDDI_VERSION >= NTDDI_WINXP)
2073
2074#undef INTERFACE
2075#define INTERFACE IPinCount
2076
2077DEFINE_GUID(IID_IPinCount, 0x5dadb7dcL, 0xa2cb, 0x4540, 0xa4, 0xa8, 0x42, 0x5e, 0xe4, 0xae, 0x90, 0x51);
2078
2080{
2082
2084 IN ULONG PinId,
2085 IN OUT PULONG FilterNecessary,
2086 IN OUT PULONG FilterCurrent,
2087 IN OUT PULONG FilterPossible,
2088 IN OUT PULONG GlobalCurrent,
2089 IN OUT PULONG GlobalPossible) PURE;
2090};
2091typedef IPinCount *PPINCOUNT;
2092
2093#undef INTERFACE
2094#endif
2095
2096
2097/* ===============================================================
2098 IPortEvents Interface
2099*/
2100
2101#undef INTERFACE
2102#define INTERFACE IPortEvents
2103
2104DEFINE_GUID(IID_IPortEvents, 0xA80F29C4L, 0x5498, 0x11D2, 0x95, 0xD9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3);
2106{
2108
2109 STDMETHOD_(void,AddEventToEventList)(THIS_
2110 IN PKSEVENT_ENTRY EventEntry)PURE;
2111
2112 STDMETHOD_(void,GenerateEventList)(THIS_
2114 IN ULONG EventId,
2115 IN BOOL PinEvent,
2116 IN ULONG PinId,
2117 IN BOOL NodeEvent,
2118 IN ULONG NodeId)PURE;
2119};
2120
2121typedef IPortEvents *PPORTEVENTS;
2122
2123
2124#define IMP_IPortEvents \
2125 STDMETHODIMP_(void) AddEventToEventList( \
2126 IN PKSEVENT_ENTRY EventEntry); \
2127 \
2128 STDMETHODIMP_(void) GenerateEventList( \
2129 IN GUID* Set OPTIONAL, \
2130 IN ULONG EventId, \
2131 IN BOOL PinEvent, \
2132 IN ULONG PinId, \
2133 IN BOOL NodeEvent, \
2134 IN ULONG NodeId)
2135
2136/* ===============================================================
2137 IDrmPort / IDrmPort2 Interfaces
2138 These are almost identical, except for the addition of two extra methods.
2139*/
2140
2141#undef INTERFACE
2142#define INTERFACE IDrmPort
2143
2144#if (NTDDI_VERSION >= NTDDI_WINXP)
2145DEFINE_GUID(IID_IDrmPort, 0x286D3DF8L, 0xCA22, 0x4E2E, 0xB9, 0xBC, 0x20, 0xB4, 0xF0, 0xE2, 0x01, 0xCE);
2146#endif
2147
2148#define DEFINE_ABSTRACT_DRMPORT() \
2149 STDMETHOD_(NTSTATUS,CreateContentMixed)(THIS_ \
2150 IN PULONG paContentId, \
2151 IN ULONG cContentId, \
2152 OUT PULONG pMixedContentId)PURE; \
2153 \
2154 STDMETHOD_(NTSTATUS,DestroyContent)(THIS_ \
2155 IN ULONG ContentId)PURE; \
2156 \
2157 STDMETHOD_(NTSTATUS,ForwardContentToFileObject)(THIS_ \
2158 IN ULONG ContentId, \
2159 IN PFILE_OBJECT FileObject)PURE; \
2160 \
2161 STDMETHOD_(NTSTATUS,ForwardContentToInterface)(THIS_ \
2162 IN ULONG ContentId, \
2163 IN PUNKNOWN pUnknown, \
2164 IN ULONG NumMethods)PURE; \
2165 \
2166 STDMETHOD_(NTSTATUS,GetContentRights)(THIS_ \
2167 IN ULONG ContentId, \
2168 OUT PDRMRIGHTS DrmRights)PURE;
2169
2171{
2174};
2175
2176typedef IDrmPort *PDRMPORT;
2177
2178#define IMP_IDrmPort \
2179 STDMETHODIMP_(NTSTATUS) CreateContentMixed( \
2180 IN PULONG paContentId, \
2181 IN ULONG cContentId, \
2182 OUT PULONG pMixedContentId); \
2183 \
2184 STDMETHODIMP_(NTSTATUS) DestroyContent( \
2185 IN ULONG ContentId); \
2186 \
2187 STDMETHODIMP_(NTSTATUS) ForwardContentToFileObject( \
2188 IN ULONG ContentId, \
2189 IN PFILE_OBJECT FileObject); \
2190 \
2191 STDMETHODIMP_(NTSTATUS) ForwardContentToInterface( \
2192 IN ULONG ContentId, \
2193 IN PUNKNOWN pUnknown, \
2194 IN ULONG NumMethods); \
2195 \
2196 STDMETHODIMP_(NTSTATUS) GetContentRights( \
2197 IN ULONG ContentId, \
2198 OUT PDRMRIGHTS DrmRights)
2199
2200
2201/* ===============================================================
2202 IDrmPort2 Interface
2203*/
2204
2205#undef INTERFACE
2206#define INTERFACE IDrmPort2
2207
2208#if (NTDDI_VERSION >= NTDDI_WINXP)
2209DEFINE_GUID(IID_IDrmPort2, 0x1ACCE59CL, 0x7311, 0x4B6B, 0x9F, 0xBA, 0xCC, 0x3B, 0xA5, 0x9A, 0xCD, 0xCE);
2210#endif
2211
2212DECLARE_INTERFACE_(IDrmPort2, IDrmPort)
2213{
2216
2217 STDMETHOD_(NTSTATUS,AddContentHandlers)(THIS_
2218 IN ULONG ContentId,
2219 IN PVOID * paHandlers,
2221
2222 STDMETHOD_(NTSTATUS,ForwardContentToDeviceObject)(THIS_
2223 IN ULONG ContentId,
2225 IN PCDRMFORWARD DrmForward)PURE;
2226};
2227
2228typedef IDrmPort2 *PDRMPORT2;
2229
2230#define IMP_IDrmPort2 \
2231 IMP_IDrmPort; \
2232 STDMETHODIMP_(NTSTATUS) AddContentHandlers( \
2233 IN ULONG ContentId, \
2234 IN PVOID * paHandlers, \
2235 IN ULONG NumHandlers); \
2236 \
2237 STDMETHODIMP_(NTSTATUS) ForwardContentToDeviceObject( \
2238 IN ULONG ContentId, \
2239 IN PVOID Reserved, \
2240 IN PCDRMFORWARD DrmForward)
2241
2242
2243/* ===============================================================
2244 IPortClsVersion Interface
2245*/
2246#undef INTERFACE
2247#define INTERFACE IPortClsVersion
2248
2249#if (NTDDI_VERSION >= NTDDI_WINXP)
2250DEFINE_GUID(IID_IPortClsVersion, 0x7D89A7BBL, 0x869B, 0x4567, 0x8D, 0xBE, 0x1E, 0x16, 0x8C, 0xC8, 0x53, 0xDE);
2251#endif
2252
2254{
2256
2258};
2259
2260#define IMP_IPortClsVersion \
2261 STDMETHODIMP_(DWORD) GetVersion(void);
2262
2263typedef IPortClsVersion *PPORTCLSVERSION;
2264
2265#undef INTERFACE
2266
2267#if (NTDDI_VERSION >= NTDDI_WINXP)
2268DEFINE_GUID(IID_IMusicTechnology,
22690x80396C3CL, 0xCBCB, 0x409B, 0x9F, 0x65, 0x4F, 0x1E, 0x74, 0x67, 0xCD, 0xAF);
2270#endif
2271
2272/* ===============================================================
2273 IDmaOperations Interface
2274*/
2275
2276/* ===============================================================
2277 IPreFetchOffset Interface
2278*/
2279#undef INTERFACE
2280#define INTERFACE IPreFetchOffset
2281
2282#if (NTDDI_VERSION >= NTDDI_WINXP)
2283DEFINE_GUID(IID_IPreFetchOffset, 0x7000f480L, 0xed44, 0x4e8b, 0xb3, 0x8a, 0x41, 0x2f, 0x8d, 0x7a, 0x50, 0x4d);
2284#endif
2285
2287{
2289
2290 STDMETHOD_(DWORD, SetPreFetchOffset)(THIS_
2291 IN ULONG PreFetchOffset) PURE;
2292};
2293
2294#define IMP_IPreFetchOffset \
2295 STDMETHODIMP_(DWORD) SetPreFetchOffset(IN ULONG PreFetchOffset);
2296
2297typedef IPreFetchOffset *PPREFETCHOFFSET;
2298
2299/* ===============================================================
2300 PortCls API Functions
2301*/
2302
2306 IN PIRP Irp,
2308
2309/* This is in NTDDK.H */
2310/*
2311typedef NTSTATUS (*PDRIVER_ADD_DEVICE)(
2312 IN struct _DRIVER_OBJECT* DriverObject,
2313 IN struct _DEVICE_OBJECT* PhysicalDeviceObject);
2314*/
2315
2321 IN ULONG MaxObjects,
2322 IN ULONG DeviceExtensionSize);
2323
2327 IN PUNICODE_STRING RegistryPathName,
2329
2330/* ===============================================================
2331 Factories (TODO: Move elsewhere)
2332*/
2333
2336 OUT PDMACHANNEL* OutDmaChannel,
2337 IN PUNKNOWN OuterUnknown OPTIONAL,
2341
2344 OUT PINTERRUPTSYNC* OUtInterruptSync,
2345 IN PUNKNOWN OuterUnknown OPTIONAL,
2347 IN ULONG ResourceIndex,
2349
2352 OUT PMINIPORT* OutMiniport,
2353 IN REFCLSID ClassId);
2354
2356PcNewPort(
2357 OUT PPORT* OutPort,
2358 IN REFCLSID ClassId);
2359
2362 OUT PREGISTRYKEY* OutRegistryKey,
2363 IN PUNKNOWN OuterUnknown OPTIONAL,
2364 IN ULONG RegistryKeyType,
2367 IN PVOID SubDevice OPTIONAL,
2371
2374 OUT PRESOURCELIST* OutResourceList,
2375 IN PUNKNOWN OuterUnknown OPTIONAL,
2377 IN PCM_RESOURCE_LIST TranslatedResources,
2378 IN PCM_RESOURCE_LIST UntranslatedResources);
2379
2382 OUT PRESOURCELIST* OutResourceList,
2383 IN PUNKNOWN OuterUnknown OPTIONAL,
2385 IN PRESOURCELIST ParentList,
2386 IN ULONG MaximumEntries);
2387
2390 OUT PSERVICEGROUP* OutServiceGroup,
2391 IN PUNKNOWN OuterUnknown OPTIONAL);
2392
2393
2394/* ===============================================================
2395 IRP Handling
2396*/
2397
2401 IN PIRP Irp);
2402
2406 IN PIRP Irp,
2408
2412 IN PIRP Irp);
2413
2414/* ===============================================================
2415 Power Management
2416*/
2417
2421 IN PVOID pvContext1);
2422
2426
2430 IN DEVICE_POWER_STATE RequestedNewState);
2431
2432/* ===============================================================
2433 Properties
2434*/
2435
2443
2446 IN PPCPROPERTY_REQUEST PropertyRequest,
2447 IN NTSTATUS NtStatus);
2448
2449/* ===============================================================
2450 I/O Timeouts
2451*/
2452
2456 IN PIO_TIMER_ROUTINE pTimerRoutine,
2457 IN PVOID pContext);
2458
2462 IN PIO_TIMER_ROUTINE pTimerRoutine,
2463 IN PVOID pContext);
2464
2465/* ===============================================================
2466 Physical Connections
2467*/
2468
2472 IN PUNKNOWN FromUnknown,
2473 IN ULONG FromPin,
2474 IN PUNKNOWN ToUnknown,
2475 IN ULONG ToPin);
2476
2480 IN PUNICODE_STRING FromString,
2481 IN ULONG FromPin,
2482 IN PUNKNOWN ToUnknown,
2483 IN ULONG ToPin);
2484
2488 IN PUNKNOWN FromUnknown,
2489 IN ULONG FromPin,
2491 IN ULONG ToPin);
2492
2493/* ===============================================================
2494 Misc
2495*/
2496
2499 IN ULONGLONG Since);
2500
2501#define GTI_SECONDS(t) (ULONGLONG(t)*10000000)
2502#define GTI_MILLISECONDS(t) (ULONGLONG(t)*10000)
2503#define GTI_MICROSECONDS(t) (ULONGLONG(t)*10)
2504
2508 IN PWCHAR Name,
2510
2511/* ===============================================================
2512 Digital Rights Management Functions
2513 Implemented in XP and above
2514*/
2515
2518 IN ULONG ContentId,
2519 IN PVOID *paHandlers,
2521
2524 IN PULONG paContentId,
2527
2530 IN ULONG ContentId);
2531
2534 IN ULONG ContentId,
2536 IN PCDRMFORWARD DrmForward);
2537
2540 IN ULONG ContentId,
2542
2545 IN ULONG ContentId,
2548
2551 IN ULONG ContentId,
2553
2554#endif /* PORTCLS_H */
WCHAR First[]
Definition: FormatMessage.c:11
unsigned char BOOLEAN
Type
Definition: Type.h:7
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn UINT32 *TableIdx UINT32 ACPI_TABLE_HEADER *OutTableHeader ACPI_TABLE_HEADER **OutTable ACPI_HANDLE UINT32 ACPI_WALK_CALLBACK ACPI_WALK_CALLBACK void void **ReturnValue UINT32 ACPI_BUFFER *RetPathPtr ACPI_OBJECT_HANDLER void *Data ACPI_OBJECT_HANDLER void **Data ACPI_STRING ACPI_OBJECT_LIST ACPI_BUFFER *ReturnObjectBuffer ACPI_DEVICE_INFO **ReturnBuffer ACPI_HANDLE Parent
Definition: acpixf.h:732
IPortWaveRT * PPORTWAVERT
Definition: interfaces.hpp:681
LONG NTSTATUS
Definition: precomp.h:26
BOOL DeleteKey(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath)
Definition: edit.c:1938
#define DECLARE_INTERFACE_(i, b)
Definition: basetyps.h:78
#define PURE
Definition: basetyps.h:64
#define THIS_
Definition: basetyps.h:65
#define THIS
Definition: basetyps.h:66
#define STDMETHOD_(t, m)
Definition: basetyps.h:63
PDEVICE_OBJECT PhysicalDeviceObject
Definition: btrfs_drv.h:1157
struct _Capture Capture
Definition: capture.h:24
_In_ PSCSI_REQUEST_BLOCK _In_opt_ PVOID BufferAddress
Definition: cdrom.h:990
Definition: bufpool.h:45
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:36
_In_ PIRP Irp
Definition: csq.h:116
#define BufferSize
Definition: mmc.h:75
BOOL WINAPI SHIM_OBJ_NAME() Notify(DWORD fdwReason, PVOID ptr)
#define NTSTATUS
Definition: precomp.h:19
GUID IID_IDmaChannelSlave
_In_ ULONG cContentId
Definition: drmk.h:48
_In_ PUNKNOWN pUnknown
Definition: drmk.h:76
_In_ ULONG NumHandlers
Definition: drmk.h:41
_Out_ PDRMRIGHTS DrmRights
Definition: drmk.h:84
_In_ ULONG _Out_ PULONG pMixedContentId
Definition: drmk.h:49
IN PDCB IN VBO IN ULONG IN BOOLEAN Pin
Definition: fatprocs.h:428
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
Status
Definition: gdiplustypes.h:25
static BOOL AddEntry(WCHAR Type, LPCWSTR Value)
Definition: geninst.cpp:217
CPPORT Port[4]
Definition: headless.c:35
_In_ ULONG Mode
Definition: hubbusif.h:303
@ Unknown
Definition: i8042prt.h:114
_In_ PKSALLOCATOR_FRAMING AllocatorFraming
Definition: ks.h:4518
KSSTATE
Definition: ks.h:1214
struct _KSEVENT_ENTRY * PKSEVENT_ENTRY
Definition: ks.h:2101
_In_ PKSPIN_CONNECT Connect
Definition: ks.h:4536
#define DEFINE_GUIDSTRUCT(guid, name)
Definition: ks.h:98
#define DEFINE_ABSTRACT_UNKNOWN()
Definition: ksiface.h:5
DWORD GetPosition(DWORD private_handle, PMMTIME time, DWORD time_size)
@ NumMethods
Definition: actctx.c:1556
static IStream Stream
Definition: htmldoc.c:1115
_In_ PNDIS_STRING _In_ PNDIS_STRING _Out_ PDEVICE_OBJECT * pDeviceObject
Definition: ndis.h:4679
_In_ NDIS_STATUS _In_ ULONG _In_ USHORT _In_opt_ PVOID _In_ ULONG DataSize
Definition: ndis.h:4755
_Must_inspect_result_ _Out_ PNDIS_STATUS _In_ NDIS_HANDLE _In_ PNDIS_STRING SubKeyName
Definition: ndis.h:4725
_In_ BOOLEAN Dma64BitAddresses
Definition: ndis.h:4652
_In_ ULONG _In_ KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass
Definition: cmfuncs.h:94
_In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Reserved_ ULONG _In_opt_ PUNICODE_STRING _In_ ULONG _Out_opt_ PULONG Disposition
Definition: cmfuncs.h:56
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID * BaseAddress
Definition: mmfuncs.h:404
_In_ PCWSTR _Inout_ _At_ QueryTable _Pre_unknown_ PRTL_QUERY_REGISTRY_TABLE QueryTable
Definition: rtlfuncs.h:4220
DWORD Interval
Definition: netstat.c:30
static BOOL StartDevice(IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DevInfoData OPTIONAL, IN BOOL bEnable, IN DWORD HardwareProfile OPTIONAL, OUT BOOL *bNeedReboot OPTIONAL)
Definition: wizard.c:173
ULONG ACCESS_MASK
Definition: nt_native.h:40
enum _KEY_VALUE_INFORMATION_CLASS KEY_VALUE_INFORMATION_CLASS
Definition: reg.c:135
enum _KEY_INFORMATION_CLASS KEY_INFORMATION_CLASS
__GNU_EXTENSION typedef unsigned __int64 * PULONGLONG
Definition: ntbasedef.h:391
__GNU_EXTENSION typedef __int64 * PLONGLONG
Definition: ntbasedef.h:390
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
@ NotificationEvent
enum _DEVICE_POWER_STATE DEVICE_POWER_STATE
@ Service
Definition: ntsecapi.h:292
static BOOL Set
Definition: pageheap.c:10
DRIVER_ADD_DEVICE AddDevice
Definition: parport.h:72
IMiniportWaveCyclic * PMINIPORTWAVECYCLIC
Definition: portcls.h:1543
struct PCCONNECTION_DESCRIPTOR * PPCCONNECTION_DESCRIPTOR
PORTCLASSAPI NTSTATUS NTAPI PcRegisterAdapterPowerManagement(IN PUNKNOWN pUnknown, IN PVOID pvContext1)
Definition: power.cpp:16
IRegistryKey * PREGISTRYKEY
Definition: portcls.h:1009
#define DEFINE_ABSTRACT_DMACHANNELSLAVE()
Definition: portcls.h:791
IMiniportMidiStream * PMINIPORTMIDISTREAM
Definition: portcls.h:1342
IDmaChannel * PDMACHANNEL
Definition: portcls.h:784
NTSTATUS(NTAPI * PCPFNPROPERTY_HANDLER)(IN PPCPROPERTY_REQUEST PropertyRequest)
Definition: portcls.h:233
#define DEFINE_ABSTRACT_DRMPORT()
Definition: portcls.h:2148
NTSTATUS(NTAPI * PCPFNEVENT_HANDLER)(IN struct _PCEVENT_REQUEST *EventRequest)
Definition: portcls.h:273
IPortWaveRT * PPORTWAVERT
Definition: portcls.h:1785
IMiniportWaveRT * PMINIPORTWAVERT
Definition: portcls.h:1983
PORTCLASSAPI NTSTATUS NTAPI PcCompleteIrp(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN NTSTATUS Status)
Definition: irp.cpp:458
IPortMidi * PPORTMIDI
Definition: portcls.h:1132
PORTCLASSAPI NTSTATUS NTAPI PcNewPort(OUT PPORT *OutPort, IN REFCLSID ClassId)
Definition: port.cpp:17
IPinCount * PPINCOUNT
Definition: portcls.h:2091
struct _PCEVENT_REQUEST PCEVENT_REQUEST
IInterruptSync * PINTERRUPTSYNC
Definition: portcls.h:888
IMiniportTopology * PMINIPORTTOPOLOGY
Definition: portcls.h:1443
struct _PCMETHOD_REQUEST PCMETHOD_REQUEST
IServiceSink * PSERVICESINK
Definition: portcls.h:569
struct _PCEVENT_ITEM PCEVENT_ITEM
PORTCLASSAPI NTSTATUS NTAPI PcForwardIrpSynchronous(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: irp.cpp:509
PORTCLASSAPI NTSTATUS NTAPI PcForwardContentToInterface(IN ULONG ContentId, IN PUNKNOWN pUnknown, IN ULONG NumMethods)
Definition: drm.cpp:68
PORTCLASSAPI NTSTATUS NTAPI PcRegisterSubdevice(IN PDEVICE_OBJECT DeviceObject, IN PWCHAR Name, IN PUNKNOWN Unknown)
Definition: adapter.cpp:206
IMiniportWavePciStream * PMINIPORTWAVEPCISTREAM
Definition: portcls.h:1643
PORTCLASSAPI NTSTATUS NTAPI PcNewResourceSublist(OUT PRESOURCELIST *OutResourceList, IN PUNKNOWN OuterUnknown OPTIONAL, IN POOL_TYPE PoolType, IN PRESOURCELIST ParentList, IN ULONG MaximumEntries)
Definition: resource.cpp:395
PORTCLASSAPI NTSTATUS NTAPI PcNewInterruptSync(OUT PINTERRUPTSYNC *OUtInterruptSync, IN PUNKNOWN OuterUnknown OPTIONAL, IN PRESOURCELIST ResourceList, IN ULONG ResourceIndex, IN INTERRUPTSYNCMODE Mode)
Definition: interrupt.cpp:295
IResourceList * PRESOURCELIST
Definition: portcls.h:442
PORTCLASSAPI NTSTATUS NTAPI PcDispatchIrp(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: irp.cpp:409
PORTCLASSAPI NTSTATUS NTAPI PcNewMiniport(OUT PMINIPORT *OutMiniport, IN REFCLSID ClassId)
Definition: miniport.cpp:45
IMiniport * PMINIPORT
Definition: portcls.h:1309
IPortWavePciStream * PPORTWAVEPCISTREAM
Definition: portcls.h:1590
#define DEFINE_ABSTRACT_MINIPORTWAVERTSTREAM()
Definition: portcls.h:1721
#define DEFINE_ABSTRACT_PORT()
Definition: portcls.h:1047
IPortEvents * PPORTEVENTS
Definition: portcls.h:2121
IMiniportWaveRTStream * PMINIPORTWAVERTSTREAM
Definition: portcls.h:1865
@ kVersionWinServer2003_UAAQFE
Definition: portcls.h:221
@ kVersionInvalid
Definition: portcls.h:207
@ kVersionWin2K_SP2
Definition: portcls.h:212
@ kVersionWin2K
Definition: portcls.h:210
@ kVersionWinServer2003
Definition: portcls.h:218
@ kVersionWin2K_UAAQFE
Definition: portcls.h:219
@ kVersionWin98SE
Definition: portcls.h:209
@ kVersionWinXP
Definition: portcls.h:216
@ kVersionWinXP_UAAQFE
Definition: portcls.h:220
@ kVersionWin98SE_QFE2
Definition: portcls.h:211
@ kVersionWin98
Definition: portcls.h:208
@ kVersionWinME_QFE1
Definition: portcls.h:215
@ kVersionWinXPSP1
Definition: portcls.h:217
@ kVersionWin98SE_QFE3
Definition: portcls.h:214
@ kVersionWinME
Definition: portcls.h:213
PORTCLASSAPI NTSTATUS NTAPI PcInitializeAdapterDriver(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPathName, IN PDRIVER_ADD_DEVICE AddDevice)
Definition: adapter.cpp:29
PORTCLASSAPI NTSTATUS NTAPI PcDestroyContent(IN ULONG ContentId)
Definition: drm.cpp:38
IDmaChannelSlave * PDMACHANNELSLAVE
Definition: portcls.h:831
struct _PCPROPERTY_REQUEST * PPCPROPERTY_REQUEST
Definition: portcls.h:230
IPortWaveRTStream * PPORTWAVERTSTREAM
Definition: portcls.h:1847
IAdapterPowerManagement * PADAPTERPOWERMANAGEMENT
Definition: portcls.h:2039
IMusicTechnology * PMUSICTECHNOLOGY
Definition: portcls.h:1028
IUnregisterSubdevice * PUNREGISTERSUBDEVICE
Definition: portcls.h:635
IPortClsVersion * PPORTCLSVERSION
Definition: portcls.h:2263
PORTCLASSAPI NTSTATUS NTAPI PcCompletePendingPropertyRequest(IN PPCPROPERTY_REQUEST PropertyRequest, IN NTSTATUS NtStatus)
Definition: api.cpp:181
PORTCLASSAPI NTSTATUS NTAPI PcCreateContentMixed(IN PULONG paContentId, IN ULONG cContentId, OUT PULONG pMixedContentId)
Definition: drm.cpp:27
PORTCLASSAPI NTSTATUS NTAPI PcRegisterIoTimeout(IN PDEVICE_OBJECT pDeviceObject, IN PIO_TIMER_ROUTINE pTimerRoutine, IN PVOID pContext)
Definition: api.cpp:76
PORTCLASSAPI NTSTATUS NTAPI PcRegisterPhysicalConnectionToExternal(IN PDEVICE_OBJECT DeviceObject, IN PUNKNOWN FromUnknown, IN ULONG FromPin, IN PUNICODE_STRING ToString, IN ULONG ToPin)
Definition: connection.cpp:294
PORTCLASSAPI NTSTATUS NTAPI PcRegisterPhysicalConnection(IN PDEVICE_OBJECT DeviceObject, IN PUNKNOWN FromUnknown, IN ULONG FromPin, IN PUNKNOWN ToUnknown, IN ULONG ToPin)
Definition: connection.cpp:259
IUnregisterPhysicalConnection * PUNREGISTERPHYSICALCONNECTION
Definition: portcls.h:677
PORTCLASSAPI ULONGLONG NTAPI PcGetTimeInterval(IN ULONGLONG Since)
Definition: api.cpp:34
IMiniportWaveCyclicStream * PMINIPORTWAVECYCLICSTREAM
Definition: portcls.h:1487
#define DEFINE_ABSTRACT_MINIPORT()
Definition: portcls.h:1279
PORTCLASSAPI NTSTATUS NTAPI PcGetContentRights(IN ULONG ContentId, OUT PDRMRIGHTS DrmRights)
Definition: drm.cpp:78
#define PORTCLASSAPI
Definition: portcls.h:148
struct PCPROPERTY_ITEM * PPCPROPERTY_ITEM
IPreFetchOffset * PPREFETCHOFFSET
Definition: portcls.h:2297
PORTCLASSAPI NTSTATUS NTAPI PcForwardContentToDeviceObject(IN ULONG ContentId, IN PVOID Reserved, IN PCDRMFORWARD DrmForward)
Definition: drm.cpp:47
IPortWaveCyclic * PPORTWAVECYCLIC
Definition: portcls.h:1184
PORTCLASSAPI NTSTATUS NTAPI PcUnregisterIoTimeout(IN PDEVICE_OBJECT pDeviceObject, IN PIO_TIMER_ROUTINE pTimerRoutine, IN PVOID pContext)
Definition: api.cpp:134
NTSTATUS(NTAPI * PCPFNSTARTDEVICE)(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PRESOURCELIST ResourceList)
Definition: portcls.h:2304
PORTCLASSAPI NTSTATUS NTAPI PcRequestNewPowerState(IN PDEVICE_OBJECT pDeviceObject, IN DEVICE_POWER_STATE RequestedNewState)
Definition: power.cpp:85
PORTCLASSAPI NTSTATUS NTAPI PcRegisterPhysicalConnectionFromExternal(IN PDEVICE_OBJECT DeviceObject, IN PUNICODE_STRING FromString, IN ULONG FromPin, IN PUNKNOWN ToUnknown, IN ULONG ToPin)
Definition: connection.cpp:277
PORTCLASSAPI NTSTATUS NTAPI PcNewServiceGroup(OUT PSERVICEGROUP *OutServiceGroup, IN PUNKNOWN OuterUnknown OPTIONAL)
struct _PCMETHOD_REQUEST * PPCMETHOD_REQUEST
PORTCLASSAPI NTSTATUS NTAPI PcNewRegistryKey(OUT PREGISTRYKEY *OutRegistryKey, IN PUNKNOWN OuterUnknown OPTIONAL, IN ULONG RegistryKeyType, IN ACCESS_MASK DesiredAccess, IN PVOID DeviceObject OPTIONAL, IN PVOID SubDevice OPTIONAL, IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, IN ULONG CreateOptions OPTIONAL, OUT PULONG Disposition OPTIONAL)
Definition: registry.cpp:264
PORTCLASSAPI NTSTATUS NTAPI PcForwardContentToFileObject(IN ULONG ContentId, IN PFILE_OBJECT FileObject)
Definition: drm.cpp:58
struct _PCEVENT_REQUEST * PPCEVENT_REQUEST
struct PCFILTER_DESCRIPTOR * PPCFILTER_DESCRIPTOR
NTSTATUS(NTAPI * PINTERRUPTSYNCROUTINE)(IN struct IInterruptSync *InterruptSync, IN PVOID DynamicContext)
Definition: portcls.h:847
IDrmPort2 * PDRMPORT2
Definition: portcls.h:2228
struct _PCMETHOD_ITEM * PPCMETHOD_ITEM
PORTCLASSAPI NTSTATUS NTAPI PcNewResourceList(OUT PRESOURCELIST *OutResourceList, IN PUNKNOWN OuterUnknown OPTIONAL, IN POOL_TYPE PoolType, IN PCM_RESOURCE_LIST TranslatedResources, IN PCM_RESOURCE_LIST UntranslatedResources)
Definition: resource.cpp:295
#define DEFINE_ABSTRACT_DMACHANNEL()
Definition: portcls.h:717
IMiniportWavePci * PMINIPORTWAVEPCI
Definition: portcls.h:1697
IServiceGroup * PSERVICEGROUP
Definition: portcls.h:614
struct _PCMETHOD_ITEM PCMETHOD_ITEM
PORTCLASSAPI NTSTATUS NTAPI PcAddContentHandlers(IN ULONG ContentId, IN PVOID *paHandlers, IN ULONG NumHandlers)
Definition: drm.cpp:16
IDrmPort * PDRMPORT
Definition: portcls.h:2176
INTERRUPTSYNCMODE
Definition: portcls.h:839
@ InterruptSyncModeAll
Definition: portcls.h:841
@ InterruptSyncModeNormal
Definition: portcls.h:840
@ InterruptSyncModeRepeat
Definition: portcls.h:842
IMiniportMidi * PMINIPORTMIDI
Definition: portcls.h:1378
struct PCAUTOMATION_TABLE * PPCAUTOMATION_TABLE
struct _PCEVENT_ITEM * PPCEVENT_ITEM
@ DriverRegistryKey
Definition: portcls.h:902
@ GeneralRegistryKey
Definition: portcls.h:900
@ DeviceInterfaceRegistryKey
Definition: portcls.h:904
@ DeviceRegistryKey
Definition: portcls.h:901
@ HwProfileRegistryKey
Definition: portcls.h:903
PORTCLASSAPI NTSTATUS NTAPI PcGetDeviceProperty(IN PVOID DeviceObject, IN DEVICE_REGISTRY_PROPERTY DeviceProperty, IN ULONG BufferLength, OUT PVOID PropertyBuffer, OUT PULONG ResultLength)
Definition: api.cpp:16
struct PCNODE_DESCRIPTOR * PPCNODE_DESCRIPTOR
struct PCPIN_DESCRIPTOR * PPCPIN_DESCRIPTOR
IPortTopology * PPORTTOPOLOGY
Definition: portcls.h:1415
IPowerNotify * PPOWERNOTIFY
Definition: portcls.h:2059
PORTCLASSAPI NTSTATUS NTAPI PcUnregisterAdapterPowerManagement(IN PDEVICE_OBJECT DeviceObject)
Definition: power.cpp:49
NTSTATUS(NTAPI * PCPFNMETHOD_HANDLER)(IN struct _PCMETHOD_REQUEST *MethodRequest)
Definition: portcls.h:296
IPort * PPORT
Definition: portcls.h:1105
PORTCLASSAPI NTSTATUS NTAPI PcAddAdapterDevice(IN PDRIVER_OBJECT DriverObject, IN PDEVICE_OBJECT PhysicalDeviceObject, IN PCPFNSTARTDEVICE StartDevice, IN ULONG MaxObjects, IN ULONG DeviceExtensionSize)
Definition: adapter.cpp:73
IPortWavePci * PPORTWAVEPCI
Definition: portcls.h:1248
PORTCLASSAPI NTSTATUS NTAPI PcNewDmaChannel(OUT PDMACHANNEL *OutDmaChannel, IN PUNKNOWN OuterUnknown OPTIONAL, IN POOL_TYPE PoolType, IN PDEVICE_DESCRIPTION DeviceDescription, IN PDEVICE_OBJECT DeviceObject)
Definition: dma_slave.cpp:479
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
Definition: guiddef.h:68
#define REFCLSID
Definition: guiddef.h:117
DWORD WINAPI GetVersion()
Definition: redirtest.c:5
enum _DMA_SPEED DMA_SPEED
enum _DMA_WIDTH DMA_WIDTH
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
_In_ const GUID _In_ ULONG PinCount
Definition: strmini.h:505
_In_ BOOLEAN Read
Definition: strmini.h:479
Definition: drmk.h:18
const PCPROPERTY_ITEM * Properties
Definition: portcls.h:321
ULONG PropertyItemSize
Definition: portcls.h:319
ULONG EventItemSize
Definition: portcls.h:325
const PCEVENT_ITEM * Events
Definition: portcls.h:327
const PCMETHOD_ITEM * Methods
Definition: portcls.h:324
ULONG PropertyCount
Definition: portcls.h:320
ULONG MethodItemSize
Definition: portcls.h:322
ULONG ConnectionCount
Definition: portcls.h:362
const PCNODE_DESCRIPTOR * Nodes
Definition: portcls.h:361
const GUID * Categories
Definition: portcls.h:365
const PCCONNECTION_DESCRIPTOR * Connections
Definition: portcls.h:363
const PCPIN_DESCRIPTOR * Pins
Definition: portcls.h:358
const PCAUTOMATION_TABLE * AutomationTable
Definition: portcls.h:355
const PCAUTOMATION_TABLE * AutomationTable
Definition: portcls.h:348
const GUID * Name
Definition: portcls.h:350
const GUID * Type
Definition: portcls.h:349
ULONG MaxGlobalInstanceCount
Definition: portcls.h:339
ULONG MinFilterInstanceCount
Definition: portcls.h:341
KSPIN_DESCRIPTOR KsPinDescriptor
Definition: portcls.h:343
const PCAUTOMATION_TABLE * AutomationTable
Definition: portcls.h:342
ULONG MaxFilterInstanceCount
Definition: portcls.h:340
const GUID * Set
Definition: portcls.h:237
PCPFNPROPERTY_HANDLER Handler
Definition: portcls.h:253
PCPFNEVENT_HANDLER Handler
Definition: portcls.h:280
ULONG Flags
Definition: portcls.h:279
ULONG Id
Definition: portcls.h:278
const GUID * Set
Definition: portcls.h:277
PKSEVENT_ENTRY EventEntry
Definition: portcls.h:288
PUNKNOWN MinorTarget
Definition: portcls.h:285
const PCEVENT_ITEM * EventItem
Definition: portcls.h:287
PUNKNOWN MajorTarget
Definition: portcls.h:284
const GUID * Set
Definition: portcls.h:300
ULONG Flags
Definition: portcls.h:302
PCPFNMETHOD_HANDLER Handler
Definition: portcls.h:303
PUNKNOWN MajorTarget
Definition: portcls.h:307
PUNKNOWN MinorTarget
Definition: portcls.h:308
const PCMETHOD_ITEM * MethodItem
Definition: portcls.h:310
PUNKNOWN MinorTarget
Definition: portcls.h:259
const PCPROPERTY_ITEM * PropertyItem
Definition: portcls.h:261
PUNKNOWN MajorTarget
Definition: portcls.h:258
static COORD Position
Definition: mouse.c:34
#define OPTIONAL
Definition: typedefs.h:41
uint32_t * PULONG
Definition: typedefs.h:59
INT POOL_TYPE
Definition: typedefs.h:78
#define NTAPI
Definition: typedefs.h:36
ULONG_PTR SIZE_T
Definition: typedefs.h:80
#define IN
Definition: typedefs.h:39
uint16_t * PWCHAR
Definition: typedefs.h:56
uint32_t ULONG
Definition: typedefs.h:59
uint64_t ULONGLONG
Definition: typedefs.h:67
#define OUT
Definition: typedefs.h:40
static BOOL Write(PBYTE Address, PBYTE Data, SIZE_T Size)
Definition: vmhorizon.c:15
_In_ WDFCOLLECTION _In_ ULONG Index
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG _Out_ PULONG ResultLength
Definition: wdfdevice.h:3776
_Must_inspect_result_ _In_ WDFDEVICE _In_ BOOLEAN _In_opt_ PVOID Tag
Definition: wdfdevice.h:4065
_Must_inspect_result_ _In_ WDFDEVICE _In_ ULONG _In_ ACCESS_MASK DesiredAccess
Definition: wdfdevice.h:2658
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE PoolType
Definition: wdfdevice.h:3815
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
Definition: wdfdevice.h:550
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ ULONG _Out_ PVOID PropertyBuffer
Definition: wdfdevice.h:4437
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY DeviceProperty
Definition: wdfdevice.h:3769
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG BufferLength
Definition: wdfdevice.h:3771
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_ WDF_DEVICE_POWER_STATE PowerState
Definition: wdfdevice.h:3034
_Must_inspect_result_ _In_ WDFDMATRANSACTION _In_ PFN_WDF_PROGRAM_DMA _In_ WDF_DMA_DIRECTION _In_ PMDL _In_ PVOID VirtualAddress
_In_ WDFDMATRANSACTION _In_ size_t MaximumLength
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
Definition: wdfdriver.h:213
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PLONGLONG _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_opt_ PULONG_PTR BytesWritten
Definition: wdfiotarget.h:960
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PLONGLONG _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_opt_ PULONG_PTR BytesRead
Definition: wdfiotarget.h:870
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_ PCUNICODE_STRING DeviceDescription
Definition: wdfpdo.h:432
_Must_inspect_result_ _In_opt_ WDFKEY _In_ PCUNICODE_STRING _In_ ACCESS_MASK _In_ ULONG CreateOptions
Definition: wdfregistry.h:118
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING ValueName
Definition: wdfregistry.h:243
_Must_inspect_result_ _In_ WDFIORESREQLIST _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFIORESLIST * ResourceList
Definition: wdfresource.h:309
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS PhysicalAddress
Definition: iotypes.h:1098
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _In_ LARGE_INTEGER ByteCount
Definition: iotypes.h:1099
DRIVER_ADD_DEVICE * PDRIVER_ADD_DEVICE
Definition: iotypes.h:2216
DEVICE_REGISTRY_PROPERTY
Definition: iotypes.h:1194
_In_ struct _IRP _In_ struct _SCATTER_GATHER_LIST * ScatterGather
Definition: iotypes.h:2375
* PFILE_OBJECT
Definition: iotypes.h:1998
* PDEVICE_CAPABILITIES
Definition: iotypes.h:965
IO_TIMER_ROUTINE * PIO_TIMER_ROUTINE
Definition: iotypes.h:2863
_Must_inspect_result_ _In_ PHYSICAL_ADDRESS HighAddress
Definition: mmfuncs.h:226
_Inout_ PMDL MemoryDescriptorList
Definition: mmfuncs.h:405
_Must_inspect_result_ _In_ PHYSICAL_ADDRESS _In_ PHYSICAL_ADDRESS _In_opt_ PHYSICAL_ADDRESS _In_ MEMORY_CACHING_TYPE CacheType
Definition: mmfuncs.h:217
_Must_inspect_result_ _In_ PHYSICAL_ADDRESS _In_ PHYSICAL_ADDRESS _In_ SIZE_T TotalBytes
Definition: mmfuncs.h:228
enum _MEMORY_CACHING_TYPE MEMORY_CACHING_TYPE
std::string ToString(XMLHandle node)
Definition: xml2sdb.cpp:59
_In_ ULONG _In_ KEY_INFORMATION_CLASS KeyInformationClass
Definition: zwfuncs.h:167