ReactOS 0.4.16-dev-983-g23ad936
|
#include <ntoskrnl.h>
#include <debug.h>
Go to the source code of this file.
Macros | |
#define | NDEBUG |
#define | GUID_STRING_CHARS 38 |
#define | GUID_STRING_BYTES (GUID_STRING_CHARS * sizeof(WCHAR)) |
Variables | |
static PCWSTR | BaseKeyString = L"\\Registry\\Machine\\System\\CurrentControlSet\\Control\\DeviceClasses\\" |
#define GUID_STRING_BYTES (GUID_STRING_CHARS * sizeof(WCHAR)) |
Definition at line 22 of file deviface.c.
#define GUID_STRING_CHARS 38 |
Definition at line 21 of file deviface.c.
#define NDEBUG |
Definition at line 17 of file deviface.c.
C_ASSERT | ( | sizeof(L"{01234567-89ab-cdef-0123-456789abcdef}") | = =GUID_STRING_BYTES+sizeof(UNICODE_NULL) | ) |
NTSTATUS NTAPI IoGetDeviceInterfaceAlias | ( | _In_ PUNICODE_STRING | SymbolicLinkName, |
_In_ CONST GUID * | AliasInterfaceClassGuid, | ||
_Out_ PUNICODE_STRING | AliasSymbolicLinkName | ||
) |
Returns the alias device interface of the specified device interface instance, if the alias exists.
[in] | SymbolicLinkName | Pointer to a symbolic link string which identifies the device interface instance. |
[in] | AliasInterfaceClassGuid | Pointer to a device interface class GUID. |
[out] | AliasSymbolicLinkName | Pointer to unicode string which receives the alias symbolic link upon success. Must be freed with RtlFreeUnicodeString after using. |
Definition at line 758 of file deviface.c.
Referenced by Test_IoGetDeviceInterfaceAlias().
NTSTATUS NTAPI IoGetDeviceInterfaces | ( | IN CONST GUID * | InterfaceClassGuid, |
IN PDEVICE_OBJECT PhysicalDeviceObject | OPTIONAL, | ||
IN ULONG | Flags, | ||
OUT PWSTR * | SymbolicLinkList | ||
) |
Definition at line 936 of file deviface.c.
Referenced by CompBattGetBatteries(), get_device_pnp_name_guid(), IopFetchConfigurationInformation(), IopGetInterfaceDeviceList(), IoRegisterPlugPlayNotification(), KsRegisterFilterWithNoKSPins(), Test_IoGetDeviceInterfaces(), and WdmAudOpenSysAudioDevices().
NTSTATUS NTAPI IoOpenDeviceInterfaceRegistryKey | ( | IN PUNICODE_STRING | SymbolicLinkName, |
IN ACCESS_MASK | DesiredAccess, | ||
OUT PHANDLE | DeviceInterfaceKey | ||
) |
Definition at line 595 of file deviface.c.
Referenced by Enum(), KsFilterFactoryUpdateCacheData(), KsRegisterFilterWithNoKSPins(), PcNewRegistryKey(), and Test_IoOpenDeviceInterfaceRegistryKey().
|
static |
Creates a new symbolic link from the specified format of the prefix, device string, class GUID and reference string (if any).
[in] | DeviceString | Device string, placed after prefix and before GUID, for example ACPI::PNP0501#1#. |
[in] | GuidString | Device interface class GUID represented by a string. Placed in curly brackets {}, after device string, should always be 38 characters long. For example, {01234567-89ab-cdef-0123-456789abcdef}. |
[in] | ReferenceString | Optional reference string, if any. Placed after GUID, at the end of symbolic link. Usually contains human-readable subdevice name or class GUID. |
[in] | UserModePrefixFormat | Specifies whether a new symbolic link should have either a kernel mode or user mode prefix. TRUE for user mode prefix, FALSE for kernel mode. |
[out] | SymbolicLinkName | Pointer to unicode string which receives created symbolic link. |
Definition at line 61 of file deviface.c.
Referenced by IoGetDeviceInterfaceAlias().
PDEVICE_OBJECT IopGetDeviceObjectFromDeviceInstance | ( | PUNICODE_STRING | DeviceInstance | ) |
Definition at line 206 of file plugplay.c.
Referenced by IoSetDeviceInterfaceState().
|
static |
Definition at line 652 of file deviface.c.
Referenced by IoGetDeviceInterfaces().
|
static |
Retrieves a handles to the device and instance registry keys for the previously opened registry key handle of the specified symbolic link.
Definition at line 297 of file deviface.c.
Referenced by OpenRegistryHandlesFromSymbolicLink().
|
static |
Parses the specified symbolic link onto the 4 parts: prefix, device string, class GUID and reference string.
[in] | SymbolicLinkName | Pointer to a symbolic link string to parse. |
[out] | PrefixString | Receives prefix of symbolic link. Can be '\??\' for Kernel mode or '\?\' for User mode. |
[out] | MungedString | Receives device string. For example, ##?#ACPI#PNP0501#1#. |
[out] | GuidString | Receives device interface class GUID string represented by device interface. For example, {01234567-89ab-cdef-0123-456789abcdef}. |
[out] | ReferenceString | Receives reference string, if any. Usually contains a human-readable subdevice name or class GUID. |
[out] | ReferenceStringPresent | Pointer to variable that indicates whether the reference string exists in symbolic link. TRUE if it does, FALSE otherwise. |
[out] | InterfaceClassGuid | Receives the interface class GUID to which specified symbolic link belongs to. |
Definition at line 161 of file deviface.c.
Referenced by IoGetDeviceInterfaceAlias(), IopOpenOrCreateSymbolicLinkSubKeys(), and OpenRegistryHandlesFromSymbolicLink().
NTSTATUS NTAPI IoRegisterDeviceInterface | ( | IN PDEVICE_OBJECT | PhysicalDeviceObject, |
IN CONST GUID * | InterfaceClassGuid, | ||
IN PUNICODE_STRING ReferenceString | OPTIONAL, | ||
OUT PUNICODE_STRING | SymbolicLinkName | ||
) |
Definition at line 1437 of file deviface.c.
Referenced by _Function_class_(), BatteryClassInitializeDevice(), Bus_PDO_PnP(), ClassAddDevice(), ClasspRegisterMountedDeviceInterface(), FdoHandleStartDevice(), FdoStartAdapter(), FreeBT_AddDevice(), HidClassPDO_PnP(), i8042PowerWorkItem(), KsCreateBusEnumObject(), KspRegisterDeviceAssociation(), KspRegisterDeviceInterfaces(), Mx::MxRegisterDeviceInterface(), NdisIAddDevice(), PartitionHandleStartDevice(), PcRegisterSubdevice(), RamdiskAddDevice(), RamdiskPnp(), RegisterDeviceInterfaces(), ScsiFlopInitDevice(), SerenumAddDevice(), SerialAddDeviceInternal(), SysAudioRegisterDeviceInterfaces(), USBH_SymbolicLink(), USBPORT_RegisterDeviceInterface(), and WdmAudRegisterDeviceInterface().
Definition at line 1793 of file deviface.c.
Referenced by _Function_class_(), add_volume_device(), BatteryClassInitializeDevice(), BatteryClassUnload(), Bus_PDO_PnP(), check_system_root(), ClasspRegisterMountedDeviceInterface(), FdoHandleRemoveDevice(), FdoHandleStartDevice(), FdoRemoveAdapter(), FdoStartAdapter(), HandleRemoveDevice(), HandleStartDevice(), HandleSurpriseRemoval(), HidClassPDO_PnP(), i8042PowerWorkItem(), KsCreateBusEnumObject(), KspEnableBusDeviceInterface(), KspRegisterDeviceAssociation(), KspRemoveDeviceAssociations(), KspSetDeviceInterfacesState(), Mx::MxSetDeviceInterfaceState(), NdisIPnPStartDevice(), NdisIPnPStopDevice(), PartitionHandleRemove(), PartitionHandleStartDevice(), PcRegisterSubdevice(), RamdiskAddDevice(), RamdiskPnp(), RamdiskRemoveBusDevice(), RegisterDeviceInterfaces(), remove_volume_child(), ScsiFlopRemoveDevice(), ScsiFlopStartDevice(), SerenumFdoStartDevice(), SerialPnpStartDevice(), SysAudioRegisterDeviceInterfaces(), Test_IoSetDeviceInterfaceState(), USBH_SymbolicLink(), USBPORT_RegisterDeviceInterface(), and WdmAudRegisterDeviceInterface().
|
static |
Retrieves a handles to the GUID, device and instance registry keys for the specified symbolic link.
Definition at line 462 of file deviface.c.
Referenced by IoGetDeviceInterfaceAlias(), IoOpenDeviceInterfaceRegistryKey(), and IoSetDeviceInterfaceState().
|
static |
Definition at line 30 of file deviface.c.
Referenced by IoRegisterDeviceInterface(), and OpenRegistryHandlesFromSymbolicLink().