* Annotate swenum.h.

svn path=/trunk/; revision=60023
This commit is contained in:
Amine Khaldi 2013-09-10 23:31:39 +00:00
parent 54f807af0c
commit 2f66f47d0c

View file

@ -1,9 +1,16 @@
#pragma once
#ifndef _SWENUM_ #ifndef _SWENUM_
#define _SWENUM_ #define _SWENUM_
#define IOCTL_SWENUM_INSTALL_INTERFACE CTL_CODE(FILE_DEVICE_BUS_EXTENDER, 0x000, METHOD_BUFFERED, FILE_ANY_ACCESS) #define IOCTL_SWENUM_INSTALL_INTERFACE \
#define IOCTL_SWENUM_REMOVE_INTERFACE CTL_CODE(FILE_DEVICE_BUS_EXTENDER, 0x001, METHOD_BUFFERED, FILE_ANY_ACCESS) CTL_CODE(FILE_DEVICE_BUS_EXTENDER, 0x000, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_SWENUM_GET_BUS_ID CTL_CODE(FILE_DEVICE_BUS_EXTENDER, 0x002, METHOD_NEITHER, FILE_READ_ACCESS)
#define IOCTL_SWENUM_REMOVE_INTERFACE \
CTL_CODE(FILE_DEVICE_BUS_EXTENDER, 0x001, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_SWENUM_GET_BUS_ID \
CTL_CODE(FILE_DEVICE_BUS_EXTENDER, 0x002, METHOD_NEITHER, FILE_READ_ACCESS)
typedef struct _SWENUM_INSTALL_INTERFACE { typedef struct _SWENUM_INSTALL_INTERFACE {
GUID DeviceId; GUID DeviceId;
@ -11,7 +18,7 @@ typedef struct _SWENUM_INSTALL_INTERFACE {
WCHAR ReferenceString[1]; WCHAR ReferenceString[1];
} SWENUM_INSTALL_INTERFACE, *PSWENUM_INSTALL_INTERFACE; } SWENUM_INSTALL_INTERFACE, *PSWENUM_INSTALL_INTERFACE;
#if defined(_KS_) #ifdef _KS_
#define STATIC_BUSID_SoftwareDeviceEnumerator STATIC_KSMEDIUMSETID_Standard #define STATIC_BUSID_SoftwareDeviceEnumerator STATIC_KSMEDIUMSETID_Standard
#define BUSID_SoftwareDeviceEnumerator KSMEDIUMSETID_Standard #define BUSID_SoftwareDeviceEnumerator KSMEDIUMSETID_Standard
#else #else
@ -19,15 +26,26 @@ typedef struct _SWENUM_INSTALL_INTERFACE {
0x4747B320L, 0x62CE, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00 0x4747B320L, 0x62CE, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
#endif /* _KS_ */ #endif /* _KS_ */
#if defined(_NTDDK_) #ifdef _NTDDK_
#if !defined(_KS_) #ifndef _KS_
typedef VOID (NTAPI *PFNREFERENCEDEVICEOBJECT)(PVOID Context);
typedef VOID (NTAPI *PFNDEREFERENCEDEVICEOBJECT)(PVOID Context);
typedef NTSTATUS (NTAPI *PFNQUERYREFERENCESTRING)(PVOID Context, PWCHAR *String);
#endif /* _KS_ */
#define BUS_INTERFACE_SWENUM_VERSION 0x100 typedef VOID
(NTAPI *PFNREFERENCEDEVICEOBJECT)(
_In_ PVOID Context);
typedef VOID
(NTAPI *PFNDEREFERENCEDEVICEOBJECT)(
_In_ PVOID Context);
typedef NTSTATUS
(NTAPI *PFNQUERYREFERENCESTRING)(
_In_ PVOID Context,
_Inout_ PWCHAR *String);
#endif /* !_KS_ */
#define BUS_INTERFACE_SWENUM_VERSION 0x100
typedef struct _BUS_INTERFACE_SWENUM { typedef struct _BUS_INTERFACE_SWENUM {
INTERFACE Interface; INTERFACE Interface;
@ -40,90 +58,98 @@ typedef struct _BUS_INTERFACE_SWENUM {
extern "C" { extern "C" {
#endif #endif
#if defined(_KS_) #ifdef _KS_
KSDDKAPI KSDDKAPI
NTSTATUS NTSTATUS
NTAPI NTAPI
KsQuerySoftwareBusInterface( KsQuerySoftwareBusInterface(
IN PDEVICE_OBJECT PnpDeviceObject, _In_ PDEVICE_OBJECT PnpDeviceObject,
OUT PBUS_INTERFACE_SWENUM BusInterface); _Out_ PBUS_INTERFACE_SWENUM BusInterface);
KSDDKAPI KSDDKAPI
NTSTATUS NTSTATUS
NTAPI NTAPI
KsReferenceSoftwareBusObject( KsReferenceSoftwareBusObject(
IN KSDEVICE_HEADER Header); _In_ KSDEVICE_HEADER Header);
KSDDKAPI KSDDKAPI
VOID VOID
NTAPI NTAPI
KsDereferenceSoftwareBusObject( KsDereferenceSoftwareBusObject(
IN KSDEVICE_HEADER Header); _In_ KSDEVICE_HEADER Header);
_IRQL_requires_max_(PASSIVE_LEVEL)
KSDDKAPI KSDDKAPI
NTSTATUS NTSTATUS
NTAPI NTAPI
KsCreateBusEnumObject( KsCreateBusEnumObject(
IN PWSTR BusIdentifier, _In_ PWSTR BusIdentifier,
IN PDEVICE_OBJECT BusDeviceObject, _In_ PDEVICE_OBJECT BusDeviceObject,
IN PDEVICE_OBJECT PhysicalDeviceObject, _In_ PDEVICE_OBJECT PhysicalDeviceObject,
IN PDEVICE_OBJECT PnpDeviceObject, _In_opt_ PDEVICE_OBJECT PnpDeviceObject,
IN REFGUID InterfaceGuid, _In_opt_ REFGUID InterfaceGuid,
IN PWSTR ServiceRelativePath); _In_opt_ PWSTR ServiceRelativePath);
KSDDKAPI KSDDKAPI
NTSTATUS NTSTATUS
NTAPI NTAPI
KsGetBusEnumIdentifier( KsGetBusEnumIdentifier(
IN OUT PIRP Irp); _Inout_ PIRP Irp);
_IRQL_requires_max_(PASSIVE_LEVEL)
KSDDKAPI KSDDKAPI
NTSTATUS NTSTATUS
NTAPI NTAPI
KsGetBusEnumPnpDeviceObject( KsGetBusEnumPnpDeviceObject(
IN PDEVICE_OBJECT DeviceObject, _In_ PDEVICE_OBJECT DeviceObject,
OUT PDEVICE_OBJECT *PnpDeviceObject); _Out_ PDEVICE_OBJECT *PnpDeviceObject);
_IRQL_requires_max_(PASSIVE_LEVEL)
KSDDKAPI KSDDKAPI
NTSTATUS NTSTATUS
NTAPI NTAPI
KsInstallBusEnumInterface( KsInstallBusEnumInterface(
IN PIRP Irp); _In_ PIRP Irp);
_IRQL_requires_max_(PASSIVE_LEVEL)
KSDDKAPI KSDDKAPI
NTSTATUS NTSTATUS
NTAPI NTAPI
KsIsBusEnumChildDevice( KsIsBusEnumChildDevice(
IN PDEVICE_OBJECT DeviceObject, _In_ PDEVICE_OBJECT DeviceObject,
OUT PBOOLEAN ChildDevice); _Out_ PBOOLEAN ChildDevice);
_IRQL_requires_max_(PASSIVE_LEVEL)
KSDDKAPI KSDDKAPI
NTSTATUS NTSTATUS
NTAPI NTAPI
KsRemoveBusEnumInterface( KsRemoveBusEnumInterface(
IN PIRP Irp); _In_ PIRP Irp);
_IRQL_requires_max_(PASSIVE_LEVEL)
KSDDKAPI KSDDKAPI
NTSTATUS NTSTATUS
NTAPI NTAPI
KsServiceBusEnumPnpRequest( KsServiceBusEnumPnpRequest(
IN PDEVICE_OBJECT DeviceObject, _In_ PDEVICE_OBJECT DeviceObject,
IN OUT PIRP Irp); _Inout_ PIRP Irp);
_IRQL_requires_max_(PASSIVE_LEVEL)
KSDDKAPI KSDDKAPI
NTSTATUS NTSTATUS
NTAPI NTAPI
KsServiceBusEnumCreateRequest( KsServiceBusEnumCreateRequest(
IN PDEVICE_OBJECT DeviceObject, _In_ PDEVICE_OBJECT DeviceObject,
IN OUT PIRP Irp); _Inout_ PIRP Irp);
_IRQL_requires_max_(PASSIVE_LEVEL)
KSDDKAPI KSDDKAPI
NTSTATUS NTSTATUS
NTAPI NTAPI
KsGetBusEnumParentFDOFromChildPDO( KsGetBusEnumParentFDOFromChildPDO(
IN PDEVICE_OBJECT DeviceObject, _In_ PDEVICE_OBJECT DeviceObject,
OUT PDEVICE_OBJECT *FunctionalDeviceObject); _Out_ PDEVICE_OBJECT *FunctionalDeviceObject);
#endif /* _KS_ */ #endif /* _KS_ */