ReactOS 0.4.17-dev-1281-g065abb3
hubregistry.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  HubIdStrings
 

Macros

#define HUB_MSG_REGISTRY_FAILURE   0x40011006
 

Functions

VOID NTAPI HubFormatIdStrings (_In_ const USB_DEVICE_DESCRIPTOR *Descriptor, _Out_ HubIdStrings *Ids)
 
 _IRQL_requires_ (PASSIVE_LEVEL) NTSTATUS NTAPI HubRegReadValue(_In_ WDFKEY Key
 Sends a synchronous IOCTL to the specified device object.
 
_In_ PCWSTR _In_ ULONG _Out_writes_bytes_ (Size) PVOID Data)
 
_In_ PCWSTR _In_reads_bytes_ (Size) PVOID Data
 

Variables

_In_ PCWSTR Name
 
_In_ PCWSTR _In_ ULONG Size
 

Macro Definition Documentation

◆ HUB_MSG_REGISTRY_FAILURE

#define HUB_MSG_REGISTRY_FAILURE   0x40011006

Definition at line 11 of file hubregistry.h.

Function Documentation

◆ _In_reads_bytes_()

_In_ PCWSTR _In_reads_bytes_ ( Size  )

◆ _IRQL_requires_()

_IRQL_requires_ ( PASSIVE_LEVEL  )

Sends a synchronous IOCTL to the specified device object.

Reads up to Size bytes of a value into a zeroed buffer; the type is not checked.

Writes a REG_BINARY value into the device's usbflags subkey.

Sets or clears ExtPropertiesInstalled from ExtPropDescSemaphore in the hardware key.

Definition at line 2121 of file class.c.

13175{
13177
13178 PAGED_CODE();
13179
13180 TracePrint((TRACE_LEVEL_VERBOSE,
13181 TRACE_FLAG_PNP,
13182 "ClassDetermineTokenOperationCommandSupport (%p): Entering function.\n",
13183 DeviceObject));
13184
13185 //
13186 // Send down Inquiry for VPD_THIRD_PARTY_COPY_PAGE and cache away the device parameters
13187 // from WINDOWS_BLOCK_DEVICE_TOKEN_LIMITS_DESCRIPTOR.
13188 //
13190
13191 if (NT_SUCCESS(status)) {
13192
13193 ULONG maxListIdentifier = MaxTokenOperationListIdentifier;
13194
13195 //
13196 // Query the maximum list identifier to use for TokenOperation commands.
13197 //
13198 if (NT_SUCCESS(ClasspGetMaximumTokenListIdentifier(DeviceObject, REG_DISK_CLASS_CONTROL, &maxListIdentifier))) {
13199 if (maxListIdentifier >= MIN_TOKEN_LIST_IDENTIFIERS) {
13200
13201 NT_ASSERT(maxListIdentifier <= MAX_TOKEN_LIST_IDENTIFIERS);
13202 MaxTokenOperationListIdentifier = maxListIdentifier;
13203 }
13204 }
13205
13206 }
13207
13208 TracePrint((TRACE_LEVEL_VERBOSE,
13209 TRACE_FLAG_PNP,
13210 "ClassDetermineTokenOperationCommandSupport (%p): Exiting function with status %x.\n",
13212 status));
13213
13214 return status;
13215}
#define PAGED_CODE()
LONG NTSTATUS
Definition: precomp.h:26
#define REG_DISK_CLASS_CONTROL
Definition: classp.h:218
#define MAX_TOKEN_LIST_IDENTIFIERS
Definition: classp.h:215
#define MIN_TOKEN_LIST_IDENTIFIERS
Definition: classp.h:214
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
ULONG MaxTokenOperationListIdentifier
Definition: class.c:107
_IRQL_requires_same_ NTSTATUS ClasspGetBlockDeviceTokenLimitsInfo(_Inout_ PDEVICE_OBJECT DeviceObject)
Definition: class.c:13220
#define STATUS_SUCCESS
Definition: shellext.h:65
#define TRACE_LEVEL_VERBOSE
Definition: storswtr.h:30
Definition: ps.c:97
uint32_t ULONG
Definition: typedefs.h:59
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2061
#define NT_ASSERT
Definition: rtlfuncs.h:3334

◆ _Out_writes_bytes_()

_In_ PCWSTR _In_ ULONG _Out_writes_bytes_ ( Size  )

Definition at line 108 of file hubregistry.cpp.

109{
111
114
116}
#define NULL
Definition: types.h:112
_In_ const HubIdStrings _In_ PCWSTR ValueName
_In_ PCWSTR Name
return WdfRegistryQueryValue(Key, Name, sizeof(*Record), Record, NULL, NULL)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4539
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING ValueName
Definition: wdfregistry.h:243

◆ HubFormatIdStrings()

VOID NTAPI HubFormatIdStrings ( _In_ const USB_DEVICE_DESCRIPTOR *  Descriptor,
_Out_ HubIdStrings *  Ids 
)

Definition at line 59 of file hubregistry.cpp.

62{
63 RtlStringCbPrintfA(Ids->Vendor, sizeof(Ids->Vendor), "%04X", Descriptor->idVendor);
64 RtlStringCbPrintfA(Ids->Product, sizeof(Ids->Product), "%04X", Descriptor->idProduct);
65 RtlStringCbPrintfA(Ids->Revision, sizeof(Ids->Revision), "%04X", Descriptor->bcdDevice);
66}
_In_ const HubIdStrings * Ids
NTSTRSAFEVAPI RtlStringCbPrintfA(_Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PSTR pszDest, _In_ size_t cbDest, _In_ _Printf_format_string_ NTSTRSAFE_PCSTR pszFormat,...)
Definition: ntstrsafe.h:1148
CHAR Revision[MAX_REVISION_ID_STRING_LENGTH]
Definition: hubregistry.h:18
CHAR Vendor[MAX_VENDOR_ID_STRING_LENGTH]
Definition: hubregistry.h:16
CHAR Product[MAX_DEVICE_ID_STRING_LENGTH]
Definition: hubregistry.h:17
_Must_inspect_result_ _In_ WDFIORESLIST _In_ PIO_RESOURCE_DESCRIPTOR Descriptor
Definition: wdfresource.h:342

Referenced by HubMachine::QueryErrataFlags(), and DeviceMachine::QueryRegistryValues().

Variable Documentation

◆ Name

_In_ PCWSTR Name

Definition at line 33 of file hubregistry.h.

◆ Size

Definition at line 34 of file hubregistry.h.