4.9.7. pnp interface

The Plug and Play service runs one RPC service, pnp:

Z:\>ifids -p ncalrpc -e ntsvcs serveur
Interfaces: 7

[...]

  8d9f4e40-a03d-11ce-8f69-08003e30051b v1.0

Z:\>ifids -p ncacn_np -e \pipe\ntsvcs \\.
Interfaces: 7

[...]

  8d9f4e40-a03d-11ce-8f69-08003e30051b v1.0

Before Windows Vista, the \pipe\ntsvcs named pipe endpoint is usually used to reach the pnp interface.

In Windows Vista, a dedicated named pipe, plugplay was introduced.


C:\Users\>ifids -p ncacn_np -e \pipe\plugplay \\.
Interfaces: 3
  8d9f4e40-a03d-11ce-8f69-08003e30051b v1.0

  [...]

Table 4.21. pnp operations

InterfaceOperation numberOperation name
8d9f4e40-a03d-11ce-8f69-08003e30051b v1.0: pnp  
 0x00PNP_Disconnect
 0x01PNP_Connect
 0x02PNP_GetVersion
 0x03PNP_GetGlobalState
 0x04PNP_InitDetection
 0x05PNP_ReportLogOn
 0x06PNP_ValidateDeviceInstance
 0x07PNP_GetRootDeviceInstance
 0x08PNP_GetRelatedDeviceInstance
 0x09PNP_EnumerateSubKeys
 0x0aPNP_GetDeviceList
 0x0bPNP_GetDeviceListSize
 0x0cPNP_GetDepth
 0x0dPNP_GetDeviceRegProp
 0x0ePNP_SetDeviceRegProp
 0x0fPNP_GetClassInstance
 0x10PNP_CreateKey
 0x11PNP_DeleteRegistryKey
 0x12PNP_GetClassCount
 0x13PNP_GetClassName
 0x14PNP_DeleteClassKey
 0x15PNP_GetInterfaceDeviceAlias
 0x16PNP_GetInterfaceDeviceList
 0x17PNP_GetInterfaceDeviceListSize
 0x18PNP_RegisterDeviceClassAssociation
 0x19PNP_UnregisterDeviceClassAssociation
 0x1aPNP_GetClassRegProp
 0x1bPNP_SetClassRegProp
 0x1cPNP_CreateDevInst
 0x1dPNP_DeviceInstanceAction
 0x1ePNP_GetDeviceStatus
 0x1fPNP_SetDeviceProblem
 0x20PNP_DisableDevInst
 0x21PNP_UninstallDevInst
 0x22PNP_AddID
 0x23PNP_RegisterDriver
 0x24PNP_QueryRemove
 0x25PNP_RequestDeviceEject
 0x26PNP_IsDockStationPresent
 0x27PNP_RequestEjectPC
 0x28PNP_HwProfFlags
 0x29PNP_GetHwProfInfo
 0x2aPNP_AddEmptyLogConf
 0x2bPNP_FreeLogConf
 0x2cPNP_GetFirstLogConf
 0x2dPNP_GetNextLogConf
 0x2ePNP_GetLogConfPriority
 0x2fPNP_AddResDes
 0x30PNP_FreeResDes
 0x31PNP_GetNextResDes
 0x32PNP_GetResDesData
 0x33PNP_GetResDesDataSize
 0x34PNP_ModifyResDes
 0x35PNP_DetectResourceConflict
 0x36PNP_QueryResConfList
 0x37PNP_SetHwProf
 0x38PNP_QueryArbitratorFreeData
 0x39PNP_QueryArbitratorFreeSize
 0x3aPNP_RunDetection
 0x3bPNP_RegisterNotification
 0x3cPNP_UnregisterNotification
> Windows XP and Windows Server 2003 0x3dPNP_GetCustomDevProp
 0x3ePNP_GetVersionInternal
 0x3fPNP_GetBlockedDriverInfo
 0x40PNP_GetServerSideDeviceInstallFlags
> Windows Vista0x41PNP_GetObjectPropKeys
 0x42PNP_GetObjectProp
 0x43PNP_SetObjectProp
 0x44PNP_InstallDevInst
 0x45PNP_ApplyPowerSettings
 0x46PNP_DriverStoreAddDriverPackage
 0x47PNP_DriverStoreDeleteDriverPackage
 0x48PNP_RegisterServiceNotification
 0x49PNP_SetActiveService
 0x4aPNP_DeleteServiceDevices

In Windows NT 4.0, a similar interface exists with exactly the same interface identifier but in version 0.0 and with fewer operations (thanks to Derek Soeder for providing operations names).

Z:\>ifids -p ncacn_np -e \pipe\ntsvcs \\.
Interfaces: 7

[...]

  8d9f4e40-a03d-11ce-8f69-08003e30051b v0.0

Table 4.22. nt4_pnp operations

InterfaceOperation numberOperation name
8d9f4e40-a03d-11ce-8f69-08003e30051b v0.0: nt4_pnp  
 0x00PNP_Connect
 0x01PNP_Disconnect
 0x02PNP_GetVersion
 0x03PNP_GetGlobalState
 0x04PNP_InitDetection
 0x05PNP_ReportLogOn
 0x06PNP_ValidateDeviceInstance
 0x07PNP_GetRootDeviceInstance
 0x08PNP_GetRelatedDeviceInstance
 0x09PNP_EnumerateSubKeys
 0x0aPNP_GetDeviceList
 0x0bPNP_GetDeviceListSize
 0x0cPNP_GetDepth
 0x0dPNP_GetDeviceRegProp
 0x0ePNP_SetDeviceRegProp
 0x0fPNP_GetClassInstance
 0x10PNP_CreateKey
 0x11PNP_DeleteRegistryKey
 0x12PNP_GetClassCount
 0x13PNP_GetClassName
 0x14PNP_DeleteClassKey
 0x15PNP_CreateDevInst
 0x16PNP_DeviceInstanceAction
 0x17PNP_GetDeviceStatus
 0x18PNP_UninstallDevInst
 0x19PNP_AddID
 0x1aPNP_HwProfFlags
 0x1bPNP_GetHwProfInfo
 0x1cPNP_AddEmptyLogConf
 0x1dPNP_FreeLogConf
 0x1ePNP_GetFirstLogConf
 0x1fPNP_GetNextLogConf
 0x20PNP_AddResDes
 0x21PNP_FreeResDes
 0x22PNP_GetNextResDes
 0x23PNP_GetResDesData
 0x24PNP_GetResDesDataSize
 0x25PNP_ModifyResDes
 0x26PNP_DetectResourceConflict
 0x27PNP_SetHwProf
 0x28PNP_QueryArbitratorFreeData
 0x29PNP_QueryArbitratorFreeSize
 0x2aPNP_RunDetection