ReactOS  0.4.14-dev-52-g6116262
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
129 extern "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 
163 DEFINE_GUID(CLSID_MiniportDriverFmSynth, 0xb4c90ae0L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
164 DEFINE_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 
206 enum {
219  kVersionWin2K_UAAQFE, /* These support IUnregister* interface */
222 };
223 
224 /* ===============================================================
225  Properties
226 */
227 
228 struct _PCPROPERTY_REQUEST;
229 
231 
232 typedef NTSTATUS
234  IN PPCPROPERTY_REQUEST PropertyRequest);
235 
236 typedef 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 
270 struct _PCEVENT_REQUEST;
271 
272 typedef NTSTATUS
273 (NTAPI *PCPFNEVENT_HANDLER)(
274  IN struct _PCEVENT_REQUEST* EventRequest);
275 
276 typedef struct _PCEVENT_ITEM {
277  const GUID* Set;
280  PCPFNEVENT_HANDLER Handler;
282 
283 typedef struct _PCEVENT_REQUEST {
292 
293 struct _PCMETHOD_REQUEST;
294 
295 typedef NTSTATUS
296 (NTAPI *PCPFNMETHOD_HANDLER)(
297  IN struct _PCMETHOD_REQUEST* MethodRequest);
298 
299 typedef struct _PCMETHOD_ITEM {
300  const GUID* Set;
303  PCPFNMETHOD_HANDLER Handler;
305 
306 typedef struct _PCMETHOD_REQUEST {
313 
314 /* ===============================================================
315  Structures (unsorted)
316 */
317 
318 typedef struct {
330 
331 typedef struct {
337 
338 typedef struct {
343  KSPIN_DESCRIPTOR KsPinDescriptor;
345 
346 typedef struct {
349  const GUID* Type;
350  const GUID* Name;
352 
353 typedef struct {
365  const GUID* Categories;
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 
385 DEFINE_GUID(IID_IResourceList, 0x22C6AC60L, 0x851B, 0x11D0, 0x9A, 0x7F, 0x00, 0xAA, 0x00, 0x38, 0xAC, 0xFE);
386 
387 DECLARE_INTERFACE_(IResourceList, IUnknown) {
389 
390  STDMETHOD_(ULONG, NumberOfEntries)( THIS ) PURE;
391 
392  STDMETHOD_(ULONG, NumberOfEntriesOfType)( THIS_
393  IN CM_RESOURCE_TYPE Type) PURE;
394 
395  STDMETHOD_(PCM_PARTIAL_RESOURCE_DESCRIPTOR, FindTranslatedEntry)( THIS_
396  IN CM_RESOURCE_TYPE Type,
397  IN ULONG Index) PURE;
398 
399  STDMETHOD_(PCM_PARTIAL_RESOURCE_DESCRIPTOR, FindUntranslatedEntry)( THIS_
400  IN CM_RESOURCE_TYPE Type,
401  IN ULONG Index) PURE;
402 
403  STDMETHOD_(NTSTATUS, AddEntry)( THIS_
406 
407  STDMETHOD_(NTSTATUS, AddEntryFromParent)( THIS_
408  IN IResourceList* Parent,
409  IN CM_RESOURCE_TYPE Type,
410  IN ULONG Index) PURE;
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 
442 typedef 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 
559 DEFINE_GUID(IID_IServiceSink, 0x22C6AC64L, 0x851B, 0x11D0, 0x9A, 0x7F, 0x00, 0xAA, 0x00, 0x38, 0xAC, 0xFE);
560 
561 DECLARE_INTERFACE_(IServiceSink, IUnknown) {
563  STDMETHOD_(void, RequestService)( THIS ) PURE;
564 };
565 
566 #define IMP_IServiceSink \
567  STDMETHODIMP_(void) RequestService(void);
568 
569 typedef IServiceSink *PSERVICESINK;
570 
571 /* ===============================================================
572  IServiceGroup Interface
573 */
574 #undef INTERFACE
575 #define INTERFACE IServiceGroup
576 
577 DEFINE_GUID(IID_IServiceGroup, 0x22C6AC65L, 0x851B, 0x11D0, 0x9A, 0x7F, 0x00, 0xAA, 0x00, 0x38, 0xAC, 0xFE);
578 
579 DECLARE_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 
614 typedef IServiceGroup *PSERVICEGROUP;
615 
616 
617 #if (NTDDI_VERSION >= NTDDI_WS03)
618 /* ===============================================================
619  IUnregisterSubdevice Interface
620 */
621 
622 DEFINE_GUID(IID_IUnregisterSubdevice, 0x16738177L, 0xe199, 0x41f9, 0x9a, 0x87, 0xab, 0xb2, 0xa5, 0x43, 0x2f, 0x21);
623 
624 #undef INTERFACE
625 #define INTERFACE IUnregisterSubdevice
626 
627 DECLARE_INTERFACE_(IUnregisterSubdevice,IUnknown) {
629 
630  STDMETHOD_(NTSTATUS,UnregisterSubdevice)(THIS_
633 };
634 
635 typedef 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 
649 DEFINE_GUID(IID_IUnregisterPhysicalConnection, 0x6c38e231L, 0x2a0d, 0x428d, 0x81, 0xf8, 0x07, 0xcc, 0x42, 0x8b, 0xb9, 0xa4);
650 
651 DECLARE_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 
677 typedef 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 #define DEFINE_ABSTRACT_DMACHANNEL() \
708  STDMETHOD_(NTSTATUS, AllocateBuffer)( THIS_ \
709  IN ULONG BufferSize, \
710  IN PPHYSICAL_ADDRESS PhysicalAddressConstraint OPTIONAL) PURE; \
711 \
712  STDMETHOD_(void, FreeBuffer)( THIS ) PURE; \
713  STDMETHOD_(ULONG, TransferCount)( THIS ) PURE; \
714  STDMETHOD_(ULONG, MaximumBufferSize)( THIS ) PURE; \
715  STDMETHOD_(ULONG, AllocatedBufferSize)( THIS ) PURE; \
716  STDMETHOD_(ULONG, BufferSize)( THIS ) PURE; \
717 \
718  STDMETHOD_(void, SetBufferSize)( THIS_ \
719  IN ULONG BufferSize) PURE; \
720 \
721  STDMETHOD_(PVOID, SystemAddress)( THIS ) PURE; \
722  STDMETHOD_(PHYSICAL_ADDRESS, PhysicalAddress)( THIS ) PURE; \
723  STDMETHOD_(PADAPTER_OBJECT, GetAdapterObject)( THIS ) PURE; \
724 \
725  STDMETHOD_(void, CopyTo)( THIS_ \
726  IN PVOID Destination, \
727  IN PVOID Source, \
728  IN ULONG ByteCount) PURE; \
729 \
730  STDMETHOD_(void, CopyFrom)( THIS_ \
731  IN PVOID Destination, \
732  IN PVOID Source, \
733  IN ULONG ByteCount) PURE;
734 
735 #define IMP_IDmaChannel \
736  STDMETHODIMP_(NTSTATUS) AllocateBuffer( \
737  IN ULONG BufferSize, \
738  IN PPHYSICAL_ADDRESS PhysicalAddressConstraint OPTIONAL); \
739  \
740  STDMETHODIMP_(void) FreeBuffer(void); \
741  STDMETHODIMP_(ULONG) TransferCount(void); \
742  STDMETHODIMP_(ULONG) MaximumBufferSize(void); \
743  STDMETHODIMP_(ULONG) AllocatedBufferSize(void); \
744  STDMETHODIMP_(ULONG) BufferSize(void); \
745  \
746  STDMETHODIMP_(void) SetBufferSize( \
747  IN ULONG BufferSize); \
748  \
749  STDMETHODIMP_(PVOID) SystemAddress(void); \
750  STDMETHODIMP_(PHYSICAL_ADDRESS) PhysicalAddress(void); \
751  STDMETHODIMP_(PADAPTER_OBJECT) GetAdapterObject(void); \
752  \
753  STDMETHODIMP_(void) CopyTo( \
754  IN PVOID Destination, \
755  IN PVOID Source, \
756  IN ULONG ByteCount); \
757  \
758  STDMETHODIMP_(void) CopyFrom( \
759  IN PVOID Destination, \
760  IN PVOID Source, \
761  IN ULONG ByteCount)
762 
763 #undef INTERFACE
764 #define INTERFACE IDmaChannel
765 
766 DEFINE_GUID(IID_IDmaChannel, 0x22C6AC61L, 0x851B, 0x11D0, 0x9A, 0x7F, 0x00, 0xAA, 0x00, 0x38, 0xAC, 0xFE);
767 
769 {
772 };
773 
774 typedef IDmaChannel *PDMACHANNEL;
775 
776 
777 /* ===============================================================
778  IDmaChannelSlave Interface
779 */
780 
781 #define DEFINE_ABSTRACT_DMACHANNELSLAVE() \
782  STDMETHOD_(NTSTATUS, Start)( THIS_ \
783  IN ULONG MapSize, \
784  IN BOOLEAN WriteToDevice) PURE; \
785 \
786  STDMETHOD_(NTSTATUS, Stop)( THIS ) PURE; \
787  STDMETHOD_(ULONG, ReadCounter)( THIS ) PURE; \
788 \
789  STDMETHOD_(NTSTATUS, WaitForTC)( THIS_ \
790  ULONG Timeout) PURE;
791 
792 #define IMP_IDmaChannelSlave \
793  IMP_IDmaChannel; \
794  STDMETHODIMP_(NTSTATUS) Start( \
795  IN ULONG MapSize, \
796  IN BOOLEAN WriteToDevice); \
797  \
798  STDMETHODIMP_(NTSTATUS) Stop(void); \
799  STDMETHODIMP_(ULONG) ReadCounter(void); \
800  \
801  STDMETHODIMP_(NTSTATUS) WaitForTC( \
802  ULONG Timeout)
803 
804 #undef INTERFACE
805 #define INTERFACE IDmaChannelSlave
806 
807 #if (NTDDI_VERSION < NTDDI_LONGHORN)
808 DEFINE_GUID(IID_IDmaChannelSlave, 0x22C6AC62L, 0x851B, 0x11D0, 0x9A, 0x7F, 0x00, 0xAA, 0x00, 0x38, 0xAC, 0xFE);
809 #endif
810 
811 #undef INTERFACE
812 #define INTERFACE IDmaChannelSlave
813 
814 DECLARE_INTERFACE_(IDmaChannelSlave, IDmaChannel)
815 {
819 };
820 
821 typedef IDmaChannelSlave *PDMACHANNELSLAVE;
822 
823 
824 /* ===============================================================
825  IInterruptSync Interface
826 */
827 
828 typedef enum
829 {
834 
835 struct IInterruptSync;
836 
837 typedef NTSTATUS (NTAPI *PINTERRUPTSYNCROUTINE)(
838  IN struct IInterruptSync* InterruptSync,
840 
841 #undef INTERFACE
842 #define INTERFACE IInterruptSync
843 
844 DECLARE_INTERFACE_(IInterruptSync, IUnknown)
845 {
847 
848  STDMETHOD_(NTSTATUS, CallSynchronizedRoutine)( THIS_
849  IN PINTERRUPTSYNCROUTINE Routine,
851 
852  STDMETHOD_(PKINTERRUPT, GetKInterrupt)( THIS ) PURE;
854  STDMETHOD_(void, Disconnect)( THIS ) PURE;
855 
856  STDMETHOD_(NTSTATUS, RegisterServiceRoutine)( THIS_
857  IN PINTERRUPTSYNCROUTINE Routine,
859  IN BOOLEAN First) PURE;
860 };
861 
862 DEFINE_GUID(IID_IInterruptSync, 0x22C6AC63L, 0x851B, 0x11D0, 0x9A, 0x7F, 0x00, 0xAA, 0x00, 0x38, 0xAC, 0xFE);
863 
864 #define IMP_IInterruptSync \
865  STDMETHODIMP_(NTSTATUS) CallSynchronizedRoutine( \
866  IN PINTERRUPTSYNCROUTINE Routine, \
867  IN PVOID DynamicContext); \
868  \
869  STDMETHODIMP_(PKINTERRUPT) GetKInterrupt(void); \
870  STDMETHODIMP_(NTSTATUS) Connect(void); \
871  STDMETHODIMP_(void) Disconnect(void); \
872  \
873  STDMETHODIMP_(NTSTATUS) RegisterServiceRoutine( \
874  IN PINTERRUPTSYNCROUTINE Routine, \
875  IN PVOID DynamicContext, \
876  IN BOOLEAN First)
877 
878 typedef IInterruptSync *PINTERRUPTSYNC;
879 
880 
881 /* ===============================================================
882  IRegistryKey Interface
883 */
884 
885 #undef INTERFACE
886 #define INTERFACE IRegistryKey
887 
888 enum
889 {
895 };
896 
897 DEFINE_GUID(IID_IRegistryKey, 0xE8DA4302l, 0xF304, 0x11D0, 0x95, 0x8B, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3);
898 
900 {
902 
903  STDMETHOD_(NTSTATUS, QueryKey)( THIS_
905  OUT PVOID KeyInformation,
906  IN ULONG Length,
908 
909  STDMETHOD_(NTSTATUS, EnumerateKey)( THIS_
910  IN ULONG Index,
912  OUT PVOID KeyInformation,
913  IN ULONG Length,
915 
916  STDMETHOD_(NTSTATUS, QueryValueKey)( THIS_
919  OUT PVOID KeyValueInformation,
920  IN ULONG Length,
922 
923  STDMETHOD_(NTSTATUS, EnumerateValueKey)( THIS_
924  IN ULONG Index,
926  OUT PVOID KeyValueInformation,
927  IN ULONG Length,
929 
930  STDMETHOD_(NTSTATUS, SetValueKey)( THIS_
932  IN ULONG Type,
933  IN PVOID Data,
935 
936  STDMETHOD_(NTSTATUS, QueryRegistryValues)( THIS_
939 
940  STDMETHOD_(NTSTATUS, NewSubKey)( THIS_
941  OUT IRegistryKey** RegistrySubKey,
942  IN PUNKNOWN OuterUnknown,
947 
949 };
950 
951 #define IMP_IRegistryKey \
952  STDMETHODIMP_(NTSTATUS) QueryKey( \
953  IN KEY_INFORMATION_CLASS KeyInformationClass, \
954  OUT PVOID KeyInformation, \
955  IN ULONG Length, \
956  OUT PULONG ResultLength); \
957 \
958  STDMETHODIMP_(NTSTATUS) EnumerateKey( \
959  IN ULONG Index, \
960  IN KEY_INFORMATION_CLASS KeyInformationClass, \
961  OUT PVOID KeyInformation, \
962  IN ULONG Length, \
963  OUT PULONG ResultLength); \
964 \
965  STDMETHODIMP_(NTSTATUS) QueryValueKey( \
966  IN PUNICODE_STRING ValueName, \
967  IN KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass, \
968  OUT PVOID KeyValueInformation, \
969  IN ULONG Length, \
970  OUT PULONG ResultLength); \
971 \
972  STDMETHODIMP_(NTSTATUS) EnumerateValueKey( \
973  IN ULONG Index, \
974  IN KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass, \
975  OUT PVOID KeyValueInformation, \
976  IN ULONG Length, \
977  OUT PULONG ResultLength); \
978 \
979  STDMETHODIMP_(NTSTATUS) SetValueKey( \
980  IN PUNICODE_STRING ValueName OPTIONAL, \
981  IN ULONG Type, \
982  IN PVOID Data, \
983  IN ULONG DataSize); \
984 \
985  STDMETHODIMP_(NTSTATUS) QueryRegistryValues( \
986  IN PRTL_QUERY_REGISTRY_TABLE QueryTable, \
987  IN PVOID Context OPTIONAL); \
988 \
989  STDMETHODIMP_(NTSTATUS) NewSubKey( \
990  OUT IRegistryKey** RegistrySubKey, \
991  IN PUNKNOWN OuterUnknown, \
992  IN ACCESS_MASK DesiredAccess, \
993  IN PUNICODE_STRING SubKeyName, \
994  IN ULONG CreateOptions, \
995  OUT PULONG Disposition OPTIONAL); \
996 \
997  STDMETHODIMP_(NTSTATUS) DeleteKey(void);
998 
999 typedef IRegistryKey *PREGISTRYKEY;
1000 
1001 
1002 /* ===============================================================
1003  IMusicTechnology Interface
1004 */
1005 
1006 DECLARE_INTERFACE_(IMusicTechnology, IUnknown)
1007 {
1009 
1010  STDMETHOD_(NTSTATUS, SetTechnology)( THIS_
1011  IN const GUID* Technology) PURE;
1012 };
1013 
1014 #define IMP_IMusicTechnology \
1015  STDMETHODIMP_(NTSTATUS) SetTechnology( \
1016  IN const GUID* Technology);
1017 
1018 typedef IMusicTechnology *PMUSICTECHNOLOGY;
1019 
1020 
1021 /* ===============================================================
1022  IPort Interface
1023 */
1024 
1025 #if 0
1026 #define STATIC_IPort 0xb4c90a25L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44
1027 DEFINE_GUIDSTRUCT("0xB4C90A25-5791-11d0-86f9-00a0c911b544", IID_IPort);
1028 #define IID_IPort DEFINE_GUIDNAMED(IID_IPort)
1029 #endif
1030 
1031 DEFINE_GUID(IID_IMiniport,
1032  0xb4c90a24L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
1033 
1034 DEFINE_GUID(IID_IPort,
1035  0xb4c90a25L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
1036 
1037 #define DEFINE_ABSTRACT_PORT() \
1038  STDMETHOD_(NTSTATUS, Init)( THIS_ \
1039  IN PDEVICE_OBJECT DeviceObject, \
1040  IN PIRP Irp, \
1041  IN PUNKNOWN UnknownMiniport, \
1042  IN PUNKNOWN UnknownAdapter OPTIONAL, \
1043  IN PRESOURCELIST ResourceList) PURE; \
1044 \
1045  STDMETHOD_(NTSTATUS, GetDeviceProperty)( THIS_ \
1046  IN DEVICE_REGISTRY_PROPERTY DeviceProperty, \
1047  IN ULONG BufferLength, \
1048  OUT PVOID PropertyBuffer, \
1049  OUT PULONG ResultLength) PURE; \
1050 \
1051  STDMETHOD_(NTSTATUS, NewRegistryKey)( THIS_ \
1052  OUT PREGISTRYKEY* OutRegistryKey, \
1053  IN PUNKNOWN OuterUnknown OPTIONAL, \
1054  IN ULONG RegistryKeyType, \
1055  IN ACCESS_MASK DesiredAccess, \
1056  IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, \
1057  IN ULONG CreateOptiona OPTIONAL, \
1058  OUT PULONG Disposition OPTIONAL) PURE;
1059 
1060 #ifdef PC_IMPLEMENTATION
1061 #define IMP_IPort\
1062  STDMETHODIMP_(NTSTATUS) Init\
1063  ( IN PDEVICE_OBJECT DeviceObject,\
1064  IN PIRP Irp,\
1065  IN PUNKNOWN UnknownMiniport,\
1066  IN PUNKNOWN UnknownAdapter OPTIONAL,\
1067  IN PRESOURCELIST ResourceList\
1068  );\
1069  STDMETHODIMP_(NTSTATUS) GetDeviceProperty\
1070  ( IN DEVICE_REGISTRY_PROPERTY DeviceProperty,\
1071  IN ULONG BufferLength,\
1072  OUT PVOID PropertyBuffer,\
1073  OUT PULONG ResultLength\
1074  );\
1075  STDMETHODIMP_(NTSTATUS) NewRegistryKey\
1076  ( OUT PREGISTRYKEY * OutRegistryKey,\
1077  IN PUNKNOWN OuterUnknown OPTIONAL,\
1078  IN ULONG RegistryKeyType,\
1079  IN ACCESS_MASK DesiredAccess,\
1080  IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,\
1081  IN ULONG CreateOptions OPTIONAL,\
1082  OUT PULONG Disposition OPTIONAL\
1083  )
1084 #endif
1085 
1086 #undef INTERFACE
1087 #define INTERFACE IPort
1088 
1090 {
1093 };
1094 
1095 typedef IPort *PPORT;
1096 
1097 
1098 /* ===============================================================
1099  IPortMidi Interface
1100 */
1101 
1102 DEFINE_GUID(IID_IPortMidi,
1103  0xb4c90a40L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
1104 DEFINE_GUID(CLSID_PortMidi,
1105  0xb4c90a43L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
1106 
1107 #undef INTERFACE
1108 #define INTERFACE IPortMidi
1109 
1110 DECLARE_INTERFACE_(IPortMidi, IPort)
1111 {
1114 
1116  IN PSERVICEGROUP ServiceGroup OPTIONAL) PURE;
1117 
1118  STDMETHOD_(NTSTATUS, RegisterServiceGroup)(THIS_
1119  IN PSERVICEGROUP ServiceGroup) PURE;
1120 };
1121 
1122 typedef IPortMidi *PPORTMIDI;
1123 
1124 #define IMP_IPortMidi() \
1125  STDMETHODIMP_(VOID) Notify( \
1126  IN PSERVICEGROUP ServiceGroup OPTIONAL); \
1127 \
1128  STDMETHODIMP_(NTSTATUS) RegisterServiceGroup( \
1129  IN PSERVICEGROUP ServiceGroup);
1130 
1131 #undef INTERFACE
1132 
1133 /* ===============================================================
1134  IPortWaveCyclic Interface
1135 */
1136 
1137 DEFINE_GUID(IID_IPortWaveCyclic,
1138  0xb4c90a26L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
1139 DEFINE_GUID(CLSID_PortWaveCyclic,
1140  0xb4c90a2aL, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
1141 
1142 #define INTERFACE IPortWaveCyclic
1143 
1144 DECLARE_INTERFACE_(IPortWaveCyclic, IPort)
1145 {
1147 
1149 
1151  IN PSERVICEGROUP ServiceGroup) PURE;
1152 
1153  STDMETHOD_(NTSTATUS, NewSlaveDmaChannel)(THIS_
1154  OUT PDMACHANNELSLAVE* DmaChannel,
1155  IN PUNKNOWN OuterUnknown,
1157  IN ULONG DmaIndex,
1159  IN BOOLEAN DemandMode,
1160  IN DMA_SPEED DmaSpeed) PURE;
1161 
1162  STDMETHOD_(NTSTATUS, NewMasterDmaChannel)(THIS_
1163  OUT PDMACHANNEL* DmaChannel,
1164  IN PUNKNOWN OuterUnknown,
1167  IN BOOLEAN Dma32BitAddresses,
1169  IN DMA_WIDTH DmaWidth,
1170  IN DMA_SPEED DmaSpeed) PURE;
1171 
1172 };
1173 
1174 typedef IPortWaveCyclic *PPORTWAVECYCLIC;
1175 
1176 #ifdef PC_IMPLEMENTATION
1177 #define IMP_IPortWaveCyclic \
1178  IMP_IPort; \
1179  STDMETHODIMP_(VOID) Notify( \
1180  IN PSERVICEGROUP ServiceGroup); \
1181  \
1182  STDMETHODIMP_(NTSTATUS) NewSlaveDmaChannel( \
1183  OUT PDMACHANNELSLAVE* DmaChannel, \
1184  IN PUNKNOWN OuterUnknown, \
1185  IN PRESOURCELIST ResourceList OPTIONAL, \
1186  IN ULONG DmaIndex, \
1187  IN ULONG MaximumLength, \
1188  IN BOOLEAN DemandMode, \
1189  IN DMA_SPEED DmaSpeed); \
1190  \
1191  STDMETHODIMP_(NTSTATUS) NewMasterDmaChannel( \
1192  OUT PDMACHANNEL* DmaChannel, \
1193  IN PUNKNOWN OuterUnknown, \
1194  IN PRESOURCELIST ResourceList OPTIONAL, \
1195  IN ULONG MaximumLength, \
1196  IN BOOLEAN Dma32BitAddresses, \
1197  IN BOOLEAN Dma64BitAddresses, \
1198  IN DMA_WIDTH DmaWidth, \
1199  IN DMA_SPEED DmaSpeed)
1200 #endif
1201 
1202 
1203 #undef INTERFACE
1204 /* ===============================================================
1205  IPortWavePci Interface
1206 */
1207 #undef INTERFACE
1208 #define INTERFACE IPortWavePci
1209 
1210 DEFINE_GUID(IID_IPortWavePci,
1211  0xb4c90a50L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
1212 DEFINE_GUID(CLSID_PortWavePci,
1213  0xb4c90a54L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
1214 
1215 DECLARE_INTERFACE_(IPortWavePci, IPort)
1216 {
1219 
1221  IN PSERVICEGROUP ServiceGroup) PURE;
1222 
1223  STDMETHOD_(NTSTATUS, NewMasterDmaChannel)(THIS_
1224  OUT PDMACHANNEL* DmaChannel,
1225  IN PUNKNOWN OuterUnknown,
1229  IN BOOLEAN Dma32BitAddresses,
1231  IN BOOLEAN IgnoreCount,
1232  IN DMA_WIDTH DmaWidth,
1233  IN DMA_SPEED DmaSpeed,
1235  IN ULONG DmaPort) PURE;
1236 };
1237 
1238 typedef IPortWavePci *PPORTWAVEPCI;
1239 #undef INTERFACE
1240 
1241 #ifdef PC_IMPLEMENTATION
1242 #define IMP_IPortWavePci \
1243  IMP_IPort; \
1244  STDMETHODIMP_(VOID) Notify( \
1245  IN PSERVICEGROUP ServiceGroup); \
1246  \
1247  STDMETHODIMP_(NTSTATUS) NewMasterDmaChannel( \
1248  OUT PDMACHANNEL* DmaChannel, \
1249  IN PUNKNOWN OuterUnknown, \
1250  IN POOL_TYPE PoolType, \
1251  IN PRESOURCELIST ResourceList OPTIONAL, \
1252  IN BOOLEAN ScatterGather, \
1253  IN BOOLEAN Dma32BitAddresses, \
1254  IN BOOLEAN Dma64BitAddresses, \
1255  IN BOOLEAN IgnoreCount, \
1256  IN DMA_WIDTH DmaWidth, \
1257  IN DMA_SPEED DmaSpeed, \
1258  IN ULONG MaximumLength, \
1259  IN ULONG DmaPort);
1260 #endif
1261 
1262 /* ===============================================================
1263  IMiniPort Interface
1264 */
1265 
1266 DEFINE_GUID(IID_IMiniPort,
1267  0xb4c90a24L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
1268 
1269 #define DEFINE_ABSTRACT_MINIPORT() \
1270  STDMETHOD_(NTSTATUS, GetDescription)( THIS_ \
1271  OUT PPCFILTER_DESCRIPTOR* Description) PURE; \
1272 \
1273  STDMETHOD_(NTSTATUS, DataRangeIntersection)( THIS_ \
1274  IN ULONG PinId, \
1275  IN PKSDATARANGE DataRange, \
1276  IN PKSDATARANGE MatchingDataRange, \
1277  IN ULONG OutputBufferLength, \
1278  OUT PVOID ResultantFormat OPTIONAL, \
1279  OUT PULONG ResultantFormatLength) PURE;
1280 
1281 #define IMP_IMiniport \
1282  STDMETHODIMP_(NTSTATUS) GetDescription( \
1283  OUT PPCFILTER_DESCRIPTOR* Description); \
1284  \
1285  STDMETHODIMP_(NTSTATUS) DataRangeIntersection( \
1286  IN ULONG PinId, \
1287  IN PKSDATARANGE DataRange, \
1288  IN PKSDATARANGE MatchingDataRange, \
1289  IN ULONG OutputBufferLength, \
1290  OUT PVOID ResultantFormat OPTIONAL, \
1291  OUT PULONG ResultantFormatLength)
1292 
1294 {
1297 };
1298 
1299 typedef IMiniport *PMINIPORT;
1300 
1301 
1302 /* ===============================================================
1303  IMiniportMidiStream Interface
1304 */
1305 #undef INTERFACE
1306 #define INTERFACE IMiniportMidiStream
1307 
1308 DEFINE_GUID(IID_IMiniportMidiStream,
1309  0xb4c90a42L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
1310 
1311 DECLARE_INTERFACE_(IMiniportMidiStream, IUnknown)
1312 {
1314 
1315  STDMETHOD_(NTSTATUS,SetFormat)(THIS_
1317 
1318  STDMETHOD_(NTSTATUS,SetState)(THIS_
1319  IN KSSTATE State)PURE;
1320 
1322  IN PVOID BufferAddress,
1325 
1327  IN PVOID BufferAddress,
1328  IN ULONG BytesToWrite,
1330 };
1331 
1332 typedef IMiniportMidiStream* PMINIPORTMIDISTREAM;
1333 #undef INTERFACE
1334 
1335 /* ===============================================================
1336  IMiniportMidi Interface
1337 */
1338 #undef INTERFACE
1339 #define INTERFACE IMiniportMidi
1340 
1341 DEFINE_GUID(IID_IMiniportMidi,
1342  0xb4c90a41L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
1343 
1344 DECLARE_INTERFACE_(IMiniportMidi, IMiniport)
1345 {
1348 
1350  IN PUNKNOWN UnknownAdapter,
1352  IN PPORTMIDI Port,
1353  OUT PSERVICEGROUP* ServiceGroup) PURE;
1354 
1355  STDMETHOD_(void, Service)(THIS) PURE;
1356 
1357  STDMETHOD_(NTSTATUS, NewStream)(THIS_
1359  IN PUNKNOWN OuterUnknown OPTIONAL,
1361  IN ULONG Pin,
1362  IN BOOLEAN Capture,
1364  OUT PSERVICEGROUP* ServiceGroup) PURE;
1365 
1366 };
1367 
1368 typedef IMiniportMidi *PMINIPORTMIDI;
1369 #undef INTERFACE
1370 
1371 /* ===============================================================
1372  IMiniportDriverUart Interface
1373 */
1374 
1375 DEFINE_GUID(IID_MiniportDriverUart,
1376  0xb4c90ae1L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
1377 DEFINE_GUID(CLSID_MiniportDriverUart,
1378  0xb4c90ae1L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
1379 
1380 /* ===============================================================
1381  IPortTopology Interface
1382 */
1383 #if 0
1384 #define STATIC_IPortTopology \
1385  0xb4c90a30L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44
1386 DEFINE_GUIDSTRUCT("0xB4C90A30-5791-11d0-86f9-00a0c911b544", IID_IPortTopology);
1387 #define IID_IPortTopology DEFINE_GUIDNAMED(IID_IPortTopology)
1388 #endif
1389 
1390 #undef INTERFACE
1391 #define INTERFACE IPortTopology
1392 
1393 DEFINE_GUID(IID_IPortTopology, 0xb4c90a30L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
1394 DEFINE_GUID(CLSID_PortTopology, 0xb4c90a32L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
1395 
1396 #undef INTERFACE
1397 #define INTERFACE IPortTopology
1398 
1399 DECLARE_INTERFACE_(IPortTopology, IPort)
1400 {
1403 };
1404 
1405 typedef IPortTopology *PPORTTOPOLOGY;
1406 
1407 #define IMP_IPortTopology IMP_IPort
1408 
1409 
1410 /* ===============================================================
1411  IMiniportTopology Interface
1412 */
1413 
1414 #undef INTERFACE
1415 #define INTERFACE IMiniportTopology
1416 
1417 DEFINE_GUID(IID_IMiniportTopology, 0xb4c90a31L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
1418 
1419 #undef INTERFACE
1420 #define INTERFACE IMiniportTopology
1421 
1422 DECLARE_INTERFACE_(IMiniportTopology,IMiniport)
1423 {
1426 
1428  IN PUNKNOWN UnknownAdapter,
1431 };
1432 
1433 typedef IMiniportTopology *PMINIPORTTOPOLOGY;
1434 
1435 /* ===============================================================
1436  IMiniportWaveCyclicStream Interface
1437 */
1438 
1439 #undef INTERFACE
1440 #define INTERFACE IMiniportWaveCyclicStream
1441 
1442 DEFINE_GUID(IID_IMiniportWaveCyclicStream,
1443 0xb4c90a28L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
1444 
1445 DECLARE_INTERFACE_(IMiniportWaveCyclicStream,IUnknown)
1446 {
1448 
1449  STDMETHOD_(NTSTATUS,SetFormat)(THIS_
1451 
1452  STDMETHOD_(ULONG,SetNotificationFreq)(THIS_
1453  IN ULONG Interval,
1454  OUT PULONG FrameSize) PURE;
1455 
1456  STDMETHOD_(NTSTATUS,SetState)(THIS_
1457  IN KSSTATE State) PURE;
1458 
1461 
1462  STDMETHOD_(NTSTATUS,NormalizePhysicalPosition)(THIS_
1463  IN OUT PLONGLONG PhysicalPosition) PURE;
1464 
1465  STDMETHOD_(void, Silence)( THIS_
1466  IN PVOID Buffer,
1468 };
1469 
1470 typedef IMiniportWaveCyclicStream *PMINIPORTWAVECYCLICSTREAM;
1471 
1472 #define IMP_IMiniportWaveCyclicStream\
1473  STDMETHODIMP_(NTSTATUS) SetFormat\
1474  ( IN PKSDATAFORMAT DataFormat\
1475  );\
1476  STDMETHODIMP_(ULONG) SetNotificationFreq\
1477  ( IN ULONG Interval,\
1478  OUT PULONG FrameSize\
1479  );\
1480  STDMETHODIMP_(NTSTATUS) SetState\
1481  ( IN KSSTATE State\
1482  );\
1483  STDMETHODIMP_(NTSTATUS) GetPosition\
1484  ( OUT PULONG Position\
1485  );\
1486  STDMETHODIMP_(NTSTATUS) NormalizePhysicalPosition\
1487  ( IN OUT PLONGLONG PhysicalPosition\
1488  );\
1489  STDMETHODIMP_(void) Silence\
1490  ( IN PVOID Buffer,\
1491  IN ULONG ByteCount\
1492  )
1493 
1494 
1495 /* ===============================================================
1496  IMiniportWaveCyclic Interface
1497 */
1498 #undef INTERFACE
1499 
1500 DEFINE_GUID(IID_IMiniportWaveCyclic,
1501  0xb4c90a27L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
1502 
1503 #define INTERFACE IMiniportWaveCyclic
1504 
1505 DECLARE_INTERFACE_(IMiniportWaveCyclic, IMiniport)
1506 {
1509 
1511  IN PUNKNOWN UnknownAdapter,
1514 
1515  STDMETHOD_(NTSTATUS, NewStream)(THIS_
1517  IN PUNKNOWN OuterUnknown OPTIONAL,
1519  IN ULONG Pin,
1520  IN BOOLEAN Capture,
1522  OUT PDMACHANNEL *DmaChannel,
1523  OUT PSERVICEGROUP *ServiceGroup) PURE;
1524 };
1525 
1526 typedef IMiniportWaveCyclic *PMINIPORTWAVECYCLIC;
1527 #undef INTERFACE
1528 
1529 #define IMP_IMiniportWaveCyclic\
1530  IMP_IMiniport;\
1531  STDMETHODIMP_(NTSTATUS) Init\
1532  ( IN PUNKNOWN UnknownAdapter,\
1533  IN PRESOURCELIST ResourceList,\
1534  IN PPORTWAVECYCLIC Port\
1535  );\
1536  STDMETHODIMP_(NTSTATUS) NewStream\
1537  ( OUT PMINIPORTWAVECYCLICSTREAM * Stream,\
1538  IN PUNKNOWN OuterUnknown OPTIONAL,\
1539  IN POOL_TYPE PoolType,\
1540  IN ULONG Pin,\
1541  IN BOOLEAN Capture,\
1542  IN PKSDATAFORMAT DataFormat,\
1543  OUT PDMACHANNEL * DmaChannel,\
1544  OUT PSERVICEGROUP * ServiceGroup\
1545  )
1546 
1547 
1548 /* ===============================================================
1549  IPortWavePciStream Interface
1550 */
1551 #undef INTERFACE
1552 #define INTERFACE IPortWavePciStream
1553 
1554 DEFINE_GUID(IID_IPortWavePciStream, 0xb4c90a51L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
1555 
1556 DECLARE_INTERFACE_(IPortWavePciStream,IUnknown)
1557 {
1558  DEFINE_ABSTRACT_UNKNOWN() // For IUnknown
1559 
1560  STDMETHOD_(NTSTATUS,GetMapping)(THIS_
1561  IN PVOID Tag,
1565  OUT PULONG Flags)PURE;
1566 
1567  STDMETHOD_(NTSTATUS,ReleaseMapping)(THIS_
1568  IN PVOID Tag)PURE;
1569 
1570  STDMETHOD_(NTSTATUS,TerminatePacket)(THIS)PURE;
1571 };
1572 
1573 typedef IPortWavePciStream *PPORTWAVEPCISTREAM;
1574 
1575 #define IMP_IPortWavePciStream \
1576  STDMETHODIMP_(NTSTATUS) GetMapping( \
1577  IN PVOID Tag, \
1578  OUT PPHYSICAL_ADDRESS PhysicalAddress, \
1579  OUT PVOID * VirtualAddress, \
1580  OUT PULONG ByteCount, \
1581  OUT PULONG Flags); \
1582  \
1583  STDMETHODIMP_(NTSTATUS) ReleaseMapping( \
1584  IN PVOID Tag); \
1585  \
1586  STDMETHODIMP_(NTSTATUS) TerminatePacket(THIS)
1587 
1588 
1589 /* ===============================================================
1590  IMiniportWavePciStream Interface
1591 */
1592 #undef INTERFACE
1593 #define INTERFACE IMiniportWavePciStream
1594 
1595 DEFINE_GUID(IID_IMiniportWavePciStream, 0xb4c90a53L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
1596 
1597 DECLARE_INTERFACE_(IMiniportWavePciStream,IUnknown)
1598 {
1600 
1601  STDMETHOD_(NTSTATUS,SetFormat)(THIS_
1603 
1604  STDMETHOD_(NTSTATUS,SetState)(THIS_
1605  IN KSSTATE State)PURE;
1606 
1609 
1610  STDMETHOD_(NTSTATUS,NormalizePhysicalPosition)(THIS_
1611  IN OUT PLONGLONG PhysicalPosition)PURE;
1612 
1613  STDMETHOD_(NTSTATUS,GetAllocatorFraming)(THIS_
1615 
1616  STDMETHOD_(NTSTATUS,RevokeMappings)(THIS_
1617  IN PVOID FirstTag,
1618  IN PVOID LastTag,
1619  OUT PULONG MappingsRevoked)PURE;
1620 
1621  STDMETHOD_(void,MappingAvailable)(THIS)PURE;
1622 
1623  STDMETHOD_(void,Service)(THIS)PURE;
1624 };
1625 
1626 typedef IMiniportWavePciStream *PMINIPORTWAVEPCISTREAM;
1627 
1628 /* ===============================================================
1629  IMiniportWavePci Interface
1630 */
1631 #undef INTERFACE
1632 #define INTERFACE IMiniportWavePci
1633 
1634 DEFINE_GUID(IID_IMiniportWavePci, 0xb4c90a52L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
1635 
1636 DECLARE_INTERFACE_(IMiniportWavePci,IMiniport)
1637 {
1639 
1641 
1643  IN PUNKNOWN UnknownAdapter,
1646  OUT PSERVICEGROUP * ServiceGroup)PURE;
1647 
1648  STDMETHOD_(NTSTATUS,NewStream)(THIS_
1650  IN PUNKNOWN OuterUnknown OPTIONAL,
1652  IN PPORTWAVEPCISTREAM PortStream,
1653  IN ULONG Pin,
1654  IN BOOLEAN Capture,
1656  OUT PDMACHANNEL * DmaChannel,
1657  OUT PSERVICEGROUP * ServiceGroup)PURE;
1658 
1659  STDMETHOD_(void,Service)(THIS)PURE;
1660 };
1661 
1662 typedef IMiniportWavePci *PMINIPORTWAVEPCI;
1663 
1664 
1665 #if !defined(DEFINE_ABSTRACT_MINIPORTWAVERTSTREAM)
1666 
1667 #define DEFINE_ABSTRACT_MINIPORTWAVERTSTREAM() \
1668  STDMETHOD_(NTSTATUS,SetFormat) \
1669  ( THIS_ \
1670  IN PKSDATAFORMAT DataFormat \
1671  ) PURE; \
1672  STDMETHOD_(NTSTATUS,SetState) \
1673  ( THIS_ \
1674  IN KSSTATE State \
1675  ) PURE; \
1676  STDMETHOD_(NTSTATUS,GetPosition) \
1677  ( THIS_ \
1678  OUT PKSAUDIO_POSITION Position \
1679  ) PURE; \
1680  STDMETHOD_(NTSTATUS,AllocateAudioBuffer) \
1681  ( THIS_ \
1682  IN ULONG RequestedSize, \
1683  OUT PMDL *AudioBufferMdl, \
1684  OUT ULONG *ActualSize, \
1685  OUT ULONG *OffsetFromFirstPage, \
1686  OUT MEMORY_CACHING_TYPE *CacheType \
1687  ) PURE; \
1688  STDMETHOD_(VOID,FreeAudioBuffer) \
1689  ( THIS_ \
1690  IN PMDL AudioBufferMdl, \
1691  IN ULONG BufferSize \
1692  ) PURE; \
1693  STDMETHOD_(VOID,GetHWLatency) \
1694  ( THIS_ \
1695  OUT KSRTAUDIO_HWLATENCY *hwLatency \
1696  ) PURE; \
1697  STDMETHOD_(NTSTATUS,GetPositionRegister) \
1698  ( THIS_ \
1699  OUT KSRTAUDIO_HWREGISTER *Register \
1700  ) PURE; \
1701  STDMETHOD_(NTSTATUS,GetClockRegister) \
1702  ( THIS_ \
1703  OUT KSRTAUDIO_HWREGISTER *Register \
1704  ) PURE;
1705 
1706 #endif
1707 
1708 
1709 /* ===============================================================
1710  IAdapterPowerManagement Interface
1711 */
1712 
1713 #if (NTDDI_VERSION >= NTDDI_VISTA)
1714 /* ===============================================================
1715  IPortWaveRT Interface
1716 */
1717 
1718 DEFINE_GUID(CLSID_PortWaveRT, 0xcc9be57a, 0xeb9e, 0x42b4, 0x94, 0xfc, 0xc, 0xad, 0x3d, 0xbc, 0xe7, 0xfa);
1719 DEFINE_GUID(IID_IPortWaveRT, 0x339ff909, 0x68a9, 0x4310, 0xb0, 0x9b, 0x27, 0x4e, 0x96, 0xee, 0x4c, 0xbd);
1720 
1721 #undef INTERFACE
1722 #define INTERFACE IPortWaveRT
1723 
1724 DECLARE_INTERFACE_(IPortWaveRT,IPort)
1725 {
1726  DEFINE_ABSTRACT_UNKNOWN() // For IUnknown
1727 
1728  DEFINE_ABSTRACT_PORT() // For IPort
1729 };
1730 
1731 typedef IPortWaveRT *PPORTWAVERT;
1732 
1733 #ifdef PC_IMPLEMENTATION
1734 #define IMP_IPortWaveRT IMP_IPort
1735 #endif
1736 
1737 
1738 /* ===============================================================
1739  IPortWaveRTStream Interface
1740 */
1741 
1742 #undef INTERFACE
1743 #define INTERFACE IPortWaveRTStream
1744 
1745 DEFINE_GUID(IID_IPortWaveRTStream, 0x1809ce5a, 0x64bc, 0x4e62, 0xbd, 0x7d, 0x95, 0xbc, 0xe4, 0x3d, 0xe3, 0x93);
1746 
1747 DECLARE_INTERFACE_(IPortWaveRTStream, IUnknown)
1748 {
1750 
1751  STDMETHOD_(PMDL, AllocatePagesForMdl)
1752  ( THIS_
1755  ) PURE;
1756 
1757  STDMETHOD_(PMDL, AllocateContiguousPagesForMdl)
1758  ( THIS_
1759  IN PHYSICAL_ADDRESS LowAddress,
1762  ) PURE;
1763 
1764  STDMETHOD_(PVOID, MapAllocatedPages)
1765  ( THIS_
1768  ) PURE;
1769 
1770  STDMETHOD_(VOID, UnmapAllocatedPages)
1771  ( THIS_
1774  ) PURE;
1775 
1776  STDMETHOD_(VOID, FreePagesFromMdl)
1777  ( THIS_
1779  ) PURE;
1780 
1781  STDMETHOD_(ULONG, GetPhysicalPagesCount)
1782  ( THIS_
1784  ) PURE;
1785 
1786  STDMETHOD_(PHYSICAL_ADDRESS, GetPhysicalPageAddress)
1787  ( THIS_
1789  IN ULONG Index
1790  ) PURE;
1791 };
1792 
1793 typedef IPortWaveRTStream *PPORTWAVERTSTREAM;
1794 
1795 
1796 /* ===============================================================
1797  IMiniportWaveRTStream Interface
1798 */
1799 
1800 #undef INTERFACE
1801 #define INTERFACE IMiniportWaveRTStream
1802 
1803 DEFINE_GUID(IID_IMiniportWaveRTStream, 0xac9ab, 0xfaab, 0x4f3d, 0x94, 0x55, 0x6f, 0xf8, 0x30, 0x6a, 0x74, 0xa0);
1804 
1805 DECLARE_INTERFACE_(IMiniportWaveRTStream, IUnknown)
1806 {
1809 };
1810 
1811 typedef IMiniportWaveRTStream *PMINIPORTWAVERTSTREAM;
1812 
1813 #define IMP_IMiniportWaveRTStream\
1814  STDMETHODIMP_(NTSTATUS) SetFormat\
1815  ( IN PKSDATAFORMAT DataFormat\
1816  );\
1817  STDMETHODIMP_(NTSTATUS) SetState\
1818  ( IN KSSTATE State\
1819  );\
1820  STDMETHODIMP_(NTSTATUS) GetPosition\
1821  ( OUT PKSAUDIO_POSITION Position\
1822  );\
1823  STDMETHODIMP_(NTSTATUS) AllocateAudioBuffer\
1824  (\
1825  IN ULONG RequestedSize,\
1826  OUT PMDL *AudioBufferMdl,\
1827  OUT ULONG *ActualSize,\
1828  OUT ULONG *OffsetFromFirstPage,\
1829  OUT MEMORY_CACHING_TYPE *CacheType\
1830  );\
1831  STDMETHODIMP_(VOID) FreeAudioBuffer\
1832  (\
1833  IN PMDL AudioBufferMdl,\
1834  IN ULONG BufferSize\
1835  );\
1836  STDMETHODIMP_(VOID) GetHWLatency\
1837  (\
1838  OUT KSRTAUDIO_HWLATENCY *hwLatency\
1839  );\
1840  STDMETHODIMP_(NTSTATUS) GetPositionRegister\
1841  (\
1842  OUT KSRTAUDIO_HWREGISTER *Register\
1843  );\
1844  STDMETHODIMP_(NTSTATUS) GetClockRegister\
1845  (\
1846  OUT KSRTAUDIO_HWREGISTER *Register\
1847  )
1848 
1849 
1850 /* ===============================================================
1851  IMiniportWaveRTStreamNotification Interface
1852 */
1853 
1854 #undef INTERFACE
1855 #define INTERFACE IMiniportWaveRTStreamNotification
1856 
1857 DEFINE_GUID(IID_IMiniportWaveRTStreamNotification, 0x23759128, 0x96f1, 0x423b, 0xab, 0x4d, 0x81, 0x63, 0x5b, 0xcf, 0x8c, 0xa1);
1858 
1859 DECLARE_INTERFACE_(IMiniportWaveRTStreamNotification, IMiniportWaveRTStream)
1860 {
1862 
1864 
1865  STDMETHOD_(NTSTATUS,AllocateBufferWithNotification)
1866  ( THIS_
1867  IN ULONG NotificationCount,
1868  IN ULONG RequestedSize,
1869  OUT PMDL *AudioBufferMdl,
1870  OUT ULONG *ActualSize,
1871  OUT ULONG *OffsetFromFirstPage,
1873  ) PURE;
1874 
1875  STDMETHOD_(VOID,FreeBufferWithNotification)
1876  ( THIS_
1877  IN PMDL AudioBufferMdl,
1879  ) PURE;
1880 
1881  STDMETHOD_(NTSTATUS,RegisterNotificationEvent)
1882  ( THIS_
1884  ) PURE;
1885 
1886  STDMETHOD_(NTSTATUS,UnregisterNotificationEvent)
1887  ( THIS_
1889  ) PURE;
1890 };
1891 
1892 /* ===============================================================
1893  IMiniportWaveRT Interface
1894 */
1895 
1896 #undef INTERFACE
1897 #define INTERFACE IMiniportWaveRT
1898 
1899 DEFINE_GUID(IID_IMiniportWaveRT, 0xf9fc4d6, 0x6061, 0x4f3c, 0xb1, 0xfc, 0x7, 0x5e, 0x35, 0xf7, 0x96, 0xa);
1900 
1901 DECLARE_INTERFACE_(IMiniportWaveRT, IMiniport)
1902 {
1904 
1906 
1908  ( THIS_
1909  IN PUNKNOWN UnknownAdapter,
1912  ) PURE;
1913 
1914  STDMETHOD_(NTSTATUS,NewStream)
1915  ( THIS_
1917  IN PPORTWAVERTSTREAM PortStream,
1918  IN ULONG Pin,
1919  IN BOOLEAN Capture,
1921  ) PURE;
1922 
1923  STDMETHOD_(NTSTATUS,GetDeviceDescription)
1924  ( THIS_
1926  ) PURE;
1927 };
1928 
1929 typedef IMiniportWaveRT *PMINIPORTWAVERT;
1930 
1931 #define IMP_IMiniportWaveRT\
1932  IMP_IMiniport;\
1933  STDMETHODIMP_(NTSTATUS) Init\
1934  ( IN PUNKNOWN UnknownAdapter,\
1935  IN PRESOURCELIST ResourceList,\
1936  IN PPORTWAVERT Port\
1937  );\
1938  STDMETHODIMP_(NTSTATUS) NewStream\
1939  ( OUT PMINIPORTWAVERTSTREAM * Stream,\
1940  IN PPORTWAVERTSTREAM PortStream,\
1941  IN ULONG Pin,\
1942  IN BOOLEAN Capture,\
1943  IN PKSDATAFORMAT DataFormat\
1944  );\
1945  STDMETHODIMP_(NTSTATUS) GetDeviceDescription\
1946  ( OUT PDEVICE_DESCRIPTION DeviceDescription\
1947  )
1948 
1949 #endif
1950 
1951 /* ===============================================================
1952  IAdapterPowerManagement Interface
1953 */
1954 
1955 #undef INTERFACE
1956 #define INTERFACE IAdapterPowerManagement
1957 
1958 DEFINE_GUID(IID_IAdapterPowerManagement, 0x793417D0L, 0x35FE, 0x11D1, 0xAD, 0x08, 0x00, 0xA0, 0xC9, 0x0A, 0xB1, 0xB0);
1959 
1960 DECLARE_INTERFACE_(IAdapterPowerManagement, IUnknown)
1961 {
1963 
1964  STDMETHOD_(void,PowerChangeState)(THIS_
1965  IN POWER_STATE NewState) PURE;
1966 
1967  STDMETHOD_(NTSTATUS,QueryPowerChangeState)(THIS_
1968  IN POWER_STATE NewStateQuery) PURE;
1969 
1970  STDMETHOD_(NTSTATUS,QueryDeviceCapabilities)(THIS_
1971  IN PDEVICE_CAPABILITIES PowerDeviceCaps) PURE;
1972 };
1973 
1974 #define IMP_IAdapterPowerManagement \
1975  STDMETHODIMP_(void) PowerChangeState \
1976  ( IN POWER_STATE NewState \
1977  ); \
1978  STDMETHODIMP_(NTSTATUS) QueryPowerChangeState \
1979  ( IN POWER_STATE NewStateQuery \
1980  ); \
1981  STDMETHODIMP_(NTSTATUS) QueryDeviceCapabilities \
1982  ( IN PDEVICE_CAPABILITIES PowerDeviceCaps \
1983  )
1984 
1985 typedef IAdapterPowerManagement *PADAPTERPOWERMANAGEMENT;
1986 
1987 
1988 /* ===============================================================
1989  IPowerNotify Interface
1990 */
1991 
1992 #undef INTERFACE
1993 #define INTERFACE IPowerNotify
1994 
1995 DEFINE_GUID(IID_IPowerNotify, 0x3DD648B8L, 0x969F, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3);
1996 
1998 {
2000 
2001  STDMETHOD_(void, PowerChangeNotify)(THIS_
2003 };
2004 
2005 typedef IPowerNotify *PPOWERNOTIFY;
2006 
2007 #define IMP_IPowerNotify\
2008  STDMETHODIMP_(void) PowerChangeNotify\
2009  ( IN POWER_STATE PowerState\
2010  )
2011 
2012 
2013 #undef INTERFACE
2014 
2015 /* ===============================================================
2016  IPinCount Interface
2017 */
2018 #if (NTDDI_VERSION >= NTDDI_WINXP)
2019 
2020 #undef INTERFACE
2021 #define INTERFACE IPinCount
2022 
2023 DEFINE_GUID(IID_IPinCount, 0x5dadb7dcL, 0xa2cb, 0x4540, 0xa4, 0xa8, 0x42, 0x5e, 0xe4, 0xae, 0x90, 0x51);
2024 
2026 {
2028 
2029  STDMETHOD_(void,PinCount)(THIS_
2030  IN ULONG PinId,
2031  IN OUT PULONG FilterNecessary,
2032  IN OUT PULONG FilterCurrent,
2033  IN OUT PULONG FilterPossible,
2034  IN OUT PULONG GlobalCurrent,
2035  IN OUT PULONG GlobalPossible) PURE;
2036 };
2037 typedef IPinCount *PPINCOUNT;
2038 
2039 #undef INTERFACE
2040 #endif
2041 
2042 
2043 /* ===============================================================
2044  IPortEvents Interface
2045 */
2046 
2047 #undef INTERFACE
2048 #define INTERFACE IPortEvents
2049 
2050 DEFINE_GUID(IID_IPortEvents, 0xA80F29C4L, 0x5498, 0x11D2, 0x95, 0xD9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3);
2052 {
2054 
2055  STDMETHOD_(void,AddEventToEventList)(THIS_
2056  IN PKSEVENT_ENTRY EventEntry)PURE;
2057 
2058  STDMETHOD_(void,GenerateEventList)(THIS_
2059  IN GUID* Set OPTIONAL,
2060  IN ULONG EventId,
2061  IN BOOL PinEvent,
2062  IN ULONG PinId,
2063  IN BOOL NodeEvent,
2064  IN ULONG NodeId)PURE;
2065 };
2066 
2067 typedef IPortEvents *PPORTEVENTS;
2068 
2069 
2070 #define IMP_IPortEvents \
2071  STDMETHODIMP_(void) AddEventToEventList( \
2072  IN PKSEVENT_ENTRY EventEntry); \
2073  \
2074  STDMETHODIMP_(void) GenerateEventList( \
2075  IN GUID* Set OPTIONAL, \
2076  IN ULONG EventId, \
2077  IN BOOL PinEvent, \
2078  IN ULONG PinId, \
2079  IN BOOL NodeEvent, \
2080  IN ULONG NodeId)
2081 
2082 /* ===============================================================
2083  IDrmPort / IDrmPort2 Interfaces
2084  These are almost identical, except for the addition of two extra methods.
2085 */
2086 
2087 #undef INTERFACE
2088 #define INTERFACE IDrmPort
2089 
2090 #if (NTDDI_VERSION >= NTDDI_WINXP)
2091 DEFINE_GUID(IID_IDrmPort, 0x286D3DF8L, 0xCA22, 0x4E2E, 0xB9, 0xBC, 0x20, 0xB4, 0xF0, 0xE2, 0x01, 0xCE);
2092 #endif
2093 
2094 #define DEFINE_ABSTRACT_DRMPORT() \
2095  STDMETHOD_(NTSTATUS,CreateContentMixed)(THIS_ \
2096  IN PULONG paContentId, \
2097  IN ULONG cContentId, \
2098  OUT PULONG pMixedContentId)PURE; \
2099  \
2100  STDMETHOD_(NTSTATUS,DestroyContent)(THIS_ \
2101  IN ULONG ContentId)PURE; \
2102  \
2103  STDMETHOD_(NTSTATUS,ForwardContentToFileObject)(THIS_ \
2104  IN ULONG ContentId, \
2105  IN PFILE_OBJECT FileObject)PURE; \
2106  \
2107  STDMETHOD_(NTSTATUS,ForwardContentToInterface)(THIS_ \
2108  IN ULONG ContentId, \
2109  IN PUNKNOWN pUnknown, \
2110  IN ULONG NumMethods)PURE; \
2111  \
2112  STDMETHOD_(NTSTATUS,GetContentRights)(THIS_ \
2113  IN ULONG ContentId, \
2114  OUT PDRMRIGHTS DrmRights)PURE;
2115 
2117 {
2120 };
2121 
2122 typedef IDrmPort *PDRMPORT;
2123 
2124 #define IMP_IDrmPort \
2125  STDMETHODIMP_(NTSTATUS) CreateContentMixed( \
2126  IN PULONG paContentId, \
2127  IN ULONG cContentId, \
2128  OUT PULONG pMixedContentId); \
2129  \
2130  STDMETHODIMP_(NTSTATUS) DestroyContent( \
2131  IN ULONG ContentId); \
2132  \
2133  STDMETHODIMP_(NTSTATUS) ForwardContentToFileObject( \
2134  IN ULONG ContentId, \
2135  IN PFILE_OBJECT FileObject); \
2136  \
2137  STDMETHODIMP_(NTSTATUS) ForwardContentToInterface( \
2138  IN ULONG ContentId, \
2139  IN PUNKNOWN pUnknown, \
2140  IN ULONG NumMethods); \
2141  \
2142  STDMETHODIMP_(NTSTATUS) GetContentRights( \
2143  IN ULONG ContentId, \
2144  OUT PDRMRIGHTS DrmRights)
2145 
2146 
2147 /* ===============================================================
2148  IDrmPort2 Interface
2149 */
2150 
2151 #undef INTERFACE
2152 #define INTERFACE IDrmPort2
2153 
2154 #if (NTDDI_VERSION >= NTDDI_WINXP)
2155 DEFINE_GUID(IID_IDrmPort2, 0x1ACCE59CL, 0x7311, 0x4B6B, 0x9F, 0xBA, 0xCC, 0x3B, 0xA5, 0x9A, 0xCD, 0xCE);
2156 #endif
2157 
2158 DECLARE_INTERFACE_(IDrmPort2, IDrmPort)
2159 {
2162 
2163  STDMETHOD_(NTSTATUS,AddContentHandlers)(THIS_
2164  IN ULONG ContentId,
2165  IN PVOID * paHandlers,
2167 
2168  STDMETHOD_(NTSTATUS,ForwardContentToDeviceObject)(THIS_
2169  IN ULONG ContentId,
2170  IN PVOID Reserved,
2171  IN PCDRMFORWARD DrmForward)PURE;
2172 };
2173 
2174 typedef IDrmPort2 *PDRMPORT2;
2175 
2176 #define IMP_IDrmPort2 \
2177  IMP_IDrmPort; \
2178  STDMETHODIMP_(NTSTATUS) AddContentHandlers( \
2179  IN ULONG ContentId, \
2180  IN PVOID * paHandlers, \
2181  IN ULONG NumHandlers); \
2182  \
2183  STDMETHODIMP_(NTSTATUS) ForwardContentToDeviceObject( \
2184  IN ULONG ContentId, \
2185  IN PVOID Reserved, \
2186  IN PCDRMFORWARD DrmForward)
2187 
2188 
2189 /* ===============================================================
2190  IPortClsVersion Interface
2191 */
2192 #undef INTERFACE
2193 #define INTERFACE IPortClsVersion
2194 
2195 #if (NTDDI_VERSION >= NTDDI_WINXP)
2196 DEFINE_GUID(IID_IPortClsVersion, 0x7D89A7BBL, 0x869B, 0x4567, 0x8D, 0xBE, 0x1E, 0x16, 0x8C, 0xC8, 0x53, 0xDE);
2197 #endif
2198 
2199 DECLARE_INTERFACE_(IPortClsVersion, IUnknown)
2200 {
2202 
2204 };
2205 
2206 #define IMP_IPortClsVersion \
2207  STDMETHODIMP_(DWORD) GetVersion(void);
2208 
2209 typedef IPortClsVersion *PPORTCLSVERSION;
2210 
2211 #undef INTERFACE
2212 
2213 #if (NTDDI_VERSION >= NTDDI_WINXP)
2214 DEFINE_GUID(IID_IMusicTechnology,
2215 0x80396C3CL, 0xCBCB, 0x409B, 0x9F, 0x65, 0x4F, 0x1E, 0x74, 0x67, 0xCD, 0xAF);
2216 #endif
2217 
2218 /* ===============================================================
2219  IDmaOperations Interface
2220 */
2221 
2222 /* ===============================================================
2223  IPreFetchOffset Interface
2224 */
2225 
2226 /* ===============================================================
2227  PortCls API Functions
2228 */
2229 
2230 typedef NTSTATUS
2233  IN PIRP Irp,
2235 
2236 /* This is in NTDDK.H */
2237 /*
2238 typedef NTSTATUS (*PDRIVER_ADD_DEVICE)(
2239  IN struct _DRIVER_OBJECT* DriverObject,
2240  IN struct _DEVICE_OBJECT* PhysicalDeviceObject);
2241 */
2242 
2248  IN ULONG MaxObjects,
2249  IN ULONG DeviceExtensionSize);
2250 
2254  IN PUNICODE_STRING RegistryPathName,
2256 
2257 /* ===============================================================
2258  Factories (TODO: Move elsewhere)
2259 */
2260 
2263  OUT PDMACHANNEL* OutDmaChannel,
2264  IN PUNKNOWN OuterUnknown OPTIONAL,
2268 
2271  OUT PINTERRUPTSYNC* OUtInterruptSync,
2272  IN PUNKNOWN OuterUnknown OPTIONAL,
2274  IN ULONG ResourceIndex,
2276 
2279  OUT PMINIPORT* OutMiniport,
2280  IN REFCLSID ClassId);
2281 
2283 PcNewPort(
2284  OUT PPORT* OutPort,
2285  IN REFCLSID ClassId);
2286 
2289  OUT PREGISTRYKEY* OutRegistryKey,
2290  IN PUNKNOWN OuterUnknown OPTIONAL,
2291  IN ULONG RegistryKeyType,
2294  IN PVOID SubDevice OPTIONAL,
2298 
2301  OUT PRESOURCELIST* OutResourceList,
2302  IN PUNKNOWN OuterUnknown OPTIONAL,
2304  IN PCM_RESOURCE_LIST TranslatedResources,
2305  IN PCM_RESOURCE_LIST UntranslatedResources);
2306 
2309  OUT PRESOURCELIST* OutResourceList,
2310  IN PUNKNOWN OuterUnknown OPTIONAL,
2312  IN PRESOURCELIST ParentList,
2313  IN ULONG MaximumEntries);
2314 
2317  OUT PSERVICEGROUP* OutServiceGroup,
2318  IN PUNKNOWN OuterUnknown OPTIONAL);
2319 
2320 
2321 /* ===============================================================
2322  IRP Handling
2323 */
2324 
2328  IN PIRP Irp);
2329 
2333  IN PIRP Irp,
2334  IN NTSTATUS Status);
2335 
2339  IN PIRP Irp);
2340 
2341 /* ===============================================================
2342  Power Management
2343 */
2344 
2348  IN PVOID pvContext1);
2349 
2353 
2357  IN DEVICE_POWER_STATE RequestedNewState);
2358 
2359 /* ===============================================================
2360  Properties
2361 */
2362 
2368  OUT PVOID PropertyBuffer,
2370 
2373  IN PPCPROPERTY_REQUEST PropertyRequest,
2374  IN NTSTATUS NtStatus);
2375 
2376 /* ===============================================================
2377  I/O Timeouts
2378 */
2379 
2383  IN PIO_TIMER_ROUTINE pTimerRoutine,
2384  IN PVOID pContext);
2385 
2389  IN PIO_TIMER_ROUTINE pTimerRoutine,
2390  IN PVOID pContext);
2391 
2392 /* ===============================================================
2393  Physical Connections
2394 */
2395 
2399  IN PUNKNOWN FromUnknown,
2400  IN ULONG FromPin,
2401  IN PUNKNOWN ToUnknown,
2402  IN ULONG ToPin);
2403 
2407  IN PUNICODE_STRING FromString,
2408  IN ULONG FromPin,
2409  IN PUNKNOWN ToUnknown,
2410  IN ULONG ToPin);
2411 
2415  IN PUNKNOWN FromUnknown,
2416  IN ULONG FromPin,
2418  IN ULONG ToPin);
2419 
2420 /* ===============================================================
2421  Misc
2422 */
2423 
2426  IN ULONGLONG Since);
2427 
2428 #define GTI_SECONDS(t) (ULONGLONG(t)*10000000)
2429 #define GTI_MILLISECONDS(t) (ULONGLONG(t)*10000)
2430 #define GTI_MICROSECONDS(t) (ULONGLONG(t)*10)
2431 
2435  IN PWCHAR Name,
2436  IN PUNKNOWN Unknown);
2437 
2438 /* ===============================================================
2439  Digital Rights Management Functions
2440  Implemented in XP and above
2441 */
2442 
2445  IN ULONG ContentId,
2446  IN PVOID *paHandlers,
2447  IN ULONG NumHandlers);
2448 
2451  IN PULONG paContentId,
2454 
2457  IN ULONG ContentId);
2458 
2461  IN ULONG ContentId,
2462  IN PVOID Reserved,
2463  IN PCDRMFORWARD DrmForward);
2464 
2467  IN ULONG ContentId,
2469 
2472  IN ULONG ContentId,
2474  IN ULONG NumMethods);
2475 
2478  IN ULONG ContentId,
2480 
2481 #endif /* PORTCLS_H */
PORTCLASSAPI NTSTATUS NTAPI PcCompletePendingPropertyRequest(IN PPCPROPERTY_REQUEST PropertyRequest, IN NTSTATUS NtStatus)
Definition: api.cpp:188
IN CINT OUT PVOID IN ULONG OUT PULONG ResultLength
Definition: conport.c:47
IPortWaveRTStream * PPORTWAVERTSTREAM
Definition: portcls.h:1791
IServiceGroup * PSERVICEGROUP
Definition: portcls.h:614
DEVICE_REGISTRY_PROPERTY
Definition: iotypes.h:1154
BOOL WINAPI SHIM_OBJ_NAME() Notify(DWORD fdwReason, PVOID ptr)
IPortEvents * PPORTEVENTS
Definition: portcls.h:2065
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:35
PCPFNMETHOD_HANDLER Handler
Definition: portcls.h:303
CPPORT Port[4]
Definition: headless.c:34
_In_ PCWSTR _Inout_ _At_ QueryTable _Pre_unknown_ PRTL_QUERY_REGISTRY_TABLE QueryTable
Definition: rtlfuncs.h:4004
#define IN
Definition: typedefs.h:38
_In_ PNDIS_STRING _In_ PNDIS_STRING _Out_ PDEVICE_OBJECT * pDeviceObject
Definition: ndis.h:4679
_In_ BOOLEAN Read
Definition: strmini.h:479
IPortWaveRT * PPORTWAVERT
Definition: interfaces.hpp:682
Definition: drmk.h:18
IDmaChannel * PDMACHANNEL
Definition: portcls.h:772
ULONG MaxGlobalInstanceCount
Definition: portcls.h:339
_Must_inspect_result_ _In_ PFILE_OBJECT _In_opt_ PLARGE_INTEGER _In_ ULONG _In_ FLT_IO_OPERATION_FLAGS _Out_opt_ PULONG BytesWritten
Definition: fltkernel.h:1293
IMiniport * PMINIPORT
Definition: portcls.h:1297
_In_ UCHAR _In_ POWER_STATE PowerState
Definition: pofuncs.h:42
#define DEFINE_ABSTRACT_DMACHANNEL()
Definition: portcls.h:707
PORTCLASSAPI NTSTATUS NTAPI PcUnregisterIoTimeout(IN PDEVICE_OBJECT pDeviceObject, IN PIO_TIMER_ROUTINE pTimerRoutine, IN PVOID pContext)
Definition: api.cpp:137
typedef NTSTATUS(NTAPI *PCPFNEVENT_HANDLER)(IN struct _PCEVENT_REQUEST *EventRequest)
#define DEFINE_ABSTRACT_UNKNOWN()
Definition: ksiface.h:5
#define THIS_
Definition: basetyps.h:65
_In_ PKSPIN_CONNECT Connect
Definition: ks.h:4536
Type
Definition: Type.h:6
_Must_inspect_result_ _Out_ PNDIS_STATUS _In_ NDIS_HANDLE _In_ PNDIS_STRING SubKeyName
Definition: ndis.h:4723
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:310
IPortTopology * PPORTTOPOLOGY
Definition: portcls.h:1403
IMiniportTopology * PMINIPORTTOPOLOGY
Definition: portcls.h:1431
_In_ ULONG Mode
Definition: hubbusif.h:303
IPinCount * PPINCOUNT
Definition: portcls.h:2036
#define DEFINE_ABSTRACT_MINIPORT()
Definition: portcls.h:1269
_In_ ULONG _In_ KEY_INFORMATION_CLASS KeyInformationClass
Definition: zwfuncs.h:166
PORTCLASSAPI NTSTATUS NTAPI PcDestroyContent(IN ULONG ContentId)
Definition: drm.cpp:41
enum _KEY_INFORMATION_CLASS KEY_INFORMATION_CLASS
const GUID * Set
Definition: portcls.h:237
PORTCLASSAPI NTSTATUS NTAPI PcGetDeviceProperty(IN PVOID DeviceObject, IN DEVICE_REGISTRY_PROPERTY DeviceProperty, IN ULONG BufferLength, OUT PVOID PropertyBuffer, OUT PULONG ResultLength)
Definition: api.cpp:19
const GUID * Categories
Definition: portcls.h:365
#define THIS
Definition: basetyps.h:66
const GUID * Type
Definition: portcls.h:349
ULONG Flags
Definition: portcls.h:279
PORTCLASSAPI NTSTATUS NTAPI PcInitializeAdapterDriver(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPathName, IN PDRIVER_ADD_DEVICE AddDevice)
Definition: adapter.cpp:32
_In_ PIRP Irp
Definition: csq.h:116
const PCPROPERTY_ITEM * Properties
Definition: portcls.h:321
const PCAUTOMATION_TABLE * AutomationTable
Definition: portcls.h:355
DRIVER_ADD_DEVICE AddDevice
Definition: parport.h:72
#define REFCLSID
Definition: guiddef.h:117
PUNKNOWN MinorTarget
Definition: portcls.h:285
PORTCLASSAPI NTSTATUS NTAPI PcRequestNewPowerState(IN PDEVICE_OBJECT pDeviceObject, IN DEVICE_POWER_STATE RequestedNewState)
Definition: power.cpp:91
PORTCLASSAPI NTSTATUS NTAPI PcGetContentRights(IN ULONG ContentId, OUT PDRMRIGHTS DrmRights)
Definition: drm.cpp:81
IMusicTechnology * PMUSICTECHNOLOGY
Definition: portcls.h:1018
static COORD Position
Definition: mouse.c:34
IPortWavePciStream * PPORTWAVEPCISTREAM
Definition: portcls.h:1571
IMiniportWaveRTStream * PMINIPORTWAVERTSTREAM
Definition: portcls.h:1809
LONG NTSTATUS
Definition: precomp.h:26
_In_ PKSALLOCATOR_FRAMING AllocatorFraming
Definition: ks.h:4518
struct _PCPROPERTY_REQUEST * PPCPROPERTY_REQUEST
Definition: portcls.h:230
PORTCLASSAPI NTSTATUS NTAPI PcForwardContentToFileObject(IN ULONG ContentId, IN PFILE_OBJECT FileObject)
Definition: drm.cpp:61
PUNKNOWN MinorTarget
Definition: portcls.h:259
enum _DMA_WIDTH DMA_WIDTH
IServiceSink * PSERVICESINK
Definition: portcls.h:569
struct _PCMETHOD_ITEM PCMETHOD_ITEM
ULONG EventItemSize
Definition: portcls.h:325
PORTCLASSAPI NTSTATUS NTAPI PcRegisterAdapterPowerManagement(IN PUNKNOWN pUnknown, IN PVOID pvContext1)
Definition: power.cpp:19
ULONG MethodItemSize
Definition: portcls.h:322
PORTCLASSAPI NTSTATUS NTAPI PcRegisterIoTimeout(IN PDEVICE_OBJECT pDeviceObject, IN PIO_TIMER_ROUTINE pTimerRoutine, IN PVOID pContext)
Definition: api.cpp:79
struct PCNODE_DESCRIPTOR * PPCNODE_DESCRIPTOR
IUnregisterSubdevice * PUNREGISTERSUBDEVICE
Definition: portcls.h:633
const PCNODE_DESCRIPTOR * Nodes
Definition: portcls.h:361
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn BOOLEAN Physical 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:722
uint16_t * PWCHAR
Definition: typedefs.h:54
PDEVICE_OBJECT PhysicalDeviceObject
Definition: btrfs_drv.h:1114
KSPIN_DESCRIPTOR KsPinDescriptor
Definition: portcls.h:343
static BOOL Write(PBYTE Address, PBYTE Data, SIZE_T Size)
Definition: vmhorizon.c:15
PORTCLASSAPI NTSTATUS NTAPI PcRegisterPhysicalConnectionToExternal(IN PDEVICE_OBJECT DeviceObject, IN PUNKNOWN FromUnknown, IN ULONG FromPin, IN PUNICODE_STRING ToString, IN ULONG ToPin)
Definition: connection.cpp:321
_In_ const GUID _In_ ULONG PinCount
Definition: strmini.h:504
NTSTATUS(NTAPI * PCPFNPROPERTY_HANDLER)(IN PPCPROPERTY_REQUEST PropertyRequest)
Definition: portcls.h:233
PORTCLASSAPI NTSTATUS NTAPI PcRegisterPhysicalConnectionFromExternal(IN PDEVICE_OBJECT DeviceObject, IN PUNICODE_STRING FromString, IN ULONG FromPin, IN PUNKNOWN ToUnknown, IN ULONG ToPin)
Definition: connection.cpp:304
PORTCLASSAPI NTSTATUS NTAPI PcRegisterSubdevice(IN PDEVICE_OBJECT DeviceObject, IN PWCHAR Name, IN PUNKNOWN Unknown)
Definition: adapter.cpp:210
INTERRUPTSYNCMODE
Definition: portcls.h:828
ULONG Id
Definition: portcls.h:278
const MUI_LANGUAGE_RESOURCE ResourceList[]
Definition: muilanguages.h:414
_In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Reserved_ ULONG _In_opt_ PUNICODE_STRING _In_ ULONG _Out_opt_ PULONG Disposition
Definition: cmfuncs.h:50
IMiniportWaveRT * PMINIPORTWAVERT
Definition: portcls.h:1927
DWORD WINAPI GetVersion(VOID)
Definition: version.c:22
struct _PCEVENT_ITEM PCEVENT_ITEM
static BOOL Set
Definition: pageheap.c:10
IMiniportWavePciStream * PMINIPORTWAVEPCISTREAM
Definition: portcls.h:1624
const GUID * Set
Definition: portcls.h:300
const GUID * Name
Definition: portcls.h:350
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:281
const PCMETHOD_ITEM * Methods
Definition: portcls.h:324
struct PCPIN_DESCRIPTOR * PPCPIN_DESCRIPTOR
ULONG ConnectionCount
Definition: portcls.h:362
__GNU_EXTENSION typedef __int64 * PLONGLONG
Definition: ntbasedef.h:389
WCHAR First[]
Definition: FormatMessage.c:11
_In_ PUNICODE_STRING ValueName
Definition: cmfuncs.h:264
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
PORTCLASSAPI NTSTATUS NTAPI PcNewMiniport(OUT PMINIPORT *OutMiniport, IN REFCLSID ClassId)
Definition: miniport.cpp:48
#define DEFINE_GUIDSTRUCT(guid, name)
Definition: ks.h:98
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
PORTCLASSAPI NTSTATUS NTAPI PcForwardContentToDeviceObject(IN ULONG ContentId, IN PVOID Reserved, IN PCDRMFORWARD DrmForward)
Definition: drm.cpp:50
unsigned int BOOL
Definition: ntddk_ex.h:94
_Inout_ PMDL MemoryDescriptorList
Definition: mmfuncs.h:406
_In_ ULONG BufferLength
Definition: usbdlib.h:225
PKSEVENT_ENTRY EventEntry
Definition: portcls.h:288
const PCCONNECTION_DESCRIPTOR * Connections
Definition: portcls.h:363
struct _PCEVENT_ITEM * PPCEVENT_ITEM
PUNKNOWN MajorTarget
Definition: portcls.h:307
DEFINE_GUID(CLSID_MiniportDriverFmSynth, 0xb4c90ae0L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44)
const PCAUTOMATION_TABLE * AutomationTable
Definition: portcls.h:348
_In_ BOOLEAN Dma64BitAddresses
Definition: ndis.h:4652
IPort * PPORT
Definition: portcls.h:1093
unsigned char BOOLEAN
_Must_inspect_result_ _In_ PHYSICAL_ADDRESS _In_ PHYSICAL_ADDRESS _In_opt_ PHYSICAL_ADDRESS _In_ MEMORY_CACHING_TYPE CacheType
Definition: mmfuncs.h:214
struct PCAUTOMATION_TABLE * PPCAUTOMATION_TABLE
_In_ LPGUID _In_ PVOID Data
Definition: classpnp.h:778
static PDRIVER_OBJECT DriverObject
Definition: template.c:42
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
#define PORTCLASSAPI
Definition: portcls.h:148
ULONG PropertyCount
Definition: portcls.h:320
IMiniportWavePci * PMINIPORTWAVEPCI
Definition: portcls.h:1660
DECLARE_INTERFACE_(IResourceList, IUnknown)
Definition: portcls.h:387
PORTCLASSAPI NTSTATUS NTAPI PcNewServiceGroup(OUT PSERVICEGROUP *OutServiceGroup, IN PUNKNOWN OuterUnknown OPTIONAL)
GUID IID_IDmaChannelSlave
PCPFNPROPERTY_HANDLER Handler
Definition: portcls.h:253
_Inout_ PFILE_OBJECT FileObject
Definition: cdprocs.h:593
ULONG Flags
Definition: portcls.h:302
struct PCFILTER_DESCRIPTOR * PPCFILTER_DESCRIPTOR
PORTCLASSAPI NTSTATUS NTAPI PcCompleteIrp(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN NTSTATUS Status)
Definition: irp.cpp:483
struct PCCONNECTION_DESCRIPTOR * PPCCONNECTIONDESCRIPTOR
IUnregisterPhysicalConnection * PUNREGISTERPHYSICALCONNECTION
Definition: portcls.h:675
DWORD Interval
Definition: netstat.c:33
PORTCLASSAPI NTSTATUS NTAPI PcNewPort(OUT PPORT *OutPort, IN REFCLSID ClassId)
Definition: port.cpp:20
NTSTATUS(NTAPI * PCPFNSTARTDEVICE)(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PRESOURCELIST ResourceList)
Definition: portcls.h:2231
_In_ PUNKNOWN pUnknown
Definition: drmk.h:76
enum _DEVICE_POWER_STATE DEVICE_POWER_STATE
const PCPROPERTY_ITEM * PropertyItem
Definition: portcls.h:261
_Must_inspect_result_ _In_ PDEVICE_DESCRIPTION DeviceDescription
Definition: iofuncs.h:1015
PORTCLASSAPI NTSTATUS NTAPI PcNewInterruptSync(OUT PINTERRUPTSYNC *OUtInterruptSync, IN PUNKNOWN OuterUnknown OPTIONAL, IN PRESOURCELIST ResourceList, IN ULONG ResourceIndex, IN INTERRUPTSYNCMODE Mode)
Definition: interrupt.cpp:323
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID * BaseAddress
Definition: mmfuncs.h:404
PUNKNOWN MinorTarget
Definition: portcls.h:308
IRegistryKey * PREGISTRYKEY
Definition: portcls.h:999
IDrmPort2 * PDRMPORT2
Definition: portcls.h:2172
IN PDCB IN VBO IN ULONG IN BOOLEAN Pin
Definition: fatprocs.h:415
struct _PCMETHOD_ITEM * PPCMETHOD_ITEM
INT POOL_TYPE
Definition: typedefs.h:76
uint64_t ULONGLONG
Definition: typedefs.h:65
struct _PCEVENT_REQUEST PCEVENT_REQUEST
PUNKNOWN MajorTarget
Definition: portcls.h:284
struct _PCMETHOD_REQUEST PCMETHOD_REQUEST
ULONG PropertyItemSize
Definition: portcls.h:319
IAdapterPowerManagement * PADAPTERPOWERMANAGEMENT
Definition: portcls.h:1985
IDrmPort * PDRMPORT
Definition: portcls.h:2120
IMiniportWaveCyclicStream * PMINIPORTWAVECYCLICSTREAM
Definition: portcls.h:1468
static const UCHAR Index[8]
Definition: usbohci.c:18
PORTCLASSAPI NTSTATUS NTAPI PcAddContentHandlers(IN ULONG ContentId, IN PVOID *paHandlers, IN ULONG NumHandlers)
Definition: drm.cpp:19
#define BufferSize
Definition: classpnp.h:419
unsigned long DWORD
Definition: ntddk_ex.h:95
_Must_inspect_result_ _In_opt_ PFLT_INSTANCE _Out_ PHANDLE _In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Out_ PIO_STATUS_BLOCK _In_opt_ PLARGE_INTEGER _In_ ULONG _In_ ULONG _In_ ULONG _In_ ULONG CreateOptions
Definition: fltkernel.h:1230
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
* PFILE_OBJECT
Definition: iotypes.h:1955
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:142
struct _PCEVENT_REQUEST * PPCEVENT_REQUEST
IPortWaveRT * PPORTWAVERT
Definition: portcls.h:1729
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS PhysicalAddress
Definition: iotypes.h:1061
IDmaChannelSlave * PDMACHANNELSLAVE
Definition: portcls.h:819
PUNKNOWN MajorTarget
Definition: portcls.h:258
_In_ ULONG _In_ BOOLEAN _Must_inspect_result_ PVOID * VirtualAddress
Definition: ndis.h:3791
const PCEVENT_ITEM * EventItem
Definition: portcls.h:287
PORTCLASSAPI NTSTATUS NTAPI PcUnregisterAdapterPowerManagement(IN PDEVICE_OBJECT DeviceObject)
Definition: power.cpp:53
* PDEVICE_CAPABILITIES
Definition: iotypes.h:928
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _In_ LARGE_INTEGER ByteCount
Definition: iotypes.h:1061
Status
Definition: gdiplustypes.h:24
enum _DMA_SPEED DMA_SPEED
IResourceList * PRESOURCELIST
Definition: portcls.h:442
PORTCLASSAPI NTSTATUS NTAPI PcNewResourceSublist(OUT PRESOURCELIST *OutResourceList, IN PUNKNOWN OuterUnknown OPTIONAL, IN POOL_TYPE PoolType, IN PRESOURCELIST ParentList, IN ULONG MaximumEntries)
Definition: resource.cpp:410
UnicodeString MaximumLength
Definition: rtlfuncs.h:2982
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1560
PORTCLASSAPI NTSTATUS NTAPI PcDispatchIrp(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: irp.cpp:433
ULONG_PTR SIZE_T
Definition: typedefs.h:78
IMiniportWaveCyclic * PMINIPORTWAVECYCLIC
Definition: portcls.h:1524
enum State_ State
Definition: pofuncs.h:54
KSSTATE
Definition: ks.h:1214
_In_ DEVICE_REGISTRY_PROPERTY DeviceProperty
Definition: iofuncs.h:1003
_In_ ULONG cContentId
Definition: drmk.h:48
_Must_inspect_result_ _In_ PHYSICAL_ADDRESS HighAddress
Definition: mmfuncs.h:226
PORTCLASSAPI NTSTATUS NTAPI PcForwardIrpSynchronous(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: irp.cpp:536
IPortWavePci * PPORTWAVEPCI
Definition: portcls.h:1236
ULONG MaxFilterInstanceCount
Definition: portcls.h:340
_In_ PIO_STACK_LOCATION _Inout_ PFILE_OBJECT _Inout_ PVCB _Outptr_result_maybenull_ PDCB _In_ PDCB _In_ PDIRENT _In_ ULONG _In_ ULONG _In_ PUNICODE_STRING _In_ PACCESS_MASK DesiredAccess
Definition: create.c:4157
BOOL DeleteKey(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath)
Definition: edit.c:1456
DRIVER_ADD_DEVICE * PDRIVER_ADD_DEVICE
Definition: iotypes.h:2108
IMiniportMidi * PMINIPORTMIDI
Definition: portcls.h:1366
#define OPTIONAL
Definition: typedefs.h:40
unsigned int * PULONG
Definition: retypes.h:1
#define PURE
Definition: basetyps.h:64
_In_ struct _IRP _In_ struct _SCATTER_GATHER_LIST * ScatterGather
Definition: iotypes.h:2259
const PCMETHOD_ITEM * MethodItem
Definition: portcls.h:310
PORTCLASSAPI NTSTATUS NTAPI PcAddAdapterDevice(IN PDRIVER_OBJECT DriverObject, IN PDEVICE_OBJECT PhysicalDeviceObject, IN PCPFNSTARTDEVICE StartDevice, IN ULONG MaxObjects, IN ULONG DeviceExtensionSize)
Definition: adapter.cpp:76
IInterruptSync * PINTERRUPTSYNC
Definition: portcls.h:878
IN ULONG IN ULONG Tag
Definition: evtlib.h:159
IPowerNotify * PPOWERNOTIFY
Definition: portcls.h:2003
ULONG MinFilterInstanceCount
Definition: portcls.h:341
_In_ ULONG _Out_ PULONG pMixedContentId
Definition: drmk.h:48
PORTCLASSAPI NTSTATUS NTAPI PcForwardContentToInterface(IN ULONG ContentId, IN PUNKNOWN pUnknown, IN ULONG NumMethods)
Definition: drm.cpp:71
const GUID * Set
Definition: portcls.h:277
#define OUT
Definition: typedefs.h:39
__GNU_EXTENSION typedef unsigned __int64 * PULONGLONG
Definition: ntbasedef.h:390
PCPFNEVENT_HANDLER Handler
Definition: portcls.h:280
const PCPIN_DESCRIPTOR * Pins
Definition: portcls.h:358
IO_TIMER_ROUTINE * PIO_TIMER_ROUTINE
Definition: iotypes.h:2508
unsigned int ULONG
Definition: retypes.h:1
struct _PCMETHOD_REQUEST * PPCMETHOD_REQUEST
const PCEVENT_ITEM * Events
Definition: portcls.h:327
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:491
#define DEFINE_ABSTRACT_MINIPORTWAVERTSTREAM()
Definition: portcls.h:1667
struct _KSEVENT_ENTRY * PKSEVENT_ENTRY
Definition: ks.h:2101
_Out_ PDRMRIGHTS DrmRights
Definition: drmk.h:84
PORTCLASSAPI NTSTATUS NTAPI PcRegisterPhysicalConnection(IN PDEVICE_OBJECT DeviceObject, IN PUNKNOWN FromUnknown, IN ULONG FromPin, IN PUNKNOWN ToUnknown, IN ULONG ToPin)
Definition: connection.cpp:286
PORTCLASSAPI NTSTATUS NTAPI PcCreateContentMixed(IN PULONG paContentId, IN ULONG cContentId, OUT PULONG pMixedContentId)
Definition: drm.cpp:30
_In_ ULONG _In_ KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass
Definition: cmfuncs.h:93
#define STDMETHOD_(t, m)
Definition: basetyps.h:63
IN BOOLEAN OUT PSTR Buffer
Definition: progress.h:34
const PCAUTOMATION_TABLE * AutomationTable
Definition: portcls.h:342
enum _MEMORY_CACHING_TYPE MEMORY_CACHING_TYPE
IMiniportMidiStream * PMINIPORTMIDISTREAM
Definition: portcls.h:1330
_Must_inspect_result_ _In_ FLT_CONTEXT_TYPE _In_ SIZE_T _In_ POOL_TYPE PoolType
Definition: fltkernel.h:1444
_In_ ULONG NumHandlers
Definition: drmk.h:41
std::string ToString(XMLHandle node)
Definition: xml2sdb.cpp:59
PORTCLASSAPI ULONGLONG NTAPI PcGetTimeInterval(IN ULONGLONG Since)
Definition: api.cpp:37
IPortWaveCyclic * PPORTWAVECYCLIC
Definition: portcls.h:1172
IPortMidi * PPORTMIDI
Definition: portcls.h:1120
_In_ NDIS_STATUS _In_ ULONG _In_ USHORT _In_opt_ PVOID _In_ ULONG DataSize
Definition: ndis.h:4751
#define DEFINE_ABSTRACT_DRMPORT()
Definition: portcls.h:2094
_Inout_opt_ PUNICODE_STRING _Inout_opt_ PUNICODE_STRING Stream
Definition: fltkernel.h:1092
ULONG ACCESS_MASK
Definition: nt_native.h:40
_Must_inspect_result_ _In_ PFILE_OBJECT _In_opt_ PLARGE_INTEGER _In_ ULONG _In_ FLT_IO_OPERATION_FLAGS _Out_opt_ PULONG BytesRead
Definition: fltkernel.h:1255
IN PVOID DynamicContext
Definition: portcls.h:839
DWORD GetPosition(DWORD private_handle, PMMTIME time, DWORD time_size)
#define DEFINE_ABSTRACT_DMACHANNELSLAVE()
Definition: portcls.h:781
enum _KEY_VALUE_INFORMATION_CLASS KEY_VALUE_INFORMATION_CLASS
Definition: reg.c:135
_Must_inspect_result_ _In_ PHYSICAL_ADDRESS _In_ PHYSICAL_ADDRESS _In_ SIZE_T TotalBytes
Definition: mmfuncs.h:226
#define DEFINE_ABSTRACT_PORT()
Definition: portcls.h:1037
struct PCPROPERTY_ITEM * PPCPROPERTY_ITEM
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
IPortClsVersion * PPORTCLSVERSION
Definition: portcls.h:2209