Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

692 lines
22 KiB

  1. /*++
  2. Copyright (c) 1995-2000 Microsoft Corporation
  3. Module Name:
  4. PNP.IDL
  5. Abstract:
  6. Contains the PnP APIs which are used to remote the plug-and-play
  7. APIs to the local or remote server via RPC. Also contains the RPC
  8. specific data structures for these API.
  9. ** NOTE: You _must_ add new interfaces to the end of the file. **
  10. ** Inserting them in the middle breaks backwards compatibility. **
  11. Author:
  12. Paula Tomlinson (paulat) 06-June-1995
  13. Environment:
  14. User-mode - Win32 - MIDL
  15. Revision History:
  16. 06-June-1995 PaulaT
  17. created
  18. --*/
  19. //
  20. // Interface Attributes
  21. //
  22. [
  23. uuid(8D9F4E40-A03D-11CE-8F69-08003E30051B),
  24. version(1.0),
  25. #ifdef __midl
  26. ms_union,
  27. #endif // __midl
  28. pointer_default(unique)
  29. ]
  30. //
  31. // Interface Keyword
  32. //
  33. interface pnp
  34. //
  35. // Interface Body
  36. //
  37. {
  38. import "imports.idl"; // import all the include files
  39. //
  40. // PnP Generic Handle used to bind from client to server.
  41. //
  42. typedef [handle,unique] LPWSTR PNP_HANDLE;
  43. typedef [context_handle] void* PNP_NOTIFICATION_CONTEXT;
  44. typedef PNP_NOTIFICATION_CONTEXT *PPNP_NOTIFICATION_CONTEXT;
  45. typedef struct _PNP_CLIENT_CONTEXT {
  46. ULONG PNP_CC_Signature;
  47. ULONG_PTR PNP_CC_ContextHandle;
  48. } PNP_CLIENT_CONTEXT, *PPNP_CLIENT_CONTEXT;
  49. //
  50. // Function Prototypes (UNICODE only, PNP is unicode internally)
  51. //
  52. //
  53. // NOTE:
  54. // The names of the functions are short so that when RPC
  55. // prepends the interface name to the names, they are still
  56. // unique.
  57. //
  58. //
  59. // NOTE: Whenever [out,string] is used for an attribute, that means the
  60. // client and server are assuming valid (predefined) sizes of buffers
  61. // in order to more efficiently copy the data between address spaces
  62. // (this is generally only used for internal buffers, not user buffers)
  63. // these two routines are place holders --------------
  64. CONFIGRET
  65. PNP_Connect(
  66. [in,string,unique] PNP_HANDLE UNCServerName
  67. );
  68. CONFIGRET
  69. PNP_Disconnect(
  70. [in,string,unique] PNP_HANDLE UNCServerName
  71. );
  72. // these two routines are place holders -------------
  73. CONFIGRET
  74. PNP_GetVersion(
  75. [in] handle_t hBinding,
  76. [out] WORD *pVersion
  77. );
  78. CONFIGRET
  79. PNP_GetGlobalState(
  80. [in] handle_t hBinding,
  81. [out] PULONG pulState,
  82. [in] ULONG ulFlags
  83. );
  84. CONFIGRET
  85. PNP_InitDetection(
  86. [in] handle_t hBinding
  87. );
  88. CONFIGRET
  89. PNP_ReportLogOn(
  90. [in] handle_t hBinding,
  91. [in] BOOL bAdmin,
  92. [in] DWORD ProcessID
  93. );
  94. CONFIGRET
  95. PNP_ValidateDeviceInstance(
  96. [in] handle_t hBinding,
  97. [in,string,ref] LPWSTR pDeviceID,
  98. [in] ULONG ulFlags
  99. );
  100. CONFIGRET
  101. PNP_GetRootDeviceInstance(
  102. [in] handle_t hBinding,
  103. [out,string,size_is(ulLength)] LPWSTR pDeviceID,
  104. [in] ULONG ulLength
  105. );
  106. CONFIGRET
  107. PNP_GetRelatedDeviceInstance(
  108. [in] handle_t hBinding,
  109. [in] ULONG ulRelationship,
  110. [in,string,ref] LPWSTR pDeviceID,
  111. [out,string,size_is(*pulLength)] LPWSTR pRelatedDeviceID,
  112. [in,out] PULONG pulLength,
  113. [in] ULONG ulFlags
  114. );
  115. CONFIGRET
  116. PNP_EnumerateSubKeys(
  117. [in] handle_t hBinding,
  118. [in] ULONG ulBranch,
  119. [in] ULONG ulIndex,
  120. [out,string,size_is(ulLength)] PWSTR Buffer,
  121. [in] ULONG ulLength,
  122. [out] PULONG pulRequiredLen,
  123. [in] ULONG ulFlags
  124. );
  125. CONFIGRET
  126. PNP_GetDeviceList(
  127. [in] handle_t hBinding,
  128. [in,string,unique] LPCWSTR pszFilter,
  129. [out,size_is(*pulLength),length_is(*pulLength)] LPWSTR Buffer,
  130. [in,out] PULONG pulLength,
  131. [in] ULONG ulFlags
  132. );
  133. CONFIGRET
  134. PNP_GetDeviceListSize(
  135. [in] handle_t hBinding,
  136. [in,string,unique] LPCWSTR pszFilter,
  137. [out] PULONG pulLen,
  138. [in] ULONG ulFlags
  139. );
  140. CONFIGRET
  141. PNP_GetDepth(
  142. [in] handle_t hBinding,
  143. [in,string,ref] LPCWSTR pszDeviceID,
  144. [out] PULONG pulDepth,
  145. [in] ULONG ulFlags
  146. );
  147. CONFIGRET
  148. PNP_GetDeviceRegProp(
  149. [in] handle_t hBinding,
  150. [in,string,ref] LPCWSTR pDeviceID,
  151. [in] ULONG ulProperty,
  152. [in,out] PULONG pulRegDataType,
  153. [out,size_is(*pulTransferLen),length_is(*pulTransferLen)] LPBYTE Buffer,
  154. [in,out] PULONG pulTransferLen,
  155. [in,out] PULONG pulLength,
  156. [in] ULONG ulFlags
  157. );
  158. CONFIGRET
  159. PNP_SetDeviceRegProp(
  160. [in] handle_t hBinding,
  161. [in,string,ref] LPCWSTR pDeviceID,
  162. [in] ULONG ulProperty,
  163. [in] ULONG ulDataType,
  164. [in,size_is(ulLength)] LPBYTE Buffer,
  165. [in] ULONG ulLength,
  166. [in] ULONG ulFlags
  167. );
  168. CONFIGRET
  169. PNP_GetClassInstance(
  170. [in] handle_t hBinding,
  171. [in,string,ref] LPCWSTR pDeviceID,
  172. [out,string,size_is(ulLength)] LPWSTR pszClassInstance,
  173. [in] ULONG ulLength
  174. );
  175. CONFIGRET
  176. PNP_CreateKey(
  177. [in] handle_t hBinding,
  178. [in,string,ref] LPCWSTR pszSubKey,
  179. [in] REGSAM samDesired,
  180. [in] ULONG ulFlags
  181. );
  182. CONFIGRET
  183. PNP_DeleteRegistryKey(
  184. [in] handle_t hBinding,
  185. [in,string,ref] LPCWSTR pszDeviceID,
  186. [in,string,ref] LPCWSTR pszParentKey,
  187. [in,string,ref] LPCWSTR pszChildKey,
  188. [in] ULONG ulFlags
  189. );
  190. CONFIGRET
  191. PNP_GetClassCount(
  192. [in] handle_t hBinding,
  193. [out] PULONG pulClassCount,
  194. [in] ULONG ulFlags
  195. );
  196. CONFIGRET
  197. PNP_GetClassName(
  198. [in] handle_t hBinding,
  199. [in,string,ref] PCWSTR pszClassGuid,
  200. [out,string,size_is(*pulLength)] PWSTR Buffer,
  201. [in,out] PULONG pulLength,
  202. [in] ULONG ulFlags
  203. );
  204. CONFIGRET
  205. PNP_DeleteClassKey(
  206. [in] handle_t hBinding,
  207. [in,string,ref] PCWSTR pszClassGuid,
  208. [in] ULONG ulFlags
  209. );
  210. CONFIGRET
  211. PNP_GetInterfaceDeviceAlias(
  212. [in] handle_t hBinding,
  213. [in,string,ref] PCWSTR pszInterfaceDevice,
  214. [in] LPGUID AliasInterfaceGuid,
  215. [out,string,size_is(*pulTransferLen)] PWSTR pszAliasInterfaceDevice,
  216. [in,out] PULONG pulLength,
  217. [in,out] PULONG pulTransferLen,
  218. [in] ULONG ulFlags
  219. );
  220. CONFIGRET
  221. PNP_GetInterfaceDeviceList(
  222. [in] handle_t hBinding,
  223. [in] LPGUID InterfaceGuid,
  224. [in,string,unique] LPCWSTR pszDeviceID,
  225. [out,size_is(*pulLength),length_is(*pulLength)] LPWSTR Buffer,
  226. [in,out] PULONG pulLength,
  227. [in] ULONG ulFlags
  228. );
  229. CONFIGRET
  230. PNP_GetInterfaceDeviceListSize(
  231. [in] handle_t hBinding,
  232. [out] PULONG pulLen,
  233. [in] LPGUID InterfaceGuid,
  234. [in,string,unique] LPCWSTR pszDeviceID,
  235. [in] ULONG ulFlags
  236. );
  237. CONFIGRET
  238. PNP_RegisterDeviceClassAssociation(
  239. [in] handle_t hBinding,
  240. [in,string,unique] LPCWSTR pszDeviceID,
  241. [in] LPGUID InterfaceGuid,
  242. [in,string,unique] LPCWSTR pszReference,
  243. [out,string,size_is(*pulTransferLen)] PWSTR pszSymLink,
  244. [in,out] PULONG pulLength,
  245. [in,out] PULONG pulTransferLen,
  246. [in] ULONG ulFlags
  247. );
  248. CONFIGRET
  249. PNP_UnregisterDeviceClassAssociation(
  250. [in] handle_t hBinding,
  251. [in,string,unique] LPCWSTR pszInterfaceDevice,
  252. [in] ULONG ulFlags
  253. );
  254. CONFIGRET
  255. PNP_GetClassRegProp(
  256. [in] handle_t hBinding,
  257. [in,string,ref] LPCWSTR pszClassGuid,
  258. [in] ULONG ulProperty,
  259. [in,out] PULONG pulRegDataType,
  260. [out,size_is(*pulTransferLen),length_is(*pulTransferLen)] LPBYTE Buffer,
  261. [in,out] PULONG pulTransferLen,
  262. [in,out] PULONG pulLength,
  263. [in] ULONG ulFlags
  264. );
  265. CONFIGRET
  266. PNP_SetClassRegProp(
  267. [in] handle_t hBinding,
  268. [in,string,ref] LPCWSTR pszClassGuid,
  269. [in] ULONG ulProperty,
  270. [in] ULONG ulDataType,
  271. [in,size_is(ulLength)] LPBYTE Buffer,
  272. [in] ULONG ulLength,
  273. [in] ULONG ulFlags
  274. );
  275. CONFIGRET
  276. PNP_CreateDevInst(
  277. [in] handle_t hBinding,
  278. [in,out,string,size_is(ulLength)] LPWSTR pszDeviceID,
  279. [in,string,ref] LPWSTR pszParentDeviceID,
  280. [in] ULONG ulLength,
  281. [in] ULONG ulFlags
  282. );
  283. CONFIGRET
  284. PNP_DeviceInstanceAction(
  285. [in] handle_t hBinding,
  286. [in] ULONG ulMajorAction,
  287. [in] ULONG ulMinorAction,
  288. [in,string,unique] PCWSTR pszDeviceInstance1,
  289. [in,string,unique] PCWSTR pszDeviceInstance2
  290. );
  291. CONFIGRET
  292. PNP_GetDeviceStatus(
  293. [in] handle_t hBinding,
  294. [in,string,unique] LPCWSTR pDeviceID,
  295. [out] PULONG pulStatus,
  296. [out] PULONG pulProblem,
  297. [in] ULONG ulFlags
  298. );
  299. CONFIGRET
  300. PNP_SetDeviceProblem(
  301. [in] handle_t hBinding,
  302. [in,string,unique] LPCWSTR pDeviceID,
  303. [in] ULONG ulProblem,
  304. [in] ULONG ulFlags
  305. );
  306. CONFIGRET
  307. PNP_DisableDevInst(
  308. [in] handle_t hBinding,
  309. [in,string,unique] LPCWSTR pDeviceID,
  310. [in,out,unique] PPNP_VETO_TYPE pVetoType,
  311. [in,out,string,max_is(ulNameLength),unique] LPWSTR pszVetoName,
  312. [in] ULONG ulNameLength,
  313. [in] ULONG ulFlags
  314. );
  315. CONFIGRET
  316. PNP_UninstallDevInst(
  317. [in] handle_t hBinding,
  318. [in,string,unique] LPCWSTR pDeviceID,
  319. [in] ULONG ulFlags
  320. );
  321. CONFIGRET
  322. PNP_AddID(
  323. [in] handle_t hBinding,
  324. [in,string,unique] LPCWSTR pszDeviceID,
  325. [in,string,ref] LPCWSTR pszID,
  326. [in] ULONG ulFlags
  327. );
  328. CONFIGRET
  329. PNP_RegisterDriver(
  330. [in] handle_t hBinding,
  331. [in,string,ref] LPCWSTR pszDeviceID,
  332. [in] ULONG ulFlags
  333. );
  334. CONFIGRET
  335. PNP_QueryRemove(
  336. [in] handle_t hBinding,
  337. [in,string,ref] LPCWSTR pszDeviceID,
  338. [in,out,unique] PPNP_VETO_TYPE pVetoType,
  339. [in,out,string,max_is(ulNameLength),unique] LPWSTR pszVetoName,
  340. [in] ULONG ulNameLength,
  341. [in] ULONG ulFlags
  342. );
  343. CONFIGRET
  344. PNP_RequestDeviceEject(
  345. [in] handle_t hBinding,
  346. [in,string,ref] LPCWSTR pszDeviceID,
  347. [in,out,unique] PPNP_VETO_TYPE pVetoType,
  348. [in,out,string,max_is(ulNameLength),unique] LPWSTR pszVetoName,
  349. [in] ULONG ulNameLength,
  350. [in] ULONG ulFlags
  351. );
  352. CONFIGRET
  353. PNP_IsDockStationPresent (
  354. [in] handle_t hBinding,
  355. [in,out,unique] PBOOL Present
  356. );
  357. CONFIGRET
  358. PNP_RequestEjectPC (
  359. [in] handle_t hBinding
  360. );
  361. CONFIGRET
  362. PNP_HwProfFlags(
  363. [in] handle_t hBinding,
  364. [in] ULONG ulAction,
  365. [in,string,ref] LPCWSTR pDeviceID,
  366. [in] ULONG ulConfig,
  367. [in,out] PULONG pulValue,
  368. [in,out,unique] PPNP_VETO_TYPE pVetoType,
  369. [in,out,string,max_is(ulNameLength),unique] LPWSTR pszVetoName,
  370. [in] ULONG ulNameLength,
  371. [in] ULONG ulFlags
  372. );
  373. CONFIGRET
  374. PNP_GetHwProfInfo(
  375. [in] handle_t hBinding,
  376. [in] ULONG ulIndex,
  377. [in,out,ref] HWPROFILEINFO *pHWProfileInfo,
  378. [in] ULONG ulProfileInfoSize,
  379. [in] ULONG ulFlags
  380. );
  381. CONFIGRET
  382. PNP_AddEmptyLogConf(
  383. [in] handle_t hBinding,
  384. [in,string,ref] LPWSTR pDeviceID,
  385. [in] ULONG ulPriority,
  386. [out] PULONG pulLogConfTag,
  387. [in] ULONG ulFlags
  388. );
  389. CONFIGRET
  390. PNP_FreeLogConf(
  391. [in] handle_t hBinding,
  392. [in,string,ref] LPWSTR pDeviceID,
  393. [in] ULONG ulLogConfType,
  394. [in] ULONG ulLogConfTag,
  395. [in] ULONG ulFlags
  396. );
  397. CONFIGRET
  398. PNP_GetFirstLogConf(
  399. [in] handle_t hBinding,
  400. [in,string,ref] LPWSTR pDeviceID,
  401. [in] ULONG ulLogConfType,
  402. [out] PULONG pulLogConfTag,
  403. [in] ULONG ulFlags
  404. );
  405. CONFIGRET
  406. PNP_GetNextLogConf(
  407. [in] handle_t hBinding,
  408. [in,string,ref] LPWSTR pDeviceID,
  409. [in] ULONG ulLogConfType,
  410. [in] ULONG ulCurrentTag,
  411. [out] PULONG pulNextTag,
  412. [in] ULONG ulFlags
  413. );
  414. CONFIGRET
  415. PNP_GetLogConfPriority(
  416. [in] handle_t hBinding,
  417. [in,string,ref] LPWSTR pDeviceID,
  418. [in] ULONG ulType,
  419. [in] ULONG ulTag,
  420. [out] PULONG pPriority,
  421. [in] ULONG ulFlags
  422. );
  423. CONFIGRET
  424. PNP_AddResDes(
  425. [in] handle_t hBinding,
  426. [in,string,ref] LPWSTR pDeviceID,
  427. [in] ULONG ulLogConfTag,
  428. [in] ULONG ulLogConfType,
  429. [in] RESOURCEID ResourceID,
  430. [out] PULONG pulResourceTag,
  431. [in,size_is(ResourceLen)] LPBYTE ResourceData,
  432. [in] ULONG ResourceLen,
  433. [in] ULONG ulFlags
  434. );
  435. CONFIGRET
  436. PNP_FreeResDes(
  437. [in] handle_t hBinding,
  438. [in,string,ref] LPWSTR pDeviceID,
  439. [in] ULONG ulLogConfTag,
  440. [in] ULONG ulLogConfType,
  441. [in] RESOURCEID ResourceID,
  442. [in] ULONG ulResourceTag,
  443. [out] PULONG pulPreviousResType,
  444. [out] PULONG pulPreviousResTag,
  445. [in] ULONG ulFlags
  446. );
  447. CONFIGRET
  448. PNP_GetNextResDes(
  449. [in] handle_t hBinding,
  450. [in,string,ref] LPWSTR pDeviceID,
  451. [in] ULONG ulLogConfTag,
  452. [in] ULONG ulLogConfType,
  453. [in] RESOURCEID ResourceID,
  454. [in] ULONG ulResourceTag,
  455. [out] PULONG pulNextResDesTag,
  456. [out] PULONG pulNextResDesType,
  457. [in] ULONG ulFlags
  458. );
  459. CONFIGRET
  460. PNP_GetResDesData(
  461. [in] handle_t hBinding,
  462. [in,string,ref] LPWSTR pDeviceID,
  463. [in] ULONG ulLogConfTag,
  464. [in] ULONG ulLogConfType,
  465. [in] RESOURCEID ResourceID,
  466. [in] ULONG ulResourceTag,
  467. [out,size_is(BufferLen)] LPBYTE Buffer,
  468. [in] ULONG BufferLen,
  469. [in] ULONG ulFlags
  470. );
  471. CONFIGRET
  472. PNP_GetResDesDataSize(
  473. [in] handle_t hBinding,
  474. [in,string,ref] LPWSTR pDeviceID,
  475. [in] ULONG ulLogConfTag,
  476. [in] ULONG ulLogConfType,
  477. [in] RESOURCEID ResourceID,
  478. [in] ULONG ulResourceTag,
  479. [out] PULONG pulSize,
  480. [in] ULONG ulFlags
  481. );
  482. CONFIGRET
  483. PNP_ModifyResDes(
  484. [in] handle_t hBinding,
  485. [in,string,ref] LPWSTR pDeviceID,
  486. [in] ULONG ulLogConfTag,
  487. [in] ULONG ulLogConfType,
  488. [in] RESOURCEID CurrentResourceID,
  489. [in] RESOURCEID NewResourceID,
  490. [in] ULONG ulResourceTag,
  491. [in,size_is(ResourceLen)] LPBYTE ResourceData,
  492. [in] ULONG ResourceLen,
  493. [in] ULONG ulFlags
  494. );
  495. CONFIGRET
  496. PNP_DetectResourceConflict(
  497. [in] handle_t hBinding,
  498. [in,string,ref] LPWSTR pDeviceID,
  499. [in] RESOURCEID ResourceID,
  500. [in,size_is(ResourceLen)] LPBYTE ResourceData,
  501. [in] ULONG ResourceLen,
  502. [out] PBOOL pbConflictDetected,
  503. [in] ULONG ulFlags
  504. );
  505. CONFIGRET
  506. PNP_QueryResConfList(
  507. [in] handle_t hBinding,
  508. [in,string,ref] LPWSTR pDeviceID,
  509. [in] RESOURCEID ResourceID,
  510. [in,size_is(ResourceLen)] LPBYTE ResourceData,
  511. [in] ULONG ResourceLen,
  512. [out,size_is(BufferLen)] LPBYTE Buffer,
  513. [in] ULONG BufferLen,
  514. [in] ULONG ulFlags
  515. );
  516. CONFIGRET
  517. PNP_SetHwProf(
  518. [in] handle_t hBinding,
  519. [in] ULONG ulHardwareProfile,
  520. [in] ULONG ulFlags
  521. );
  522. CONFIGRET
  523. PNP_QueryArbitratorFreeData(
  524. [in] handle_t hBinding,
  525. [out,size_is(ulDataLen)] LPBYTE pData,
  526. [in] ULONG ulDataLen,
  527. [in,string,ref] LPCWSTR pszDeviceID,
  528. [in] RESOURCEID ResourceID,
  529. [in] ULONG ulFlags
  530. );
  531. CONFIGRET
  532. PNP_QueryArbitratorFreeSize(
  533. [in] handle_t hBinding,
  534. [out] PULONG pulSize,
  535. [in,string,ref] LPCWSTR pszDeviceID,
  536. [in] RESOURCEID ResourceID,
  537. [in] ULONG ulFlags
  538. );
  539. CONFIGRET
  540. PNP_RunDetection(
  541. [in] handle_t hBinding,
  542. [in] ULONG ulFlags
  543. );
  544. CONFIGRET
  545. PNP_RegisterNotification(
  546. [in] handle_t hBinding,
  547. [in] ULONG_PTR hRecipient,
  548. [in,string,ref] LPWSTR ServiceName,
  549. [in,size_is(ulSize)] LPBYTE NotificationFilter,
  550. [in] ULONG ulSize,
  551. [in] DWORD Flags,
  552. [out] PNP_NOTIFICATION_CONTEXT *Context,
  553. [in] ULONG hProcess,
  554. [in] ULONG64 *ClientContext
  555. );
  556. CONFIGRET
  557. PNP_UnregisterNotification(
  558. [in] handle_t hBinding,
  559. [in,out] PNP_NOTIFICATION_CONTEXT *Context
  560. );
  561. CONFIGRET
  562. PNP_GetCustomDevProp(
  563. [in] handle_t hBinding,
  564. [in,string,ref] LPCWSTR pDeviceID,
  565. [in,string,ref] LPCWSTR CustomPropName,
  566. [out] PULONG pulRegDataType,
  567. [out,size_is(*pulLength),length_is(*pulTransferLen)] LPBYTE Buffer,
  568. [out] PULONG pulTransferLen,
  569. [in,out] PULONG pulLength,
  570. [in] ULONG ulFlags
  571. );
  572. CONFIGRET
  573. PNP_GetVersionInternal(
  574. [in] handle_t hBinding,
  575. [in,out] WORD *pwVersion
  576. );
  577. CONFIGRET
  578. PNP_GetBlockedDriverInfo(
  579. [in] handle_t hBinding,
  580. [out,size_is(*pulLength),length_is(*pulTransferLen)] LPBYTE Buffer,
  581. [out] PULONG pulTransferLen,
  582. [in,out] PULONG pulLength,
  583. [in] ULONG ulFlags
  584. );
  585. CONFIGRET
  586. PNP_GetServerSideDeviceInstallFlags(
  587. [in] handle_t hBinding,
  588. [out] PULONG pulSSDIFlags,
  589. [in] ULONG ulFlags
  590. );
  591. //---------------------------------------------------------
  592. // ** ADD NEW INTERFACES HERE **
  593. //---------------------------------------------------------
  594. }