Leaked source code of windows server 2003
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.

666 lines
19 KiB

  1. //
  2. // Prototype and function pointer types
  3. //
  4. typedef BOOL (GETFILEATTRIBUTESEXA_PROTOTYPE)(LPCSTR, GET_FILEEX_INFO_LEVELS, LPVOID);
  5. typedef GETFILEATTRIBUTESEXA_PROTOTYPE * GETFILEATTRIBUTESEXA_PROC;
  6. typedef UINT (GETSYSTEMWINDOWSDIRECTORYA_PROTOTYPE)(LPSTR, UINT);
  7. typedef GETSYSTEMWINDOWSDIRECTORYA_PROTOTYPE * GETSYSTEMWINDOWSDIRECTORYA_PROC;
  8. typedef BOOL (VERIFYVERSIONINFOA_PROTOTYPE)(LPOSVERSIONINFOEXA, DWORD, DWORDLONG);
  9. typedef VERIFYVERSIONINFOA_PROTOTYPE * VERIFYVERSIONINFOA_PROC;
  10. typedef ULONGLONG (VERSETCONDITIONMASK_PROTOTYPE)(ULONGLONG, DWORD, BYTE);
  11. typedef VERSETCONDITIONMASK_PROTOTYPE * VERSETCONDITIONMASK_PROC;
  12. typedef HANDLE (WINAPI SFCONNECTTOSERVER_PROTOTYPE)(LPCWSTR ServerName);
  13. typedef VOID (SFCCLOSE_PROTOTYPE)(IN HANDLE RpcHandle);
  14. typedef DWORD (WINAPI SFCFILEEXCEPTION_PROTOTYPE)(HANDLE RpcHandle,PCWSTR FileName,DWORD ExpectedChangeType);
  15. typedef BOOL (WINAPI SFCISFILEPROTECTED_PROTOTYPE)(HANDLE RpcHandle,LPCWSTR ProtFileName);
  16. typedef SFCONNECTTOSERVER_PROTOTYPE * SFCONNECTTOSERVER_PROC;
  17. typedef SFCCLOSE_PROTOTYPE * SFCCLOSE_PROC;
  18. typedef SFCFILEEXCEPTION_PROTOTYPE * SFCFILEEXCEPTION_PROC;
  19. typedef SFCISFILEPROTECTED_PROTOTYPE * SFCISFILEPROTECTED_PROC;
  20. #ifdef ANSI_SETUPAPI
  21. typedef CONFIGRET (WINAPI *CM_GET_CLASS_REGISTRY_PROPERTYA)(
  22. IN LPGUID ClassGUID,
  23. IN ULONG ulProperty,
  24. OUT PULONG pulRegDataType, OPTIONAL
  25. OUT PVOID Buffer, OPTIONAL
  26. IN OUT PULONG pulLength,
  27. IN ULONG ulFlags,
  28. IN HMACHINE hMachine
  29. );
  30. typedef CONFIGRET (WINAPI *CM_SET_CLASS_REGISTRY_PROPERTYA)(
  31. IN LPGUID ClassGUID,
  32. IN ULONG ulProperty,
  33. IN PCVOID Buffer, OPTIONAL
  34. IN ULONG ulLength,
  35. IN ULONG ulFlags,
  36. IN HMACHINE hMachine
  37. );
  38. typedef CONFIGRET (WINAPI *CM_GET_DEVICE_INTERFACE_ALIAS_EXA)(
  39. IN LPCSTR pszDeviceInterface,
  40. IN LPGUID AliasInterfaceGuid,
  41. OUT LPSTR pszAliasDeviceInterface,
  42. IN OUT PULONG pulLength,
  43. IN ULONG ulFlags,
  44. IN HMACHINE hMachine
  45. );
  46. typedef CONFIGRET (WINAPI *CM_GET_DEVICE_INTERFACE_LIST_EXA)(
  47. IN LPGUID InterfaceClassGuid,
  48. IN DEVINSTID_A pDeviceID, OPTIONAL
  49. OUT PCHAR Buffer,
  50. IN ULONG BufferLen,
  51. IN ULONG ulFlags,
  52. IN HMACHINE hMachine
  53. );
  54. typedef CONFIGRET (WINAPI *CM_GET_DEVICE_INTERFACE_LIST_SIZE_EXA)(
  55. IN PULONG pulLen,
  56. IN LPGUID InterfaceClassGuid,
  57. IN DEVINSTID_A pDeviceID, OPTIONAL
  58. IN ULONG ulFlags,
  59. IN HMACHINE hMachine
  60. );
  61. typedef CONFIGRET (WINAPI *CM_GET_LOG_CONF_PRIORITY_EX)(
  62. IN LOG_CONF lcLogConf,
  63. OUT PPRIORITY pPriority,
  64. IN ULONG ulFlags,
  65. IN HMACHINE hMachine
  66. );
  67. typedef CONFIGRET (WINAPI *CM_QUERY_AND_REMOVE_SUBTREE_EXA)(
  68. IN DEVINST dnAncestor,
  69. OUT PPNP_VETO_TYPE pVetoType,
  70. OUT LPSTR pszVetoName,
  71. IN ULONG ulNameLength,
  72. IN ULONG ulFlags,
  73. IN HMACHINE hMachine
  74. );
  75. typedef CONFIGRET (WINAPI *CM_REGISTER_DEVICE_INTERFACE_EXA)(
  76. IN DEVINST dnDevInst,
  77. IN LPGUID InterfaceClassGuid,
  78. IN LPCSTR pszReference, OPTIONAL
  79. OUT LPSTR pszDeviceInterface,
  80. IN OUT PULONG pulLength,
  81. IN ULONG ulFlags,
  82. IN HMACHINE hMachine
  83. );
  84. typedef CONFIGRET (WINAPI *CM_SET_DEVNODE_PROBLEM_EX)(
  85. IN DEVINST dnDevInst,
  86. IN ULONG ulProblem,
  87. IN ULONG ulFlags,
  88. IN HMACHINE hMachine
  89. );
  90. typedef CONFIGRET (WINAPI *CM_UNREGISTER_DEVICE_INTERFACE_EXA)(
  91. IN LPCSTR pszDeviceInterface,
  92. IN ULONG ulFlags,
  93. IN HMACHINE hMachine
  94. );
  95. typedef BOOL (WINAPI *CRYPTCATADMINACQUIRECONTEXT)(
  96. OUT HCATADMIN *phCatAdmin,
  97. IN const GUID *pgSubsystem,
  98. IN DWORD dwFlags
  99. );
  100. typedef BOOL (WINAPI *CRYPTCATADMINRELEASECONTEXT)(
  101. IN HCATADMIN hCatAdmin,
  102. IN DWORD dwFlags
  103. );
  104. typedef BOOL (WINAPI *CRYPTCATADMINRELEASECATALOGCONTEXT)(
  105. IN HCATADMIN hCatAdmin,
  106. IN HCATINFO hCatInfo,
  107. IN DWORD dwFlags
  108. );
  109. typedef HCATINFO (WINAPI *CRYPTCATADMINADDCATALOG)(
  110. IN HCATADMIN hCatAdmin,
  111. IN WCHAR *pwszCatalogFile,
  112. IN OPTIONAL WCHAR *pwszSelectBaseName,
  113. IN DWORD dwFlags
  114. );
  115. typedef BOOL (WINAPI *CRYPTCATCATALOGINFOFROMCONTEXT)(
  116. IN HCATINFO hCatInfo,
  117. IN OUT CATALOG_INFO *psCatInfo,
  118. IN DWORD dwFlags
  119. );
  120. typedef BOOL (WINAPI *CRYPTCATADMINCALCHASHFROMFILEHANDLE)(
  121. IN HANDLE hFile,
  122. IN OUT DWORD *pcbHash,
  123. OUT OPTIONAL BYTE *pbHash,
  124. IN DWORD dwFlags
  125. );
  126. typedef HCATINFO (WINAPI *CRYPTCATADMINENUMCATALOGFROMHASH)(
  127. IN HCATADMIN hCatAdmin,
  128. IN BYTE *pbHash,
  129. IN DWORD cbHash,
  130. IN DWORD dwFlags,
  131. IN OUT HCATINFO *phPrevCatInfo
  132. );
  133. typedef BOOL (WINAPI *CRYPTCATADMINREMOVECATALOG)(
  134. IN HCATADMIN hCatAdmin,
  135. IN WCHAR *pwszCatalogFile,
  136. IN DWORD dwFlags
  137. );
  138. typedef BOOL (WINAPI *CRYPTCATADMINRESOLVECATALOGPATH)(
  139. IN HCATADMIN hCatAdmin,
  140. IN WCHAR *pwszCatalogFile,
  141. IN OUT CATALOG_INFO *psCatInfo,
  142. IN DWORD dwFlags
  143. );
  144. typedef BOOL (WINAPI *CERTFREECERTIFICATECONTEXT)(
  145. IN PCCERT_CONTEXT pCertContext
  146. );
  147. typedef LONG (WINAPI *WINVERIFYTRUST)(
  148. HWND hwnd,
  149. GUID *pgActionID,
  150. LPVOID pWVTData
  151. );
  152. typedef CONFIGRET (WINAPI *CM_QUERY_RESOURCE_CONFLICT_LIST)(
  153. OUT PCONFLICT_LIST pclConflictList,
  154. IN DEVINST dnDevInst,
  155. IN RESOURCEID ResourceID,
  156. IN PCVOID ResourceData,
  157. IN ULONG ResourceLen,
  158. IN ULONG ulFlags,
  159. IN HMACHINE hMachine
  160. );
  161. typedef CONFIGRET (WINAPI *CM_FREE_RESOURCE_CONFLICT_HANDLE)(
  162. IN CONFLICT_LIST clConflictList
  163. );
  164. typedef CONFIGRET (WINAPI *CM_GET_RESOURCE_CONFLICT_COUNT)(
  165. IN CONFLICT_LIST clConflictList,
  166. OUT PULONG pulCount
  167. );
  168. typedef CONFIGRET (WINAPI *CM_GET_RESOURCE_CONFLICT_DETAILSA)(
  169. IN CONFLICT_LIST clConflictList,
  170. IN ULONG ulIndex,
  171. IN OUT PCONFLICT_DETAILS_A pConflictDetails
  172. );
  173. #endif
  174. //
  175. // Pointers declared in stub.c and initialized in InitializeStubFnPtrs
  176. //
  177. extern GETFILEATTRIBUTESEXA_PROC Dyn_GetFileAttributesExA;
  178. extern GETSYSTEMWINDOWSDIRECTORYA_PROC Dyn_GetSystemWindowsDirectoryA;
  179. extern VERIFYVERSIONINFOA_PROC Dyn_VerifyVersionInfoA;
  180. extern VERSETCONDITIONMASK_PROC Dyn_VerSetConditionMask;
  181. extern SFCONNECTTOSERVER_PROC Dyn_SfcConnectToServer;
  182. extern SFCCLOSE_PROC Dyn_SfcClose;
  183. extern SFCFILEEXCEPTION_PROC Dyn_SfcFileException;
  184. extern SFCISFILEPROTECTED_PROC Dyn_SfcIsFileProtected;
  185. #ifdef ANSI_SETUPAPI
  186. extern CM_QUERY_RESOURCE_CONFLICT_LIST Dyn_CM_Query_Resource_Conflict_List;
  187. extern CM_FREE_RESOURCE_CONFLICT_HANDLE Dyn_CM_Free_Resource_Conflict_Handle;
  188. extern CM_GET_RESOURCE_CONFLICT_COUNT Dyn_CM_Get_Resource_Conflict_Count;
  189. extern CM_GET_RESOURCE_CONFLICT_DETAILSA Dyn_CM_Get_Resource_Conflict_DetailsA;
  190. extern CM_GET_CLASS_REGISTRY_PROPERTYA Dyn_CM_Get_Class_Registry_PropertyA;
  191. extern CM_SET_CLASS_REGISTRY_PROPERTYA Dyn_CM_Set_Class_Registry_PropertyA;
  192. extern CM_GET_DEVICE_INTERFACE_ALIAS_EXA Dyn_CM_Get_Device_Interface_Alias_ExA;
  193. extern CM_GET_DEVICE_INTERFACE_LIST_EXA Dyn_CM_Get_Device_Interface_List_ExA;
  194. extern CM_GET_DEVICE_INTERFACE_LIST_SIZE_EXA Dyn_CM_Get_Device_Interface_List_Size_ExA;
  195. extern CM_GET_LOG_CONF_PRIORITY_EX Dyn_CM_Get_Log_Conf_Priority_Ex;
  196. extern CM_QUERY_AND_REMOVE_SUBTREE_EXA Dyn_CM_Query_And_Remove_SubTree_ExA;
  197. extern CM_REGISTER_DEVICE_INTERFACE_EXA Dyn_CM_Register_Device_Interface_ExA;
  198. extern CM_SET_DEVNODE_PROBLEM_EX Dyn_CM_Set_DevNode_Problem_Ex;
  199. extern CM_UNREGISTER_DEVICE_INTERFACE_EXA Dyn_CM_Unregister_Device_Interface_ExA;
  200. extern CRYPTCATADMINACQUIRECONTEXT Dyn_CryptCATAdminAcquireContext;
  201. extern CRYPTCATADMINRELEASECONTEXT Dyn_CryptCATAdminReleaseContext;
  202. extern CRYPTCATADMINRELEASECATALOGCONTEXT Dyn_CryptCATAdminReleaseCatalogContext;
  203. extern CRYPTCATADMINADDCATALOG Dyn_CryptCATAdminAddCatalog;
  204. extern CRYPTCATCATALOGINFOFROMCONTEXT Dyn_CryptCATCatalogInfoFromContext;
  205. extern CRYPTCATADMINCALCHASHFROMFILEHANDLE Dyn_CryptCATAdminCalcHashFromFileHandle;
  206. extern CRYPTCATADMINENUMCATALOGFROMHASH Dyn_CryptCATAdminEnumCatalogFromHash;
  207. extern CRYPTCATADMINREMOVECATALOG Dyn_CryptCATAdminRemoveCatalog;
  208. extern CRYPTCATADMINRESOLVECATALOGPATH Dyn_CryptCATAdminResolveCatalogPath;
  209. extern CERTFREECERTIFICATECONTEXT Dyn_CertFreeCertificateContext;
  210. extern WINVERIFYTRUST Dyn_WinVerifyTrust;
  211. #endif
  212. //
  213. // "Not Implemented" Stubs
  214. //
  215. BOOL
  216. WINAPI
  217. Stub_VerifyVersionInfoA(
  218. IN LPOSVERSIONINFOEXA lpVersionInformation,
  219. IN DWORD dwTypeMask,
  220. IN DWORDLONG dwlConditionMask
  221. );
  222. BOOL
  223. WINAPI
  224. Stub_VerifyVersionInfoW(
  225. IN LPOSVERSIONINFOEXW lpVersionInformation,
  226. IN DWORD dwTypeMask,
  227. IN DWORDLONG dwlConditionMask
  228. );
  229. ULONGLONG
  230. NTAPI
  231. Stub_VerSetConditionMask(
  232. IN ULONGLONG ConditionMask,
  233. IN DWORD TypeMask,
  234. IN BYTE Condition
  235. );
  236. HANDLE
  237. WINAPI
  238. Stub_SfcConnectToServer(
  239. IN LPCWSTR ServerName
  240. );
  241. VOID
  242. Stub_SfcClose(
  243. IN HANDLE RpcHandle
  244. );
  245. DWORD
  246. WINAPI
  247. Stub_SfcFileException(
  248. IN HANDLE RpcHandle,
  249. IN PCWSTR FileName,
  250. IN DWORD ExpectedChangeType
  251. );
  252. BOOL
  253. WINAPI
  254. Stub_SfcIsFileProtected(
  255. IN HANDLE RpcHandle,
  256. IN LPCWSTR ProtFileName
  257. );
  258. HANDLE
  259. WINAPI
  260. FirstLoad_SfcConnectToServer(
  261. IN LPCWSTR ServerName
  262. );
  263. VOID
  264. FirstLoad_SfcClose(
  265. IN HANDLE RpcHandle
  266. );
  267. DWORD
  268. WINAPI
  269. FirstLoad_SfcFileException(
  270. IN HANDLE RpcHandle,
  271. IN PCWSTR FileName,
  272. IN DWORD ExpectedChangeType
  273. );
  274. BOOL
  275. WINAPI
  276. FirstLoad_SfcIsFileProtected(
  277. IN HANDLE RpcHandle,
  278. IN LPCWSTR ProtFileName
  279. );
  280. #ifdef ANSI_SETUPAPI
  281. CONFIGRET
  282. WINAPI
  283. Stub_CM_Get_Class_Registry_PropertyA(
  284. IN LPGUID ClassGUID,
  285. IN ULONG ulProperty,
  286. OUT PULONG pulRegDataType, OPTIONAL
  287. OUT PVOID Buffer, OPTIONAL
  288. IN OUT PULONG pulLength,
  289. IN ULONG ulFlags,
  290. IN HMACHINE hMachine
  291. );
  292. CONFIGRET
  293. WINAPI
  294. Stub_CM_Set_Class_Registry_PropertyA(
  295. IN LPGUID ClassGUID,
  296. IN ULONG ulProperty,
  297. IN PCVOID Buffer, OPTIONAL
  298. IN ULONG ulLength,
  299. IN ULONG ulFlags,
  300. IN HMACHINE hMachine
  301. );
  302. CONFIGRET
  303. WINAPI
  304. Stub_CM_Get_Device_Interface_Alias_ExA (
  305. IN LPCSTR pszDeviceInterface,
  306. IN LPGUID AliasInterfaceGuid,
  307. OUT LPSTR pszAliasDeviceInterface,
  308. IN OUT PULONG pulLength,
  309. IN ULONG ulFlags,
  310. IN HMACHINE hMachine
  311. );
  312. CONFIGRET
  313. WINAPI
  314. Stub_CM_Get_Device_Interface_List_ExA(
  315. IN LPGUID InterfaceClassGuid,
  316. IN DEVINSTID_A pDeviceID, OPTIONAL
  317. OUT PCHAR Buffer,
  318. IN ULONG BufferLen,
  319. IN ULONG ulFlags,
  320. IN HMACHINE hMachine
  321. );
  322. CONFIGRET
  323. WINAPI
  324. Stub_CM_Get_Device_Interface_List_Size_ExA(
  325. IN PULONG pulLen,
  326. IN LPGUID InterfaceClassGuid,
  327. IN DEVINSTID_A pDeviceID, OPTIONAL
  328. IN ULONG ulFlags,
  329. IN HMACHINE hMachine
  330. );
  331. CONFIGRET
  332. WINAPI
  333. Stub_CM_Get_Log_Conf_Priority_Ex(
  334. IN LOG_CONF lcLogConf,
  335. OUT PPRIORITY pPriority,
  336. IN ULONG ulFlags,
  337. IN HMACHINE hMachine
  338. );
  339. CONFIGRET
  340. WINAPI
  341. Stub_CM_Query_And_Remove_SubTree_ExA(
  342. IN DEVINST dnAncestor,
  343. OUT PPNP_VETO_TYPE pVetoType,
  344. OUT LPSTR pszVetoName,
  345. IN ULONG ulNameLength,
  346. IN ULONG ulFlags,
  347. IN HMACHINE hMachine
  348. );
  349. CONFIGRET
  350. WINAPI
  351. Stub_CM_Register_Device_Interface_ExA(
  352. IN DEVINST dnDevInst,
  353. IN LPGUID InterfaceClassGuid,
  354. IN LPCSTR pszReference, OPTIONAL
  355. OUT LPSTR pszDeviceInterface,
  356. IN OUT PULONG pulLength,
  357. IN ULONG ulFlags,
  358. IN HMACHINE hMachine
  359. );
  360. CONFIGRET
  361. WINAPI
  362. Stub_CM_Set_DevNode_Problem_Ex(
  363. IN DEVINST dnDevInst,
  364. IN ULONG ulProblem,
  365. IN ULONG ulFlags,
  366. IN HMACHINE hMachine
  367. );
  368. CONFIGRET
  369. WINAPI
  370. Stub_CM_Unregister_Device_Interface_ExA(
  371. IN LPCSTR pszDeviceInterface,
  372. IN ULONG ulFlags,
  373. IN HMACHINE hMachine
  374. );
  375. CONFIGRET
  376. WINAPI
  377. Stub_CM_Query_Resource_Conflict_List(
  378. OUT PCONFLICT_LIST pclConflictList,
  379. IN DEVINST dnDevInst,
  380. IN RESOURCEID ResourceID,
  381. IN PCVOID ResourceData,
  382. IN ULONG ResourceLen,
  383. IN ULONG ulFlags,
  384. IN HMACHINE hMachine
  385. );
  386. CONFIGRET
  387. WINAPI
  388. Stub_CM_Free_Resource_Conflict_Handle(
  389. IN CONFLICT_LIST clConflictList
  390. );
  391. CONFIGRET
  392. WINAPI
  393. Stub_CM_Get_Resource_Conflict_Count(
  394. IN CONFLICT_LIST clConflictList,
  395. OUT PULONG pulCount
  396. );
  397. CONFIGRET
  398. WINAPI
  399. Stub_CM_Get_Resource_Conflict_DetailsA(
  400. IN CONFLICT_LIST clConflictList,
  401. IN ULONG ulIndex,
  402. IN OUT PCONFLICT_DETAILS_A pConflictDetails
  403. );
  404. BOOL
  405. WINAPI
  406. Stub_CryptCATAdminAcquireContext (
  407. OUT HCATADMIN *phCatAdmin,
  408. IN const GUID *pgSubsystem,
  409. IN DWORD dwFlags
  410. );
  411. BOOL
  412. WINAPI
  413. Stub_CryptCATAdminReleaseContext (
  414. IN HCATADMIN hCatAdmin,
  415. IN DWORD dwFlags
  416. );
  417. BOOL
  418. WINAPI
  419. Stub_CryptCATAdminReleaseCatalogContext (
  420. IN HCATADMIN hCatAdmin,
  421. IN HCATINFO hCatInfo,
  422. IN DWORD dwFlags
  423. );
  424. HCATINFO
  425. WINAPI
  426. Stub_CryptCATAdminAddCatalog (
  427. IN HCATADMIN hCatAdmin,
  428. IN WCHAR *pwszCatalogFile,
  429. IN OPTIONAL WCHAR *pwszSelectBaseName,
  430. IN DWORD dwFlags
  431. );
  432. BOOL
  433. WINAPI
  434. Stub_CryptCATCatalogInfoFromContext (
  435. IN HCATINFO hCatInfo,
  436. IN OUT CATALOG_INFO *psCatInfo,
  437. IN DWORD dwFlags
  438. );
  439. BOOL
  440. WINAPI
  441. Stub_CryptCATAdminCalcHashFromFileHandle (
  442. IN HANDLE hFile,
  443. IN OUT DWORD *pcbHash,
  444. OUT OPTIONAL BYTE *pbHash,
  445. IN DWORD dwFlags
  446. );
  447. HCATINFO
  448. WINAPI
  449. Stub_CryptCATAdminEnumCatalogFromHash(
  450. IN HCATADMIN hCatAdmin,
  451. IN BYTE *pbHash,
  452. IN DWORD cbHash,
  453. IN DWORD dwFlags,
  454. IN OUT HCATINFO *phPrevCatInfo
  455. );
  456. BOOL
  457. WINAPI
  458. Stub_CryptCATAdminRemoveCatalog(
  459. IN HCATADMIN hCatAdmin,
  460. IN WCHAR *pwszCatalogFile,
  461. IN DWORD dwFlags
  462. );
  463. BOOL
  464. WINAPI
  465. Stub_CryptCATAdminResolveCatalogPath(
  466. IN HCATADMIN hCatAdmin,
  467. IN WCHAR *pwszCatalogFile,
  468. IN OUT CATALOG_INFO *psCatInfo,
  469. IN DWORD dwFlags
  470. );
  471. BOOL
  472. WINAPI
  473. Stub_CertFreeCertificateContext(
  474. IN PCCERT_CONTEXT pCertContext
  475. );
  476. LONG
  477. WINAPI
  478. Stub_WinVerifyTrust(
  479. HWND hwnd,
  480. GUID *pgActionID,
  481. LPVOID pWVTData
  482. );
  483. int
  484. Stub_wnsprintf(
  485. LPTSTR lpOut,
  486. int cchLimitIn,
  487. LPCTSTR pszFmt,
  488. ...
  489. );
  490. #endif
  491. //
  492. // Macro repairs
  493. //
  494. #define SfcConnectToServer Dyn_SfcConnectToServer
  495. #define SfcClose Dyn_SfcClose
  496. #define SfcFileException Dyn_SfcFileException
  497. #define SfcIsFileProtected Dyn_SfcIsFileProtected
  498. #ifdef ANSI_SETUPAPI
  499. #undef VerifyVersionInfo
  500. #undef VerSetConditionMask
  501. #undef GetFileAttributesEx
  502. #undef GetSystemWindowsDirectory
  503. #undef CM_Get_Class_Registry_Property
  504. #undef CM_Set_Class_Registry_Property
  505. #undef CM_Get_Device_Interface_Alias_Ex
  506. #undef CM_Get_Device_Interface_List_Ex
  507. #undef CM_Get_Device_Interface_List_Size_Ex
  508. #undef CM_Query_And_Remove_SubTree_Ex
  509. #undef CM_Register_Device_Interface_Ex
  510. #undef CM_Unregister_Device_Interface_Ex
  511. #undef CM_Get_Resource_Conflict_Details
  512. #define VerifyVersionInfo Dyn_VerifyVersionInfoA
  513. #define VerSetConditionMask Dyn_VerSetConditionMask
  514. #define CM_Get_Class_Registry_Property Dyn_CM_Get_Class_Registry_PropertyA
  515. #define CM_Set_Class_Registry_Property Dyn_CM_Set_Class_Registry_PropertyA
  516. #define CM_Get_Device_Interface_Alias_Ex Dyn_CM_Get_Device_Interface_Alias_ExA
  517. #define CM_Get_Device_Interface_List_Ex Dyn_CM_Get_Device_Interface_List_ExA
  518. #define CM_Get_Device_Interface_List_Size_Ex Dyn_CM_Get_Device_Interface_List_Size_ExA
  519. #define CM_Get_Log_Conf_Priority_Ex Dyn_CM_Get_Log_Conf_Priority_Ex
  520. #define CM_Query_And_Remove_SubTree_Ex Dyn_CM_Query_And_Remove_SubTree_ExA
  521. #define CM_Register_Device_Interface_Ex Dyn_CM_Register_Device_Interface_ExA
  522. #define CM_Set_DevNode_Problem_Ex Dyn_CM_Set_DevNode_Problem_Ex
  523. #define CM_Unregister_Device_Interface_Ex Dyn_CM_Unregister_Device_Interface_ExA
  524. #define CM_Query_Resource_Conflict_List Dyn_CM_Query_Resource_Conflict_List
  525. #define CM_Free_Resource_Conflict_Handle Dyn_CM_Free_Resource_Conflict_Handle
  526. #define CM_Get_Resource_Conflict_Count Dyn_CM_Get_Resource_Conflict_Count
  527. #define CM_Get_Resource_Conflict_Details Dyn_CM_Get_Resource_Conflict_DetailsA
  528. #define CryptCATAdminAcquireContext Dyn_CryptCATAdminAcquireContext
  529. #define CryptCATAdminReleaseContext Dyn_CryptCATAdminReleaseContext
  530. #define CryptCATAdminReleaseCatalogContext Dyn_CryptCATAdminReleaseCatalogContext
  531. #define CryptCATAdminAddCatalog Dyn_CryptCATAdminAddCatalog
  532. #define CryptCATCatalogInfoFromContext Dyn_CryptCATCatalogInfoFromContext
  533. #define CryptCATAdminCalcHashFromFileHandle Dyn_CryptCATAdminCalcHashFromFileHandle
  534. #define CryptCATAdminEnumCatalogFromHash Dyn_CryptCATAdminEnumCatalogFromHash
  535. #define CryptCATAdminRemoveCatalog Dyn_CryptCATAdminRemoveCatalog
  536. #define CryptCATAdminResolveCatalogPath Dyn_CryptCATAdminResolveCatalogPath
  537. #define CertFreeCertificateContext Dyn_CertFreeCertificateContext
  538. #define WinVerifyTrust Dyn_WinVerifyTrust
  539. #define GetFileAttributesEx Dyn_GetFileAttributesExA
  540. #define GetSystemWindowsDirectory Dyn_GetSystemWindowsDirectoryA
  541. #endif
  542. //
  543. // ANSI specific emulation of API's (we don't want to dynamic check)
  544. //
  545. #ifdef ANSI_SETUPAPI
  546. #undef wnsprintf
  547. #define wnsprintf Stub_wnsprintf
  548. #endif
  549. //
  550. // Functions called from DllMain
  551. //
  552. VOID
  553. InitializeStubFnPtrs (
  554. VOID
  555. );
  556. VOID
  557. CleanUpStubFns (
  558. VOID
  559. );
  560. FARPROC
  561. ObtainFnPtr (
  562. PCSTR DllName,
  563. PCSTR FnName,
  564. FARPROC Default
  565. );