18(
NTAPI *IoGetDeviceInterfaces_Func)(
25ReactOS_IoGetDeviceInterfaces(
36 PWSTR SymbolicLinkListPtr;
37 GUID Guid = {0x378de44c, 0x56ef, 0x11d1, {0xbc, 0x8c, 0x00, 0xa0, 0xc9, 0x14, 0x05, 0xdd}};
46 "IoGetDeviceInterfaces failed with status 0x%X\n",
53 DPRINT(
"IoGetDeviceInterfaces results:\n");
55 SymbolicLinkListPtr[0] != 0 && SymbolicLinkListPtr[1] != 0;
56 SymbolicLinkListPtr +=
wcslen(SymbolicLinkListPtr) + 1)
58 DPRINT1(
"Symbolic Link: %S\n", SymbolicLinkListPtr);
62 DPRINT(
"[PnP Test] Trying to get aliases\n");
65 SymbolicLinkListPtr[0] != 0 && SymbolicLinkListPtr[1] != 0;
66 SymbolicLinkListPtr +=
wcslen(SymbolicLinkListPtr) + 1)
80 DPRINT(
"[PnP Test] Original: %S\n", SymbolicLinkListPtr);
81 DPRINT(
"[PnP Test] Alias: %S\n", AliasSymbolicLink.
Buffer);
93 GUID Guid = {0x378de44c, 0x56ef, 0x11d1, {0xbc, 0x8c, 0x00, 0xa0, 0xc9, 0x14, 0x05, 0xdd}};
111 "IoRegisterDeviceInterface returned 0x%08lX\n",
Status);
120 "IoRegisterDeviceInterface returned 0x%08lX\n",
Status);
171 (
PVOID)&GUID_DEVICE_SYS_BUTTON,
static VOID DeviceInterfaceTest_Func()
static DRIVER_NOTIFICATION_CALLBACK_ROUTINE NotificationCallback
static VOID Test_IoRegisterPlugPlayNotification(VOID)
static VOID Test_IoRegisterDeviceInterface(VOID)
static VOID Test_IoSetDeviceInterface(VOID)
static UCHAR NotificationContext
#define ok_eq_pointer(value, expected)
#define ok_eq_hex(value, expected)
#define ok_eq_uint(value, expected)
PDEVICE_OBJECT PhysicalDeviceObject
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
#define NT_SUCCESS(StatCode)
static const WCHAR SymbolicLink[]
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define OBJ_KERNEL_HANDLE
VOID KmtFreeGuarded(PVOID Pointer)
#define KmtEndSeh(ExpectedStatus)
BOOLEAN BOOLEAN VOID VOID BOOLEAN BOOLEAN PVOID KmtAllocateGuarded(SIZE_T SizeRequested)
#define InitializeObjectAttributes(p, n, a, r, s)
NTSYSAPI NTSTATUS NTAPI ZwOpenSymbolicLinkObject(_Out_ PHANDLE SymbolicLinkHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSTATUS NTAPI IoGetDeviceInterfaces(IN CONST GUID *InterfaceClassGuid, IN PDEVICE_OBJECT PhysicalDeviceObject OPTIONAL, IN ULONG Flags, OUT PWSTR *SymbolicLinkList)
NTSTATUS NTAPI IoGetDeviceInterfaceAlias(IN PUNICODE_STRING SymbolicLinkName, IN CONST GUID *AliasInterfaceClassGuid, OUT PUNICODE_STRING AliasSymbolicLinkName)
NTSTATUS NTAPI IoRegisterDeviceInterface(IN PDEVICE_OBJECT PhysicalDeviceObject, IN CONST GUID *InterfaceClassGuid, IN PUNICODE_STRING ReferenceString OPTIONAL, OUT PUNICODE_STRING SymbolicLinkName)
NTSTATUS NTAPI IoSetDeviceInterfaceState(IN PUNICODE_STRING SymbolicLinkName, IN BOOLEAN Enable)
NTSTATUS NTAPI ObCloseHandle(IN HANDLE Handle, IN KPROCESSOR_MODE AccessMode)
NTSTATUS NTAPI IoRegisterPlugPlayNotification(_In_ IO_NOTIFICATION_EVENT_CATEGORY EventCategory, _In_ ULONG EventCategoryFlags, _In_opt_ PVOID EventCategoryData, _In_ PDRIVER_OBJECT DriverObject, _In_ PDRIVER_NOTIFICATION_CALLBACK_ROUTINE CallbackRoutine, _Inout_opt_ PVOID Context, _Out_ PVOID *NotificationEntry)
NTSTATUS NTAPI IoUnregisterPlugPlayNotification(_In_ PVOID NotificationEntry)
PULONG MinorVersion OPTIONAL
struct _DEVICE_NODE * DeviceNode
#define RtlCopyMemory(Destination, Source, Length)
#define STATUS_INVALID_DEVICE_REQUEST
#define STATUS_INVALID_PARAMETER
#define STATUS_OBJECT_NAME_NOT_FOUND
_In_ PWDFDEVICE_INIT _In_ PFN_WDF_DEVICE_SHUTDOWN_NOTIFICATION Notification
_In_ PDEVICE_OBJECT DeviceObject
_Must_inspect_result_ _In_ WDFDEVICE _In_ PCUNICODE_STRING SymbolicLinkName
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
_Must_inspect_result_ _In_ WDFOBJECT _In_ CONST GUID * Guid
_Must_inspect_result_ _In_ ULONG Flags
_In_opt_ PDEVICE_OBJECT _In_ ULONG _Outptr_result_nullonfailure_ _At_ * SymbolicLinkList(return==0, __drv_allocatesMem(Mem))) PZZWSTR *SymbolicLinkList
_In_ CONST GUID * InterfaceClassGuid
_In_ ULONG _In_opt_ PVOID _In_ PDRIVER_OBJECT _In_ PDRIVER_NOTIFICATION_CALLBACK_ROUTINE _Inout_opt_ __drv_aliasesMem PVOID _Outptr_result_nullonfailure_ _At_ * NotificationEntry(return==0, __drv_allocatesMem(Mem))) PVOID *NotificationEntry
_In_ PVOID NotificationStructure
struct _DEVOBJ_EXTENSION * PDEVOBJ_EXTENSION
@ EventCategoryDeviceInterfaceChange
#define PNPNOTIFY_DEVICE_INTERFACE_INCLUDE_EXISTING_INTERFACES