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.

932 lines
23 KiB

  1. /*++
  2. Copyright (c) 1995-2001 Microsoft Corporation
  3. Module Name:
  4. hwprof.c
  5. Abstract:
  6. This module contains the API routines that operate directly on hardware
  7. profile configurations.
  8. CM_Is_Dock_Station_Present
  9. CM_Request_Eject_PC
  10. CM_Get_HW_Prof_Flags
  11. CM_Set_HW_Prof_Flags
  12. CM_Get_Hardware_Profile_Info
  13. CM_Set_HW_Prof
  14. Author:
  15. Paula Tomlinson (paulat) 7-18-1995
  16. Environment:
  17. User mode only.
  18. Revision History:
  19. 18-July-1995 paulat
  20. Creation and initial implementation.
  21. --*/
  22. //
  23. // includes
  24. //
  25. #include "precomp.h"
  26. #include "cfgi.h"
  27. #include "setupapi.h"
  28. #include "spapip.h"
  29. CMAPI
  30. CONFIGRET
  31. WINAPI
  32. CM_Is_Dock_Station_Present_Ex(
  33. OUT PBOOL pbPresent,
  34. IN HMACHINE hMachine
  35. )
  36. /*++
  37. Routine Description:
  38. This routine determines whether a docking station is currently present.
  39. Parameters:
  40. pbPresent Supplies the address of a boolean variable that is set
  41. upon successful return to indicate whether or not a
  42. docking station is currently present.
  43. Return Value:
  44. If the function succeeds, the return value is CR_SUCCESS.
  45. If the function fails, the return value is a CR failure code.
  46. --*/
  47. {
  48. CONFIGRET status = CR_SUCCESS;
  49. handle_t hBinding = NULL;
  50. try {
  51. //
  52. // validate input parameters
  53. //
  54. if (!ARGUMENT_PRESENT(pbPresent)) {
  55. status = CR_INVALID_POINTER;
  56. goto Clean0;
  57. }
  58. //
  59. // Initialize output parameter
  60. //
  61. *pbPresent = FALSE;
  62. //
  63. // setup rpc binding handle
  64. //
  65. if (!PnPGetGlobalHandles(hMachine, NULL, &hBinding)) {
  66. status = CR_FAILURE;
  67. goto Clean0;
  68. }
  69. RpcTryExcept {
  70. //
  71. // call rpc service entry point
  72. //
  73. status = PNP_IsDockStationPresent(
  74. hBinding,
  75. pbPresent);
  76. }
  77. RpcExcept (I_RpcExceptionFilter(RpcExceptionCode())) {
  78. KdPrintEx((DPFLTR_PNPMGR_ID,
  79. DBGF_ERRORS,
  80. "PNP_IsDockStationPresent caused an exception (%d)\n",
  81. RpcExceptionCode()));
  82. status = MapRpcExceptionToCR(RpcExceptionCode());
  83. goto Clean0;
  84. }
  85. RpcEndExcept
  86. Clean0:
  87. NOTHING;
  88. } except(EXCEPTION_EXECUTE_HANDLER) {
  89. status = CR_FAILURE;
  90. }
  91. return status;
  92. } // CM_Is_Dock_Station_Present_Ex
  93. CMAPI
  94. CONFIGRET
  95. WINAPI
  96. CM_Request_Eject_PC_Ex(
  97. IN HMACHINE hMachine
  98. )
  99. /*++
  100. Routine Description:
  101. This routine requests that the PC be ejected (i.e., undocked).
  102. Parameters:
  103. none.
  104. Return Value:
  105. If the function succeeds, the return value is CR_SUCCESS.
  106. If the function fails, the return value is a CR failure code.
  107. --*/
  108. {
  109. CONFIGRET status = CR_SUCCESS;
  110. handle_t hBinding = NULL;
  111. try {
  112. //
  113. // No input Parameters to validate.
  114. //
  115. //
  116. // setup rpc binding handle
  117. //
  118. if (!PnPGetGlobalHandles(hMachine, NULL, &hBinding)) {
  119. status = CR_FAILURE;
  120. goto Clean0;
  121. }
  122. RpcTryExcept {
  123. //
  124. // call rpc service entry point
  125. //
  126. status = PNP_RequestEjectPC(hBinding); // rpc binding handle
  127. }
  128. RpcExcept (I_RpcExceptionFilter(RpcExceptionCode())) {
  129. KdPrintEx((DPFLTR_PNPMGR_ID,
  130. DBGF_ERRORS,
  131. "PNP_RequestEjectPC caused an exception (%d)\n",
  132. RpcExceptionCode()));
  133. status = MapRpcExceptionToCR(RpcExceptionCode());
  134. leave;
  135. }
  136. RpcEndExcept
  137. Clean0:
  138. NOTHING;
  139. } except(EXCEPTION_EXECUTE_HANDLER) {
  140. status = CR_FAILURE;
  141. }
  142. return status;
  143. } // CM_Request_Eject_PC_Ex
  144. CONFIGRET
  145. CM_Get_HW_Prof_Flags_ExW(
  146. IN DEVINSTID_W pDeviceID,
  147. IN ULONG ulHardwareProfile,
  148. OUT PULONG pulValue,
  149. IN ULONG ulFlags,
  150. IN HMACHINE hMachine
  151. )
  152. /*++
  153. Routine Description:
  154. This routine retrieves the configuration-specific configuration flags
  155. for a device instance and hardware profile combination.
  156. Parameters:
  157. pDeviceID Supplies the address of a NULL-terminated string
  158. specifying the name of the device instance to query.
  159. ulHardwareProfile Supplies the handle of the hardware profile to query.
  160. If 0, the API queries the current hardware profile.
  161. pulValue Supplies the address of the variable that receives the
  162. configuration-specific configuration (CSCONFIGFLAG_)
  163. flags.
  164. ulFlags Must be zero.
  165. hMachine Machine handle returned from CM_Connect_Machine or NULL.
  166. Return Value:
  167. If the function succeeds, the return value is CR_SUCCESS.
  168. If the function fails, the return value is one of the following:
  169. CR_INVALID_FLAG,
  170. CR_INVALID_POINTER,
  171. CR_REGISTRY_ERROR,
  172. CR_REMOTE_COMM_FAILURE,
  173. CR_MACHINE_UNAVAILABLE,
  174. CR_FAILURE.
  175. --*/
  176. {
  177. CONFIGRET Status = CR_SUCCESS;
  178. WCHAR szFixedUpDeviceID[MAX_DEVICE_ID_LEN];
  179. handle_t hBinding = NULL;
  180. try {
  181. //
  182. // validate input parameters
  183. //
  184. if ((!ARGUMENT_PRESENT(pDeviceID)) ||
  185. (!ARGUMENT_PRESENT(pulValue))) {
  186. Status = CR_INVALID_POINTER;
  187. goto Clean0;
  188. }
  189. if (INVALID_FLAGS(ulFlags, 0)) {
  190. Status = CR_INVALID_FLAG;
  191. goto Clean0;
  192. }
  193. //
  194. // check the format of the device id string
  195. //
  196. if ((!*pDeviceID) ||
  197. (!IsLegalDeviceId(pDeviceID))) {
  198. Status = CR_INVALID_DEVICE_ID;
  199. goto Clean0;
  200. }
  201. //
  202. // fix up the device ID string for consistency (uppercase, etc)
  203. //
  204. CopyFixedUpDeviceId(szFixedUpDeviceID,
  205. pDeviceID,
  206. lstrlen(pDeviceID));
  207. //
  208. // setup rpc binding handle
  209. //
  210. if (!PnPGetGlobalHandles(hMachine, NULL, &hBinding)) {
  211. Status = CR_FAILURE;
  212. goto Clean0;
  213. }
  214. RpcTryExcept {
  215. //
  216. // call rpc service entry point
  217. //
  218. Status = PNP_HwProfFlags(
  219. hBinding, // rpc binding handle
  220. PNP_GET_HWPROFFLAGS, // HW Prof Action flag
  221. szFixedUpDeviceID, // device id string
  222. ulHardwareProfile, // hw config id
  223. pulValue, // config flags returned here
  224. NULL, // Buffer that receives VetoType
  225. NULL, // Buffer that receives VetoName
  226. 0, // Size of VetoName buffer
  227. ulFlags); // currently unused
  228. }
  229. RpcExcept (I_RpcExceptionFilter(RpcExceptionCode())) {
  230. KdPrintEx((DPFLTR_PNPMGR_ID,
  231. DBGF_ERRORS,
  232. "PNP_HwProfFlags caused an exception (%d)\n",
  233. RpcExceptionCode()));
  234. Status = MapRpcExceptionToCR(RpcExceptionCode());
  235. }
  236. RpcEndExcept
  237. Clean0:
  238. NOTHING;
  239. } except(EXCEPTION_EXECUTE_HANDLER) {
  240. Status = CR_FAILURE;
  241. }
  242. return Status;
  243. } // CM_Get_HW_Prof_Flags_ExW
  244. CONFIGRET
  245. CM_Set_HW_Prof_Flags_ExW(
  246. IN DEVINSTID_W pDeviceID,
  247. IN ULONG ulConfig,
  248. IN ULONG ulValue,
  249. IN ULONG ulFlags,
  250. IN HMACHINE hMachine
  251. )
  252. /*++
  253. Routine Description:
  254. This routine sets the configuration-specific configuration flags for a
  255. device instance and hardware profile combination. If the
  256. CSCONFIGFLAG_DO_NOT_CREATE bit is set for an existing device instance
  257. in the current hardware profile, it will be removed. If the
  258. CSCONFIGFLAG_DO_NOT_CREATE bit is cleared in the current hardware profile,
  259. the entire hardware tree will be reenumerated, so that the parent of the
  260. device instance has the chance to create the device instance if necessary.
  261. Parameters:
  262. pDeviceID Supplies the address of a null-terminated string that
  263. specifies the name of a device instance to modify.
  264. ulConfig Supplies the number of the hardware profile to modify.
  265. If 0, the API modifies the current hardware profile.
  266. ulValue Supplies the configuration flags value. Can be a
  267. combination of these values:
  268. CSCONFIGFLAG_DISABLE Disable the device instance in this
  269. hardware profile.
  270. CSCONFIGFLAG_DO_NOT_CREATE Do not allow this device
  271. instance to be created in this hardware profile.
  272. ulFlags CM_SET_HW_PROF_FLAGS_UI_NOT_OK
  273. If this flag is specified then the OS will not display the
  274. reason that the device failed to be disabled or removed.
  275. hMachine Machine handle returned from CM_Connect_Machine or NULL.
  276. Return Value:
  277. If the function succeeds, the return value is CR_SUCCESS.
  278. If the function fails, the return value is one of the following:
  279. CR_INVALID_FLAG,
  280. CR_INVALID_POINTER,
  281. CR_REGISTRY_ERROR,
  282. CR_REMOTE_COMM_FAILURE,
  283. CR_MACHINE_UNAVAILABLE,
  284. CR_FAILURE.
  285. --*/
  286. {
  287. CONFIGRET Status = CR_SUCCESS;
  288. WCHAR szFixedUpDeviceID[MAX_DEVICE_ID_LEN];
  289. ULONG ulTempValue = 0;
  290. handle_t hBinding = NULL;
  291. PNP_VETO_TYPE vetoType, *pVetoType;
  292. WCHAR vetoName[MAX_DEVICE_ID_LEN], *pszVetoName;
  293. ULONG ulNameLength;
  294. try {
  295. //
  296. // validate parameters
  297. //
  298. if (!ARGUMENT_PRESENT(pDeviceID)) {
  299. Status = CR_INVALID_POINTER;
  300. goto Clean0;
  301. }
  302. if (INVALID_FLAGS(ulFlags, CM_SET_HW_PROF_FLAGS_BITS)) {
  303. Status = CR_INVALID_FLAG;
  304. goto Clean0;
  305. }
  306. if (INVALID_FLAGS(ulValue, CSCONFIGFLAG_BITS)) {
  307. Status = CR_INVALID_DATA;
  308. goto Clean0;
  309. }
  310. //
  311. // check the format of the device id string
  312. //
  313. if ((!*pDeviceID) ||
  314. (!IsLegalDeviceId(pDeviceID))) {
  315. Status = CR_INVALID_DEVICE_ID;
  316. goto Clean0;
  317. }
  318. //
  319. // fix up the device ID string for consistency (uppercase, etc)
  320. //
  321. CopyFixedUpDeviceId(szFixedUpDeviceID,
  322. pDeviceID,
  323. lstrlen(pDeviceID));
  324. //
  325. // setup rpc binding handle
  326. //
  327. if (!PnPGetGlobalHandles(hMachine, NULL, &hBinding)) {
  328. Status = CR_FAILURE;
  329. goto Clean0;
  330. }
  331. if (ulFlags & CM_SET_HW_PROF_FLAGS_UI_NOT_OK) {
  332. vetoType = PNP_VetoTypeUnknown;
  333. pVetoType = &vetoType;
  334. vetoName[0] = L'\0';
  335. pszVetoName = &vetoName[0];
  336. ulNameLength = MAX_DEVICE_ID_LEN;
  337. } else {
  338. pVetoType = NULL;
  339. pszVetoName = NULL;
  340. ulNameLength = 0;
  341. }
  342. ulTempValue = ulValue;
  343. RpcTryExcept {
  344. //
  345. // call rpc service entry point
  346. //
  347. Status = PNP_HwProfFlags(
  348. hBinding, // rpc machine name
  349. PNP_SET_HWPROFFLAGS, // HW Prof Action flag
  350. szFixedUpDeviceID, // device id string
  351. ulConfig, // hw config id
  352. &ulTempValue, // specifies config flags
  353. pVetoType, // Buffer that receives the VetoType
  354. pszVetoName, // Buffer that receives the VetoName
  355. ulNameLength, // size of the pszVetoName buffer
  356. ulFlags); // specifies hwprof set flags
  357. }
  358. RpcExcept (I_RpcExceptionFilter(RpcExceptionCode())) {
  359. KdPrintEx((DPFLTR_PNPMGR_ID,
  360. DBGF_ERRORS,
  361. "PNP_HwProfFlags caused an exception (%d)\n",
  362. RpcExceptionCode()));
  363. Status = MapRpcExceptionToCR(RpcExceptionCode());
  364. }
  365. RpcEndExcept
  366. Clean0:
  367. NOTHING;
  368. } except(EXCEPTION_EXECUTE_HANDLER) {
  369. Status = CR_FAILURE;
  370. }
  371. return Status;
  372. } // CM_Set_HW_Prof_Flags_ExW
  373. CONFIGRET
  374. CM_Get_Hardware_Profile_Info_ExW(
  375. IN ULONG ulIndex,
  376. OUT PHWPROFILEINFO_W pHWProfileInfo,
  377. IN ULONG ulFlags,
  378. IN HMACHINE hMachine
  379. )
  380. /*++
  381. Routine Description:
  382. This routine returns information about a hardware profile.
  383. Parameters:
  384. ulIndex Supplies the index of the hardware profile to retrieve
  385. information for. Specifying 0xFFFFFFFF references the
  386. currently active hardware profile.
  387. pHWProfileInfo Supplies the address of a HWPROFILEINFO structure that
  388. will receive information about the specified hardware
  389. profile.
  390. ulFlags Must be zero.
  391. hMachine Machine handle returned from CM_Connect_Machine or NULL.
  392. Return Value:
  393. If the function succeeds, the return value is CR_SUCCESS.
  394. If the function fails, the return value is one of the following:
  395. CR_INVALID_FLAG,
  396. CR_INVALID_POINTER,
  397. CR_INVALID_DATA,
  398. CR_NO_SUCH_VALUE,
  399. CR_REGISTRY_ERROR,
  400. CR_REMOTE_COMM_FAILURE,
  401. CR_MACHINE_UNAVAILABLE,
  402. CR_FAILURE.
  403. --*/
  404. {
  405. CONFIGRET Status = CR_SUCCESS;
  406. ULONG ulSize = sizeof(HWPROFILEINFO);
  407. handle_t hBinding = NULL;
  408. try {
  409. //
  410. // validate parameters
  411. //
  412. if (!ARGUMENT_PRESENT(pHWProfileInfo)) {
  413. Status = CR_INVALID_POINTER;
  414. goto Clean0;
  415. }
  416. if (INVALID_FLAGS(ulFlags, 0)) {
  417. Status = CR_INVALID_FLAG;
  418. goto Clean0;
  419. }
  420. //
  421. // setup rpc binding handle
  422. //
  423. if (!PnPGetGlobalHandles(hMachine, NULL, &hBinding)) {
  424. Status = CR_FAILURE;
  425. goto Clean0;
  426. }
  427. RpcTryExcept {
  428. //
  429. // call rpc service entry point
  430. //
  431. Status = PNP_GetHwProfInfo(
  432. hBinding, // rpc machine name
  433. ulIndex, // hw profile index
  434. pHWProfileInfo, // returns profile info
  435. ulSize, // sizeof of profile info struct
  436. ulFlags); // currently unused
  437. }
  438. RpcExcept (I_RpcExceptionFilter(RpcExceptionCode())) {
  439. KdPrintEx((DPFLTR_PNPMGR_ID,
  440. DBGF_ERRORS,
  441. "PNP_GetHwProfInfo caused an exception (%d)\n",
  442. RpcExceptionCode()));
  443. Status = MapRpcExceptionToCR(RpcExceptionCode());
  444. }
  445. RpcEndExcept
  446. Clean0:
  447. NOTHING;
  448. } except(EXCEPTION_EXECUTE_HANDLER) {
  449. Status = CR_FAILURE;
  450. }
  451. return Status;
  452. } // CM_Get_Hardware_Profile_Info_ExW
  453. CONFIGRET
  454. CM_Set_HW_Prof_Ex(
  455. IN ULONG ulHardwareProfile,
  456. IN ULONG ulFlags,
  457. IN HMACHINE hMachine
  458. )
  459. /*++
  460. Routine Description:
  461. This routine sets the current hardware profile. This API updates the
  462. HKEY_CURRENT_CONFIG predefined key in the registry, broadcasts a
  463. DBT_CONFIGCHANGED message, and reenumerates the root device instance.
  464. It should only be called by the Configuration Manager and the control
  465. panel.
  466. Parameters:
  467. ulHardwareProfile Supplies the current hardware profile handle.
  468. ulFlags Must be zero.
  469. Return Value:
  470. If the function succeeds, the return value is CR_SUCCESS.
  471. If the function fails, the return value is one of the following:
  472. CR_INVALID_FLAG or
  473. CR_REGISTRY_ERROR. (Windows 95 may also return CR_NOT_AT_APPY_TIME.)
  474. --*/
  475. {
  476. CONFIGRET Status = CR_SUCCESS;
  477. handle_t hBinding = NULL;
  478. try {
  479. if (INVALID_FLAGS(ulFlags, 0)) {
  480. Status = CR_INVALID_FLAG;
  481. goto Clean0;
  482. }
  483. //
  484. // setup rpc binding handle
  485. //
  486. if (!PnPGetGlobalHandles(hMachine, NULL, &hBinding)) {
  487. Status = CR_FAILURE;
  488. goto Clean0;
  489. }
  490. RpcTryExcept {
  491. //
  492. // call rpc service entry point
  493. //
  494. Status = PNP_SetHwProf(
  495. hBinding, // rpc machine name
  496. ulHardwareProfile, // hw config id
  497. ulFlags); // currently unused
  498. }
  499. RpcExcept (I_RpcExceptionFilter(RpcExceptionCode())) {
  500. KdPrintEx((DPFLTR_PNPMGR_ID,
  501. DBGF_ERRORS,
  502. "PNP_SetHwProf caused an exception (%d)\n",
  503. RpcExceptionCode()));
  504. Status = MapRpcExceptionToCR(RpcExceptionCode());
  505. }
  506. RpcEndExcept
  507. Clean0:
  508. NOTHING;
  509. } except(EXCEPTION_EXECUTE_HANDLER) {
  510. Status = CR_FAILURE;
  511. }
  512. return Status;
  513. } // CM_Set_HW_Prof_Ex
  514. //-------------------------------------------------------------------
  515. // ANSI Stubs
  516. //-------------------------------------------------------------------
  517. CONFIGRET
  518. CM_Get_HW_Prof_Flags_ExA(
  519. IN DEVINSTID_A szDevInstName,
  520. IN ULONG ulHardwareProfile,
  521. OUT PULONG pulValue,
  522. IN ULONG ulFlags,
  523. IN HMACHINE hMachine
  524. )
  525. {
  526. CONFIGRET Status = CR_SUCCESS;
  527. PWSTR pUniDeviceID = NULL;
  528. //
  529. // convert devinst string to UNICODE and pass to wide version
  530. //
  531. if (pSetupCaptureAndConvertAnsiArg(szDevInstName, &pUniDeviceID) == NO_ERROR) {
  532. Status = CM_Get_HW_Prof_Flags_ExW(pUniDeviceID,
  533. ulHardwareProfile,
  534. pulValue,
  535. ulFlags,
  536. hMachine);
  537. pSetupFree(pUniDeviceID);
  538. } else {
  539. Status = CR_INVALID_POINTER;
  540. }
  541. return Status;
  542. } // CM_Get_HW_Prof_Flags_ExA
  543. CONFIGRET
  544. CM_Set_HW_Prof_Flags_ExA(
  545. IN DEVINSTID_A szDevInstName,
  546. IN ULONG ulConfig,
  547. IN ULONG ulValue,
  548. IN ULONG ulFlags,
  549. IN HMACHINE hMachine
  550. )
  551. {
  552. CONFIGRET Status = CR_SUCCESS;
  553. PWSTR pUniDeviceID = NULL;
  554. //
  555. // convert devinst string to UNICODE and pass to wide version
  556. //
  557. if (pSetupCaptureAndConvertAnsiArg(szDevInstName, &pUniDeviceID) == NO_ERROR) {
  558. Status = CM_Set_HW_Prof_Flags_ExW(pUniDeviceID,
  559. ulConfig,
  560. ulValue,
  561. ulFlags,
  562. hMachine);
  563. pSetupFree(pUniDeviceID);
  564. } else {
  565. Status = CR_INVALID_POINTER;
  566. }
  567. return Status;
  568. } // CM_Set_HW_Prof_Flags_ExA
  569. CONFIGRET
  570. CM_Get_Hardware_Profile_Info_ExA(
  571. IN ULONG ulIndex,
  572. OUT PHWPROFILEINFO_A pHWProfileInfo,
  573. IN ULONG ulFlags,
  574. IN HMACHINE hMachine
  575. )
  576. {
  577. CONFIGRET Status = CR_SUCCESS;
  578. HWPROFILEINFO_W UniHwProfInfo;
  579. ULONG ulLength;
  580. //
  581. // validate essential parameters only
  582. //
  583. if (!ARGUMENT_PRESENT(pHWProfileInfo)) {
  584. return CR_INVALID_POINTER;
  585. }
  586. //
  587. // call the wide version, passing a unicode struct as a parameter
  588. //
  589. Status = CM_Get_Hardware_Profile_Info_ExW(ulIndex,
  590. &UniHwProfInfo,
  591. ulFlags,
  592. hMachine);
  593. //
  594. // a HWPROFILEINFO_W structure should always be large enough.
  595. //
  596. ASSERT(Status != CR_BUFFER_SMALL);
  597. //
  598. // copy the info from the unicode structure to the ansi structure passed in
  599. // by the caller (converting the embedded strings to ansi in the process)
  600. //
  601. if (Status == CR_SUCCESS) {
  602. pHWProfileInfo->HWPI_ulHWProfile = UniHwProfInfo.HWPI_ulHWProfile;
  603. pHWProfileInfo->HWPI_dwFlags = UniHwProfInfo.HWPI_dwFlags;
  604. //
  605. // convert the hardware profile friendly name string to ANSI.
  606. //
  607. ulLength = MAX_PROFILE_LEN;
  608. Status = PnPUnicodeToMultiByte(UniHwProfInfo.HWPI_szFriendlyName,
  609. (lstrlenW(UniHwProfInfo.HWPI_szFriendlyName)+1)*sizeof(WCHAR),
  610. pHWProfileInfo->HWPI_szFriendlyName,
  611. &ulLength);
  612. //
  613. // the ANSI representation of a hardware profile friendly name string
  614. // should not be longer than MAX_PROFILE_LEN bytes, because that's the
  615. // max size of the buffer in the structure.
  616. //
  617. ASSERT(Status != CR_BUFFER_SMALL);
  618. }
  619. return Status;
  620. } // CM_Get_Hardware_Profile_Info_ExA
  621. //-------------------------------------------------------------------
  622. // Local Stubs
  623. //-------------------------------------------------------------------
  624. CMAPI
  625. CONFIGRET
  626. WINAPI
  627. CM_Request_Eject_PC (
  628. VOID
  629. )
  630. {
  631. return CM_Request_Eject_PC_Ex (NULL);
  632. }
  633. CMAPI
  634. CONFIGRET
  635. WINAPI
  636. CM_Is_Dock_Station_Present (
  637. OUT PBOOL pbPresent
  638. )
  639. {
  640. return CM_Is_Dock_Station_Present_Ex (pbPresent, NULL);
  641. }
  642. CONFIGRET
  643. CM_Get_HW_Prof_FlagsW(
  644. IN DEVINSTID_W pDeviceID,
  645. IN ULONG ulHardwareProfile,
  646. OUT PULONG pulValue,
  647. IN ULONG ulFlags
  648. )
  649. {
  650. return CM_Get_HW_Prof_Flags_ExW(pDeviceID, ulHardwareProfile,
  651. pulValue, ulFlags, NULL);
  652. }
  653. CONFIGRET
  654. CM_Get_HW_Prof_FlagsA(
  655. IN DEVINSTID_A pDeviceID,
  656. IN ULONG ulHardwareProfile,
  657. OUT PULONG pulValue,
  658. IN ULONG ulFlags
  659. )
  660. {
  661. return CM_Get_HW_Prof_Flags_ExA(pDeviceID, ulHardwareProfile,
  662. pulValue, ulFlags, NULL);
  663. }
  664. CONFIGRET
  665. CM_Set_HW_Prof_FlagsW(
  666. IN DEVINSTID_W pDeviceID,
  667. IN ULONG ulConfig,
  668. IN ULONG ulValue,
  669. IN ULONG ulFlags
  670. )
  671. {
  672. return CM_Set_HW_Prof_Flags_ExW(pDeviceID, ulConfig, ulValue,
  673. ulFlags, NULL);
  674. }
  675. CONFIGRET
  676. CM_Set_HW_Prof_FlagsA(
  677. IN DEVINSTID_A pDeviceID,
  678. IN ULONG ulConfig,
  679. IN ULONG ulValue,
  680. IN ULONG ulFlags
  681. )
  682. {
  683. return CM_Set_HW_Prof_Flags_ExA(pDeviceID, ulConfig, ulValue,
  684. ulFlags, NULL);
  685. }
  686. CONFIGRET
  687. CM_Get_Hardware_Profile_InfoW(
  688. IN ULONG ulIndex,
  689. OUT PHWPROFILEINFO_W pHWProfileInfo,
  690. IN ULONG ulFlags
  691. )
  692. {
  693. return CM_Get_Hardware_Profile_Info_ExW(ulIndex, pHWProfileInfo,
  694. ulFlags, NULL);
  695. }
  696. CONFIGRET
  697. CM_Get_Hardware_Profile_InfoA(
  698. IN ULONG ulIndex,
  699. OUT PHWPROFILEINFO_A pHWProfileInfo,
  700. IN ULONG ulFlags
  701. )
  702. {
  703. return CM_Get_Hardware_Profile_Info_ExA(ulIndex, pHWProfileInfo,
  704. ulFlags, NULL);
  705. }
  706. CONFIGRET
  707. CM_Set_HW_Prof(
  708. IN ULONG ulHardwareProfile,
  709. IN ULONG ulFlags
  710. )
  711. {
  712. return CM_Set_HW_Prof_Ex(ulHardwareProfile, ulFlags, NULL);
  713. }