(MS-PNPR) - Plug and Play Remote (PNPR) Protocol Specification
(MS-PNPR) - Plug and Play Remote (PNPR) Protocol Specification
This protocol documentation is covered by Microsoft copyrights. Regardless of any other terms
that are contained in the terms of use for the Microsoft website that hosts this documentation,
you may make copies of it in order to develop implementations of the protocols, and may
distribute portions of it in your implementations of the protocols or your documentation as
necessary to properly document the implementation. This permission also applies to any
documents that are referenced in the protocol documentation.
Microsoft does not claim any trade secret rights in this documentation.
Microsoft has patents that may cover your implementations of the protocols. Neither this notice
nor Microsoft's delivery of the documentation grants any licenses under those or any other
Microsoft patents. If you are interested in obtaining a patent license, please contact
[email protected].
The names of companies and products contained in this documentation may be covered by
trademarks or similar intellectual property rights. This notice does not grant any licenses under
those rights.
All other rights are reserved, and this notice does not grant any rights other than specifically
described above, whether by implication, estoppel, or otherwise.
This protocol documentation is intended for use in conjunction with publicly available standard
specifications, network programming art, and Microsoft Windows distributed systems concepts, and
assumes that the reader either is familiar with the aforementioned material or has immediate access
to it.
A protocol specification does not require the use of Microsoft programming tools or programming
environments in order for you to develop an implementation. If you have access to Microsoft
programming tools and environments you are free to take advantage of them.
Revision Summary
1 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Date Revision History Revision Class Comments
11/30/2007 1.5 Minor Updated, removed, and added some return codes.
2 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Table of Contents
1 Introduction .............................................................................................................. 7
1.1 Glossary .............................................................................................................. 7
1.2 References ........................................................................................................... 9
1.2.1 Normative References ...................................................................................... 9
1.2.2 Informative References..................................................................................... 10
1.3 Protocol Overview (Synopsis) .................................................................................. 10
1.4 Relationship to Other Protocols................................................................................ 10
1.5 Prerequisites/Preconditions ..................................................................................... 10
1.6 Applicability Statement .......................................................................................... 11
1.7 Versioning and Capability Negotiation....................................................................... 11
1.8 Vendor-Extensible Fields ........................................................................................ 11
1.9 Standards Assignments .......................................................................................... 12
2 Messages ................................................................................................................... 13
2.1 Transport ............................................................................................................. 13
2.2 Common Data Types ............................................................................................. 13
2.2.1 PNP_PROP_SIZE .............................................................................................. 13
2.2.2 PPNP_PROP_SIZE ............................................................................................ 14
2.2.3 RESOURCEID .................................................................................................. 14
2.2.4 PNP_RPC_STRING_LEN ..................................................................................... 14
2.2.5 PNP_RPC_BUFFER_SIZE ................................................................................... 14
2.2.6 PNP_PROP_COUNT ........................................................................................... 14
2.2.7 DEVPROPTYPE ................................................................................................. 15
2.2.8 Abstract Data Elements .................................................................................... 15
2.2.8.1 Device ID .................................................................................................. 15
2.2.8.2 Compatible ID ........................................................................................... 15
2.2.8.3 Device Class GUID String ID ........................................................................ 15
2.2.8.4 Device Instance ID ..................................................................................... 16
2.2.8.5 Device Interface ID .................................................................................... 16
2.2.8.6 Enumerator ID ........................................................................................... 16
2.2.8.7 Hardware ID .............................................................................................. 16
2.2.8.8 Instance ID ............................................................................................... 17
2.2.8.9 Reference String ........................................................................................ 17
2.2.9 Constants ....................................................................................................... 17
2.2.10 Data Types ..................................................................................................... 18
2.2.11 Enumerations .................................................................................................. 18
2.2.11.1 PPNP_VETO_TYPE....................................................................................... 18
2.2.12 Structures ...................................................................................................... 19
2.2.12.1 Resource Structures ................................................................................... 19
2.2.12.1.1 BUSNUMBER Structures ......................................................................... 19
2.2.12.1.1.1 BUSNUMBER_DES ........................................................................... 20
2.2.12.1.1.2 BUSNUMBER_RANGE ....................................................................... 20
2.2.12.1.1.3 BUSNUMBER_RESOURCE .................................................................. 21
2.2.12.1.2 CS Structures ....................................................................................... 21
2.2.12.1.2.1 CS_DES ......................................................................................... 21
2.2.12.1.2.2 CS_RESOURCE ................................................................................ 22
2.2.12.1.3 DevicePrivate Structures ........................................................................ 22
2.2.12.1.3.1 DEVPRIVATE_DES ........................................................................... 22
2.2.12.1.3.2 DEVPRIVATE_RANGE ....................................................................... 22
2.2.12.1.3.3 DEVPRIVATE_RESOURCE .................................................................. 23
2.2.12.1.4 DMA Structures .................................................................................... 23
2.2.12.1.4.1 DMA_DES....................................................................................... 23
3 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
2.2.12.1.4.2 DMA_RANGE ................................................................................... 25
2.2.12.1.4.3 DMA_RESOURCE ............................................................................. 25
2.2.12.1.5 IO Structures ....................................................................................... 25
2.2.12.1.5.1 IO_DES.......................................................................................... 25
2.2.12.1.5.2 IO_RANGE...................................................................................... 26
2.2.12.1.5.3 IO_RESOURCE ................................................................................ 27
2.2.12.1.6 IRQ Structures ..................................................................................... 28
2.2.12.1.6.1 IRQ_DES ........................................................................................ 28
2.2.12.1.6.2 IRQ_RANGE .................................................................................... 29
2.2.12.1.6.3 IRQ_RESOURCE .............................................................................. 29
2.2.12.1.7 Mem Structures .................................................................................... 30
2.2.12.1.7.1 MEM_DES ...................................................................................... 30
2.2.12.1.7.2 MEM_RANGE................................................................................... 32
2.2.12.1.7.3 MEM_RESOURCE ............................................................................. 32
2.2.12.1.8 MfCard Structures ................................................................................. 33
2.2.12.1.8.1 MFCARD_DES ................................................................................. 33
2.2.12.1.8.2 MFCARD_RESOURCE ........................................................................ 34
2.2.12.1.9 PcCard Structures ................................................................................. 34
2.2.12.1.9.1 PCCARD_DES ................................................................................. 34
2.2.12.1.9.2 PCCARD_RESOURCE ........................................................................ 35
2.2.12.1.10 Resource Conflict Detection Structures .................................................. 35
2.2.12.1.10.1 PNP_CONFLICT_LIST ..................................................................... 35
2.2.12.1.10.2 PNP_CONFLICT_ENTRY .................................................................. 36
2.2.12.1.10.3 PNP_CONFLICT_STRINGS .............................................................. 36
2.2.12.2 DEVPROPKEY ............................................................................................. 37
2.2.12.3 HWPROFILEINFO ........................................................................................ 37
3 Protocol Details ......................................................................................................... 39
3.1 Server Details ....................................................................................................... 39
3.1.1 Abstract Data Model ......................................................................................... 39
3.1.2 Timers ........................................................................................................... 39
3.1.3 Initialization .................................................................................................... 39
3.1.4 Message Processing Events and Sequencing Rules ................................................ 40
3.1.4.1 PNP_GetVersion (Opnum 2) ......................................................................... 44
3.1.4.2 PNP_GetGlobalState (Opnum 3) ................................................................... 45
3.1.4.3 PNP_ValidateDeviceInstance (Opnum 6) ........................................................ 46
3.1.4.4 PNP_GetRootDeviceInstance (Opnum 7) ........................................................ 47
3.1.4.5 PNP_GetRelatedDeviceInstance (Opnum 8) .................................................... 48
3.1.4.6 PNP_EnumerateSubKeys (Opnum 9) ............................................................. 49
3.1.4.7 PNP_GetDeviceList (Opnum 10).................................................................... 51
3.1.4.8 PNP_GetDeviceListSize (Opnum 11) .............................................................. 52
3.1.4.9 PNP_GetDepth (Opnum 12) ......................................................................... 54
3.1.4.10 PNP_GetDeviceRegProp (Opnum 13) ............................................................. 55
3.1.4.11 PNP_SetDeviceRegProp (Opnum 14) ............................................................. 59
3.1.4.12 PNP_GetClassInstance (Opnum 15)............................................................... 60
3.1.4.13 PNP_CreateKey (Opnum 16) ........................................................................ 62
3.1.4.14 PNP_DeleteRegistryKey (Opnum 17) ............................................................. 63
3.1.4.15 PNP_GetClassCount (Opnum 18) .................................................................. 64
3.1.4.16 PNP_GetClassName (Opnum 19) .................................................................. 65
3.1.4.17 PNP_DeleteClassKey (Opnum 20) ................................................................. 66
3.1.4.18 PNP_GetInterfaceDeviceAlias (Opnum 21)...................................................... 67
3.1.4.19 PNP_GetInterfaceDeviceList (Opnum 22) ....................................................... 68
3.1.4.20 PNP_GetInterfaceDeviceListSize (Opnum 23).................................................. 69
3.1.4.21 PNP_RegisterDeviceClassAssociation (Opnum 24) ........................................... 71
3.1.4.22 PNP_UnregisterDeviceClassAssociation (Opnum 25) ........................................ 72
4 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
3.1.4.23 PNP_GetClassRegProp (Opnum 26) ............................................................... 73
3.1.4.24 PNP_SetClassRegProp (Opnum 27) ............................................................... 75
3.1.4.25 PNP_CreateDevInst (Opnum 28)................................................................... 76
3.1.4.26 PNP_DeviceInstanceAction (Opnum 29) ......................................................... 78
3.1.4.27 PNP_GetDeviceStatus (Opnum 30)................................................................ 80
3.1.4.28 PNP_SetDeviceProblem (Opnum 31) ............................................................. 84
3.1.4.29 PNP_DisableDevInst (Opnum 32) .................................................................. 85
3.1.4.30 PNP_UninstallDevInst (Opnum 33) ................................................................ 86
3.1.4.31 PNP_AddID (Opnum 34) .............................................................................. 87
3.1.4.32 PNP_RegisterDriver (Opnum 35) ................................................................... 89
3.1.4.33 PNP_QueryRemove (Opnum 36) ................................................................... 90
3.1.4.34 PNP_RequestDeviceEject (Opnum 37) ........................................................... 91
3.1.4.35 PNP_IsDockStationPresent (Opnum 38) ......................................................... 93
3.1.4.36 PNP_RequestEjectPC (Opnum 39) ................................................................. 93
3.1.4.37 PNP_HwProfFlags (Opnum 40) ..................................................................... 94
3.1.4.38 PNP_GetHwProfInfo (Opnum 41) .................................................................. 96
3.1.4.39 PNP_AddEmptyLogConf (Opnum 42) ............................................................. 97
3.1.4.40 PNP_FreeLogConf (Opnum 43) ..................................................................... 99
3.1.4.41 PNP_GetFirstLogConf (Opnum 44) ................................................................ 101
3.1.4.42 PNP_GetNextLogConf (Opnum 45) ................................................................ 102
3.1.4.43 PNP_GetLogConfPriority (Opnum 46)............................................................. 103
3.1.4.44 PNP_AddResDes (Opnum 47) ....................................................................... 105
3.1.4.45 PNP_FreeResDes (Opnum 48) ...................................................................... 107
3.1.4.46 PNP_GetNextResDes (Opnum 49) ................................................................. 109
3.1.4.47 PNP_GetResDesData (Opnum 50) ................................................................. 111
3.1.4.48 PNP_GetResDesDataSize (Opnum 51) ........................................................... 112
3.1.4.49 PNP_ModifyResDes (Opnum 52) ................................................................... 114
3.1.4.50 PNP_DetectResourceConflict (Opnum 53) ....................................................... 115
3.1.4.51 PNP_QueryResConfList (Opnum 54) .............................................................. 116
3.1.4.52 PNP_GetCustomDevProp (Opnum 61)............................................................ 118
3.1.4.53 PNP_GetVersionInternal (Opnum 62) ............................................................ 120
3.1.4.54 PNP_GetBlockedDriverInfo (Opnum 63) ......................................................... 120
3.1.4.55 PNP_GetServerSideDeviceInstallFlags (Opnum 64) .......................................... 121
3.1.4.56 PNP_GetObjectPropKeys (Opnum 65) ............................................................ 122
3.1.4.57 PNP_GetObjectProp (Opnum 66) .................................................................. 124
3.1.4.58 PNP_SetObjectProp (Opnum 67) ................................................................... 130
3.1.5 Timer Events................................................................................................... 132
3.1.6 Other Local Events ........................................................................................... 132
3.2 Client Details ........................................................................................................ 133
3.2.1 Abstract Data Model ......................................................................................... 133
3.2.2 Timers ........................................................................................................... 133
3.2.3 Initialization .................................................................................................... 133
3.2.4 Message Processing Events and Sequencing Rules ................................................ 133
3.2.5 Timer Events................................................................................................... 133
3.2.6 Other Local Events ........................................................................................... 133
4 Protocol Examples ..................................................................................................... 134
4.1 Retrieving a List of Devices ..................................................................................... 134
4.2 Retrieving Status and Problem Values of a Device ...................................................... 134
5 Security ..................................................................................................................... 136
5.1 Security Considerations for Implementers ................................................................. 136
6 Appendix A: Full IDL .................................................................................................. 137
7 Appendix B: Windows Behavior ................................................................................. 149
5 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
8 Index ......................................................................................................................... 157
6 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
1 Introduction
This document specifies the Plug and Play Remote (PNPR) Protocol, a Microsoft proprietary remote
procedure call (RPC) interface. The PNPR Protocol interface is used by the client for remote
management of devices on the target system. The server does not maintain client state
information. The protocol operation is stateless.
An RPC sequence is a client/server session that includes a security context phase and requests to
call remote procedures. For connection-oriented RPC, the session also includes a binding phase.
The RPC client supplies the necessary security information; for connection-oriented RPC, the RPC
client also supplies binding information such as interface name and server endpoint. The sequence
of subsequent RPC calls in the session is implementation specific.
The request for information is provided through an RPC protocol interface. To receive this request,
the server registers an endpoint using the universal unique identifier (UUID) 8D9F4E40-A03D-
11CE-8F69-08003E30051B.
There are two versions of the Plug and Play Remote Protocol, Version 0.0 and Version 1.0. Version
0.0 contains a subset of the Version 1.0 functionality, in that all methods described and
implemented in Version 0.0 are available in Version 1.0 with identical syntax. The increment in the
version number results from the reassignment of opnums of the methods in Version 1.0, resulting
in incompatibility of the two versions. This document specifies Version 1.0 of the PNPR Protocol.<1>
1.1 Glossary
Authenticated Users
Authentication Level
Authentication Service (AS)
Dynamic Endpoint
Endpoint
Globally Unique Identifier (GUID)
Interface Definition Language (IDL)
Microsoft Interface Definition Language (MIDL)
Network Data Representation (NDR)
Opnum
Remote Procedure Call (RPC)
RPC Protocol Sequence
RPC Transfer Syntax
RPC Transport
Security Provider
Server
Session
Universally Unique Identifier (UUID)
Well-Known Endpoint
Compatible ID: A vendor-defined identification string used to match a device to an INF file.
Compatible IDs are used if a match for the Hardware ID is not found in an INF for a device.
7 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Connection: An association established by a Server Message Block (SMB) client to a specific
resource on an SMB server using a given session. See also Session.
Device Class GUID: A globally unique identifier (GUID) used to identify a category for
grouping devices. The category referred to may either be a Device Setup Class or a Device
Interface Class.
Device Instance ID: A system-supplied device identification string that uniquely identifies a
device in the system. A device instance ID is persistent across system boots.
Device Interface: Device functionality that a driver exposes to applications or other system
components. Each device interface is a member of system-defined or vendor-defined
Device Interface Classes. A driver can expose instances of zero, one, or more than one
Device Interface Classes for a device. For example, a device can have a joystick and a
keypad, and the device's driver stack can expose instances of three interface classes for the
device: a joystick, a keypad, and a combined joystick/keypad.
Device Interface Class: A way of exporting device and driver functionality to other system
components, including other drivers and user-mode applications. A driver can register a
Device Interface Class, and then enable an instance of the class for each device object to
which user-mode I/O requests might be sent. On the highest level, a Device Interface Class
is a grouping of devices by functionality. A GUID uniquely identifies a Device Interface
Class. Each Device Interface Class is associated with a GUID. The system defines GUIDs
for common Device Interface Classes. Vendors can create additional Device Interface
Classes.
Device Interface ID: A system-defined identification string that uniquely identifies a device
interface in the system.
Device Setup Class: To facilitate device installation, devices that are set up and configured in
the same way are grouped into a Device Setup Class. The Device Setup Class defines the
class installer and the class co-installers that are involved in installing the device. A GUID
uniquely identifies a Device Setup Class.
Docking Station: The base computer unit into which a user can insert a portable computer,
expanding it to a desktop equivalent. A typical docking station provides drive bays,
expansion slots, ports (desktop equivalents), and AC power.
Enumerator: A system component that discovers Plug and Play (PnP) devices based on a PnP
hardware standard. For Windows 2000 and later, these tasks are carried out by PnP bus
drivers in partnership with the PnP manager. A device is typically enumerated by its parent
bus driver such as the PCI or PCMCIA bus driver. Some devices are enumerated by a bus filter
driver such as the ACPI driver.
Hardware ID: A vendor-defined device identification string that is used to match a device to an
INF file.Hardware Profile: A logical configuration of the machine that includes a set of
instructions for what devices to start when the computer starts, or what settings to use for
each device.
Hardware Resources: Low-level channels for transport of control signals to and from a device.
For example, the IRQ (Interrupt Request Line) is a resource over which a peripheral device,
8 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
bus controller, other processor, or the kernel signals a request for service to the
microprocessor.
Instance ID: A device identification string that distinguishes a device from other devices of the
same type on a machine. An instance ID contains serial number information, if supported by
the underlying bus, or some kind of location information.
Named Pipe: A named, one-way or duplex pipe for communication between a named server
and one or more named pipe clients. For more information, see [PIPE].
Service: A string identifier representing a driver that can be associated with devices on the
system. A driver service conforms to the device driver protocols. A driver service can be
queried and configured through the service control manager interface, as specified in [MS-
SCMR].
MAY, SHOULD, MUST, SHOULD NOT, MUST NOT: These terms (in all caps) are used as
described in [RFC2119]. All statements of optional behavior use either MAY, SHOULD, or
SHOULD NOT.
1.2 References
We conduct frequent surveys of the normative references to assure their continued availability. If
you have any issue with finding a normative reference, please contact [email protected]. We
will assist you in finding the relevant information. Please check the archive site,
http://msdn2.microsoft.com/en-us/library/E4BD6494-06AD-4aed-9823-445E921C9624, as an
additional source.
[C706] The Open Group, "DCE 1.1: Remote Procedure Call", C706, August 1997,
http://www.opengroup.org/public/pubs/catalog/c706.htm
[MS-DCOM] Microsoft Corporation, "Distributed Component Object Model (DCOM) Remote Protocol
Specification", March 2007.
[MS-RPCE] Microsoft Corporation, "Remote Procedure Call Protocol Extensions", January 2007.
[MS-SCMR] Microsoft Corporation, "Service Control Manager Remote Protocol Specification", August
2007.
[MS-SMB] Microsoft Corporation, "Server Message Block (SMB) Protocol Specification", July 2007.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC
2119, March 1997, http://www.ietf.org/rfc/rfc2119.txt
9 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
1.2.2 Informative References
The Plug and Play Remote (PNPR) Protocol is designed for remotely querying and configuring devices
on a remote computer. Using this protocol, a client can retrieve the set of devices on the server,
discover and change settings for the devices, and query or configure the state of the devices.
This is an RPC-based protocol. The server does not maintain client state information. The protocol's
operation is stateless
Using this protocol, it is possible to enumerate the list of devices and individually configure each
device on remote systems on a network. It may be used by system administrators to query the
health of devices on remote systems and maintain a list of currently active and functioning devices
on the network. It also allows for remote configuration of devices for troubleshooting, enabling or
disabling functionality, or for auditing purposes.
The server is implemented by the Plug and Play service and clients can connect to the server using
a well-known named pipe. The client uses a well-known RPC named pipe endpoint to connect to
the server.
Typically, communication between the client and the server begins with the client requesting a list of
devices on the remote server. Each device is represented by a device instance ID string that
identifies a specific device on the remote system. The client references these strings in subsequent
calls to other methods implemented by the server to either query or modify the state of the device
or to retrieve or set properties and attributes of the device. The client may also make configuration
changes to the device, to enable or disable functionality of the device. The client may also
enumerate the set of other abstract objects managed by the server, such as device interfaces or
device setup classes, and similarly query or modify those objects.
Access and privilege checks to authenticate and authorize the client user are performed by the
server before any of the methods available are executed.<2>
This protocol is dependent on RPC and Server Message Block (SMB) for its transport. This protocol
uses RPC over named pipes, as specified in section 2.1. Named pipes use the Server Message Block
(SMB) Protocol.
1.5 Prerequisites/Preconditions
The Plug and Play Remote (PNPR) Protocol is an RPC interface and, as a result, has the prerequisites
specified in [MS-RPCE] as common to RPC interfaces.
The server is started and fully initialized before the protocol starts.
It is assumed that a PNPR Protocol client has obtained the name of a remote machine that supports
the Plug and Play Remote (PNPR) Protocol before this protocol is invoked. How a client does this is
not addressed in this document.
10 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
1.6 Applicability Statement
The protocol described herein is applicable to environments that require discovery and configuration
of devices on a remote computer.
Supported Transports: This protocol uses RPC as a communication protocol. The only supported
transport for this is Named Pipe over SMB (see section 2.1).
Protocol Version: Two versions of this remote protocol have evolved over time, and the client
and server are required to agree on the version number before communications proceed. Version
0.0 and Version 1.0 are incompatible and cannot be used interchangeably. The incompatibility
arises from the rearrangement of opnums of the methods implemented in the two versions of the
protocol. The version number can change, but this version of the protocol requires it to be a
specific value (see section 2.1). This version of the protocol can be extended by adding RPC
messages to the interface with opnums lying numerically beyond those defined in this
specification. An RPC client determines if such methods are supported by attempting to invoke
the method; if the method is not supported, the RPC runtime returns an "opnum out of range"
error, as specified in [C706] and [MS-RPCE]. For RPC versioning and capacity negotiation in this
situation, see [C706] and [MS-RPCE].
Capability Negotiation: This protocol's RPC interface may use either of two RPC well-known
named pipe endpoints, as specified in section 2.1.
A client negotiates what well-known endpoint to use by first attempting to establish a connection to
the server using the \\PIPE\plugplay well-known named pipe endpoint. If unsuccessful, the client
attempts to establish a connection to the server using the \PIPE\ntsvcs well-known named pipe
endpoint.
This protocol uses string identifiers to uniquely identify devices and other abstract objects from all
other such objects on the remote system. Vendors are free to choose their own values for these
fields to identify devices provided that they conform to the guidelines for the string identifiers, as
specified in section 2.2.8, and uniquely represent the objects on the server.
This protocol uses globally unique identifiers (GUIDs), as specified in [MS-DTYP], to represent
device class categories. Vendors are free to choose their own values for these fields to define new
device class categories that may be assigned to devices.
This protocol uses string identifiers, GUIDs, and integer values as the data for many of the device
registry property values specified in section 3.1.4.10. These values describe different attributes of a
device or class. Vendors are free to choose their own values for the property data fields provided
that the data conforms to the specification for the registry type values specified in section 3.1.4.10.
The data MUST also be appropriate for the specific property as interpreted by the server and other
clients.
This protocol uses DEVPROPKEY (section 2.2.12.2) structures to represent attributes of devices
and other objects. Vendors are free to choose their own values for the fields in that structure to
create new properties provided that they conform to the guidelines of the DEVPROPKEY (section
2.2.12.2) structure. The value of the data referenced by the DEVPROPKEY (section 2.2.12.2)
11 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
structures is also extensible by the vendor provided that the data conforms to the specification for
the property type values (see section 3.1.4.57). The data MUST also be appropriate for the specific
property as interpreted by the server and other clients.
12 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
2 Messages
The following sections specify how messages are transported and details of message syntax,
including common structures, certificate requirements, and common error codes.
2.1 Transport
This protocol uses the following RPC protocol sequence: RPC over SMB, as specified in [MS-
RPCE].
This protocol uses the following well-known endpoints. These endpoints are pipe names for RPC over
SMB, as specified in [MS-RPCE] (for more information, see [PIPE]):
\PIPE\ntsvcs
\PIPE\plugplay
The \PIPE\ntsvcs well-known endpoint supports calls to interface methods with opnums lying
numerically up to and including opnum 64, as supported by the server. This endpoint does not
support any methods outside that range. Attempting to invoke the method, if the method is not
supported, the RPC runtime returns an "opnum out of range" error, as specified in [C706] and [MS-
RPCE]. This well-known endpoint SHOULD be implemented by all servers.
The \PIPE\plugplay well-known endpoint supports calls to all interface methods currently supported
by the server. This well-known endpoint SHOULD be implemented by all servers. <4>
This protocol MUST use the UUID specified in section 1.9. The RPC version number is 1.0.
This protocol allows any user to establish a connection to the RPC server. The protocol uses the
underlying RPC protocol to retrieve the identity of the caller that made the method call, as specified
in [MS-RPCE] section 3.3.3.4.3. The server SHOULD use this identity to perform method-specific
access checks, as specified in section 3.1.4.
This protocol MUST indicate to the RPC runtime that it is to support the Network Data
Representation (NDR) 20 (that is, NDR20) transfer syntax only, as specified in [C706] part 4.
This protocol MUST enable the ms_union extension, as specified in [MS-RPCE] section 2.2.4.
In addition to RPC base types and definitions specified in [C706] and [MS-DTYP], additional data
types are defined below.
2.2.1 PNP_PROP_SIZE
typedef [range(0,PNP_MAX_PROP_SIZE)]
unsigned long PNP_PROP_SIZE;
13 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
2.2.2 PPNP_PROP_SIZE
2.2.3 RESOURCEID
2.2.4 PNP_RPC_STRING_LEN
The PNP_RPC_STRING_LEN datatype is used to specify the size, in characters, of the string buffer.
2.2.5 PNP_RPC_BUFFER_SIZE
2.2.6 PNP_PROP_COUNT
14 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
typedef unsigned long PNP_PROP_COUNT;
2.2.7 DEVPROPTYPE
The DEVPROPTYPE is used to specify property types,each of which requires a different format for a
corresponding property buffer.
The PNPR Protocol interface sets the following limits on the format of abstract data elements.
2.2.8.1 Device ID
<enumerator>\<enumerator-specific-device-ID>
*<enumerator-specific-ID>
<device-class-specific-ID>
A device ID string MUST NOT contain any of the following invalid characters:
The number of characters of a device ID, excluding a NULL terminator, MUST be less than 200. This
constraint applies to the sum of the lengths of all the fields and any "\" field separators in a device
ID. In addition, when an instance ID is concatenated to a device ID to create a device instance ID,
the lengths of the device ID and the instance ID are further constrained by the maximum possible
length of a device instance ID.
2.2.8.2 Compatible ID
A compatible ID string MUST have the same format as what is specified for a device ID.
The number of characters in a list of compatible ID strings (including a NULL terminator after each
compatible ID and a final NULL terminator) MUST be less than 1,024. The number of compatible ID
strings in a list of compatible IDs MUST be less than 64.
A Device Class GUID string ID MUST be specified in the format defined for a GUID string, as
specified in [MS-GLOS].
15 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
A GUID string is the string representation of a 128-bit GUID, using the form {XXXXXXXX-XXXX-
XXXX-XXXX-XXXXXXXXXXXX} where X denotes a hexadecimal digit.
<enumerator-ID>\<enumerator-specific-device-ID>
\<instance-specific-ID>
The number of characters of a device instance ID, including a NULL-terminator, MUST be less than
200 characters. This constraint applies to the sum of the lengths of all the fields and the "\" field
separator between the device ID and the instance-specific ID fields.
\\?\<device-specific-interface-ID>
\\?\<device-specific-interface-ID>\<reference-ID>
The device-specific interface ID is generated by the system. The reference string component is
optional. If no reference string is present, the "\" field separator character that would precede it
MUST not be present.
A device interface ID string MUST NOT contain any of the following invalid characters:
The number of characters of a device interface ID, excluding a NULL terminator, MUST be less than
32,767.
2.2.8.6 Enumerator ID
An Enumerator ID string MUST not contain any "\" field separators or any of the following invalid
characters:
The number of characters of an enumerator ID, excluding a NULL terminator, MUST be less than
200. In addition, when an enumerator device ID string is concatenated to an enumerator ID to
create a device ID, the lengths of the enumerator ID and enumerator device ID are further
constrained by the maximum possible length of a device ID.
2.2.8.7 Hardware ID
A hardware ID string MUST have the same format as what is specified for a device ID.
16 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
The number of characters in a list of hardware ID strings (including a NULL terminator after each
hardware ID and a final NULL terminator) MUST be less than 1,024. The number of hardware ID
strings in a list of hardware IDs MUST be less than 64.
2.2.8.8 Instance ID
An instance ID string MUST NOT contain any "\" characters; otherwise, the generic format of the
string is bus specific.
The number of characters of an instance ID, excluding a NULL-terminator, MUST be less than 200.
In addition, when an instance ID is concatenated to a device ID to create a device instance ID, the
lengths of the device ID and the instance ID are further constrained by the maximum possible
length of a device instance ID.
A reference string ID string MUST NOT contain any "\" field separators or any of the following invalid
characters:
The number of characters of a reference string ID, excluding a NULL terminator, MUST be less than
260. In addition, when a reference string ID string is concatenated to a device-specific interface ID
to create a device interface ID, the length of the reference string ID is further constrained by the
maximum possible length of a device interface ID.
2.2.9 Constants
The Plug and Play Remote (PNPR) Protocol sets the following limits on the interface method
parameters. <5>
Constant/value Description
PNP_MAX_PROP_COUNT The maximum number of properties that may be returned by the pnp
17 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Constant/value Description
32767 interface.
PNP_MAX_BUFFER_SIZE The maximum size of the buffer, in bytes, that can be allocated by the
0xF42400 PNPR Protocol interface.
typedef [range(0,PNP_MAX_PROP_SIZE)]
unsigned long PNP_PROP_SIZE;
typedef [range(0,PNP_MAX_PROP_COUNT)]
unsigned long PNP_PROP_COUNT, *PPNP_PROP_COUNT;
typedef [range(0,PNP_MAX_STRING_LEN)]
unsigned long PNP_RPC_STRING_LEN, *PPNP_RPC_STRING_LEN;
typedef [range(0,PNP_MAX_BUFFER_SIZE)]
unsigned long PNP_RPC_BUFFER_SIZE, *PPNP_RPC_BUFFER_SIZE;
PNP_PROP_SIZE
PNP_PROP_COUNT
PNP_RPC_STRING_LEN
Length of a NULL-terminated UNICODE string in characters, including the ending NULL character.
PNP_RPC_BUFFER_SIZE
Size of the buffer, in bytes, that can be allocated by the PNPR Protocol interface.
2.2.11 Enumerations
2.2.11.1 PPNP_VETO_TYPE
The PPNP_VETO_TYPE enumeration is used to indicate the type of component on the server
responsible for vetoing a configuration change request such as the removal of a device.
typedef enum
{
PNP_VetoTypeUnknown = 0,
PNP_VetoLegacyDevice = 1,
PNP_VetoPendingClose = 2,
PNP_VetoWindowsApp = 3,
PNP_VetoWindowsService = 4,
PNP_VetoOutstandingOpen = 5,
18 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
PNP_VetoDevice = 6,
PNP_VetoDriver = 7,
PNP_VetoIllegalDeviceRequest = 8,
PNP_VetoInsufficientPower = 9,
PNP_VetoNonDisableable = 10,
PNP_VetoLegacyDriver = 11,
PNP_VetoInsufficientRights = 12
} *PPNP_VETO_TYPE;
PNP_VetoLegacyDriver: Vetoed due to a legacy driver; that is, a driver that called one of the
legacy resource allocation APIs.
2.2.12 Structures
The Resource Descriptor structures are used to specify the resources required or resources that
have been assigned to a device instance. Multiple resource descriptors are grouped into logical
configurations. A device can have multiple logical configurations representing different types of
configurations, or multiple possible configurations for the device.
The Resource Descriptor structures use 1-byte packing, and are transmitted by the protocol within
an unstructured byte array buffer parameter.
19 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
2.2.12.1.1.1 BUSNUMBER_DES
The BUSNUMBER_DES structure is used for specifying either a resource list or a resource
requirements list that describes bus number usage for a device instance.
BUSD_Type: MUST be set to the value of the size of the BUSNUMBER_RANGE (section
2.2.12.1.1.2) structure.
BUSD_Alloc_Base: The lowest number of a range of contiguous bus numbers allocated to the
device.
BUSD_Alloc_End: The highest number of a range of contiguous bus numbers allocated to the
device.
2.2.12.1.1.2 BUSNUMBER_RANGE
The BUSNUMBER_RANGE structure specifies a resource requirements list that describes bus
number usage for a device instance.
BUSR_Min: The lowest number of a range of contiguous bus numbers that can be allocated to
the device.
BUSR_Max: The highest number of a range of contiguous bus numbers that can be allocated to
the device.
20 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
2.2.12.1.1.3 BUSNUMBER_RESOURCE
2.2.12.1.2 CS Structures
2.2.12.1.2.1 CS_DES
The CS_DES structure is used for specifying a resource list that describes device class-specific
resource usage for a device instance.
CSD_ClassGuid: A globally unique identifier (GUID) identifying a Device Setup Class. If both
CSD_SignatureLength and CSD_LegacyDataSize are zero, the GUID is null.
21 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
2.2.12.1.2.2 CS_RESOURCE
The CS_RESOURCE structure is used for specifying a resource list that describes device class-
specific resource usage for a device instance.
2.2.12.1.3.1 DEVPRIVATE_DES
The DEVPRIVATE_DES structure is used for specifying either a resource list or a resource
requirements list that describes private device-specific resource usage for a device instance.
PD_Type: MUST be set to the value of the size of the DEVPRIVATE_RANGE (section
2.2.12.1.3.2) structure.
2.2.12.1.3.2 DEVPRIVATE_RANGE
The DEVPRIVATE_RANGE structure specifies a resource requirements list that describes private
device-specific resource usage for a device instance.
22 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
DWORD PR_Data1;
DWORD PR_Data2;
DWORD PR_Data3;
} DEVPRIVATE_RANGE,
*PDEVPRIVATE_RANGE;
2.2.12.1.3.3 DEVPRIVATE_RESOURCE
The DMA structures correspond to the ResType_DMA resource type, as specified in section 3.1.4.44.
2.2.12.1.4.1 DMA_DES
The DMA_DES structure is used for specifying either a resource list or a resource requirements list
that describes direct memory access (DMA) channel usage for a device instance.
DD_Count: For a resource list: Zero. For a resource requirements list: The number of elements
in the DMA_RANGE (section 2.2.12.1.4.2) array that is included in the DMA_RESOURCE
(section 2.2.12.1.4.3) structure.
DD_Type: MUST be set to the value of the size of the DMA_RANGE (section 2.2.12.1.4.2)
structure.
23 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
DD_Flags: A bit flag from each of the flag sets defined in the following table.
Value Meaning
The bitmask for the bits within DD_Flags that specify the channel width value is 0x00000003
(mDD_Width).
Value Meaning
The bitmask for the bits within DD_Flags that specify the bus mastering value is 0x00000004
(mDD_BusMaster).
Value Meaning
The bitmask for the bits within DD_Flags that specify the DMA type value is 0x00000018
(mDD_Type).
DD_Alloc_Chan: For a resource list: The DMA channel allocated to the device. For a resource
requirements list: Not used.
24 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
2.2.12.1.4.2 DMA_RANGE
The DMA_RANGE structure specifies a resource requirements list that describes DMA channel
usage for a device instance.
DR_Min: The lowest-numbered DMA channel that can be allocated to the device.
DR_Max: The highest-numbered DMA channel that can be allocated to the device.
DR_Flags: A bit flag from each of the flag sets defined in the table included with the description
of the DR_Flags member of the DMA_DES (section 2.2.12.1.4.1) structure.
2.2.12.1.4.3 DMA_RESOURCE
The DMA_RESOURCE structure is used for specifying either a resource list or a resource
requirements list that describes DMA channel usage for a device instance.
DMA_Data: For a resource list: Zero. For a resource requirements list: A DMA_RANGE
(section 2.2.12.1.4.2) array.
2.2.12.1.5 IO Structures
The IO structures correspond to the ResType_IO resource type, as specified in section 3.1.4.44.
2.2.12.1.5.1 IO_DES
The IO_DES structure is used for specifying either a resource list or a resource requirements list
that describes I/O port usage for a device instance.
25 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
IOD_Count: For a resource list: Zero. For a resource requirements list: The number of elements
in the IO_RANGE (section 2.2.12.1.5.2) array that is included in the IO_RESOURCE.
IOD_Type: MUST be set to the value of the size of the IO_RANGE (section 2.2.12.1.5.2)
structure.
IOD_Alloc_Base: For a resource list: The lowest-numbered of a range of contiguous I/O port
addresses allocated to the device. For a resource requirements list: Zero.
IOD_Alloc_End : For a resource list: The highest-numbered of a range of contiguous I/O port
addresses allocated to the device. For a resource requirements list: Zero.
IOD_DesFlags: A bit flag from each of the flag sets defined in the following table.
Value Meaning
The bitmask for the bits within IOD_DesFlags that specify the port type value is 0x00000001
(fIOD_PortType).
Decode Flags
Value Meaning
The bitmask for the bits within IOD_DesFlags that specify the decode value is 0x000000FC
(fIOD_DECODE).
2.2.12.1.5.2 IO_RANGE
The IO_RANGE structure specifies a resource requirements list that describes I/O port usage for a
device instance.
26 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
DWORD IOR_nPorts;
unsigned __int64 IOR_Min;
unsigned __int64 IOR_Max;
DWORD IOR_RangeFlags;
unsigned __int64 IOR_Alias;
} IO_RANGE,
*PIO_RANGE;
IOR_Align: Mask used to specify the port address boundary on which the first allocated I/O port
address must be aligned.
IOR_Min: The lowest numbered of a range of contiguous I/O port addresses that can be
allocated to the device.
IOR_Max: The highest numbered of a range of contiguous I/O port addresses that can be
allocated to the device.
IOR_RangeFlags: A bit flag from each of the flag sets defined in the table included with the
description of the IOD_DesFlags member of the IO_DES (section 2.2.12.1.5.1) structure.
Value Meaning
The flags specified for IOR_Alias have the same interpretation as the address decoding flags
specified for IOD_DesFlags. (However, the two sets of flags are not equivalent in assigned
values and cannot be used interchangeably.) A resource requirements list can be specified
using either set of flags, but using decode flags in IOD_DesFlags is recommended. If address
decoding flags are specified using both IOD_DesFlags and IOR_Alias, the contents of the latter
overrides the former.
2.2.12.1.5.3 IO_RESOURCE
The IO_RESOURCE structure is used for specifying either a resource list or a resource requirements
list that describes I/O port usage for a device instance.
27 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
*PIO_RESOURCE;
IO_Data: For a resource list: Zero. For a resource requirements list: An IO_RANGE (section
2.2.12.1.5.2) array.
The IRQ structures correspond to the ResType_IRQ resource type, as specified in section 3.1.4.44.
2.2.12.1.6.1 IRQ_DES
The IRQ_DES structure is used for specifying either a resource list or a resource requirements list
that describes IRQ line usage for a device instance.
IRQD_Count: For a resource list: Zero. For a resource requirements list: The number of
elements in the IRQ_RANGE (section 2.2.12.1.6.2) array that is included in the
IRQ_RESOURCE (section 2.2.12.1.6.3) structure.
IRQD_Type: MUST be set to the value of the size of the IRQ_RANGE (section 2.2.12.1.6.2)
structure.
IRQD_Flags: A bit flag from each of the flag sets defined in the following table.
Sharing Flags
Value Meaning
The bitmask for the bits within IRQD_Flags that specify the sharing value is 0x00000001
(mIRQD_Share).
Triggering Flags
28 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Value Meaning
The bitmask for the bits within IRQD_Flags that specify the triggering value is 0x00000002
(mIRQD_Edge_Level).
IRQD_Alloc_Num: For a resource list: The number of the IRQ line that is allocated to the
device. For a resource requirements list: Not used.
IRQD_Affinity: For a resource list: A bitmask representing the processor affinity of the IRQ line
allocated to the device. Bit zero represents the first processor, bit two the second, and so on.
Set this value to -1 to represent all processors. For a resource requirements list: Not used.
2.2.12.1.6.2 IRQ_RANGE
The IRQ_RANGE structure specifies a resource requirements list that describes IRQ line usage for a
device instance.
IRQR_Min: The lowest numbered of a range of contiguous IRQ lines that can be allocated to the
device.
IRQR_Max: The highest numbered of a range of contiguous IRQ lines that can be allocated to
the device.
IRQR_Flags: A bit flag from each of the flag sets defined in the table included with the
description of the IRQD_Flags member of the IRQ_DES (section 2.2.12.1.6.1) structure.
2.2.12.1.6.3 IRQ_RESOURCE
The IRQ_RESOURCE structure is used for specifying either a resource list or a resource
requirements list that describes IRQ line usage for a device instance.
29 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
IO_Data: For a resource list: Zero. For a resource requirements list: An IRQ_RANGE (section
2.2.12.1.6.2) array.
The Mem structures correspond to the ResType_Mem resource type, as specified in section 3.1.4.44.
2.2.12.1.7.1 MEM_DES
The MEM_DES structure is used for specifying either a resource list or a resource requirements list
that describes memory usage for a device instance.
MD_Count: For a resource list: Zero. For a resource requirements list: The number of elements
in the MEM_RANGE (section 2.2.12.1.7.2) array that is included in the MEM_RESOURCE
(section 2.2.12.1.7.3) structure.
MD_Type: MUST be set to the value of the size of the MEM_RANGE (section 2.2.12.1.7.2)
structure.
MD_Flags: A bit flag from each of the flag sets defined in the following table. Flag Definition:
Read-Only Flags
Value Meaning
The bitmask for the bit within MD_Flags that specifies the read-only attribute is 0x00000001
(mMD_MemoryType).
Write-Only Flags
30 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Value Meaning
The bitmask for the bit within MD_Flags that specifies the write-only attribute is 0x00000008
(mMD_Readable).
Value Meaning
The bitmask for the bit within MD_Flags that specifies the address size is 0x00000002
(mMD_32_24).
Prefetch Flags
Value Meaning
The bitmask for the bit within MD_Flags that specifies the prefetch capability is 0x00000004
(mMD_Prefetchable).
Caching Flags
Value Meaning
The bitmask for the bit within MD_Flags that specifies the caching capability is 0x00000020
(mMD_Cacheable).
Value Meaning
31 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Value Meaning
0x00000010
The bitmask for the bit within MD_Flags that specifies the combined write caching capability is
0x00000010 (mMD_CombinedWrite).
2.2.12.1.7.2 MEM_RANGE
The MEM_RANGE structure specifies a resource requirements list that describes memory usage for
a device instance.
MR_Align: Mask used to specify the memory address boundary on which the first allocated
memory address must be aligned.
MR_Min: The lowest numbered of a range of contiguous memory addresses that can be
allocated to the device.
MR_Max: The highest numbered of a range of contiguous memory addresses that can be
allocated to the device.
MR_Flags: A bit flag from each of the flag sets defined in the table included with the description
of the MD_Flags member of the MEM_DES (section 2.2.12.1.7.1) structure.
2.2.12.1.7.3 MEM_RESOURCE
The MEM_RESOURCE structure is used for specifying either a resource list or a resource
requirements list that describes memory usage for a device instance.
32 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
MEM_Header: A MEM_DES (section 2.2.12.1.7.1) structure.
MEM_Data: For a resource list: Zero; For a resource requirements list: A MEM_RANGE
(section 2.2.12.1.7.2) array.
2.2.12.1.8.1 MFCARD_DES
The MFCARD_DES structure is used for specifying either a resource list or a resource requirements
list that describes resource usage by one of the hardware functions provided by an instance of a
multifunction device.
PMF_Count: MUST be 1.
Value Meaning
PMF_ConfigRegisterBase: Offset from the beginning of the card's attribute memory space to
the base configuration register address.
33 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
2.2.12.1.8.2 MFCARD_RESOURCE
The MFCARD_RESOURCE structure is used for specifying either a resource list or a resource
requirements list that describes resource usage by one of the hardware functions provided by an
instance of a multifunction device.
2.2.12.1.9.1 PCCARD_DES
The PCCARD_DES structure is used for specifying either a resource list or a resource requirements
list that describes resource usage by a PC card instance.
PCD_Count: MUST be 1.
PCD_Flags: A bit flag from each of the flag sets defined in the following tables.
Value Meaning
The bitmask for the bit within PCD_Flags that specifies 8-bit or 16-bit I/O addressing is
0x00000001 (mPCD_IO_8_16).
34 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Memory Addressing Flags
Value Meaning
The bitmask for the bit within PCD_Flags that specifies 8-bit or 16-bit memory addressing is
0x0000000 (mPCD_MEM_8_16).
PCD_ConfigIndex: The 8-bit index value used to locate the device's configuration.
2.2.12.1.9.2 PCCARD_RESOURCE
The PCCARD_RESOURCE structure is used for specifying either a resource list or a resource
requirements list that describes resource usage by a PC card instance.
2.2.12.1.10.1 PNP_CONFLICT_LIST
35 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Reserved1: MUST be ignored on receipt.Note MUST be set to 0.
2.2.12.1.10.2 PNP_CONFLICT_ENTRY
DeviceInstance: Byte offset from start of the buffer to NULL-terminated string for device
instance ID string in DeviceInstanceStrings.
Value Meaning
PNP_CE_TRANSLATE_FAILED Translation of resource failed; resource range not available for use.
0x00000004
2.2.12.1.10.3 PNP_CONFLICT_STRINGS
36 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
typedef struct _PNP_CONFLICT_STRINGS {
unsigned long NullDeviceInstance;
wchar_t DeviceInstanceStrings[1];
} PNP_CONFLICT_STRINGS,
*PPNP_CONFLICT_STRINGS;
2.2.12.2 DEVPROPKEY
2.2.12.3 HWPROFILEINFO
Value Meaning
37 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
The HWPROFILEINFO structure is defined for Unicode strings. For non-Unicode implementations,
the structure should define the wchar_t data type member as a char data type.
38 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
3 Protocol Details
The client side of this protocol is simply a pass through. That is, there are no additional timers or
other state required on the client side of this protocol. Calls made by the higher-layer protocol or
application are passed directly to the transport, and the results returned by the transport are passed
directly back to the higher-layer protocol or application.
This section describes a conceptual model of possible data organization that an implementation
maintains to participate in this protocol. The described organization is provided to explain how the
protocol behaves. This document does not mandate that implementations adhere to this model as
long as their external behavior is consistent with that described in this document.
Note that the above conceptual data can be implemented using a variety of techniques. Any data
structure that stores the above conceptual data may be used in the implementation.
A server implementing this RPC interface manages the state and attributes of devices and other
abstract objects on the system. The server maintains a directory for storage and retrieval of the
state and attributes of the devices and other abstract objects that it manages.
Each device is uniquely represented on the system by a string identifier. A server responds to
queries from a client to retrieve the device instance ID strings for all (or some subset of) devices on
the remote system.
A server responds to queries from a client to retrieve information on the attributes, state, or
hardware resources of a specific device. The client may also make requests to modify the
attributes, state, or hardware resources of one or more devices on the remote system. The client
may also make requests to manually create devices on the server, or to remove all state for a
device from the server.
A server also manages state and attributes for other abstract objects such as Device Setup Classes,
device interfaces, and Device Interface Classes. Each of these objects is also uniquely
represented on the system by a string identifier. In the case of Device Setup Classes and Device
Interface Classes, the objects may also be described by a GUID. The server also responds to
requests to query or modify the attributes or state of those abstract objects.
3.1.2 Timers
None.
3.1.3 Initialization
At initialization time, the Plug and Play Remote (PNPR) Protocol server MUST register the RPC
interface and begin listening on the RPC well-known endpoint specified in section 2.1. The server
then MUST wait for client requests.<6>
39 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
3.1.4 Message Processing Events and Sequencing Rules
This protocol MUST indicate to the RPC runtime that it is to perform a strict NDR data consistency
check at target level 6.0, as specified in [MS-RPCE] section 3.<7> The methods MUST NOT throw an
exception.
The server SHOULD enforce appropriate security measures to make sure the caller has required
permissions to execute the following routines.<8>
Method Description
PNP_GetRootDeviceInstance Returns the device instance ID string for the device that
represents the root of the hardware tree.
Opnum: 7
40 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Method Description
PNP_DeleteClassKey Deletes the storage location for the specified Device Setup
Class.
Opnum: 20
PNP_GetInterfaceDeviceAlias Returns the device interface that is an alias for the specified
Device Interface Class GUID and device interface.
Opnum: 21
41 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Method Description
PNP_SetClassRegProp Sets the specified well-known value for the specified Device
Setup Class.
Opnum: 27
PNP_GetDeviceStatus Returns the status and problem values for the given device
instance.
Opnum: 30
PNP_UninstallDevInst Removes all configuration data and storage locations for the
specified device instance.
Opnum: 33
42 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Method Description
PNP_HwProfFlags Gets and sets device configuration flags for the specified
device instance that are applicable when the system is using
the specified hardware profile.
Opnum: 40
PNP_GetFirstLogConf Finds the first logical configuration of the specified type for
the specified device instance.
Opnum: 44
PNP_GetNextLogConf Finds the next logical configuration of the specified type for
the specified device instance.
Opnum: 45
PNP_GetResDesDataSize Returns the data size for the specified resource descriptor.
Opnum: 51
43 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Method Description
PNP_GetBlockedDriverInfo Returns the list of drivers that have been blocked from
loading on the system since the system was booted.
Opnum: 63
In the table above, the term "Reserved for local use" means that the client MUST NOT send the
opnum, and the server behavior is undefined <9>since it does not affect interoperability.
The PNP_GetVersion method returns a static server version number, 0x0400, for the server-side
component. Use the PNP_GetVersionInternal (section 3.1.4.53) method to obtain the real
internal version of the server.<10>
44 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
DWORD PNP_GetVersion(
[in] handle_t hBinding,
[out] unsigned short* pVersion
);
pVersion: Returns a pointer to the static version number. This value is always 0x0400.
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
The PNP_GetGlobalState method returns the current global state of the configuration
manager.<11>
DWORD PNP_GetGlobalState(
[in] handle_t hBinding,
[out] unsigned long* pulState,
[in] unsigned long ulFlags
);
Value Meaning
45 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
DWORD PNP_ValidateDeviceInstance(
[in] handle_t hBinding,
[in, string, ref, range(0,PNP_MAX_DEVICE_ID_LEN)]
wchar_t* pDeviceID,
[in] unsigned long ulFlags
);
pDeviceID: Null-terminated string that contains a device instance ID string for the device to be
validated.
Value Meaning
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
46 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Return value/code Description
0x00000005 The specified pDeviceID parameter value is invalid because the device
CR_INVALID_DEVNODE instance string does not conform to one or more of the following device
instance path rules:
0x0000000D The specified device instance does not exist, or does not correspond to a
CR_NO_SUCH_DEVINST present device.
The PNP_GetRootDeviceInstance method returns the device instance ID string for the device
that represents the root of the hardware tree.<13>
DWORD PNP_GetRootDeviceInstance(
[in] handle_t hBinding,
[out, string, size_is(ulLength)]
wchar_t* pDeviceID,
[in] PNP_RPC_STRING_LEN ulLength
);
pDeviceID: Pointer to a buffer that receives the root device instance string.<14>
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:Note CR_SUCCESS has a value of 0x00000000.
0x00000005 The specified pDeviceID parameter value is invalid because the device
CR_INVALID_DEVNODE instance string does not conform to one or more of the following device
instance path rules:
47 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Return value/code Description
components
0x0000001A An output parameter is too small to hold all the data available.
CR_BUFFER_SMALL
0x0000001D An error occurred while trying to create the root device instance in the
CR_REGISTRY_ERROR registry.
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
DWORD PNP_GetRelatedDeviceInstance(
[in] handle_t hBinding,
[in] unsigned long ulRelationship,
[in, string, ref, range(0,PNP_MAX_DEVICE_ID_LEN)]
wchar_t* pDeviceID,
[out, string, size_is(*pulLength)]
wchar_t* pRelatedDeviceID,
[in, out] PNP_RPC_STRING_LEN* pulLength,
[in] unsigned long ulFlags
);
Value Meaning
pDeviceID: Null-terminated string that contains a device instance ID string for the device to
retrieve the relation for.
48 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
pRelatedDeviceID: Pointer to a buffer that receives the related device instance ID string.
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
0x00000005 The specified pDeviceID parameter value is invalid because the device
CR_INVALID_DEVNODE instance string does not conform to one or more of the following device
instance path rules:
0x0000001A An output parameter is too small to hold all the data available.
CR_BUFFER_SMALL
0x0000000D The specified device instance does not exist, or no devices match the
CR_NO_SUCH_DEVINST specified relation.
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
DWORD PNP_EnumerateSubKeys(
[in] handle_t hBinding,
[in] unsigned long ulBranch,
[in] unsigned long ulIndex,
[out, string, size_is(ulLength)]
49 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
wchar_t* Buffer,
[in] PNP_RPC_STRING_LEN ulLength,
[out] PNP_RPC_STRING_LEN* pulRequiredLen,
[in] unsigned long ulFlags
);
Value Meaning
pulRequiredLen: If the transfer is successful, contains the number of characters actually copied
to Buffer. If the buffer is too small, contains the number of characters required.
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
0x0000001A The output buffer, Buffer, is too small to hold all the data available.
CR_BUFFER_SMALL
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
50 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
3.1.4.7 PNP_GetDeviceList (Opnum 10)
DWORD PNP_GetDeviceList(
[in] handle_t hBinding,
[in, string, unique, range(0,PNP_MAX_STRING_LEN)]
wchar_t* pszFilter,
[out, size_is(*pulLength), length_is(*pulLength)]
wchar_t* Buffer,
[in, out] PNP_RPC_BUFFER_SIZE* pulLength,
[in] unsigned long ulFlags
);
pszFilter: Optional null-terminated string parameter that, if specified, limits the list to device
instances returned.
The value of the optional pszFilter parameter can depend on the device ID list flag values
specified by ulFlags.
Buffer: Pointer to a buffer containing the MULTI_SZ list of device instance ID strings. In a
MULTI_SZ buffer, each string is null-terminated, as is the set of strings, making the last string
doubly null-terminated.
ulFlags: Device ID list flag specifying what device IDs to return. Possible values:
Value Meaning
51 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Value Meaning
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
0x0000001A The output buffer, Buffer, is too small to hold all the data available.
CR_BUFFER_SMALL
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
52 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
DWORD PNP_GetDeviceListSize(
[in] handle_t hBinding,
[in, string, unique, range(0,PNP_MAX_STRING_LEN)]
wchar_t* pszFilter,
[out] PNP_RPC_BUFFER_SIZE* pulLen,
[in] unsigned long ulFlags
);
pszFilter: Optional null-terminated string parameter that, if specified, limits the list size to
device instances returned.
The value of the optional pszFilter parameter can depend on the device ID list flag values
specified by ulFlags.
pulLen: Returns the estimate of the largest possible size in characters of a device instance list.
ulFlags: Flag specifying what device IDs to return. For possible values, see section 3.1.4.7.
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
0x0000001A An output parameter is too small to hold all the data available.
CR_BUFFER_SMALL
53 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
The PNP_GetDepth method returns the depth of a device instance in the hardware tree.<17>
DWORD PNP_GetDepth(
[in] handle_t hBinding,
[in, string, ref, range(0,PNP_MAX_DEVICE_ID_LEN)]
wchar_t* pszDeviceID,
[out] unsigned long* pulDepth,
[in] unsigned long ulFlags
);
pszDeviceID: Null-terminated string that contains a device instance ID string for the device for
which to find the depth in the hardware tree.
pulDepth: Returns a pointer to the depth of pszDeviceID. This value is 0 to designate the root
of the tree or 1 to designate a child of the root, and continues to increment for each child tier.
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
0x00000005 The specified pszDeviceID parameter value is invalid because the device
CR_INVALID_DEVNODE instance string does not conform to one or more of the following device
instance path rules:
0x0000000D The specified device instance does not correspond to a present device.
CR_NO_SUCH_DEVINST
54 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Return value/code Description
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
DWORD PNP_GetDeviceRegProp(
[in] handle_t hBinding,
[in, string, ref, range(0,PNP_MAX_DEVICE_ID_LEN)]
wchar_t* pDeviceID,
[in] unsigned long ulProperty,
[in, out] unsigned long* pulRegDataType,
[out, size_is(*pulTransferLen), length_is(*pulTransferLen)]
byte far* Buffer,
[in, out] PNP_PROP_SIZE* pulTransferLen,
[in, out] PNP_PROP_SIZE* pulLength,
[in] unsigned long ulFlags
);
pDeviceID: Null-terminated string that contains a device instance ID string for the device for
which the property is returned.
ulProperty: Identifier specifying what well-known registry property value to get. Possible
values:
Value Meaning
55 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Value Meaning
56 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Value Meaning
pulRegDataType: Registry data type for this property; for example, REG_SZ. Possible values
are predefined registry types:
Value Meaning
57 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Value Meaning
pulTransferLen: Pointer to data that indicates how many bytes to copy back into the user
buffer. The pulTransferLen parameter is used to control how much data is marshaled by RPC
between address spaces. The pulTransferLen parameter should be set on entry to the size of
Buffer.
pulLength: Pointer parameter passed in by caller. On entry, it contains the size of the buffer in
bytes. On exit, it contains either the amount of data copied to the caller's buffer if a transfer
occurred, or the size of the buffer required to hold the property data if the buffer is too small.
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
0x00000005 The specified pDeviceID parameter value is invalid because the device
CR_INVALID_DEVNODE instance string does not conform to one or more of the following device
instance path rules:
0x0000001A The pulLength output parameter is too small to hold all the data
CR_BUFFER_SMALL available.
58 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Return value/code Description
CR_REGISTRY_ERROR
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
DWORD PNP_SetDeviceRegProp(
[in] handle_t hBinding,
[in, string, ref, range(0,PNP_MAX_DEVICE_ID_LEN)]
wchar_t* pDeviceID,
[in] unsigned long ulProperty,
[in] unsigned long ulDataType,
[in, size_is(ulLength)] byte far* Buffer,
[in] PNP_PROP_SIZE ulLength,
[in] unsigned long ulFlags
);
pDeviceID: Null-terminated string that contains a device instance ID string for the device for
which the property is set.
ulProperty: Identifier specifying what registry property value to set. For a full description and
list of possible values, see PNP_GetDeviceRegProp (Opnum 13).
ulDataType: Registry data type for the property; for example, REG_SZ. For possible registry
data type values, see PNP_GetDeviceRegProp (Opnum 13).
ulLength: Passed in by the caller. On entry, it contains the size of the buffer in bytes. MUST be
set to 0 to delete the specified property.
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
59 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Return value/code Description
0x00000005 The specified pDeviceID parameter value is invalid because the device
CR_INVALID_DEVNODE instance string does not conform to one or more of the following device
instance path rules:
0x0000000D The specified device instance does not correspond to a present device.
CR_NO_SUCH_DEVINST
0x0000001A An output parameter is too small to hold all the data available. The
CR_BUFFER_SMALL ulLength parameter may be too small.
0x00000035 The specified property type, ulProperty, is invalid for this operation.
CR_INVALID_PROPERTY
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
The PNP_GetClassInstance method returns a unique string identifier that represents a location
where the server stores additional configuration settings for the specified device instance.
DWORD PNP_GetClassInstance(
[in] handle_t hBinding,
[in, string, ref, range(0,PNP_MAX_DEVICE_ID_LEN)]
wchar_t* pDeviceID,
60 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
[out, string, size_is(ulLength)]
wchar_t* pszClassInstance,
[in] PNP_RPC_STRING_LEN ulLength
);
pDeviceID: Null-terminated string that contains a device instance ID string for the device for
which the class instance string is returned.
pszClassInstance: Pointer to a buffer that receives the null-terminated class instance string.
A class instance string is a unique identifier that represents a location where the server stores
additional configuration settings for this device instance. This identifier MUST be unique
among all devices on the system, and MUST be the same as the data retrieved or set as the
CM_DRP_DRIVER well-known registry property for the device. See the registry property values
in sections 3.1.4.10 and 3.1.4.23.<20>
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
0x00000005 The specified pDeviceID parameter value is invalid because the device
CR_INVALID_DEVNODE instance string does not conform to one or more of the following device
instance path rules:
0x0000001A An output parameter is too small to hold all the data available. The
CR_BUFFER_SMALL ulLength parameter may be too small.
61 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Return value/code Description
CR_ACCESS_DENIED
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
The PNP_CreateKey method creates a device parameters storage location for the specified device,
if it does not already exist.<21>
DWORD PNP_CreateKey(
[in] handle_t hBinding,
[in, string, ref, range(0,PNP_MAX_CM_PATH)]
wchar_t* pszSubKey,
[in] DWORD samDesired,
[in] unsigned long ulFlags
);
pszSubKey: device instance ID string of the device to create a storage location for.
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
0x00000005 The specified pszSubKey parameter value is invalid because the device
CR_INVALID_DEVNODE instance string does not conform to one or more of the following device
instance path rules:
62 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Return value/code Description
(',')
0x0000000D The specified device instance does not correspond to a present device.
CR_NO_SUCH_DEVINST
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
DWORD PNP_DeleteRegistryKey(
[in] handle_t hBinding,
[in, string, ref, range(0,PNP_MAX_DEVICE_ID_LEN)]
wchar_t* pszDeviceID,
[in, string, ref, range(0,PNP_MAX_CM_PATH)]
wchar_t* pszParentKey,
[in, string, ref, range(0,PNP_MAX_CM_PATH)]
wchar_t* pszChildKey,
[in] unsigned long ulFlags
);
pszDeviceID: Null-terminated string that contains a device instance ID string for the device to
delete the storage location for.
pszParentKey: Null-terminated string that specifies the parent path of the device-specific
storage location to be deleted.
ulFlags: Indicates whether the specified global registry storage location for the device are to be
deleted, or if specified profile-specific registry locations for the device are to be deleted.
Value Meaning
0x00000000 Specified global registry storage location for the device is deleted (but profile-
specific keys are not deleted).
0xFFFFFFFF All specified profile-specific registry locations for the device are deleted (but global
keys are not deleted).
63 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
0x00000005 The specified pszDeviceID parameter value is invalid because the device
CR_INVALID_DEVNODE instance string does not conform to one or more of the following device
instance path rules:
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
The PNP_GetClassCount method returns the number of valid Device Setup Classes currently
installed.<23>
DWORD PNP_GetClassCount(
[in] handle_t hBinding,
[out] unsigned long* pulClassCount,
[in] unsigned long ulFlags
);
pulClassCount: Address of the variable that returns the number of classes installed.
64 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
ulFlags: Not used. MUST be set to 0.
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
The PNP_GetClassName method returns the name of the Device Setup Class represented by the
globally unique identifier (GUID).<24>
DWORD PNP_GetClassName(
[in] handle_t hBinding,
[in, string, ref, range(0,PNP_MAX_GUID_STRING_LEN)]
wchar_t* pszClassGuid,
[out, string, size_is(*pulLength)]
wchar_t* Buffer,
[in, out] PNP_RPC_STRING_LEN* pulLength,
[in] unsigned long ulFlags
);
pszClassGuid: String containing the Device Setup Class GUID for which a class name is
retrieved.
pulLength: On input, pulLength specifies the size in characters of the buffer pointed to by the
Buffer parameter. On output, it contains the number of characters actually copied to the Buffer
parameter.
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
65 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Return value/code Description
0x0000001A An output parameter is too small to hold all the data available.
CR_BUFFER_SMALL
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
The PNP_DeleteClassKey method deletes the storage location for the specified Device Setup
Class.<25>
DWORD PNP_DeleteClassKey(
[in] handle_t hBinding,
[in, string, ref, range(0,PNP_MAX_GUID_STRING_LEN)]
wchar_t* pszClassGuid,
[in] unsigned long ulFlags
);
pszClassGuid: The globally unique identifier (GUID) of the class with the storage location to be
deleted.
Value Meaning
CM_DELETE_CLASS_ONLY Delete only the storage location for the specified Device Setup
0x00000000 Class.
CM_DELETE_CLASS_SUBKEYS Delete the storage location for the specified Device Setup Class as
0x00000001 well as all storage locations returned by PNP_GetClassInstance
for all device instances whose CM_DRP_CLASSGUID property
matches the specified Device Setup Class.<26>
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
66 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Return value/code Description
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
The PNP_GetInterfaceDeviceAlias method returns the device interface that is an alias for the
specified Device Interface Class GUID and device interface.<27>
DWORD PNP_GetInterfaceDeviceAlias(
[in] handle_t hBinding,
[in, string, ref, range(0,PNP_MAX_DEVINTERFACE_LEN)]
wchar_t* pszInterfaceDevice,
[in] GUID* AliasInterfaceGuid,
[out, string, size_is(*pulTransferLen)]
wchar_t* pszAliasInterfaceDevice,
[in, out] PNP_RPC_STRING_LEN* pulLength,
[in, out] PNP_RPC_STRING_LEN* pulTransferLen,
[in] unsigned long ulFlags
);
pulLength: Parameter passed in by the client. On entry, it contains the size of the buffer in
bytes. On exit, it contains either the amount of data copied to the caller's buffer if a transfer
occurred, or the size required to hold the property data if the buffer is too small.
pulTransferLen: Indicates how much data to copy back into the user buffer.
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
67 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Note CR_SUCCESS has a value of 0x00000000.
0x0000001A The method failed to get the device interface alias. An output parameter is
CR_BUFFER_SMALL too small to hold all the data available.
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
DWORD PNP_GetInterfaceDeviceList(
[in] handle_t hBinding,
[in] GUID* InterfaceGuid,
[in, string, unique, range(0,PNP_MAX_DEVICE_ID_LEN)]
wchar_t* pszDeviceID,
[out, size_is(*pulLength), length_is(*pulLength)]
wchar_t* Buffer,
[in, out] PNP_RPC_BUFFER_SIZE* pulLength,
[in] unsigned long ulFlags
);
InterfaceGuid: Device Interface Class for which the list of device interface ID strings is to be
retrieved.
Buffer: Pointer to a buffer containing the MULTI_SZ list of device interface ID strings. In a
MULTI_SZ buffer, each string is null-terminated, as is the set of strings, making the last string
doubly null-terminated.
68 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Value Meaning
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
0x00000005 The specified pszDeviceID parameter value is invalid because the device
CR_INVALID_DEVNODE instance string does not conform to one or more of the following device
instance path rules:
0x0000001A An output parameter is too small to hold all the data available.
CR_BUFFER_SMALL
0x00000033 Verification of client access privileges failed. Access to set the hardware
CR_ACCESS_DENIED profile flag value is denied.
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
DWORD PNP_GetInterfaceDeviceListSize(
[in] handle_t hBinding,
[out] PNP_RPC_BUFFER_SIZE* pulLen,
[in] GUID* InterfaceGuid,
[in, string, unique, range(0,PNP_MAX_DEVICE_ID_LEN)]
69 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
wchar_t* pszDeviceID,
[in] unsigned long ulFlags
);
pulLen: Returns the size of the buffer in characters required to hold the MULTI_SZ interface
device list.
InterfaceGuid: Device Interface Class for which the size of a list of device interface ID strings is
to be retrieved.
Value Meaning
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
0x00000005 The specified pszDeviceID parameter value is invalid because the device
CR_INVALID_DEVNODE instance string does not conform to one or more of the following device
instance path rules:
70 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
DWORD PNP_RegisterDeviceClassAssociation(
[in] handle_t hBinding,
[in, string, unique, range(0,PNP_MAX_DEVICE_ID_LEN)]
wchar_t* pszDeviceID,
[in] GUID* InterfaceGuid,
[in, string, unique, range(0,PNP_MAX_STRING_LEN)]
wchar_t* pszReference,
[out, string, size_is(*pulTransferLen)]
wchar_t* pszSymLink,
[in, out] PNP_RPC_STRING_LEN* pulLength,
[in, out] PNP_RPC_STRING_LEN* pulTransferLen,
[in] unsigned long ulFlags
);
pszDeviceID: Null-terminated string that contains a device instance ID string for the device to
register the device interface for.
pulLength: Passed in by the caller. On entry, it contains the size of the buffer in characters. On
exit, it contains either the amount of data copied to the caller's buffer if a transfer occurred, or
the size of buffer required to hold the property data if the buffer is too small.
The pointer passed in as the pulTransferLen argument MUST NOT be the same as the pointer
passed in for the pulLength argument.
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
71 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Return value/code Description
0x00000005 The specified pszDeviceID parameter value is invalid because the device
CR_INVALID_DEVNODE instance string does not conform to the appropriate rules, which are:
0x0000001A An output parameter is too small to hold all the data available. The
CR_BUFFER_SMALL pulLength parameter may be too small.
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
DWORD PNP_UnregisterDeviceClassAssociation(
[in] handle_t hBinding,
[in, string, unique, range(0,PNP_MAX_DEVINTERFACE_LEN)]
wchar_t* pszInterfaceDevice,
[in] unsigned long ulFlags
);
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
72 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Return value/code Description
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
The PNP_GetClassRegProp method returns the specified well-known property value for the Device
Interface Class specified by the caller-provided globally unique identifier (GUID).<32>
DWORD PNP_GetClassRegProp(
[in] handle_t hBinding,
[in, string, ref, range(0,PNP_MAX_GUID_STRING_LEN)]
wchar_t* pszClassGuid,
[in] unsigned long ulProperty,
[in, out] unsigned long* pulRegDataType,
[out, size_is(*pulTransferLen), length_is(*pulTransferLen)]
byte far* Buffer,
[in, out] PNP_PROP_SIZE* pulTransferLen,
[in, out] PNP_PROP_SIZE* pulLength,
[in] unsigned long ulFlags
);
pszClassGuid: String containing the Device Setup Class GUID whose property value is returned.
ulProperty: Identifier specifying what registry property value to get. Possible values:
Value Meaning
73 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Value Meaning
pulRegDataType: Optional parameter. Returns the registry data type for the specified
property; for example, REG_SZ. For possible registry data type values, see section 3.1.4.10.
pulTransferLen: Indicates how much data to copy back into the user buffer. The pulTransferLen
parameter is used to control how much data is marshaled by RPC between address spaces; it
should be set on entry to the size of Buffer.
The pointer passed in as the pulTransferLen argument MUST NOT be the same as the pointer
passed in for the pulLength argument.
pulLength: Parameter passed in by caller. On entry, it contains the size in bytes of the buffer.
On exit, it returns either the amount of data copied to the caller's buffer if a transfer occurred,
or the size of buffer required to hold the property data if the buffer is too small.
The pointer passed in as the pulTransferLen argument MUST NOT be the same as the pointer
passed in for the pulLength argument.
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
0x0000001A An output parameter is too small to hold all the data available.
CR_BUFFER_SMALL The pulLength parameter may be too small.
74 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Return value/code Description
CR_NO_SUCH_REGISTRY_KEY
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
The PNP_SetClassRegProp method sets the specified well-known value for the specified Device
Setup Class.<33>
DWORD PNP_SetClassRegProp(
[in] handle_t hBinding,
[in, string, ref, range(0,PNP_MAX_GUID_STRING_LEN)]
wchar_t* pszClassGuid,
[in] unsigned long ulProperty,
[in] unsigned long ulDataType,
[in, size_is(ulLength)] byte far* Buffer,
[in] PNP_PROP_SIZE ulLength,
[in] unsigned long ulFlags
);
pszClassGuid: String containing the Device Setup Class globally unique identifier (GUID) whose
property is written to.
ulProperty: Identifier specifying what registry property value to set. For possible values, see
section 3.1.4.23.
ulDataType: Registry data type for the specified property; for example, REG_SZ. For possible
registry data type values, see section 3.1.4.10.
ulLength: Passed in by the caller. On entry, it contains the size of the buffer in bytes.
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
75 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Return value/code Description
CR_INVALID_FLAG
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
DWORD PNP_CreateDevInst(
[in] handle_t hBinding,
[in, out, string, size_is(ulLength)]
wchar_t* pszDeviceID,
[in, string, ref, range(0,PNP_MAX_DEVICE_ID_LEN)]
wchar_t* pszParentDeviceID,
[in] PNP_RPC_STRING_LEN ulLength,
[in] unsigned long ulFlags
);
pszDeviceID: Null-terminated string that contains a device instance ID string that specifies the
device instance to create. If the CM_CREATE_DEVNODE_GENERATE_ID flag is set,
pszDeviceID is assumed to contain simply a device ID. The unique device instance ID string
that was generated is returned in this parameter.
Once the new device is successfully created, the returned device instance ID string may be
used with other methods of this interface to configure or modify the state of the new device.
pszParentDeviceID: device instance ID string of the parent of the new device instance.<35>
Value Meaning
76 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Value Meaning
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
0x0000001A An output parameter is too small to hold all the data available. The
CR_BUFFER_SMALL ulLength parameter value may be too small.
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
77 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
3.1.4.26 PNP_DeviceInstanceAction (Opnum 29)
DWORD PNP_DeviceInstanceAction(
[in] handle_t hBinding,
[in] unsigned long ulMajorAction,
[in] unsigned long ulMinorAction,
[in, string, unique, range(0,PNP_MAX_DEVICE_ID_LEN)]
wchar_t* pszDeviceInstance1,
[in, string, unique, range(0,PNP_MAX_DEVICE_ID_LEN)]
wchar_t* pszDeviceInstance2
);
ulMajorAction: Specifies the requested action to perform. The following actions are supported.
Possible values:
Value Meaning
ulMinorAction: This value depends on the value of ulMajorAction and further defines the
specific action to perform.
If the value of ulMajorAction is PNP_DEVINST_SETUP, the following values are defined for
ulMinorAction. Any other value causes a CR_INVALID_FLAG error.
Value Meaning
78 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Value Meaning
The ulMinorAction parameter is not used for any other values of ulMajorAction.
pszDeviceInstance1: A null-terminated string that contains a device instance ID string for the
device the operation is performed for.
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
79 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Return value/code Description
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
The PNP_GetDeviceStatus method returns the status and problem values for the given device
instance.<37>
DWORD PNP_GetDeviceStatus(
[in] handle_t hBinding,
[in, string, unique, range(0,PNP_MAX_DEVICE_ID_LEN)]
wchar_t* pDeviceID,
[out] unsigned long* pulStatus,
[out] unsigned long* pulProblem,
[in] unsigned long ulFlags
);
pDeviceID: Null-terminated string that contains a device instance ID string for the device for
which to return status and problem values.
Value Meaning
DN_DRIVER_BLOCKED One or more drivers are blocked from loading for this device
0x00000040 instance.
80 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Value Meaning
DN_BAD_PARTIAL The logical configuration of the device instance does not have the
0x00400000 same resources.
81 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Value Meaning
0x10000000
Value Meaning
82 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Value Meaning
83 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Value Meaning
A return code of 0x00000000 indicates that there is no problem and that the operation is
successful.
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
0x0000000D The specified device instance does not correspond to a present device.
CR_NO_SUCH_DEVINST
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
The PNP_SetDeviceProblem method sets the specified problem information for the specified
device instance.<38>
DWORD PNP_SetDeviceProblem(
[in] handle_t hBinding,
[in, string, unique, range(0,PNP_MAX_DEVICE_ID_LEN)]
84 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
wchar_t* pDeviceID,
[in] unsigned long ulProblem,
[in] unsigned long ulFlags
);
pDeviceID: Null-terminated string that contains a device instance ID string for the device for
which to set a problem.
ulProblem: Device problem to set. For possible values, see section 3.1.4.27.
ulFlags: Flags that specify how the problem should be set. Possible values:
Value Meaning
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
0x0000000D The specified device instance does not correspond to a present device.
CR_NO_SUCH_DEVINST
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
DWORD PNP_DisableDevInst(
85 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
[in] handle_t hBinding,
[in, string, unique, range(0,PNP_MAX_DEVICE_ID_LEN)]
wchar_t* pDeviceID,
[in, out, unique] PPNP_VETO_TYPE pVetoType,
[in, out, string, unique, max_is(ulNameLength), range(0,PNP_MAX_STRING_LEN)]
wchar_t* pszVetoName,
[in] unsigned long ulNameLength,
[in] unsigned long ulFlags
);
pDeviceID: Null-terminated string that contains a device instance ID string for the device to
disable.
pVetoType: If the removal of the device is vetoed, returns the type of the component that
vetoed the operation. For possible values, see section 2.2.11.1.
pszVetoName: If the removal of the device is vetoed, returns a null-terminated string that
specifies the name of the component that vetoed the operation.
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
0x00000005 The specified device may be invalid, or may be invalid for the operation
CR_INVALID_DEVINST specified.
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
The PNP_UninstallDevInst method removes all configuration data and storage locations for the
specified device instance.<40>
86 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
DWORD PNP_UninstallDevInst(
[in] handle_t hBinding,
[in, string, unique, range(0,PNP_MAX_DEVICE_ID_LEN)]
wchar_t* pDeviceID,
[in] unsigned long ulFlags
);
pDeviceID: Null-terminated string that contains a device instance ID string for the device to
uninstall.
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
The PNP_AddID method adds a hardware ID or a compatible ID to the registry for the specified
device instance.<41>
DWORD PNP_AddID(
[in] handle_t hBinding,
[in, string, unique, range(0,PNP_MAX_DEVICE_ID_LEN)]
wchar_t* pszDeviceID,
[in, string, ref, range(0,PNP_MAX_DEVICE_ID_LEN)]
wchar_t* pszID,
87 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
[in] unsigned long ulFlags
);
pszDeviceID: Null-terminated string that contains a device instance ID string for the device for
which to add an identifier.
Value Meaning
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
0x00000005 The specified pszDeviceID parameter value is invalid because the device
CR_INVALID_DEVNODE instance string does not conform to one or more of the following device
instance path rules:
0x00000013 A general failure occurred, possibly while appending the new identifier to
CR_FAILURE the existing list.
88 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Return value/code Description
CR_ACCESS_DENIED
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
The PNP_RegisterDriver method registers a driver for a device instance and enumerates it.<42>
DWORD PNP_RegisterDriver(
[in] handle_t hBinding,
[in, string, ref, range(0,PNP_MAX_DEVICE_ID_LEN)]
wchar_t* pszDeviceID,
[in] unsigned long ulFlags
);
pszDeviceID: Null-terminated string that contains a device instance ID string for the device for
which the driver is being registered. The driver registered for the device is the one that is
currently set as the device's CM_DRP_SERVICE well-known property.
ulFlags: Flags for registering the device instance driver. Possible values:
Value Meaning
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
0x00000005 The specified pszDeviceID parameter value is invalid because the device
CR_INVALID_DEVNODE instance string does not conform to one or more of the following device
instance path rules:
89 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Return value/code Description
0x0000000D The specified device instance does not correspond to a present device.
CR_NO_SUCH_DEVINST
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
The PNP_QueryRemove method queries and removes a device instance. In this context, remove
refers to the state of the device, not to the removal of hardware or configuration data.
To process the removal request, the server first queries system components to determine if removal
of the device instance is permitted. If the removal is allowed, the system then removes the device
instance such that it does not have a status of DN_STARTED. If the removal is not permitted, the
method fails with CR_REMOVE_VETOED, and information describing the component that refused to
allow the removal of the device instance is returned.<43>
DWORD PNP_QueryRemove(
[in] handle_t hBinding,
[in, string, ref, range(0,PNP_MAX_DEVICE_ID_LEN)]
wchar_t* pszDeviceID,
[in, out, unique] PPNP_VETO_TYPE pVetoType,
[in, out, string, unique, max_is(ulNameLength), range(0,PNP_MAX_STRING_LEN)]
wchar_t* pszVetoName,
[in] unsigned long ulNameLength,
[in] unsigned long ulFlags
);
pszDeviceID: Null-terminated string that contains a device instance ID string for the device to
query for removal, and then remove the device instance.
pVetoType: If removal of the device is vetoed, returns the type of the component that vetoed
the operation. For possible values, see section 2.2.11.1.
pszVetoName: If removal of the device is vetoed, returns a null-terminated string that specifies
the name of the component that vetoed the operation.
90 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
ulNameLength: Size in characters of the pszVetoName buffer.
ulFlags: Flags defining how the query removal should be processed. User interface (UI) dialog
boxes are displayed based on if veto type and veto name buffers are supplied. Clients use
these flags to determine if a buffer is to be supplied. Possible values:
Value Meaning
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
The PNP_RequestDeviceEject method requests that a device be ejected. In this context, eject
refers to devices such as disk drives, not to media such as disks and tapes.
To process the eject request, the server first queries system components to determine if removal of
the device instance is permitted. If the removal is allowed, the system then removes the device
instance such that it does not have a status of DN_STARTED. If the removal is not permitted, the
method fails with CR_REMOVE_VETOED, and information describing the component that refused to
allow the removal of the device instance is returned.<44>
91 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
DWORD PNP_RequestDeviceEject(
[in] handle_t hBinding,
[in, string, ref, range(0,PNP_MAX_DEVICE_ID_LEN)]
wchar_t* pszDeviceID,
[in, out, unique] PPNP_VETO_TYPE pVetoType,
[in, out, string, unique, max_is(ulNameLength), range(0,PNP_MAX_STRING_LEN)]
wchar_t* pszVetoName,
[in] unsigned long ulNameLength,
[in] unsigned long ulFlags
);
pszDeviceID: Null-terminated string that contains a device instance ID string for the device to
eject.
pVetoType: If the removal of the device is vetoed, returns the type of the component that
vetoed the operation. For possible values, see section 2.2.11.1.
pszVetoName: If the removal of the device is vetoed, returns a null-terminated string that
specifies the name of the component that vetoed the operation.
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
0x00000005 The specified pszDeviceID parameter value is invalid because the device
CR_INVALID_DEVNODE instance string does not conform to one or more of the following device
instance path rules:
92 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Return value/code Description
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
DWORD PNP_IsDockStationPresent(
[in] handle_t hBinding,
[in, out, unique] int near* Present
);
Present: Boolean variable that indicates if a docking station is currently present. Possible
values:
Value Meaning
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
The PNP_RequestEjectPC method requests that a computer be ejected (undocked) from its
docking station.<46>
93 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
DWORD PNP_RequestEjectPC(
[in] handle_t hBinding
);
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
0x0000000D The specified device instance does not correspond to a present device.
CR_NO_SUCH_DEVINST
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
The PNP_HwProfFlags method gets and sets device configuration flags for the specified device
instance that are applicable when the system is using the specified hardware profile.<47>
DWORD PNP_HwProfFlags(
[in] handle_t hBinding,
[in] unsigned long ulAction,
[in, string, ref, range(0,PNP_MAX_DEVICE_ID_LEN)]
wchar_t* pDeviceID,
[in] unsigned long ulConfig,
[in, out] unsigned long* pulValue,
[in, out, unique] PPNP_VETO_TYPE pVetoType,
[in, out, string, unique, max_is(ulNameLength), range(0,PNP_MAX_STRING_LEN)]
wchar_t* pszVetoName,
[in] unsigned long ulNameLength,
[in] unsigned long ulFlags
);
94 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Value Meaning
pDeviceID: Null-terminated string that contains a device instance ID string for the device for
which to get or set the hardware profile flag.
ulConfig: Profile for which to get or set the flag. A value of 0 indicates that the current profile
should be used.
pulValue: If setting the flag, this value on entry contains the value for the hardware profile flag.
If getting the flag, this value returns the current hardware profile flag. Possible values:
Value Meaning
pVetoType: Type of the veto. If NULL, no veto information is returned, and the operating
system displays the veto information. For possible values, see section 2.2.11.1.
pszVetoName: If the removal of the device is vetoed, returns a null-terminated string that
specifies the name of the component that vetoed the operation. If NULL, no veto information
is received, and the operating system displays the veto information.
ulFlags: Dependent on the value of ulAction. For PNP_GET_HWPROFFLAGS, no flags are valid.
For PNP_SET_HWPROFFLAGS, this value can be CM_SET_HW_PROF_FLAGS_UI_NOT_OK.
Value Meaning
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
95 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Return value/code Description
CR_INVALID_FLAG
0x00000005 The specified pDeviceID parameter value is invalid because the device
CR_INVALID_DEVNODE instance string does not conform to one or more of the following device
instance path rules:
0x00000033 Verification of client access privileges failed. Access to set the hardware
CR_ACCESS_DENIED profile flag value is denied.
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
The PNP_GetHwProfInfo method returns a structure of information for the specified hardware
profile.<48>
DWORD PNP_GetHwProfInfo(
[in] handle_t hBinding,
[in] unsigned long ulIndex,
[in, out, ref] HWPROFILEINFO* pHWProfileInfo,
[in, range(0,sizeof(HWPROFILEINFO))]
unsigned long ulProfileInfoSize,
[in] unsigned long ulFlags
);
Note A value of 0xFFFFFFFF indicates that the current profile should be used.
96 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
pHWProfileInfo: Pointer to an HWPROFILEINFO (section 2.2.12.3) structure that returns
profile information.
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
DWORD PNP_AddEmptyLogConf(
[in] handle_t hBinding,
[in, string, ref, range(0,PNP_MAX_DEVICE_ID_LEN)]
wchar_t* pDeviceID,
[in] unsigned long ulPriority,
[out] unsigned long* pulLogConfTag,
[in] unsigned long ulFlags
);
pDeviceID: Null-terminated string that contains a device instance ID string for the device for
which to add a logical configuration.
Value Meaning
97 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Value Meaning
pulLogConfTag: Returns a tag that identifies what logical configuration this is.
Value Meaning
98 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Value Meaning
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
0x00000005 The specified pDeviceID parameter value is invalid because the device
CR_INVALID_DEVNODE instance string does not conform to one or more of the following device
instance path rules:
0x00000033 Verification of client access privileges failed. The caller does not have
CR_ACCESS_DENIED LoadDriverPrivileges.
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
DWORD PNP_FreeLogConf(
[in] handle_t hBinding,
[in, string, ref, range(0,PNP_MAX_DEVICE_ID_LEN)]
99 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
wchar_t* pDeviceID,
[in] unsigned long ulLogConfType,
[in] unsigned long ulLogConfTag,
[in] unsigned long ulFlags
);
pDeviceID: A null-terminated string that contains a device instance ID string for the device for
which to free the logical configuration.
ulLogConfType: The type of logical configuration to free. For possible values, see section
3.1.4.39.
ulLogConfTag: Logical configuration wanted from the specified type of logical configuration.
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
0x00000005 The specified pDeviceID parameter value is invalid because the device
CR_INVALID_DEVNODE instance string does not conform to one or more of the following device
instance path rules:
100 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Return value/code Description
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
The PNP_GetFirstLogConf method finds the first logical configuration of the specified type for the
specified device instance.<51>
DWORD PNP_GetFirstLogConf(
[in] handle_t hBinding,
[in, string, ref, range(0,PNP_MAX_DEVICE_ID_LEN)]
wchar_t* pDeviceID,
[in] unsigned long ulLogConfType,
[out] unsigned long* pulLogConfTag,
[in] unsigned long ulFlags
);
pDeviceID: Null-terminated string that specifies the device instance ID of the device from which
to get the logical configuration.
ulLogConfType: Type of logical configuration to get. For possible values, see section 3.1.4.39.
pulLogConfTag: Returns the logical configuration that is wanted from the specified type of
logical configuration.
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
0x00000005 The specified pDeviceID parameter value is invalid because the device
CR_INVALID_DEVNODE instance string does not conform to one or more of the following
device instance path rules:
101 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Return value/code Description
0x0000001D A failure occurred when the method tried to read logical configuration
CR_REGISTRY_ERROR information from the registry.
0x00000033 Verification of client access privileges failed. Caller does not have
CR_ACCESS_DENIED LoadDriverPrivileges.
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
The PNP_GetNextLogConf method finds the next logical configuration of the specified type for the
specified device instance.<52>
DWORD PNP_GetNextLogConf(
[in] handle_t hBinding,
[in, string, ref, range(0,PNP_MAX_DEVICE_ID_LEN)]
wchar_t* pDeviceID,
[in] unsigned long ulLogConfType,
[in] unsigned long ulCurrentTag,
[out] unsigned long* pulNextTag,
[in] unsigned long ulFlags
);
pDeviceID: Null-terminated string that specifies the device instance ID of the device from which
to get the logical configuration.
ulLogConfType: Type of logical configuration to get. For possible values, see section 3.1.4.39.
pulNextTag: Returns the next logical configuration of the type specified by the ulLogConfType
parameter for the specified device instance.
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
102 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Return value/code Description
0x00000005 The specified pDeviceID parameter value is invalid because the device
CR_INVALID_DEVNODE instance string does not conform to one or more of the following
device instance path rules:
0x0000000E Therefore, neither the device instance nor the logical configuration
CR_NO_MORE_LOG_CONF exists, or the specified logical configuration type contains only
resource data or requirements data.
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
The PNP_GetLogConfPriority method returns the priority value assigned to the specified logical
configuration.<53>
DWORD PNP_GetLogConfPriority(
[in] handle_t hBinding,
[in, string, ref, range(0,PNP_MAX_DEVICE_ID_LEN)]
wchar_t* pDeviceID,
[in] unsigned long ulType,
[in] unsigned long ulTag,
[out] unsigned long* pPriority,
[in] unsigned long ulFlags
);
103 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
pDeviceID: A null-terminated device instance ID specifying the device from which to get the
priority value of the specified logical configuration.
ulType: Type of logical configuration for which to return priority. For possible values, see section
3.1.4.39.
pPriority: Priority for the specified logical configuration. For possible values, see section
3.1.4.39.
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
0x00000005 The specified pDeviceID parameter value is invalid because the device
CR_INVALID_DEVNODE instance string does not conform to one or more of the following device
instance path rules:
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
104 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
3.1.4.44 PNP_AddResDes (Opnum 47)
DWORD PNP_AddResDes(
[in] handle_t hBinding,
[in, string, ref, range(0,PNP_MAX_DEVICE_ID_LEN)]
wchar_t* pDeviceID,
[in] unsigned long ulLogConfTag,
[in] unsigned long ulLogConfType,
[in] RESOURCEID ResourceID,
[out] unsigned long* pulResourceTag,
[in, size_is(ResourceLen)] byte far* ResourceData,
[in] PNP_RPC_BUFFER_SIZE ResourceLen,
[in] unsigned long ulFlags
);
pDeviceID: A null-terminated device instance ID specifying the device with the logical
configuration to which a resource descriptor is added.
ulLogConfTag: Logical configuration of the specified type for the specified device ID.
ulLogConfType: Type of logical configuration. For possible values, see section 3.1.4.39.
ResourceID: Resource type, a RESOURCEID data type, defined as an unsigned long. Possible
values:
Value Meaning
ResType_DoNotUse Spacer used to synchronize subsequent resource types with Windows NT.
0x00000005
105 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Value Meaning
0x00000007
ResType_Ignored_Bit Unused.
0x00008000
pulResourceTag: Returns the index of the resource descriptor within the logical configuration.
ResourceData: Pointer to a structure that specifies resource descriptor data to add to the
logical configuration. The format of the structure is determined by the ResourceID type. See
section 2.2.12.1.
ulFlags: Specifies the width of certain variable-size resource descriptor structure fields, as
applicable. Possible values:
Value Meaning
These flags are optional, and this parameter may include no flags (ulFlags = 0). If no flags are
specified, the width of the variable-sized resource data supplied is assumed to be 32-bit.
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
106 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Return value/code Description
CR_INVALID_POINTER
0x00000005 The specified pDeviceID parameter value is invalid because the device
CR_INVALID_DEVNODE instance string does not conform to one or more of the following
device instance path rules:
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol,
as specified in [MS-RPCE].
Resource descriptors are always added to the end of the list except in the case where a class-
specific resource descriptor has already been added. The class-specific resource descriptor always
MUST be last. To add new resource descriptors that are not class-specific, place them just before
those that are class-specific. A list can include only one class-specific resource descriptor.
The PNP_FreeResDes method frees a resource descriptor for the specified logical
configuration.<55>
DWORD PNP_FreeResDes(
[in] handle_t hBinding,
[in, string, ref, range(0,PNP_MAX_DEVICE_ID_LEN)]
107 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
wchar_t* pDeviceID,
[in] unsigned long ulLogConfTag,
[in] unsigned long ulLogConfType,
[in] RESOURCEID ResourceID,
[in] unsigned long ulResourceTag,
[out] unsigned long* pulPreviousResType,
[out] unsigned long* pulPreviousResTag,
[in] unsigned long ulFlags
);
pDeviceID: A null-terminated device instance ID specifying the device having the logical
configuration with the resource descriptor to be freed.
ulLogConfTag: Logical configuration of the specified type for the specified device ID.
ulLogConfType: Type of logical configuration. For possible values, see section 3.1.4.39.
pulPreviousResType: Returns the previous resource type. For possible values, see section
3.1.4.44.
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
0x00000005 The specified pDeviceID parameter value is invalid because the device
CR_INVALID_DEVNODE instance string does not conform to one or more of the following device
instance path rules:
108 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Return value/code Description
(',')
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
The PNP_GetNextResDes method gets the next resource descriptor in the specified logical
configuration.<56>
DWORD PNP_GetNextResDes(
[in] handle_t hBinding,
[in, string, ref, range(0,PNP_MAX_DEVICE_ID_LEN)]
wchar_t* pDeviceID,
[in] unsigned long ulLogConfTag,
[in] unsigned long ulLogConfType,
[in] RESOURCEID ResourceID,
[in] unsigned long ulResourceTag,
[out] unsigned long* pulNextResDesTag,
[out] unsigned long* pulNextResDesType,
[in] unsigned long ulFlags
);
pDeviceID: A null-terminated device instance ID specifying the device with the next resource
descriptor to be retrieved.
ulLogConfTag: Logical configuration of the specified type for the specified device ID.
ulLogConfType: Type of logical configuration. For possible values, see section 3.1.4.39.
109 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
pulNextResDesTag: Returns the tag for the next resource of the type specified by
pulNextResDesType.
pulNextResDesType: Returns the next resource type. For possible values, see 3.1.4.44.
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
0x00000005 The specified pDeviceID parameter value is invalid because the device
CR_INVALID_DEVNODE instance string does not conform to one or more of the following device
instance path rules:
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
110 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
3.1.4.47 PNP_GetResDesData (Opnum 50)
The PNP_GetResDesData method returns the data for the specified resource descriptor.<57>
DWORD PNP_GetResDesData(
[in] handle_t hBinding,
[in, string, ref, range(0,PNP_MAX_DEVICE_ID_LEN)]
wchar_t* pDeviceID,
[in] unsigned long ulLogConfTag,
[in] unsigned long ulLogConfType,
[in] RESOURCEID ResourceID,
[in] unsigned long ulResourceTag,
[out, size_is(BufferLen)] byte far* Buffer,
[in] PNP_RPC_BUFFER_SIZE BufferLen,
[in] unsigned long ulFlags
);
pDeviceID: A null-terminated device instance ID specifying the device with the resource
descriptor from which data is retrieved.
ulLogConfTag: Logical configuration of the specified type for the specified device ID.
ulLogConfType: Type of logical configuration. For possible values, see section 3.1.4.39.
Buffer: Returns resource data of ResourceID type from the logical configuration. See section
2.2.12.1.
ulFlags: Can specify flags that indicate the width of certain variable-size resource descriptor
structure fields. If no such flags are specified, the width of the variable-sized resource data
supplied is assumed to be native to the platform of the caller. Possible values:
Value Meaning
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
111 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Return value/code Description
0x00000005 The specified pDeviceID parameter value is invalid because the device
CR_INVALID_DEVNODE instance string does not conform to one or more of the following device
instance path rules:
0x0000000D The specified device instance does not correspond to a present device.
CR_NO_SUCH_DEVINST
0x0000001A An output parameter is too small to hold all the data available.
CR_BUFFER_SMALL
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
The PNP_GetResDesDataSize method returns the data size for the specified resource
descriptor.<58>
DWORD PNP_GetResDesDataSize(
[in] handle_t hBinding,
[in, string, ref, range(0,PNP_MAX_DEVICE_ID_LEN)]
wchar_t* pDeviceID,
[in] unsigned long ulLogConfTag,
[in] unsigned long ulLogConfType,
[in] RESOURCEID ResourceID,
[in] unsigned long ulResourceTag,
[out] unsigned long* pulSize,
[in] unsigned long ulFlags
112 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
);
pDeviceID: A null-terminated device instance ID specifying the device with the resource
descriptor whose data size is retrieved.
ulLogConfTag: Logical configuration of the specified type for the specified device instance.
ulLogConfType: Type of logical configuration. For possible values, see section 3.1.4.39.
pulSize: Returns the size in bytes of the buffer required to hold the resource data of ResourceID
type from the specified logical configuration, ulLogConfTag.
ulFlags: Can specify flags that indicate the width of certain variable-size resource descriptor
structure fields. If no such flags are specified, the width of the variable-sized resource data
supplied is assumed to be native to the platform of the caller. For possible values, see section
3.1.4.47.
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
0x00000005 The specified pDeviceID parameter value is invalid because the device
CR_INVALID_DEVNODE instance string does not conform to one or more of the following
device instance path rules:
113 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Return value/code Description
CR_INVALID_LOG_CONF
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
DWORD PNP_ModifyResDes(
[in] handle_t hBinding,
[in, string, ref, range(0,PNP_MAX_DEVICE_ID_LEN)]
wchar_t* pDeviceID,
[in] unsigned long ulLogConfTag,
[in] unsigned long ulLogConfType,
[in] RESOURCEID CurrentResourceID,
[in] RESOURCEID NewResourceID,
[in] unsigned long ulResourceTag,
[in, size_is(ResourceLen)] byte far* ResourceData,
[in] PNP_RPC_BUFFER_SIZE ResourceLen,
[in] unsigned long ulFlags
);
pDeviceID: Null-terminated string that specifies the device instance ID of the device from which
to get the logical configuration.
ulLogConfTag: Logical configuration of the specified type for the specified device instance.
ulLogConfType: Type of the logical configuration. For possible values, see section 3.1.4.39.
NewResourceID: New resource type. For possible values, see section 3.1.4.44.
ResourceData: Pointer to a structure that specifies new resource descriptor data. The format of
the structure is determined by the ResourceID type. See section 2.2.12.1.
114 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
ResourceLen: Size of ResourceData in bytes.
ulFlags: Can specify flags that indicate the width of certain variable-size resource descriptor
structure fields. If no such flags are specified, the width of the variable-sized resource data
supplied is assumed to be native to the platform of the caller. For possible values, see section
3.1.4.47.
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
DWORD PNP_DetectResourceConflict(
[in] handle_t hBinding,
[in, string, ref, range(0,PNP_MAX_DEVICE_ID_LEN)]
115 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
wchar_t* pDeviceID,
[in] RESOURCEID ResourceID,
[in, size_is(ResourceLen)] byte far* ResourceData,
[in] PNP_RPC_BUFFER_SIZE ResourceLen,
[out] int near* pbConflictDetected,
[in] unsigned long ulFlags
);
pDeviceID: Null-terminated string that contains a device instance ID string specifying the
device for which the resource conflict is to be detected.
ResourceData: Pointer to a structure that specifies resource descriptor data. The format of the
structure is determined by the ResourceID type. See section 2.2.12.1.
Value Meaning
ulFlags: May specify flags that indicate the width of certain variable-size resource descriptor
structure fields. If no such flags are specified, the width of the variable-sized resource data
supplied is assumed to be native to the platform of the caller. For possible values, see section
3.1.4.47.
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
DWORD PNP_QueryResConfList(
[in] handle_t hBinding,
[in, string, ref, range(0,PNP_MAX_DEVICE_ID_LEN)]
116 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
wchar_t* pDeviceID,
[in] RESOURCEID ResourceID,
[in, size_is(ResourceLen)] byte far* ResourceData,
[in] PNP_RPC_BUFFER_SIZE ResourceLen,
[out, size_is(BufferLen)] byte far* Buffer,
[in] PNP_RPC_BUFFER_SIZE BufferLen,
[in] unsigned long ulFlags
);
pDeviceID: Null-terminated string that contains a device instance ID string for the device for
which to return conflict information.
ResourceData: Pointer to a structure that specifies resource descriptor data. The format of the
structure is determined by the ResourceID type. See section 2.2.12.1.
Buffer: Pointer to a PNP_CONFLICT_LIST structure that contains the conflict list. See section
2.2.12.1.10.
BufferLen: Size in bytes of Buffer. BufferLen MUST specify that Buffer is at least as large in
bytes as: sizeof(PNP_CONFLICT_LIST) + sizeof(PNP_CONFLICT_STRINGS) + (sizeof(wchar_t)
* 200). See section 2.2.12.1.10.
ulFlags: Can specify flags that indicate the width of certain variable-size resource descriptor
structure fields. If no such flags are specified, the width of the variable-sized resource data
supplied is assumed to be native to the platform of the caller. For possible values, see section
3.1.4.47.
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
117 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Return value/code Description
0x0000001A An output parameter is too small to hold all the data available.
CR_BUFFER_SMALL
0x00000033 Verification of client access privileges failed. Caller does not have
CR_ACCESS_DENIED LoadDriverPrivileges.
0x0000003B The buffer length specified in BufferLen is too small to hold the
CR_INVALID_STRUCTURE_SIZE conflict list data structure.
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
The PNP_GetCustomDevProp method returns the data for a device instance custom
property.<62>
DWORD PNP_GetCustomDevProp(
[in] handle_t hBinding,
[in, string, ref, range(0,PNP_MAX_DEVICE_ID_LEN)]
wchar_t* pDeviceID,
[in, string, ref, range(0,PNP_MAX_STRING_LEN)]
wchar_t* CustomPropName,
[out] unsigned long* pulRegDataType,
[out, size_is(*pulLength), length_is(*pulTransferLen)]
byte far* Buffer,
[out] PNP_RPC_STRING_LEN* pulTransferLen,
[in, out] PNP_RPC_STRING_LEN* pulLength,
[in] unsigned long ulFlags
);
pDeviceID: Null-terminated string that contains a device instance ID string for the device for
which to return the custom property data.
pulRegDataType: Registry data type for the specified property. For possible registry data type
values, see section 3.1.4.10.
118 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Buffer: Returns a buffer containing the registry data. If the caller is retrieving the required size,
pulLength is 0.
pulTransferLen: Length of the data in bytes to copy into Buffer. This parameter is used to
control how much data is marshaled using RPC between address spaces.
pulLength: Passed in by the caller. On entry, it contains the size in bytes of the buffer. On exit,
it contains either the amount of data copied to Buffer if a transfer occurred, or the size
required to hold the property data if the buffer is too small.
ulFlags: Flag indicating that property values are to be merged. Possible values:
Value Meaning
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
0x00000005 The specified pDeviceID parameter value is invalid because the device
CR_INVALID_DEVNODE instance string does not conform to one or more of the following device
instance path rules:
0x0000001A An output parameter is too small to hold all the data available.
CR_BUFFER_SMALL
119 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Return value/code Description
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
The PNP_GetVersionInternal method returns the internal version number for the server-side
component.<64>
DWORD PNP_GetVersionInternal(
[in] handle_t hBinding,
[in, out] unsigned short* pwVersion
);
pwVersion: Returns the internal server version number, with the major version number in the
high byte and the minor version number in the low byte.
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns the
following non-zero error code:
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
The PNP_GetBlockedDriverInfo method returns the list of drivers that have been blocked from
loading on the system since the system was booted.<65>
DWORD PNP_GetBlockedDriverInfo(
[in] handle_t hBinding,
[out, size_is(*pulLength), length_is(*pulTransferLen)]
byte far* Buffer,
[out] PNP_RPC_BUFFER_SIZE* pulTransferLen,
[in, out] PNP_RPC_BUFFER_SIZE* pulLength,
[in] unsigned long ulFlags
);
120 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Buffer: List of unique string identifiers representing drivers that have been blocked from loading
on the system. It is legal to set this to NULL when simply retrieving data size.
pulTransferLen: Length of the data in bytes to copy into Buffer. The pulTransferLen parameter
is used only to control how much data is marshaled between address spaces by means of RPC.
pulLength: Passed in by the caller. On entry, it contains the size in bytes of Buffer. On exit, it
contains either the amount of data copied to Buffer if a transfer occurred, or the size of the
buffer required to hold the property data if Buffer is too small.
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
0x0000001A An output parameter is too small to hold all the data available.
CR_BUFFER_SMALL
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
DWORD PNP_GetServerSideDeviceInstallFlags(
[in] handle_t hBinding,
[out] unsigned long* pulSSDIFlags,
[in] unsigned long ulFlags
);
pulSSDIFlags: A pointer supplied by the caller. On successful return, the value is a bitfield that
may specify flags defined in the following table. The return value is 0 if no flags have been set.
121 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 R
Value Description
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
DWORD PNP_GetObjectPropKeys(
[in] handle_t hBinding,
[in, string, ref, range(0,PNP_MAX_STRING_LEN)]
wchar_t* ObjectName,
[in] unsigned long ObjectType,
[in, string, unique, range(0,PNP_MAX_CULTURE_NAME_LEN)]
wchar_t* PropertyCultureName,
[in, out] PNP_PROP_COUNT* PropertyCount,
[out] PNP_PROP_COUNT* TransferLen,
[out, size_is(*PropertyCount), length_is(*TransferLen)]
DEVPROPKEY* PropertyKeys,
[in] unsigned long Flags
);
122 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
ObjectName: String identifier describing the object for which the property is to be retrieved.
The format of the string depends on the value of ObjectType.
Value Meaning
PropertyCultureName: Culture name for which the specified property key data should be
retrieved. The culture name is in the ISO culture name format (for example, en-US). This
parameter MUST be NULL when retrieving culture-neutral property keys.
PropertyCount: When receiving data from the client, this parameter is a pointer to the number
of DEVPROPKEY.
Flags: Flags that modify the behavior of the method. Possible values:
Value Meaning
0x80000000 Reserved for use by system configuration tasks running on the server.
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
123 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Return value/code Description
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
The values for all In parameters are contained in the stub_data field of the RPC_REQUEST packet.
The values for all returned data, including error codes and Out parameters, are contained in the
stub_data field of the RPC_RESPONSE packet.
DWORD PNP_GetObjectProp(
[in] handle_t hBinding,
[in, string, ref, range(0,PNP_MAX_STRING_LEN)]
wchar_t* ObjectName,
[in] unsigned long ObjectType,
[in, string, unique, range(0,PNP_MAX_CULTURE_NAME_LEN)]
wchar_t* PropertyCultureName,
[in] const DEVPROPKEY* PropertyKey,
[out] DEVPROPTYPE* PropertyType,
[in, out] PNP_PROP_SIZE* PropertySize,
124 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
[out] PNP_PROP_SIZE* TransferLen,
[out, size_is(*PropertySize), length_is(*TransferLen)]
byte near* PropertyBuffer,
[in] unsigned long Flags
);
ObjectName: String identifier describing the object for which the property is to be retrieved.
The format of the string depends on the value of ObjectType.
Value Meaning
PropertyCultureName: Culture name for which the specified property data should be retrieved.
The culture name is in the ISO culture name format (for example, en-US). This parameter
MUST be NULL when retrieving a culture-neutral property.
PropertyType: Pointer to an unsigned long that can specify several different property types,
and each property type requires a different format for PropertyBuffer. The first 4 bytes of the
parameter specify a property type modifier, while the last 4 bytes specify a property type.
These are the possible property type modifier values. These values MUST NOT be specified
alone; they MUST be combined with a property type. Note: Property types and property type
modifiers MAY be used in the same PropertyType parameter; the first 4 bytes (the modifier)
modify how the last 4 bytes (the property type) are treated:
Value Meaning
DEVPROP_TYPEMOD_LIST List of elements whose data is not a fixed size. It may be combined
0x00002000 with any of the unmodified DEVPROP_TYPE types that describe a
variable-size data element. The size of the list is dependent on the
specific rules for constructing a list of the base element type.
This value MUST NOT be combined with any other property type
modifiers such as DEVPROP_TYPEMOD_ARRAY.
125 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Possible Property types:
Value Meaning
126 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Value Meaning
127 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Value Meaning
128 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Value Meaning
PropertySize: When receiving data from the client, this parameter is a pointer to the size in
bytes of the PropertyBuffer parameter. When receiving data from the server, this parameter is
either a pointer to the actual size of the data in the PropertyBuffer parameter (if successful) or
the size required (if not successful because the buffer is too small).
PropertyBuffer: Pointer to a buffer containing data for the property being retrieved. The format
of the buffer is determined by the property type. For the property types and the expected
format of the buffer, see PropertyType above.
Flags: Flags that modify the behavior of the method. Possible values:
Value Meaning
0x80000000 Reserved for use by system configuration tasks running on the server.
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
129 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Return value/code Description
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
The values for all In parameters are contained in the stub_data field of the RPC_REQUEST packet.
The values for all returned data, including error codes and Out parameters, are contained in the
stub_data field of the RPC_RESPONSE packet.
DWORD PNP_SetObjectProp(
[in] handle_t hBinding,
[in, string, ref, range(0,PNP_MAX_STRING_LEN)]
wchar_t* ObjectName,
[in] unsigned long ObjectType,
[in, string, unique, range(0,PNP_MAX_CULTURE_NAME_LEN)]
wchar_t* PropertyCultureName,
[in] const DEVPROPKEY* PropertyKey,
[in] DEVPROPTYPE PropertyType,
[in] PNP_PROP_SIZE PropertySize,
[in, unique, size_is(PropertySize)]
byte near* PropertyBuffer,
[in] unsigned long Flags
);
130 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
hBinding: A remote procedure call (RPC) binding handle.
ObjectName: String identifier describing the object for which the property is to be set. The
format of the string depends on the value of ObjectType.
Value Meaning
PropertyCultureName: Culture name for which the specified property data should be set. The
culture name is in the ISO culture name format (for example, en-US). This parameter MUST
be NULL when storing a culture-neutral property.
PropertyType: PropertyType pointer to an unsigned long that can specify several different
property types, and each property type requires a different format for PropertyBuffer. For a
full description of this member and its possible values, see the PropertyType description in
section 3.1.4.57.
PropertyBuffer: Pointer to a buffer containing data for the property being set. The format of
the buffer is determined by the property type. For a description of the property types and the
expected format of the buffer, see the PropertyType description in section 3.1.4.57.
Flags: Flags that modify the behavior of the method. Possible values:
Value Meaning
0x80000000 Reserved for use by system configuration tasks running on the server.
Return Values: The method returns CR_SUCCESS on success; otherwise, it returns one of the
following non-zero error codes:
131 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Return value/code Description
Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol.
See [MS-RPCE].
The values for all In parameters are contained in the stub_data field of the RPC_REQUEST packet.
The values for all returned data, including error codes and Out parameters, are contained in the
stub_data field of the RPC_RESPONSE packet.
132 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
3.2 Client Details
The client establishes a connection to the server and sends messages to manage devices and other
abstract objects on the remote machine.
3.2.2 Timers
3.2.3 Initialization
The client initializes by creating a remote procedure call (RPC) binding handle to the PNPR Protocol
interface on the remote computer. For how to get a client-side RPC binding handle, see [MS-DCOM]
section 3.1.4.
This protocol MUST indicate to the RPC runtime that it is to perform a strict NDR data consistency
check at target level 6.0, as specified in [MS-RPCE] section 3.<70>
133 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
4 Protocol Examples
For most methods, this is a simple request-response protocol. For every method that the server
receives, it executes the method and returns a completion. The client simply returns the completion
status to the caller.
The following sections provide examples of how a Plug and Play Remote (PNPR) Protocol client and
server communicate in common scenarios.
The following example depicts a client retrieving a list of devices on the server:
1. The client requests the size required to hold a multi-sz list of device instance ID strings,
representing the devices on the server by calling the PNP_GetDeviceListSize (section
3.1.4.8) method, passing in a reference to an UNSIGNED LONG parameter in which to store the
required size.
2. The server processes the request by estimating the largest possible size in characters required to
hold the multi-sz list of device instance ID strings. The server returns CR_SUCCESS
(0x00000000) to acknowledge that the operation is successful.
3. The client requests the list of device instance ID strings by calling the PNP_GetDeviceList
(section 3.1.4.7) method, passing in a reference to a buffer that is at least as large as the size
returned from the previous call to PNP_GetDeviceListSize.
4. The server processes the request by supplying the multi-sz list of devices, and returns
CR_SUCCESS (0x00000000) to acknowledge that the operation is successful.
The following example depicts a client retrieving the status and problem values for a device on the
server:
134 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
1. The client calls the PNP_GetDeviceStatus (section 3.1.4.27) method, passing in references to
UNSIGNED LONG parameters in which to store the status and problem values.
2. The server returns the problem and status attributes of the device, and returns CR_SUCCESS
(0x00000000) to acknowledge that the operation is successful.
135 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
5 Security
The following sections specify security considerations for administrators.
This protocol allows any user to connect to the server. Therefore, any security bug in the server
implementation can be exploitable. The server implementation SHOULD enforce security on each
method.
136 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
6 Appendix A: Full IDL
For ease of implementation, the full Interface Definition Language (IDL) is provided below
where ms-dtyp.idl is the IDL specified in [MS-DTYP]Appendix A.
import "ms-dtyp.idl";
[
uuid(8D9F4E40-A03D-11CE-8F69-08003E30051B),
version(1.0),
#ifdef __midl
ms_union,
#endif // __midl
pointer_default(unique)
]
interface pnp
// Enums
137 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
PNP_VetoIllegalDeviceRequest = 8,
PNP_VetoInsufficientPower = 9,
PNP_VetoNonDisableable = 10,
PNP_VetoLegacyDriver = 11,
PNP_VetoInsufficientRights = 12
} *PPNP_VETO_TYPE;
// Structures
typedef struct {
unsigned long HWPI_ulHWProfile;
wchar_t HWPI_szFriendlyName[80];
DWORD HWPI_dwFlags;
} HWPROFILEINFO;
// Methods
void Opnum00NotUsedOnWire(void);
void Opnum01NotUsedOnWire(void);
DWORD PNP_GetVersion(
[in] handle_t hBinding,
[out] unsigned short *pVersion
);
DWORD PNP_GetGlobalState(
[in] handle_t hBinding,
[out] unsigned long * pulState,
[in] unsigned long ulFlags
);
void PNP_LocalOnlyOpnum04(void);
void PNP_LocalOnlyOpnum05(void);
DWORD PNP_ValidateDeviceInstance(
[in] handle_t hBinding,
[in, string, ref, range(0,PNP_MAX_DEVICE_ID_LEN)] wchar_t *
pDeviceID,
[in] unsigned long ulFlags
);
DWORD PNP_GetRootDeviceInstance(
[in] handle_t hBinding,
[out,string,size_is(ulLength)] wchar_t * pDeviceID,
[in] PNP_RPC_STRING_LEN ulLength
);
138 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
DWORD PNP_GetRelatedDeviceInstance(
[in] handle_t hBinding,
[in] unsigned long ulRelationship,
[in,string,ref,range(0,PNP_MAX_DEVICE_ID_LEN)] wchar_t *
pDeviceID,
[out,string,size_is(*pulLength)] wchar_t * pRelatedDeviceID,
[in,out] PNP_RPC_STRING_LEN *pulLength,
[in] unsigned long ulFlags
);
DWORD PNP_EnumerateSubKeys(
[in] handle_t hBinding,
[in] unsigned long ulBranch,
[in] unsigned long ulIndex,
[out,string,size_is(ulLength)] wchar_t * Buffer,
[in] PNP_RPC_STRING_LEN ulLength,
[out] PNP_RPC_STRING_LEN *pulRequiredLen,
[in] unsigned long ulFlags
);
DWORD PNP_GetDeviceList(
[in] handle_t hBinding,
[in,string,unique,range(0,PNP_MAX_STRING_LEN)] wchar_t *
pszFilter,
[out,size_is(*pulLength),length_is(*pulLength)] wchar_t *
Buffer,
[in,out] PNP_RPC_BUFFER_SIZE *pulLength,
[in] unsigned long ulFlags
);
DWORD PNP_GetDeviceListSize(
[in] handle_t hBinding,
[in,string,unique,range(0,PNP_MAX_STRING_LEN)] wchar_t *
pszFilter,
[out] PNP_RPC_BUFFER_SIZE *pulLen,
[in] unsigned long ulFlags
);
DWORD PNP_GetDepth(
[in] handle_t hBinding,
[in,string,ref,range(0,PNP_MAX_DEVICE_ID_LEN)] wchar_t *
pszDeviceID,
[out] unsigned long * pulDepth,
[in] unsigned long ulFlags
);
DWORD PNP_GetDeviceRegProp(
[in] handle_t hBinding,
[in,string,ref,range(0,PNP_MAX_DEVICE_ID_LEN)] wchar_t *
pDeviceID,
[in] unsigned long ulProperty,
[in,out] unsigned long * pulRegDataType,
[out,size_is(*pulTransferLen),length_is(*pulTransferLen)] byte
far * Buffer,
[in,out] PNP_PROP_SIZE *pulTransferLen,
[in,out] PNP_PROP_SIZE *pulLength,
[in] unsigned long ulFlags
139 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
);
DWORD PNP_SetDeviceRegProp(
[in] handle_t hBinding,
[in,string,ref,range(0,PNP_MAX_DEVICE_ID_LEN)] wchar_t *
pDeviceID,
[in] unsigned long ulProperty,
[in] unsigned long ulDataType,
[in,size_is(ulLength)] byte far * Buffer,
[in] PNP_PROP_SIZE ulLength,
[in] unsigned long ulFlags
);
DWORD PNP_GetClassInstance(
[in] handle_t hBinding,
[in,string,ref,range(0,PNP_MAX_DEVICE_ID_LEN)] wchar_t *
pDeviceID,
[out,string,size_is(ulLength)] wchar_t * pszClassInstance,
[in] PNP_RPC_STRING_LEN ulLength
);
DWORD PNP_CreateKey(
[in] handle_t hBinding,
[in,string,ref,range(0,PNP_MAX_CM_PATH)] wchar_t * pszSubKey,
[in] DWORD samDesired,
[in] unsigned long ulFlags
);
DWORD PNP_DeleteRegistryKey(
[in] handle_t hBinding,
[in,string,ref,range(0,PNP_MAX_DEVICE_ID_LEN)] wchar_t *
pszDeviceID,
[in,string,ref,range(0,PNP_MAX_CM_PATH)] wchar_t * pszParentKey,
[in,string,ref,range(0,PNP_MAX_CM_PATH)] wchar_t * pszChildKey,
[in] unsigned long ulFlags
);
DWORD PNP_GetClassCount(
[in] handle_t hBinding,
[out] unsigned long * pulClassCount,
[in] unsigned long ulFlags
);
DWORD PNP_GetClassName(
[in] handle_t hBinding,
[in,string,ref,range(0,PNP_MAX_GUID_STRING_LEN)] wchar_t *
pszClassGuid,
[out,string,size_is(*pulLength)] wchar_t * Buffer,
[in,out] PNP_RPC_STRING_LEN *pulLength,
[in] unsigned long ulFlags
);
DWORD PNP_DeleteClassKey(
[in] handle_t hBinding,
[in,string,ref,range(0,PNP_MAX_GUID_STRING_LEN)] wchar_t *
pszClassGuid,
[in] unsigned long ulFlags
);
140 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
DWORD PNP_GetInterfaceDeviceAlias(
[in] handle_t hBinding,
[in,string,ref,range(0,PNP_MAX_DEVINTERFACE_LEN)] wchar_t *
pszInterfaceDevice,
[in] GUID * AliasInterfaceGuid,
[out,string,size_is(*pulTransferLen)] wchar_t *
pszAliasInterfaceDevice,
[in,out] PNP_RPC_STRING_LEN *pulLength,
[in,out] PNP_RPC_STRING_LEN *pulTransferLen,
[in] unsigned long ulFlags
);
DWORD PNP_GetInterfaceDeviceList(
[in] handle_t hBinding,
[in] GUID * InterfaceGuid,
[in,string,unique,range(0,PNP_MAX_DEVICE_ID_LEN)] wchar_t *
pszDeviceID,
[out,size_is(*pulLength),length_is(*pulLength)] wchar_t *
Buffer,
[in,out] PNP_RPC_BUFFER_SIZE *pulLength,
[in] unsigned long ulFlags
);
DWORD PNP_GetInterfaceDeviceListSize(
[in] handle_t hBinding,
[out] PNP_RPC_BUFFER_SIZE *pulLen,
[in] GUID * InterfaceGuid,
[in,string,unique,range(0,PNP_MAX_DEVICE_ID_LEN)] wchar_t *
pszDeviceID,
[in] unsigned long ulFlags
);
DWORD PNP_RegisterDeviceClassAssociation(
[in] handle_t hBinding,
[in,string,unique,range(0,PNP_MAX_DEVICE_ID_LEN)] wchar_t *
pszDeviceID,
[in] GUID * InterfaceGuid,
[in,string,unique,range(0,PNP_MAX_STRING_LEN)] wchar_t *
pszReference,
[out,string,size_is(*pulTransferLen)] wchar_t * pszSymLink,
[in,out] PNP_RPC_STRING_LEN *pulLength,
[in,out] PNP_RPC_STRING_LEN *pulTransferLen,
[in] unsigned long ulFlags
);
DWORD PNP_UnregisterDeviceClassAssociation(
[in] handle_t hBinding,
[in,string,unique,range(0,PNP_MAX_DEVINTERFACE_LEN)] wchar_t *
pszInterfaceDevice,
[in] unsigned long ulFlags
);
DWORD PNP_GetClassRegProp(
[in] handle_t hBinding,
[in,string,ref,range(0,PNP_MAX_GUID_STRING_LEN)] wchar_t *
pszClassGuid,
[in] unsigned long ulProperty,
141 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
[in,out] unsigned long * pulRegDataType,
[out,size_is(*pulTransferLen),length_is(*pulTransferLen)] byte
far * Buffer,
[in,out] PNP_PROP_SIZE *pulTransferLen,
[in,out] PNP_PROP_SIZE *pulLength,
[in] unsigned long ulFlags
);
DWORD PNP_SetClassRegProp(
[in] handle_t hBinding,
[in,string,ref,range(0,PNP_MAX_GUID_STRING_LEN)] wchar_t *
pszClassGuid,
[in] unsigned long ulProperty,
[in] unsigned long ulDataType,
[in,size_is(ulLength)] byte far * Buffer,
[in] PNP_PROP_SIZE ulLength,
[in] unsigned long ulFlags
);
DWORD PNP_CreateDevInst(
[in] handle_t hBinding,
[in,out,string,size_is(ulLength)] wchar_t * pszDeviceID,
[in,string,ref,range(0,PNP_MAX_DEVICE_ID_LEN)] wchar_t *
pszParentDeviceID,
[in] PNP_RPC_STRING_LEN ulLength,
[in] unsigned long ulFlags
);
DWORD PNP_DeviceInstanceAction(
[in] handle_t hBinding,
[in] unsigned long ulMajorAction,
[in] unsigned long ulMinorAction,
[in,string,unique,range(0,PNP_MAX_DEVICE_ID_LEN)] wchar_t *
pszDeviceInstance1,
[in,string,unique,range(0,PNP_MAX_DEVICE_ID_LEN)] wchar_t *
pszDeviceInstance2
);
DWORD PNP_GetDeviceStatus(
[in] handle_t hBinding,
[in,string,unique,range(0,PNP_MAX_DEVICE_ID_LEN)] wchar_t *
pDeviceID,
[out] unsigned long * pulStatus,
[out] unsigned long * pulProblem,
[in] unsigned long ulFlags
);
DWORD PNP_SetDeviceProblem(
[in] handle_t hBinding,
[in,string,unique,range(0,PNP_MAX_DEVICE_ID_LEN)] wchar_t *
pDeviceID,
[in] unsigned long ulProblem,
[in] unsigned long ulFlags
);
DWORD PNP_DisableDevInst(
[in] handle_t hBinding,
[in,string,unique,range(0,PNP_MAX_DEVICE_ID_LEN)] wchar_t *
142 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
pDeviceID,
[in,out,unique] PPNP_VETO_TYPE pVetoType,
[in,out,string,unique,max_is(ulNameLength),
range(0,PNP_MAX_STRING_LEN)] wchar_t * pszVetoName,
[in] unsigned long ulNameLength,
[in] unsigned long ulFlags
);
DWORD PNP_UninstallDevInst(
[in] handle_t hBinding,
[in,string,unique,range(0,PNP_MAX_DEVICE_ID_LEN)] wchar_t *
pDeviceID,
[in] unsigned long ulFlags
);
DWORD PNP_AddID(
[in] handle_t hBinding,
[in,string,unique,range(0,PNP_MAX_DEVICE_ID_LEN)] wchar_t *
pszDeviceID,
[in,string,ref,range(0,PNP_MAX_DEVICE_ID_LEN)] wchar_t * pszID,
[in] unsigned long ulFlags
);
DWORD PNP_RegisterDriver(
[in] handle_t hBinding,
[in,string,ref,range(0,PNP_MAX_DEVICE_ID_LEN)] wchar_t *
pszDeviceID,
[in] unsigned long ulFlags
);
DWORD PNP_QueryRemove(
[in] handle_t hBinding,
[in,string,ref,range(0,PNP_MAX_DEVICE_ID_LEN)] wchar_t *
pszDeviceID,
[in,out,unique] PPNP_VETO_TYPE pVetoType,
[in,out,string,unique,max_is(ulNameLength),
range(0,PNP_MAX_STRING_LEN)] wchar_t * pszVetoName,
[in] unsigned long ulNameLength,
[in] unsigned long ulFlags
);
DWORD PNP_RequestDeviceEject(
[in] handle_t hBinding,
[in,string,ref,range(0,PNP_MAX_DEVICE_ID_LEN)] wchar_t *
pszDeviceID,
[in,out,unique] PPNP_VETO_TYPE pVetoType,
[in,out,string,unique,max_is(ulNameLength),
range(0,PNP_MAX_STRING_LEN)] wchar_t * pszVetoName,
[in] unsigned long ulNameLength,
[in] unsigned long ulFlags
);
DWORD PNP_IsDockStationPresent(
[in] handle_t hBinding,
[in,out,unique] int near * Present
);
DWORD PNP_RequestEjectPC(
143 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
[in] handle_t hBinding
);
DWORD PNP_HwProfFlags(
[in] handle_t hBinding,
[in] unsigned long ulAction,
[in,string,ref,range(0,PNP_MAX_DEVICE_ID_LEN)] wchar_t *
pDeviceID,
[in] unsigned long ulConfig,
[in,out] unsigned long * pulValue,
[in,out,unique] PPNP_VETO_TYPE pVetoType,
[in,out,string,unique,max_is(ulNameLength),
range(0,PNP_MAX_STRING_LEN)] wchar_t * pszVetoName,
[in] unsigned long ulNameLength,
[in] unsigned long ulFlags
);
DWORD PNP_GetHwProfInfo(
[in] handle_t hBinding,
[in] unsigned long ulIndex,
[in,out,ref] HWPROFILEINFO *pHWProfileInfo,
[in,range(0,sizeof(HWPROFILEINFO))]unsigned long
ulProfileInfoSize,
[in] unsigned long ulFlags
);
DWORD PNP_AddEmptyLogConf(
[in] handle_t hBinding,
[in,string,ref,range(0,PNP_MAX_DEVICE_ID_LEN)] wchar_t *
pDeviceID,
[in] unsigned long ulPriority,
[out] unsigned long * pulLogConfTag,
[in] unsigned long ulFlags
);
DWORD PNP_FreeLogConf(
[in] handle_t hBinding,
[in,string,ref,range(0,PNP_MAX_DEVICE_ID_LEN)] wchar_t *
pDeviceID,
[in] unsigned long ulLogConfType,
[in] unsigned long ulLogConfTag,
[in] unsigned long ulFlags
);
DWORD PNP_GetFirstLogConf(
[in] handle_t hBinding,
[in,string,ref,range(0,PNP_MAX_DEVICE_ID_LEN)] wchar_t *
pDeviceID,
[in] unsigned long ulLogConfType,
[out] unsigned long * pulLogConfTag,
[in] unsigned long ulFlags
);
DWORD PNP_GetNextLogConf(
[in] handle_t hBinding,
[in,string,ref,range(0,PNP_MAX_DEVICE_ID_LEN)] wchar_t *
pDeviceID,
[in] unsigned long ulLogConfType,
144 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
[in] unsigned long ulCurrentTag,
[out] unsigned long * pulNextTag,
[in] unsigned long ulFlags
);
DWORD PNP_GetLogConfPriority(
[in] handle_t hBinding,
[in,string,ref,range(0,PNP_MAX_DEVICE_ID_LEN)] wchar_t *
pDeviceID,
[in] unsigned long ulType,
[in] unsigned long ulTag,
[out] unsigned long * pPriority,
[in] unsigned long ulFlags
);
DWORD PNP_AddResDes(
[in] handle_t hBinding,
[in,string,ref,range(0,PNP_MAX_DEVICE_ID_LEN)] wchar_t *
pDeviceID,
[in] unsigned long ulLogConfTag,
[in] unsigned long ulLogConfType,
[in] RESOURCEID ResourceID,
[out] unsigned long * pulResourceTag,
[in,size_is(ResourceLen)] byte far * ResourceData,
[in] PNP_RPC_BUFFER_SIZE ResourceLen,
[in] unsigned long ulFlags
);
DWORD PNP_FreeResDes(
[in] handle_t hBinding,
[in,string,ref,range(0,PNP_MAX_DEVICE_ID_LEN)] wchar_t *
pDeviceID,
[in] unsigned long ulLogConfTag,
[in] unsigned long ulLogConfType,
[in] RESOURCEID ResourceID,
[in] unsigned long ulResourceTag,
[out] unsigned long * pulPreviousResType,
[out] unsigned long * pulPreviousResTag,
[in] unsigned long ulFlags
);
DWORD PNP_GetNextResDes(
[in] handle_t hBinding,
[in,string,ref,range(0,PNP_MAX_DEVICE_ID_LEN)] wchar_t *
pDeviceID,
[in] unsigned long ulLogConfTag,
[in] unsigned long ulLogConfType,
[in] RESOURCEID ResourceID,
[in] unsigned long ulResourceTag,
[out] unsigned long * pulNextResDesTag,
[out] unsigned long * pulNextResDesType,
[in] unsigned long ulFlags
);
DWORD PNP_GetResDesData(
[in] handle_t hBinding,
[in,string,ref,range(0,PNP_MAX_DEVICE_ID_LEN)] wchar_t *
pDeviceID,
145 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
[in] unsigned long ulLogConfTag,
[in] unsigned long ulLogConfType,
[in] RESOURCEID ResourceID,
[in] unsigned long ulResourceTag,
[out,size_is(BufferLen)] byte far * Buffer,
[in] PNP_RPC_BUFFER_SIZE BufferLen,
[in] unsigned long ulFlags
);
DWORD PNP_GetResDesDataSize(
[in] handle_t hBinding,
[in,string,ref,range(0,PNP_MAX_DEVICE_ID_LEN)] wchar_t *
pDeviceID,
[in] unsigned long ulLogConfTag,
[in] unsigned long ulLogConfType,
[in] RESOURCEID ResourceID,
[in] unsigned long ulResourceTag,
[out] unsigned long * pulSize,
[in] unsigned long ulFlags
);
DWORD PNP_ModifyResDes(
[in] handle_t hBinding,
[in,string,ref,range(0,PNP_MAX_DEVICE_ID_LEN)] wchar_t *
pDeviceID,
[in] unsigned long ulLogConfTag,
[in] unsigned long ulLogConfType,
[in] RESOURCEID CurrentResourceID,
[in] RESOURCEID NewResourceID,
[in] unsigned long ulResourceTag,
[in,size_is(ResourceLen)] byte far * ResourceData,
[in] PNP_RPC_BUFFER_SIZE ResourceLen,
[in] unsigned long ulFlags
);
DWORD PNP_DetectResourceConflict(
[in] handle_t hBinding,
[in,string,ref,range(0,PNP_MAX_DEVICE_ID_LEN)] wchar_t *
pDeviceID,
[in] RESOURCEID ResourceID,
[in,size_is(ResourceLen)] byte far * ResourceData,
[in] PNP_RPC_BUFFER_SIZE ResourceLen,
[out] int near * pbConflictDetected,
[in] unsigned long ulFlags
);
DWORD PNP_QueryResConfList(
[in] handle_t hBinding,
[in,string,ref,range(0,PNP_MAX_DEVICE_ID_LEN)] wchar_t *
pDeviceID,
[in] RESOURCEID ResourceID,
[in,size_is(ResourceLen)] byte far * ResourceData,
[in] PNP_RPC_BUFFER_SIZE ResourceLen,
[out,size_is(BufferLen)] byte far * Buffer,
[in] PNP_RPC_BUFFER_SIZE BufferLen,
[in] unsigned long ulFlags
);
146 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
void Opnum55NotUsedOnWire(void);
void Opnum56NotUsedOnWire(void);
void Opnum57NotUsedOnWire(void);
void Opnum58NotUsedOnWire(void);
void Opnum59NotUsedOnWire(void);
void Opnum60NotUsedOnWire(void);
DWORD PNP_GetCustomDevProp(
[in] handle_t hBinding,
[in,string,ref,range(0,PNP_MAX_DEVICE_ID_LEN)] wchar_t *
pDeviceID,
[in,string,ref,range(0,PNP_MAX_STRING_LEN)] wchar_t *
CustomPropName,
[out] unsigned long * pulRegDataType,
[out,size_is(*pulLength),length_is(*pulTransferLen)] byte far *
Buffer,
[out] PNP_RPC_STRING_LEN * pulTransferLen,
[in,out] PNP_RPC_STRING_LEN * pulLength,
[in] unsigned long ulFlags
);
DWORD PNP_GetVersionInternal(
[in] handle_t hBinding,
[in,out] unsigned short * pwVersion
);
DWORD PNP_GetBlockedDriverInfo(
[in] handle_t hBinding,
[out,size_is(*pulLength),length_is(*pulTransferLen)] byte far *
Buffer,
[out] PNP_RPC_BUFFER_SIZE * pulTransferLen,
[in,out] PNP_RPC_BUFFER_SIZE * pulLength,
[in] unsigned long ulFlags
);
DWORD PNP_GetServerSideDeviceInstallFlags(
[in] handle_t hBinding,
[out] unsigned long * pulSSDIFlags,
[in] unsigned long ulFlags
);
DWORD PNP_GetObjectPropKeys(
[in] handle_t hBinding,
[in,string,ref,range(0,PNP_MAX_STRING_LEN)] wchar_t *
ObjectName,
[in] unsigned long ObjectType,
[in,string,unique,range(0,PNP_MAX_CULTURE_NAME_LEN)] wchar_t *
PropertyCultureName,
[in,out] PNP_PROP_COUNT * PropertyCount,
[out] PNP_PROP_COUNT * TransferLen,
[out,size_is(*PropertyCount),length_is(*TransferLen)]
DEVPROPKEY *PropertyKeys,
[in] unsigned long Flags
147 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
);
DWORD PNP_GetObjectProp(
[in] handle_t hBinding,
[in,string,ref,range(0,PNP_MAX_STRING_LEN)] wchar_t *
ObjectName,
[in] unsigned long ObjectType,
[in,string,unique,range(0,PNP_MAX_CULTURE_NAME_LEN)] wchar_t *
PropertyCultureName,
[in] const DEVPROPKEY * PropertyKey,
[out] DEVPROPTYPE * PropertyType,
[in,out] PNP_PROP_SIZE * PropertySize,
[out] PNP_PROP_SIZE * TransferLen,
[out,size_is(*PropertySize),length_is(*TransferLen)] byte near *
PropertyBuffer,
[in] unsigned long Flags
);
DWORD PNP_SetObjectProp(
[in] handle_t hBinding,
[in,string,ref,range(0,PNP_MAX_STRING_LEN)] wchar_t *
ObjectName,
[in] unsigned long ObjectType,
[in,string,unique,range(0,PNP_MAX_CULTURE_NAME_LEN)] wchar_t *
PropertyCultureName,
[in] const DEVPROPKEY * PropertyKey,
[in] DEVPROPTYPE PropertyType,
[in] PNP_PROP_SIZE PropertySize,
[in,unique,size_is(PropertySize)] byte near * PropertyBuffer,
[in] unsigned long Flags
);
148 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
7 Appendix B: Windows Behavior
The information in this specification is applicable to the following versions of Windows:
Windows NT
Windows 2000
Windows XP
Windows Vista
Exceptions, if any, are noted below. Unless otherwise specified, any statement of optional behavior
in this specification prescribed using the terms SHOULD or SHOULD NOT implies Windows behavior
in accordance with the SHOULD or SHOULD NOT prescription. Unless otherwise specified, the term
MAY implies that Windows does not follow the prescription.
<1> Section 1: Version 0.0 of the Plug and Play Remote (PNPR) Protocol is implemented by
Windows NT 4.0 only. Version 1.0 is implemented by Windows 2000, Windows XP, Windows
Server 2003, Windows Vista, and Windows Server 2008.
<2> Section 1.3: Windows implementation uses the RPC protocol to retrieve the identity of the
caller, as specified in [MS-RPCE] section 3.3.3.4.3. The server uses the underlying Windows security
subsystem to determine the permissions for the caller. If the caller does not have the required
permissions to execute a specific method, the method call fails and returns CR_ACCESS_DENIED
(0x00000033).
The specific security check implemented by the server to determine if the client has access to call
any given interface method varies among each of the methods and among different implementations
of the protocol. Generally, the methods are determined to either require special privileges, special
group access rights, or both. Below are the minimum security requirements implemented for all
methods of the interface on each version of Windows:
Windows NT, Windows 2000, Windows XP, and Windows XP SP1: The client MUST authenticate to
the server as a member of the local Authenticated Users group to call any method of the PnP
interface.
Windows XP SP2, Windows Server 2003, and Windows Vista: The client MUST authenticate to the
server as a member of the local administrators group to call any method of the PnP interface.
Additional differences in the security requirements for specific interface methods are defined
elsewhere throughout this document.
<3> Section 1.9: \\PIPE\plugplay is used on the Windows Vista version of the server, for all
opnums. \\PIPE\ntsvcs may also receive requests for methods up to and including opnum 64
(PNP_GetServerSideDeviceInstallFlags). Methods with opnum 65 (PNP_GetObjectPropKeys)
and greater are only accessible through the \\PIPE\plugplay endpoint.
<4> Section 2.1: The \\PIPE\plugplay well-known endpoint is used by the Windows Vista and
Windows Server 2008 implementations of the server, for all opnums. \\PIPE\ntsvcs may also receive
requests for methods up to and including opnum 64 (PNP_GetServerSideDeviceInstallFlags).
Methods with opnum 65 (PNP_GetObjectPropKeys) and greater are only accessible through the
\\PIPE\plugplay endpoint.
149 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
<5> Section 2.2.9: Windows NT, Windows 2000, Windows XP, Windows Server 2003: Interface
element size limits are not implemented by the protocol for these versions. No interface method
parameters are decorated with the RPC [range] attribute.
<6> Section 3.1.3: Windows Vista: The Plug and Play Remote (PNPR) Protocol is not available in
default configurations. It can be enabled through the Windows Group Policy infrastructure.
<7> Section 3.1.4: Windows 2000, Windows XP, and Windows Server 2003: This protocol MUST
indicate to the RPC runtime that it is to perform a strict NDR data consistency check at target level
5.0, as specified in [MS-RPCE] section 3.
Windows NT: This protocol disables strict checking to enforce NDR data consistency. The RPC
runtime does not perform a strict data consistency check, as specified in [MS-RPCE] section 3. This
protocol MUST indicate to the RPC runtime via the strict_context_handle attribute that it is to reject
use of context handles created by a method of a different RPC interface than this one, as specified in
[MS-RPCE] section 3.
<8> Section 3.1.4: Windows NT, Windows 2000, Windows XP, and Windows XP SP1: The client
MUST authenticate to the server as a member of the local authenticated users group to call any
method of the PNPR Protocol interface.
Windows XP SP2 and later, Windows Server 2003, and Windows Vista: The client MUST authenticate
to the server as a member of the local administrators group to call any method of the PNPR Protocol
interface.
<9> Section 3.1.4: Gaps in the opnum numbering sequence apply to Windows as follows.
Opnum Description
<10> Section 3.1.4.1: This method requires Windows XP, Windows 2000 Professional, Windows NT
Workstation 4.0 SP3 and later, Windows 2000 Server, Windows Server 2003, or Windows NT
Server 4.0 SP3 and later.
<11> Section 3.1.4.2: This method requires Windows XP, Windows 2000 Professional, Windows NT
Workstation 4.0 SP3 and later, Windows 2000 Server, Windows Server 2003, or Windows NT
Server 4.0 SP3 and later.
150 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
<12> Section 3.1.4.3: This method requires Windows XP, Windows 2000 Professional, Windows NT
Workstation 4.0 SP3 and later, Windows 2000 Server, Windows Server 2003, or Windows NT
Server 4.0 SP3 and later.
<13> Section 3.1.4.4: This method requires Windows XP, Windows 2000 Professional, Windows NT
Workstation 4.0 SP3 and later, Windows 2000 Server, Windows Server 2003, or Windows NT
Server 4.0 SP3 and later.
<15> Section 3.1.4.5: This method requires Windows XP, Windows 2000 Professional, Windows NT
Workstation 4.0 SP3 and later, Windows 2000 Server, Windows Server 2003, or Windows NT
Server 4.0 SP3 and later.
<16> Section 3.1.4.6: This method requires Windows XP, Windows 2000 Professional, Windows NT
Workstation 4.0 SP3 and later, Windows 2000 Server, Windows Server 2003, or Windows NT
Server 4.0 SP3 and later.
<17> Section 3.1.4.9: This method requires Windows XP, Windows 2000 Professional, Windows NT
Workstation 4.0 SP3 and later, Windows 2000 Server, Windows Server 2003, or Windows NT
Server 4.0 SP3 and later.
<18> Section 3.1.4.10: This method requires Windows XP, Windows 2000 Professional,
Windows NT Workstation 4.0 SP3 and later, Windows 2000 Server, Windows Server 2003, or
Windows NT Server 4.0 SP3 and later.
<19> Section 3.1.4.11: This method requires Windows XP, Windows 2000 Professional,
Windows NT Workstation 4.0 SP3 and later, Windows 2000 Server, Windows Server 2003, or
Windows NT Server 4.0 SP3 and later.
Windows Server 2003 and Windows Vista: The client MUST authenticate to the server as a member
of the local administrators group.
<21> Section 3.1.4.13: Windows Server 2003 and Windows Vista: The client MUST authenticate to
the server as a member of the local administrators group.
<22> Section 3.1.4.14: Windows NT, Windows 2000, and Windows XP: The client MUST
authenticate to the server as a user who is granted the SeLoadDriverPrivilege privilege.
Windows Server 2003 and Windows Vista: The client MUST authenticate to the server as a member
of the local administrators group.
<23> Section 3.1.4.15: This method requires Windows NTWindows XP, Windows 2000 Professional,
Windows NT Workstation 4.0 SP3 and later, Windows 2000 Server, Windows Server 2003, or
Windows NT Server 4.0 SP3 and later.
<24> Section 3.1.4.16: This method requires Windows XP, Windows 2000 Professional,
Windows NT Workstation 4.0 SP3 and later, Windows 2000 Server, Windows Server 2003, or
Windows NT Server 4.0 SP3 and later.
151 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
<25> Section 3.1.4.17: This method requires Windows XP, Windows 2000 Professional,
Windows NT Workstation 4.0 SP3 and later, Windows 2000 Server, Windows Server 2003, or
Windows NT Server 4.0 SP3 and later.
Windows NT, Windows 2000, and Windows XP: The client MUST authenticate to the server as a user
who is granted the SeLoadDriverPrivilege privilege.
Windows Server 2003 and Windows Vista: The client MUST authenticate to the server as a member
of the local administrators group.
<26> Section 3.1.4.17: Windows Vista and Windows Server 2008: Storage locations for devices
can only be deleted by specifying this flag if all such devices have a status of
DN_WILL_BE_REMOVED.
<27> Section 3.1.4.18: This method requires Windows XP, Windows 2000 Professional,
Windows NT Workstation 4.0 SP3 and later, Windows 2000 Server, Windows Server 2003, or
Windows NT Server 4.0 SP3 and later.
<28> Section 3.1.4.19: This method requires Windows XP, Windows 2000 Professional,
Windows NT Workstation 4.0 SP3 and later, Windows 2000 Server, Windows Server 2003, or
Windows NT Server 4.0 SP3 and later.
<29> Section 3.1.4.20: This method requires Windows XP, Windows 2000 Professional,
Windows NT Workstation 4.0 SP3 and later, Windows 2000 Server, Windows Server 2003, or
Windows NT Server 4.0 SP3 and later.
<30> Section 3.1.4.21: This method requires Windows XP, Windows 2000 Professional,
Windows NT Workstation 4.0 SP3 and later, Windows 2000 Server, Windows Server 2003, or
Windows NT Server 4.0 SP3 and later.
Windows NT, Windows 2000, and Windows XP: The client MUST authenticate to the server as a user
who is granted the SeLoadDriverPrivilege privilege.
Windows Server 2003 and Windows Vista: The client MUST authenticate to the server as a member
of the local administrators group.
<31> Section 3.1.4.22: This method requires Windows XP, Windows 2000 Professional,
Windows NT Workstation 4.0 SP3 and later, Windows 2000 Server, Windows Server 2003, or
Windows NT Server 4.0 SP3 and later.
Windows NT, Windows 2000, and Windows XP: The client MUST authenticate to the server as a user
who is granted the SeLoadDriverPrivilege privilege.
Windows Server 2003 and Windows Vista: The client MUST authenticate to the server as a member
of the local administrators group.
<32> Section 3.1.4.23: This method requires Windows XP, Windows 2000 Professional,
Windows NT Workstation 4.0 SP3 and later, Windows 2000 Server, Windows Server 2003, or
Windows NT Server 4.0 SP3 and later.
<33> Section 3.1.4.24: This method requires Windows XP, Windows 2000 Professional,
Windows NT Workstation 4.0 SP3 and later, Windows 2000 Server, Windows Server 2003, or
Windows NT Server 4.0 SP3 and later.
152 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Windows NT, Windows 2000, and Windows XP: The client MUST authenticate to the server as a user
who is granted the SeLoadDriverPrivilege privilege.
Windows Server 2003 and Windows Vista: The client MUST authenticate to the server as a member
of the local administrators group.
<34> Section 3.1.4.25: This method requires Windows XP, Windows 2000 Professional,
Windows NT Workstation 4.0 SP3 and later, Windows 2000 Server, Windows Server 2003, or
Windows NT Server 4.0 SP3 and later.
Windows NT, Windows 2000, and Windows XP: The client MUST authenticate to the server as a user
who is granted the SeLoadDriverPrivilege privilege.
Windows Server 2003 and Windows Vista: The client MUST authenticate to the server as a member
of the local administrators group.
<35> Section 3.1.4.25: The parent of the new device MUST be HTREE\ROOT\0.
<36> Section 3.1.4.26: This method requires Windows XP, Windows 2000 Professional,
Windows NT Workstation 4.0 SP3 and later, Windows 2000 Server, Windows Server 2003, or
Windows NT Server 4.0 SP3 and later.
The client MUST authenticate to the server as a user who is granted the SeLoadDriverPrivilege
privilege.
<37> Section 3.1.4.27: This method requires Windows XP, Windows 2000 Professional,
Windows NT Workstation 4.0 SP3 and later, Windows 2000 Server, Windows Server 2003, or
Windows NT Server 4.0 SP3 and later.
<38> Section 3.1.4.28: This method requires Windows XP, Windows 2000 Professional,
Windows NT Workstation 4.0 SP3 and later, Windows 2000 Server, Windows Server 2003, or
Windows NT Server 4.0 SP3 and later.
The client MUST authenticate to the server as a user who is granted the SeLoadDriverPrivilege
privilege.
<39> Section 3.1.4.29: This method requires Windows XP, Windows 2000 Professional,
Windows NT Workstation 4.0 SP3 and later, Windows 2000 Server, Windows Server 2003, or
Windows NT Server 4.0 SP3 and later.
The client MUST authenticate to the server as a user who is granted the SeLoadDriverPrivilege
privilege.
<40> Section 3.1.4.30: This method requires Windows XP, Windows 2000 Professional,
Windows NT Workstation 4.0 SP3 and later, Windows 2000 Server, Windows Server 2003, or
Windows NT Server 4.0 SP3 and later.
Windows NT, Windows 2000, and Windows XP: The client MUST authenticate to the server as a user
who is granted the SeLoadDriverPrivilege privilege.
Windows Server 2003 and Windows Vista: The client MUST authenticate to the server as a member
of the local administrators group.
<41> Section 3.1.4.31: This method requires Windows XP, Windows 2000 Professional,
Windows NT Workstation 4.0 SP3 and later, Windows 2000 Server, Windows Server 2003, or
Windows NT Server 4.0 SP3 and later.
153 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Windows NT, Windows 2000, and Windows XP: The client MUST authenticate to the server as a user
who is granted the SeLoadDriverPrivilege privilege.
Windows Server 2003 and Windows Vista: The client MUST authenticate to the server as a member
of the local administrators group.
<42> Section 3.1.4.32: This method requires Windows XP, Windows 2000 Professional,
Windows NT Workstation 4.0 SP3 and later, Windows 2000 Server, Windows Server 2003, or
Windows NT Server 4.0 SP3 and later.
The client MUST authenticate to the server as a user who is granted the SeLoadDriverPrivilege
privilege.
<43> Section 3.1.4.33: This method requires Windows XP, Windows 2000 Professional,
Windows NT Workstation 4.0 SP3 and later, Windows 2000 Server, Windows Server 2003, or
Windows NT Server 4.0 SP3 and later.
The client MUST authenticate to the server as a user who is granted the SeLoadDriverPrivilege
privilege.
<44> Section 3.1.4.34: This method requires Windows XP, Windows 2000 Professional,
Windows NT Workstation 4.0 SP3 and later, Windows 2000 Server, Windows Server 2003, or
Windows NT Server 4.0 SP3 and later.
When called for a device that does not represent a docking station, the client MUST authenticate to
the server as a user who is granted the SeLoadDriverPrivilege privilege. When called for a device
that is a dock station, the client MUST authenticate to the server as a user who is granted the
SeUndockPrivilege privilege.
<45> Section 3.1.4.35: This method requires Windows XP, Windows 2000 Professional,
Windows NT Workstation 4.0 SP3 and later, Windows 2000 Server, Windows Server 2003, or
Windows NT Server 4.0 SP3 and later.
<46> Section 3.1.4.36: This method requires Windows XP, Windows 2000 Professional,
Windows NT Workstation 4.0 SP3 and later, Windows 2000 Server, Windows Server 2003, or
Windows NT Server 4.0 SP3 and later.
The client MUST authenticate to the server as a user who is granted the SeUndockPrivilege
privilege.
<47> Section 3.1.4.37: This method requires Windows XP, Windows 2000 Professional,
Windows NT Workstation 4.0 SP3 and later, Windows 2000 Server, Windows Server 2003, or
Windows NT Server 4.0 SP3 and later.
When called with ulAction set to PNP_SET_HWPROFFLAGS, the client MUST authenticate to the
server as a user who is granted the SeLoadDriverPrivilege privilege.
<48> Section 3.1.4.38: This method requires Windows XP, Windows 2000 Professional,
Windows NT Workstation 4.0 SP3 and later, Windows 2000 Server, Windows Server 2003, or
Windows NT Server 4.0 SP3 and later.
<49> Section 3.1.4.39: This method requires Windows XP, Windows 2000 Professional,
Windows NT Workstation 4.0 SP3 and later, Windows 2000 Server, Windows Server 2003, or
Windows NT Server 4.0 SP3 and later.
Windows NT, Windows 2000, and Windows XP: The client MUST authenticate to the server as a user
who is granted the SeLoadDriverPrivilege privilege.
154 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
Windows Server 2003 and Windows Vista: The client MUST authenticate to the server as a member
of the local administrators group.
<50> Section 3.1.4.40: This method requires Windows XP, Windows 2000 Professional,
Windows NT Workstation 4.0 SP3 and later, Windows 2000 Server, Windows Server 2003, or
Windows NT Server 4.0 SP3 and later.
Windows NT, Windows 2000, and Windows XP: The client MUST authenticate to the server as a user
who is granted the SeLoadDriverPrivilege privilege.
Windows Server 2003 and Windows Vista: The client MUST authenticate to the server as a member
of the local administrators group.
<51> Section 3.1.4.41: This method requires Windows XP, Windows 2000 Professional,
Windows NT Workstation 4.0 SP3 and later, Windows 2000 Server, Windows Server 2003, or
Windows NT Server 4.0 SP3 and later.
<52> Section 3.1.4.42: This method requires Windows XP, Windows 2000 Professional,
Windows NT Workstation 4.0 SP3 and later, Windows 2000 Server, Windows Server 2003, or
Windows NT Server 4.0 SP3 and later.
<53> Section 3.1.4.43: This method requires Windows XP, Windows 2000 Professional,
Windows NT Workstation 4.0 SP3 and later, Windows 2000 Server, Windows Server 2003, or
Windows NT Server 4.0 SP3 and later.
<54> Section 3.1.4.44: This method requires Windows XP, Windows 2000 Professional,
Windows NT Workstation 4.0 SP3 and later, Windows 2000 Server, Windows Server 2003, or
Windows NT Server 4.0 SP3 and later.
Windows NT, Windows 2000, and Windows XP: The client MUST authenticate to the server as a user
who is granted the SeLoadDriverPrivilege privilege.
Windows Server 2003 and Windows Vista: The client MUST authenticate to the server as a member
of the local administrators group.
<55> Section 3.1.4.45: This method requires Windows XP, Windows 2000 Professional,
Windows NT Workstation 4.0 SP3 and later, Windows 2000 Server, Windows Server 2003, or
Windows NT Server 4.0 SP3 and later.
Windows NT, Windows 2000, and Windows XP: The client MUST authenticate to the server as a user
who is granted the SeLoadDriverPrivilege privilege.
Windows Server 2003 and Windows Vista: The client MUST authenticate to the server as a member
of the local administrators group.
<56> Section 3.1.4.46: This method requires Windows XP, Windows 2000 Professional,
Windows NT Workstation 4.0 SP3 and later, Windows 2000 Server, Windows Server 2003, or
Windows NT Server 4.0 SP3 and later.
<57> Section 3.1.4.47: This method requires Windows XP, Windows 2000 Professional,
Windows NT Workstation 4.0 SP3 and later, Windows 2000 Server, Windows Server 2003, or
Windows NT Server 4.0 SP3 and later.
<58> Section 3.1.4.48: This method requires Windows XP, Windows 2000 Professional,
Windows NT Workstation 4.0 SP3 and later, Windows 2000 Server, Windows Server 2003, or
Windows NT Server 4.0 SP3 and later.
155 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
<59> Section 3.1.4.49: This method requires Windows XP, Windows 2000 Professional,
Windows NT Workstation 4.0 SP3 and later, Windows 2000 Server, Windows Server 2003, or
Windows NT Server 4.0 SP3 and later.
Windows NT, Windows 2000, and Windows XP: The client MUST authenticate to the server as a user
who is granted the SeLoadDriverPrivilege privilege.
Windows Server 2003 and Windows Vista: The client MUST authenticate to the server as a member
of the local administrators group.
<60> Section 3.1.4.50: This method requires Windows XP, Windows 2000 Professional,
Windows NT Workstation 4.0 SP3 and later, Windows 2000 Server, Windows Server 2003, or
Windows NT Server 4.0 SP3 and later.
Windows XP and Windows Vista and Windows Server 2008: Returns CR_CALL_NOT_IMPLEMENTED
(0x00000034). The call is not implemented.
<61> Section 3.1.4.51: This method requires Windows XP, Windows 2000 Professional,
Windows NT Workstation 4.0 SP3 and later, Windows 2000 Server, Windows Server 2003, or
Windows NT Server 4.0 SP3 and later.
<62> Section 3.1.4.52: This method only available for Windows XP, Windows Server 2003,
Windows Vista, and Windows Server 2008.
<63> Section 3.1.4.52: The CustomPropName string is the name of a registry value that can be set
in the Device Parameters subkey for device settings.
<64> Section 3.1.4.53: This method only available for Windows XP, Windows Server 2003,
Windows Vista, and Windows Server 2008.
<65> Section 3.1.4.54: This method is available only for Windows XP, Windows Server 2003,
Windows Vista, and Windows Server 2008.
<66> Section 3.1.4.55: This method is available only for Windows XP, Windows Server 2003,
Windows Vista, and Windows Server 2008.
<67> Section 3.1.4.56: This method is available only for Windows Vista and Windows Server 2008.
<68> Section 3.1.4.57: This method is available only for Windows Vista and Windows Server 2008.
<69> Section 3.1.4.58: This method is available only for Windows Vista and Windows Server 2008.
Windows Vista: The client MUST authenticate to the server as a member of the local administrators
group.
<70> Section 3.2.4: Windows 2000, Windows XP, and Windows Server 2003: This protocol MUST
indicate to the RPC runtime that it is to perform a strict NDR data consistency check at target level
5.0, as specified in [MS-RPCE] section 3.
156 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
8 Index
Enumerator ID
A Examples
Abstract data elements
Abstract data model F
client
server Fields - vendor-extensible
Applicability Full IDL
B G
BUSNUMBER structures Glossary
BUSNUMBER_DES structure
BUSNUMBER_RANGE structure H
BUSNUMBER_RESOURCE structure
Hardware ID
HWPROFILEINFO structure
C
Capability negotiation I
Client
abstract data model IDL
initialization Implementers - security considerations
local events Informative references
message processing Initialization
overview client
sequencing rules server
timer events Instance ID
timers Introduction
Compatible ID IO structures
CS structures IO_DES structure
CS_DES structure IO_RANGE structure
CS_RESOURCE structure IO_RESOURCE structure
IRQ structures
IRQ_DES structure
D
IRQ_RANGE structure
Data model - abstract IRQ_RESOURCE structure
client
server L
Data types
Device Class GUID String ID Local events
Device ID client
Device Instance ID server
Device Interface ID
DevicePrivate structures
M
Devices
list of - example Mem structures
status example MEM_DES structure
value example MEM_RANGE structure
DEVPRIVATE_DES structure MEM_RESOURCE structure
DEVPRIVATE_RANGE structure Message processing
DEVPRIVATE_RESOURCE structure client
DEVPROPKEY structure server
DMA structures Messages
DMA_DES structure data types
DMA_RANGE structure enumerations
DMA_RESOURCE structure overview
structures
E transport
MFCard structures
Enumerations
157 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
MFCARD_DES structure PNP_GetDeviceList method
MFCARD_RESOURCE structure PNP_GetDeviceListSize method
PNP_GetDeviceRegProp method
PNP_GetDeviceStatus method
N
PNP_GetFirstLogConf method
Normative references PNP_GetGlobalState method
PNP_GetHwProfInfo method
PNP_GetInterfaceDeviceAlias method
O PNP_GetInterfaceDeviceList method
Overview PNP_GetInterfaceDeviceListSize method
PNP_GetLogConfPriority method
PNP_GetNextLogConf method
P PNP_GetNextResDes method
PBUSNUMBER_DES PNP_GetObjectProp method
PBUSNUMBER_RANGE PNP_GetObjectPropKeys method
PBUSNUMBER_RESOURCE PNP_GetRelatedDeviceInstance method
PcCard structures PNP_GetResDesData method
PCCARD_DES structure PNP_GetResDesDataSize method
PCCARD_RESOURCE structure PNP_GetRootDeviceInstance method
PCS_DES PNP_GetServerSideDeviceInstallFlags method
PCS_RESOURCE PNP_GetVersion method
PDEVPRIVATE_DES PNP_GetVersionInternal method
PDEVPRIVATE_RANGE PNP_HwProfFlags method
PDEVPRIVATE_RESOURCE PNP_IsDockStationPresent method
PDMA_DES PNP_MAX_BUFFER_SIZE
PDMA_RANGE PNP_MAX_CM_PATH
PDMA_RESOURCE PNP_MAX_CULTURE_NAME_LEN
PIO_DES PNP_MAX_DEVICE_ID_LEN
PIO_RANGE PNP_MAX_DEVINTERFACE_LEN
PIO_RESOURCE PNP_MAX_GUID_STRING_LEN
PIRQ_DES PNP_MAX_PROP_COUNT
PIRQ_RANGE PNP_MAX_PROP_SIZE
PIRQ_RESOURCE PNP_MAX_STRING_LEN
PMEM_DES PNP_ModifyResDes method
PMEM_RANGE PNP_QueryRemove method
PMEM_RESOURCE PNP_QueryResConfList method
PMFCARD_DES PNP_RegisterDeviceClassAssociation method
PMFCARD_RESOURCE PNP_RegisterDriver method
PNP_AddEmptyLogConf method PNP_RequestDeviceEject method
PNP_AddID method PNP_RequestEjectPC method
PNP_AddResDes method PNP_SetClassRegProp method
PNP_CONFLICT_ENTRY structure PNP_SetDeviceProblem method
PNP_CONFLICT_LIST structure PNP_SetDeviceRegProp method
PNP_CONFLICT_STRINGS structure PNP_SetObjectProp method
PNP_CreateDevInst method PNP_UninstallDevInst method
PNP_CreateKey method PNP_UnregisterDeviceClassAssociation method
PNP_DeleteClassKey method PNP_ValidateDeviceInstance method
PNP_DeleteRegistryKey method PPCCARD_DES
PNP_DetectResourceConflict method PPCCARD_RESOURCE
PNP_DeviceInstanceAction method PPNP_CONFLICT_ENTRY
PNP_DisableDevInst method PPNP_CONFLICT_LIST
PNP_EnumerateSubKeys method PPNP_CONFLICT_STRINGS
PNP_FreeLogConf method PPNP_VETO_TYPE enumeration
PNP_FreeResDes method Preconditions
PNP_GetBlockedDriverInfo method Prerequisites
PNP_GetClassCount method
PNP_GetClassInstance method R
PNP_GetClassName method
PNP_GetClassRegProp method Reference string
PNP_GetCustomDevProp method References
PNP_GetDepth method informative
158 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008
normative
overview
Relationship to other protocols
Resource conflict detection structures
Resource structures
S
Security
Sequencing rules
client
server
Server
abstract data model
initialization
local events
message processing
overview
sequencing rules
timer events
timers
Standards assignments
Structures
T
Timer events
client
server
Timers
client
server
Transport - message
V
Vendor-extensible fields
Versioning
W
Windows behavior
159 / 159
[MS-PNPR] – v20080207
Plug and Play Remote (PNPR) Protocol Specification
Copyright © 2008 Microsoft Corporation.
Release: Thursday, February 7, 2008