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.

1333 lines
37 KiB

  1. /*****************************************************************************
  2. *
  3. * DIExtDll.c
  4. *
  5. * Copyright (c) 1997 Microsoft Corporation. All Rights Reserved.
  6. *
  7. * Abstract:
  8. *
  9. * Dynamic loading of optional external DLLs.
  10. *
  11. * Contents:
  12. *
  13. * ExtDll_Init
  14. * ExtDll_Term
  15. *
  16. *****************************************************************************/
  17. #include "dinputpr.h"
  18. /*****************************************************************************
  19. *
  20. * The sqiffle for this file.
  21. *
  22. *****************************************************************************/
  23. #define sqfl sqflExtDll
  24. /*****************************************************************************
  25. *
  26. * @define T | TEXT(ch) |
  27. *
  28. * Either "A" or "W", depending on whether we are building
  29. * the ANSI or UNICODE version.
  30. *
  31. *****************************************************************************/
  32. #ifdef UNICODE
  33. #define T "W"
  34. #else
  35. #define T "A"
  36. #endif
  37. /*****************************************************************************
  38. *
  39. * @define MAKEAPINAME | nm |
  40. *
  41. * Emit a c_sz that records the name of the API.
  42. *
  43. *****************************************************************************/
  44. #define MAKEAPINAME(nm) CHAR c_sz##nm[] = #nm
  45. #ifndef STATIC_DLLUSAGE
  46. /*****************************************************************************
  47. *
  48. * CFGMGR32
  49. *
  50. * Note that this must match the CFGMGR32 structure in diextdll.h
  51. *
  52. *****************************************************************************/
  53. #pragma BEGIN_CONST_DATA
  54. MAKEAPINAME(CM_Get_Child);
  55. MAKEAPINAME(CM_Get_Sibling);
  56. MAKEAPINAME(CM_Get_Parent);
  57. MAKEAPINAME(CM_Get_DevNode_Registry_Property) T;
  58. MAKEAPINAME(CM_Set_DevNode_Registry_Property) T;
  59. MAKEAPINAME(CM_Get_Device_ID) T;
  60. #pragma END_CONST_DATA
  61. #ifndef WINNT
  62. LPSTR g_cfgmgr32_fn[] = {
  63. c_szCM_Get_Child,
  64. c_szCM_Get_Sibling,
  65. c_szCM_Get_Parent,
  66. c_szCM_Get_DevNode_Registry_Property,
  67. c_szCM_Set_DevNode_Registry_Property,
  68. c_szCM_Get_Device_ID
  69. };
  70. HINSTANCE g_hinstcfgmgr32;
  71. CFGMGR32 g_cfgmgr32 = {
  72. (FARPROC)DIDummy_CM_Get_Child,
  73. (FARPROC)DIDummy_CM_Get_Sibling,
  74. (FARPROC)DIDummy_CM_Get_Parent,
  75. (FARPROC)DIDummy_CM_Get_DevNode_Registry_Property,
  76. (FARPROC)DIDummy_CM_Set_DevNode_Registry_Property,
  77. (FARPROC)DIDummy_CM_Get_Device_ID
  78. };
  79. #endif
  80. /*****************************************************************************
  81. *
  82. * SETUPAPI
  83. *
  84. * Note that this must match the SETUPAPI structure in diextdll.h
  85. *
  86. *****************************************************************************/
  87. #pragma BEGIN_CONST_DATA
  88. MAKEAPINAME(SetupDiGetClassDevs) T;
  89. MAKEAPINAME(SetupDiDestroyDeviceInfoList);
  90. MAKEAPINAME(SetupDiGetDeviceInterfaceDetail) T;
  91. MAKEAPINAME(SetupDiEnumDeviceInterfaces);
  92. MAKEAPINAME(SetupDiCreateDeviceInterfaceRegKey) T;
  93. MAKEAPINAME(SetupDiCallClassInstaller);
  94. MAKEAPINAME(SetupDiGetDeviceRegistryProperty) T;
  95. MAKEAPINAME(SetupDiSetDeviceRegistryProperty) T;
  96. MAKEAPINAME(SetupDiGetDeviceInstanceId) T;
  97. MAKEAPINAME(SetupDiOpenDeviceInfo) T;
  98. MAKEAPINAME(SetupDiCreateDeviceInfoList);
  99. MAKEAPINAME(SetupDiOpenDevRegKey);
  100. #pragma END_CONST_DATA
  101. LPSTR g_setupapi_fn[] = {
  102. c_szSetupDiGetClassDevs,
  103. c_szSetupDiDestroyDeviceInfoList,
  104. c_szSetupDiGetDeviceInterfaceDetail,
  105. c_szSetupDiEnumDeviceInterfaces,
  106. c_szSetupDiCreateDeviceInterfaceRegKey,
  107. c_szSetupDiCallClassInstaller,
  108. c_szSetupDiGetDeviceRegistryProperty,
  109. c_szSetupDiSetDeviceRegistryProperty,
  110. c_szSetupDiGetDeviceInstanceId,
  111. c_szSetupDiOpenDeviceInfo,
  112. c_szSetupDiCreateDeviceInfoList,
  113. c_szSetupDiOpenDevRegKey,
  114. #ifdef WINNT
  115. c_szCM_Get_Child,
  116. c_szCM_Get_Sibling,
  117. c_szCM_Get_Parent,
  118. c_szCM_Get_DevNode_Registry_Property,
  119. c_szCM_Set_DevNode_Registry_Property,
  120. c_szCM_Get_Device_ID
  121. #endif
  122. };
  123. HINSTANCE g_hinstSetupapi;
  124. SETUPAPI g_setupapi = {
  125. (FARPROC)DIDummy_SetupDiGetClassDevs,
  126. (FARPROC)DIDummy_SetupDiDestroyDeviceInfoList,
  127. (FARPROC)DIDummy_SetupDiGetDeviceInterfaceDetail,
  128. (FARPROC)DIDummy_SetupDiEnumDeviceInterfaces,
  129. (FARPROC)DIDummy_SetupDiCreateDeviceInterfaceRegKey,
  130. (FARPROC)DIDummy_SetupDiCallClassInstaller,
  131. (FARPROC)DIDummy_SetupDiGetDeviceRegistryProperty,
  132. (FARPROC)DIDummy_SetupDiSetDeviceRegistryProperty,
  133. (FARPROC)DIDummy_SetupDiGetDeviceInstanceId,
  134. (FARPROC)DIDummy_SetupDiOpenDeviceInfo,
  135. (FARPROC)DIDummy_SetupDiCreateDeviceInfoList,
  136. (FARPROC)DIDummy_SetupDiOpenDevRegKey,
  137. #ifdef WINNT
  138. (FARPROC)DIDummy_CM_Get_Child,
  139. (FARPROC)DIDummy_CM_Get_Sibling,
  140. (FARPROC)DIDummy_CM_Get_Parent,
  141. (FARPROC)DIDummy_CM_Get_DevNode_Registry_Property,
  142. (FARPROC)DIDummy_CM_Set_DevNode_Registry_Property,
  143. (FARPROC)DIDummy_CM_Get_Device_ID
  144. #endif
  145. };
  146. /*****************************************************************************
  147. *
  148. * HIDDLL
  149. *
  150. * Note that this must match the HIDDLL structure in diextdll.h
  151. *
  152. *****************************************************************************/
  153. #pragma BEGIN_CONST_DATA
  154. MAKEAPINAME(HidD_GetHidGuid);
  155. MAKEAPINAME(HidD_GetPreparsedData);
  156. MAKEAPINAME(HidD_FreePreparsedData);
  157. MAKEAPINAME(HidD_FlushQueue);
  158. MAKEAPINAME(HidD_GetAttributes);
  159. MAKEAPINAME(HidD_GetFeature);
  160. MAKEAPINAME(HidD_SetFeature);
  161. MAKEAPINAME(HidD_GetProductString);
  162. MAKEAPINAME(HidD_GetInputReport);
  163. MAKEAPINAME(HidP_GetCaps);
  164. MAKEAPINAME(HidP_GetButtonCaps);
  165. MAKEAPINAME(HidP_GetValueCaps);
  166. MAKEAPINAME(HidP_GetLinkCollectionNodes);
  167. MAKEAPINAME(HidP_MaxDataListLength);
  168. MAKEAPINAME(HidP_GetUsagesEx);
  169. MAKEAPINAME(HidP_GetScaledUsageValue);
  170. MAKEAPINAME(HidP_GetData);
  171. MAKEAPINAME(HidP_SetData);
  172. MAKEAPINAME(HidP_GetUsageValue);
  173. MAKEAPINAME(HidP_MaxUsageListLength);
  174. MAKEAPINAME(HidP_GetSpecificButtonCaps);
  175. MAKEAPINAME(HidP_TranslateUsagesToI8042ScanCodes);
  176. #pragma END_CONST_DATA
  177. LPSTR g_hiddll_fn[] = {
  178. c_szHidD_GetHidGuid,
  179. c_szHidD_GetPreparsedData,
  180. c_szHidD_FreePreparsedData,
  181. c_szHidD_FlushQueue,
  182. c_szHidD_GetAttributes,
  183. c_szHidD_GetFeature,
  184. c_szHidD_SetFeature,
  185. c_szHidD_GetProductString,
  186. c_szHidD_GetInputReport,
  187. c_szHidP_GetCaps,
  188. c_szHidP_GetButtonCaps,
  189. c_szHidP_GetValueCaps,
  190. c_szHidP_GetLinkCollectionNodes,
  191. c_szHidP_MaxDataListLength,
  192. c_szHidP_GetUsagesEx,
  193. c_szHidP_GetScaledUsageValue,
  194. c_szHidP_GetData,
  195. c_szHidP_SetData,
  196. c_szHidP_GetUsageValue,
  197. c_szHidP_MaxUsageListLength,
  198. c_szHidP_GetSpecificButtonCaps,
  199. c_szHidP_TranslateUsagesToI8042ScanCodes
  200. };
  201. HINSTANCE g_hinstHid;
  202. HIDDLL g_hiddll = {
  203. (FARPROC)DIDummy_HidD_GetHidGuid,
  204. (FARPROC)DIDummy_HidD_GetPreparsedData,
  205. (FARPROC)DIDummy_HidD_FreePreparsedData,
  206. (FARPROC)DIDummy_HidD_FlushQueue,
  207. (FARPROC)DIDummy_HidD_GetAttributes,
  208. (FARPROC)DIDummy_HidD_GetFeature,
  209. (FARPROC)DIDummy_HidD_SetFeature,
  210. (FARPROC)DIDummy_HidD_GetProductString,
  211. (FARPROC)DIDummy_HidD_GetInputReport,
  212. (FARPROC)DIDummy_HidP_GetCaps,
  213. (FARPROC)DIDummy_HidP_GetButtonCaps,
  214. (FARPROC)DIDummy_HidP_GetValueCaps,
  215. (FARPROC)DIDummy_HidP_GetLinkCollectionNodes,
  216. (FARPROC)DIDummy_HidP_MaxDataListLength,
  217. (FARPROC)DIDummy_HidP_GetUsagesEx,
  218. (FARPROC)DIDummy_HidP_GetScaledUsageValue,
  219. (FARPROC)DIDummy_HidP_GetData,
  220. (FARPROC)DIDummy_HidP_SetData,
  221. (FARPROC)DIDummy_HidP_GetUsageValue,
  222. (FARPROC)DIDummy_HidP_MaxUsageListLength,
  223. (FARPROC)DIDummy_HidP_GetSpecificButtonCaps,
  224. (FARPROC)DIDummy_HidP_TranslateUsagesToI8042ScanCodes,
  225. };
  226. /*****************************************************************************
  227. *
  228. * Winmm
  229. *
  230. * Note that this must match the Winmm structure in diextdll.h
  231. *
  232. *****************************************************************************/
  233. #pragma BEGIN_CONST_DATA
  234. MAKEAPINAME(joyGetDevCaps) T;
  235. MAKEAPINAME(joyGetPosEx);
  236. MAKEAPINAME(joyGetPos);
  237. MAKEAPINAME(joyConfigChanged);
  238. MAKEAPINAME(mmioClose);
  239. MAKEAPINAME(mmioOpenA);
  240. MAKEAPINAME(mmioDescend);
  241. MAKEAPINAME(mmioCreateChunk);
  242. MAKEAPINAME(mmioRead);
  243. MAKEAPINAME(mmioWrite);
  244. MAKEAPINAME(mmioAscend);
  245. #pragma END_CONST_DATA
  246. LPSTR g_winmmdll_fn[] = {
  247. c_szjoyGetDevCaps,
  248. c_szjoyGetPosEx,
  249. c_szjoyGetPos,
  250. c_szjoyConfigChanged,
  251. c_szmmioClose,
  252. c_szmmioOpenA,
  253. c_szmmioDescend,
  254. c_szmmioCreateChunk,
  255. c_szmmioRead,
  256. c_szmmioWrite,
  257. c_szmmioAscend
  258. };
  259. HINSTANCE g_hinstwinmmdll;
  260. WINMMDLL g_winmmdll = {
  261. (FARPROC)DIDummy_joyGetDevCaps,
  262. (FARPROC)DIDummy_joyGetPosEx,
  263. (FARPROC)DIDummy_joyGetPos,
  264. (FARPROC)DIDummy_joyConfigChanged,
  265. (FARPROC)DIDummy_mmioClose,
  266. (FARPROC)DIDummy_mmioOpenA,
  267. (FARPROC)DIDummy_mmioDescend,
  268. (FARPROC)DIDummy_mmioCreateChunk,
  269. (FARPROC)DIDummy_mmioRead,
  270. (FARPROC)DIDummy_mmioWrite,
  271. (FARPROC)DIDummy_mmioAscend,
  272. };
  273. /*****************************************************************************
  274. *
  275. * User32
  276. *
  277. * Note that this must match the User32 structure in dihid.h
  278. *
  279. *****************************************************************************/
  280. #ifdef USE_WM_INPUT
  281. #pragma BEGIN_CONST_DATA
  282. MAKEAPINAME(RegisterRawInputDevices);
  283. MAKEAPINAME(GetRawInputData);
  284. #pragma END_CONST_DATA
  285. LPSTR g_user32_fn[] = {
  286. c_szRegisterRawInputDevices,
  287. c_szGetRawInputData,
  288. };
  289. HINSTANCE g_hinstuser32;
  290. USER32 g_user32 = {
  291. (FARPROC)DIDummy_RegisterRawInputDevices,
  292. (FARPROC)DIDummy_GetRawInputData,
  293. };
  294. #endif
  295. /*****************************************************************************
  296. *
  297. * @doc INTERNAL
  298. *
  299. * @func HINSTANCE | ExtDll_LoadDll |
  300. *
  301. * Loads a DLL and resolves all the imports.
  302. *
  303. * @parm LPCTSTR | ptszName |
  304. *
  305. * The name of the DLL to load.
  306. *
  307. * @parm PMANUALIMPORT | rgmi |
  308. *
  309. * Array of <t MANUALIMPORT> structures to resolve.
  310. *
  311. * @parm int | cmi |
  312. *
  313. * Number of <t MANUALIMPORT> structures to resolve.
  314. *
  315. * @parm LPSTR * | ppszProcName |
  316. *
  317. * Function names.
  318. *
  319. * @returns
  320. *
  321. * Returns the instance handle of the DLL if one or more of the imports
  322. * were resolved successfully; otherwise, unloads the DLL
  323. * and returns 0.
  324. *
  325. * If none of the imports was resolved successfully, the value
  326. * of the entries of <p rgmi> are not changed.
  327. *
  328. *****************************************************************************/
  329. HINSTANCE INTERNAL
  330. ExtDll_LoadDll(LPCTSTR ptszName, PMANUALIMPORT rgmi, int cmi, LPSTR *ppszProcName)
  331. {
  332. HINSTANCE hinst = 0;
  333. BOOL fNeedFreeLib = TRUE;
  334. EnterProcR(ExtDll_LoadDll, (_ "spuup", ptszName, rgmi, cmi, ppszProcName));
  335. hinst = LoadLibrary(ptszName);
  336. if(hinst)
  337. {
  338. int imi;
  339. FARPROC fp;
  340. for(imi = 0; imi < cmi; imi++)
  341. {
  342. fp = GetProcAddress(hinst, ppszProcName[imi]);
  343. if( fp ) {
  344. rgmi[imi].pfn = fp;
  345. fNeedFreeLib = FALSE;
  346. }
  347. }
  348. }
  349. if( fNeedFreeLib ) {
  350. FreeLibrary(hinst);
  351. hinst = 0;
  352. }
  353. ExitProcX((UINT_PTR)hinst);
  354. return hinst;
  355. }
  356. /*****************************************************************************
  357. *
  358. * @doc INTERNAL
  359. *
  360. * @func void | ExtDll_Init |
  361. *
  362. * Try to load our optional DLLs. Don't get upset if they
  363. * don't load.
  364. *
  365. *****************************************************************************/
  366. void EXTERNAL
  367. ExtDll_Init(void)
  368. {
  369. g_hinstHid = ExtDll_LoadDll(TEXT("HID.DLL"),
  370. g_hiddll.rgmi,
  371. cA(g_hiddll.rgmi),
  372. g_hiddll_fn );
  373. g_hinstSetupapi = ExtDll_LoadDll(TEXT("SETUPAPI.DLL"),
  374. g_setupapi.rgmi,
  375. cA(g_setupapi.rgmi),
  376. g_setupapi_fn );
  377. #ifndef WINNT
  378. g_hinstcfgmgr32 = ExtDll_LoadDll( TEXT("CFGMGR32.DLL" ),
  379. g_cfgmgr32.rgmi,
  380. cA(g_cfgmgr32.rgmi),
  381. g_cfgmgr32_fn );
  382. #endif
  383. #ifdef WINNT
  384. #define JOYPROCNUM 4
  385. g_hinstwinmmdll = ExtDll_LoadDll( TEXT("WINMM.DLL" ),
  386. &g_winmmdll.rgmi[JOYPROCNUM],
  387. cA(g_winmmdll.rgmi) - JOYPROCNUM,
  388. &g_winmmdll_fn[JOYPROCNUM] );
  389. #undef JOYPROCNUM
  390. #else
  391. g_hinstwinmmdll = ExtDll_LoadDll( TEXT("WINMM.DLL" ),
  392. g_winmmdll.rgmi,
  393. cA(g_winmmdll.rgmi),
  394. g_winmmdll_fn );
  395. #endif
  396. #ifdef USE_WM_INPUT
  397. g_hinstuser32 = ExtDll_LoadDll( TEXT("USER32.DLL" ),
  398. g_user32.rgmi,
  399. cA(g_user32.rgmi),
  400. g_user32_fn );
  401. #endif
  402. }
  403. #endif /* STATIC_DLLUSAGE */
  404. /*****************************************************************************
  405. *
  406. * @doc INTERNAL
  407. *
  408. * @func void | ExtDll_Term |
  409. *
  410. * Unload any optional DLLs that we loaded.
  411. *
  412. *****************************************************************************/
  413. void EXTERNAL
  414. ExtDll_Term(void)
  415. {
  416. #ifndef STATIC_DLLUSAGE
  417. if(g_hinstSetupapi)
  418. {
  419. #endif /* STATIC_DLLUSAGE */
  420. DllEnterCrit();
  421. if(g_phdl)
  422. {
  423. DIHid_EmptyHidList();
  424. FreePpv(&g_phdl);
  425. }
  426. DIBus_FreeMemory();
  427. DllLeaveCrit();
  428. #ifndef STATIC_DLLUSAGE
  429. FreeLibrary(g_hinstSetupapi);
  430. g_hinstSetupapi = NULL;
  431. }
  432. #ifndef WINNT
  433. if(g_hinstcfgmgr32)
  434. {
  435. FreeLibrary(g_hinstcfgmgr32);
  436. g_hinstcfgmgr32 = NULL;
  437. }
  438. #endif
  439. if(g_hinstHid)
  440. {
  441. FreeLibrary(g_hinstHid);
  442. g_hinstHid = NULL;
  443. }
  444. if( g_hinstwinmmdll)
  445. {
  446. FreeLibrary(g_hinstwinmmdll);
  447. g_hinstwinmmdll = NULL;
  448. }
  449. #ifdef USE_WM_INPUT
  450. if( g_hinstuser32)
  451. {
  452. FreeLibrary(g_hinstuser32);
  453. g_hinstuser32 = NULL;
  454. }
  455. #endif
  456. #endif /* STATIC_DLLUSAGE */
  457. }
  458. #ifndef STATIC_DLLUSAGE
  459. ////////////////////////////////////////
  460. // cfgmgr32.dll dummy functions
  461. ////////////////////////////////////////
  462. CONFIGRET WINAPI DIDummy_CM_Get_Child
  463. (
  464. OUT PDEVINST pdnDevInst,
  465. IN DEVINST dnDevInst,
  466. IN ULONG ulFlags
  467. )
  468. {
  469. SquirtSqflPtszV( sqfl | sqflBenign,
  470. TEXT("DIDummy_CM_Get_Child( %08x, %08x, %u )"),
  471. pdnDevInst, dnDevInst, ulFlags );
  472. return CR_FAILURE;
  473. }
  474. CONFIGRET WINAPI DIDummy_CM_Get_Sibling
  475. (
  476. OUT PDEVINST pdnDevInst,
  477. IN DEVINST DevInst,
  478. IN ULONG ulFlags
  479. )
  480. {
  481. SquirtSqflPtszV( sqfl | sqflBenign,
  482. TEXT("DIDummy_CM_Get_Sibling( %08x, %08x, %u )"),
  483. pdnDevInst, DevInst, ulFlags );
  484. return CR_FAILURE;
  485. }
  486. CONFIGRET WINAPI DIDummy_CM_Get_Parent
  487. (
  488. OUT PDEVINST pdnDevInst,
  489. IN DEVINST dnDevInst,
  490. IN ULONG ulFlags
  491. )
  492. {
  493. SquirtSqflPtszV( sqfl | sqflBenign,
  494. TEXT("DIDummy_CM_Get_Parent( %08x, %08x, %u )"),
  495. pdnDevInst, dnDevInst, ulFlags );
  496. return CR_FAILURE;
  497. }
  498. CONFIGRET WINAPI DIDummy_CM_Get_DevNode_Registry_Property
  499. (
  500. IN DEVINST dnDevInst,
  501. IN ULONG ulProperty,
  502. OUT PULONG pulRegDataType, OPTIONAL
  503. OUT PVOID Buffer, OPTIONAL
  504. IN OUT PULONG pulLength,
  505. IN ULONG ulFlags
  506. )
  507. {
  508. SquirtSqflPtszV( sqfl | sqflBenign,
  509. TEXT("DIDummy_CM_Get_DevNode_Registry_Property( %08x, %u, %08x, %08x, %08x, %u )"),
  510. dnDevInst, ulProperty, pulRegDataType, Buffer, pulLength, ulFlags );
  511. return CR_FAILURE;
  512. }
  513. CONFIGRET WINAPI DIDummy_CM_Set_DevNode_Registry_Property
  514. (
  515. IN DEVINST dnDevInst,
  516. IN ULONG ulProperty,
  517. IN PVOID Buffer, OPTIONAL
  518. IN ULONG ulLength,
  519. IN ULONG ulFlags
  520. )
  521. {
  522. SquirtSqflPtszV( sqfl | sqflBenign,
  523. TEXT("DIDummy_CM_Set_DevNode_Registry_Property( %08x, %u, %08x, %u, %u )"),
  524. dnDevInst, ulProperty, Buffer, ulLength, ulFlags );
  525. return CR_FAILURE;
  526. }
  527. CONFIGRET WINAPI DIDummy_CM_Get_Device_ID
  528. (
  529. IN DEVINST dnDevInst,
  530. OUT PTCHAR Buffer,
  531. IN ULONG BufferLen,
  532. IN ULONG ulFlags
  533. )
  534. {
  535. SquirtSqflPtszV( sqfl | sqflBenign,
  536. TEXT("DIDummy_CM_Get_Device_ID( %08x, %08x, %u, %u )"),
  537. dnDevInst, Buffer, BufferLen, ulFlags );
  538. return CR_FAILURE;
  539. }
  540. ////////////////////////////////////////
  541. //Setupapi.dll dummy functions
  542. ////////////////////////////////////////
  543. HDEVINFO WINAPI DIDummy_SetupDiGetClassDevs
  544. (
  545. IN LPGUID ClassGuid, OPTIONAL
  546. IN LPCTSTR Enumerator, OPTIONAL
  547. IN HWND hwndParent, OPTIONAL
  548. IN DWORD Flags
  549. )
  550. {
  551. SquirtSqflPtszV( sqfl | sqflBenign,
  552. TEXT("DIDummy_SetupDiGetClassDevs( %08x, %08x, %08x, %u )"),
  553. ClassGuid, Enumerator, hwndParent, Flags );
  554. return INVALID_HANDLE_VALUE;
  555. }
  556. BOOL WINAPI DIDummy_SetupDiDestroyDeviceInfoList
  557. (
  558. IN HDEVINFO DeviceInfoSet
  559. )
  560. {
  561. SquirtSqflPtszV( sqfl | sqflBenign,
  562. TEXT("DIDummy_SetupDiDestroyDeviceInfoList( %08x )"),
  563. DeviceInfoSet );
  564. return FALSE;
  565. }
  566. BOOL WINAPI DIDummy_SetupDiGetDeviceInterfaceDetail
  567. (
  568. IN HDEVINFO DeviceInfoSet,
  569. IN PSP_DEVICE_INTERFACE_DATA pdid,
  570. OUT PSP_DEVICE_INTERFACE_DETAIL_DATA pdidd, OPTIONAL
  571. IN DWORD cbDidd,
  572. OUT PDWORD RequiredSize, OPTIONAL
  573. OUT PSP_DEVINFO_DATA DeviceInfoData OPTIONAL
  574. )
  575. {
  576. SquirtSqflPtszV( sqfl | sqflBenign,
  577. TEXT("DIDummy_SetupDiGetDeviceInterfaceDetail( %08x, %08x, %08x, %u, %08x, %08x )"),
  578. DeviceInfoSet, pdid, pdidd, cbDidd, RequiredSize, DeviceInfoData );
  579. return FALSE;
  580. }
  581. BOOL WINAPI DIDummy_SetupDiEnumDeviceInterfaces
  582. (
  583. IN HDEVINFO DeviceInfoSet,
  584. IN PSP_DEVINFO_DATA DeviceInfoData, OPTIONAL
  585. IN LPGUID InterfaceClassGuid,
  586. IN DWORD MemberIndex,
  587. OUT PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData
  588. )
  589. {
  590. SquirtSqflPtszV( sqfl | sqflBenign,
  591. TEXT("DIDummy_SetupDiEnumDeviceInterfaces( %08x, %08x, %08x, %u, %08x )"),
  592. DeviceInfoSet, DeviceInfoData, InterfaceClassGuid, MemberIndex, DeviceInterfaceData );
  593. return FALSE;
  594. }
  595. HKEY WINAPI DIDummy_SetupDiCreateDeviceInterfaceRegKey
  596. (
  597. IN HDEVINFO hdev,
  598. IN PSP_DEVICE_INTERFACE_DATA pdid,
  599. IN DWORD Reserved,
  600. IN REGSAM samDesired,
  601. IN HINF InfHandle, OPTIONAL
  602. IN PCSTR InfSectionName OPTIONAL
  603. )
  604. {
  605. SquirtSqflPtszV( sqfl | sqflBenign,
  606. TEXT("DIDummy_SetupDiCreateDeviceInterfaceRegKey( %08x, %08x, %u, %u, %08x, %s )"),
  607. hdev, pdid, Reserved, samDesired, InfHandle, InfSectionName );
  608. return INVALID_HANDLE_VALUE;
  609. }
  610. BOOL WINAPI DIDummy_SetupDiCallClassInstaller
  611. (
  612. IN DI_FUNCTION InstallFunction,
  613. IN HDEVINFO DeviceInfoSet,
  614. IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL
  615. )
  616. {
  617. SquirtSqflPtszV( sqfl | sqflBenign,
  618. TEXT("DIDummy_SetupDiCallClassInstaller( %08x, %08x, %08x )"),
  619. InstallFunction, DeviceInfoSet, DeviceInfoData );
  620. return FALSE;
  621. }
  622. BOOL WINAPI DIDummy_SetupDiGetDeviceRegistryProperty
  623. (
  624. IN HDEVINFO DeviceInfoSet,
  625. IN PSP_DEVINFO_DATA DeviceInfoData,
  626. IN DWORD Property,
  627. OUT PDWORD PropertyRegDataType, OPTIONAL
  628. OUT PBYTE PropertyBuffer,
  629. IN DWORD PropertyBufferSize,
  630. OUT PDWORD RequiredSize OPTIONAL
  631. )
  632. {
  633. SquirtSqflPtszV( sqfl | sqflBenign,
  634. TEXT("DIDummy_SetupDiGetDeviceRegistryProperty( %08x, %08x, %u, %08x, %08x, %u, %08x )"),
  635. DeviceInfoSet, DeviceInfoData, Property, PropertyRegDataType, PropertyBuffer, PropertyBufferSize, RequiredSize );
  636. return FALSE;
  637. }
  638. BOOL WINAPI DIDummy_SetupDiSetDeviceRegistryProperty
  639. (
  640. IN HDEVINFO DeviceInfoSet,
  641. IN OUT PSP_DEVINFO_DATA DeviceInfoData,
  642. IN DWORD Property,
  643. IN CONST BYTE* PropertyBuffer,
  644. IN DWORD PropertyBufferSize
  645. )
  646. {
  647. SquirtSqflPtszV( sqfl | sqflBenign,
  648. TEXT("DIDummy_SetupDiGetDeviceInstanceId( %08x, %08x, %u, %08x, %u )"),
  649. DeviceInfoSet, DeviceInfoData, Property, PropertyBuffer, PropertyBufferSize );
  650. return FALSE;
  651. }
  652. BOOL WINAPI DIDummy_SetupDiGetDeviceInstanceId
  653. (
  654. IN HDEVINFO DeviceInfoSet,
  655. IN PSP_DEVINFO_DATA DeviceInfoData,
  656. OUT PTSTR DeviceInstanceId,
  657. IN DWORD DeviceInstanceIdSize,
  658. OUT PDWORD RequiredSize OPTIONAL
  659. )
  660. {
  661. SquirtSqflPtszV( sqfl | sqflBenign,
  662. TEXT("DIDummy_SetupDiGetDeviceInstanceId( %08x, %08x, %08x, %u, %08x )"),
  663. DeviceInfoSet, DeviceInfoData, DeviceInstanceId, DeviceInstanceIdSize, RequiredSize );
  664. return FALSE;
  665. }
  666. BOOL WINAPI DIDummy_SetupDiOpenDeviceInfo
  667. (
  668. IN HDEVINFO DeviceInfoSet,
  669. IN LPCTSTR DeviceInstanceId,
  670. IN HWND hwndParent, OPTIONAL
  671. IN DWORD OpenFlags,
  672. OUT PSP_DEVINFO_DATA DeviceInfoData OPTIONAL
  673. )
  674. {
  675. SquirtSqflPtszV( sqfl | sqflBenign,
  676. TEXT("DIDummy_SetupDiOpenDeviceInfo( %08x, %08x, %08x, %u, %08x )"),
  677. DeviceInfoSet, DeviceInstanceId, hwndParent, OpenFlags, DeviceInfoData );
  678. return FALSE;
  679. }
  680. HDEVINFO WINAPI DIDummy_SetupDiCreateDeviceInfoList
  681. (
  682. IN LPGUID ClassGuid, OPTIONAL
  683. IN HWND hwndParent OPTIONAL
  684. )
  685. {
  686. SquirtSqflPtszV( sqfl | sqflBenign,
  687. TEXT("DIDummy_SetupDiCreateDeviceInfoList( %08x, %08x )"),
  688. ClassGuid, hwndParent );
  689. return INVALID_HANDLE_VALUE;
  690. }
  691. HKEY WINAPI DIDummy_SetupDiOpenDevRegKey
  692. (
  693. IN HDEVINFO DeviceInfoSet,
  694. IN PSP_DEVINFO_DATA DeviceInfoData,
  695. IN DWORD Scope,
  696. IN DWORD HwProfile,
  697. IN DWORD KeyType,
  698. IN REGSAM samDesired
  699. )
  700. {
  701. SquirtSqflPtszV( sqfl | sqflBenign,
  702. TEXT("DIDummy_SetupDiOpenDevRegKey( %08x, %08x, %u, %u, %u, %u )"),
  703. DeviceInfoSet, DeviceInfoData, Scope, HwProfile, KeyType, samDesired );
  704. return INVALID_HANDLE_VALUE;
  705. }
  706. ////////////////////////////////////////
  707. // hid.dll dummy functions
  708. ////////////////////////////////////////
  709. void __stdcall DIDummy_HidD_GetHidGuid
  710. (
  711. OUT LPGUID HidGuid
  712. )
  713. {
  714. SquirtSqflPtszV( sqfl | sqflBenign,
  715. TEXT("DIDummy_HidD_GetHidGuid( %08x )"),
  716. HidGuid );
  717. return;
  718. }
  719. BOOLEAN __stdcall DIDummy_HidD_GetPreparsedData
  720. (
  721. IN HANDLE HidDeviceObject,
  722. OUT PHIDP_PREPARSED_DATA * PreparsedData
  723. )
  724. {
  725. SquirtSqflPtszV( sqfl | sqflBenign,
  726. TEXT("DIDummy_HidD_GetPreparsedData( %08x, %08x )"),
  727. HidDeviceObject, PreparsedData );
  728. return FALSE;
  729. }
  730. BOOLEAN __stdcall DIDummy_HidD_FreePreparsedData
  731. (
  732. IN PHIDP_PREPARSED_DATA PreparsedData
  733. )
  734. {
  735. SquirtSqflPtszV( sqfl | sqflBenign,
  736. TEXT("DIDummy_HidD_FreePreparsedData( %08x )"),
  737. PreparsedData );
  738. return FALSE;
  739. }
  740. BOOLEAN __stdcall DIDummy_HidD_FlushQueue //unused
  741. (
  742. IN HANDLE HidDeviceObject
  743. )
  744. {
  745. SquirtSqflPtszV( sqfl | sqflBenign,
  746. TEXT("DIDummy_HidD_FlushQueue( %08x )"),
  747. HidDeviceObject );
  748. return FALSE;
  749. }
  750. BOOLEAN __stdcall DIDummy_HidD_GetAttributes
  751. (
  752. IN HANDLE HidDeviceObject,
  753. OUT PHIDD_ATTRIBUTES Attributes
  754. )
  755. {
  756. SquirtSqflPtszV( sqfl | sqflBenign,
  757. TEXT("DIDummy_HidD_GetAttributes( %08x, %08x )"),
  758. HidDeviceObject, Attributes );
  759. return FALSE;
  760. }
  761. BOOLEAN __stdcall DIDummy_HidD_GetFeature
  762. (
  763. IN HANDLE HidDeviceObject,
  764. OUT PVOID ReportBuffer,
  765. IN ULONG ReportBufferLength
  766. )
  767. {
  768. SquirtSqflPtszV( sqfl | sqflBenign,
  769. TEXT("DIDummy_HidD_GetFeature( %08x, %08x, %u )"),
  770. HidDeviceObject, ReportBuffer, ReportBufferLength );
  771. return FALSE;
  772. }
  773. BOOLEAN __stdcall DIDummy_HidD_SetFeature
  774. (
  775. IN HANDLE HidDeviceObject,
  776. IN PVOID ReportBuffer,
  777. IN ULONG ReportBufferLength
  778. )
  779. {
  780. SquirtSqflPtszV( sqfl | sqflBenign,
  781. TEXT("DIDummy_HidD_SetFeature( %08x, %08x, %u )"),
  782. HidDeviceObject, ReportBuffer, ReportBufferLength );
  783. return FALSE;
  784. }
  785. BOOLEAN __stdcall DIDummy_HidD_GetProductString
  786. (
  787. IN HANDLE HidDeviceObject,
  788. OUT PVOID Buffer,
  789. IN ULONG BufferLength
  790. )
  791. {
  792. SquirtSqflPtszV( sqfl | sqflBenign,
  793. TEXT("DIDummy_HidD_GetProductString( %08x, %08x, %u )"),
  794. HidDeviceObject, Buffer, BufferLength );
  795. return FALSE;
  796. }
  797. BOOLEAN __stdcall DIDummy_HidD_GetInputReport
  798. (
  799. IN HANDLE HidDeviceObject,
  800. OUT PVOID ReportBuffer,
  801. IN ULONG ReportBufferLength
  802. )
  803. {
  804. SquirtSqflPtszV( sqfl | sqflBenign,
  805. TEXT("DIDummy_HidD_GetProductString( %08x, %08x, %u )"),
  806. HidDeviceObject, ReportBuffer, ReportBufferLength );
  807. return FALSE;
  808. }
  809. NTSTATUS __stdcall DIDummy_HidP_GetCaps
  810. (
  811. IN PHIDP_PREPARSED_DATA PreparsedData,
  812. OUT PHIDP_CAPS Capabilities
  813. )
  814. {
  815. SquirtSqflPtszV( sqfl | sqflBenign,
  816. TEXT("DIDummy_HidP_GetCaps( %08x, %08x )"),
  817. PreparsedData, Capabilities );
  818. return HIDP_STATUS_NOT_IMPLEMENTED;
  819. }
  820. NTSTATUS __stdcall DIDummy_HidP_GetButtonCaps
  821. (
  822. IN HIDP_REPORT_TYPE ReportType,
  823. OUT PHIDP_BUTTON_CAPS ButtonCaps,
  824. IN OUT PUSHORT ButtonCapsLength,
  825. IN PHIDP_PREPARSED_DATA PreparsedData
  826. )
  827. {
  828. SquirtSqflPtszV( sqfl | sqflBenign,
  829. TEXT("DIDummy_HidP_GetButtonCaps( %08x, %08x, %08x, %08x )"),
  830. ReportType, ButtonCaps, ButtonCapsLength, PreparsedData );
  831. return HIDP_STATUS_NOT_IMPLEMENTED;
  832. }
  833. NTSTATUS __stdcall DIDummy_HidP_GetValueCaps
  834. (
  835. IN HIDP_REPORT_TYPE ReportType,
  836. OUT PHIDP_VALUE_CAPS ValueCaps,
  837. IN OUT PUSHORT ValueCapsLength,
  838. IN PHIDP_PREPARSED_DATA PreparsedData
  839. )
  840. {
  841. SquirtSqflPtszV( sqfl | sqflBenign,
  842. TEXT("DIDummy_HidP_GetValueCaps( %08x, %08x, %08x, %08x )"),
  843. ReportType, ValueCaps, ValueCapsLength, PreparsedData );
  844. return HIDP_STATUS_NOT_IMPLEMENTED;
  845. }
  846. NTSTATUS __stdcall DIDummy_HidP_GetLinkCollectionNodes
  847. (
  848. OUT PHIDP_LINK_COLLECTION_NODE LinkCollectionNodes,
  849. IN OUT PULONG LinkCollectionNodesLength,
  850. IN PHIDP_PREPARSED_DATA PreparsedData
  851. )
  852. {
  853. SquirtSqflPtszV( sqfl | sqflBenign,
  854. TEXT("DIDummy_HidP_GetLinkCollectionNodes( %08x, %08x, %08x )"),
  855. LinkCollectionNodes, LinkCollectionNodesLength, PreparsedData );
  856. return HIDP_STATUS_NOT_IMPLEMENTED;
  857. }
  858. ULONG __stdcall DIDummy_HidP_MaxDataListLength
  859. (
  860. IN HIDP_REPORT_TYPE ReportType,
  861. IN PHIDP_PREPARSED_DATA PreparsedData
  862. )
  863. {
  864. SquirtSqflPtszV( sqfl | sqflBenign,
  865. TEXT("DIDummy_HidP_MaxDataListLength( %08x, %08x )"),
  866. ReportType, PreparsedData );
  867. return 0;
  868. }
  869. NTSTATUS __stdcall DIDummy_HidP_GetUsagesEx //unused
  870. (
  871. IN HIDP_REPORT_TYPE ReportType,
  872. IN USHORT LinkCollection,
  873. OUT PUSAGE_AND_PAGE ButtonList,
  874. IN OUT ULONG * UsageLength,
  875. IN PHIDP_PREPARSED_DATA PreparsedData,
  876. IN PCHAR Report,
  877. IN ULONG ReportLength
  878. )
  879. {
  880. SquirtSqflPtszV( sqfl | sqflBenign,
  881. TEXT("DIDummy_HidP_GetUsagesEx( %08x, %u, %08x, %08x, %08x, %08x, %u )"),
  882. ReportType, LinkCollection, ButtonList, UsageLength, PreparsedData, Report, ReportLength );
  883. return HIDP_STATUS_NOT_IMPLEMENTED;
  884. }
  885. NTSTATUS __stdcall DIDummy_HidP_GetScaledUsageValue //unused
  886. (
  887. IN HIDP_REPORT_TYPE ReportType,
  888. IN USAGE UsagePage,
  889. IN USHORT LinkCollection,
  890. IN USAGE Usage,
  891. OUT PLONG UsageValue,
  892. IN PHIDP_PREPARSED_DATA PreparsedData,
  893. IN PCHAR Report,
  894. IN ULONG ReportLength
  895. )
  896. {
  897. SquirtSqflPtszV( sqfl | sqflBenign,
  898. TEXT("DIDummy_HidP_GetScaledUsageValue( %08x, %u, %u, %u, %08x, %08x, %08x, %u )"),
  899. ReportType, UsagePage, LinkCollection, Usage, UsageValue, PreparsedData, Report, ReportLength );
  900. return HIDP_STATUS_NOT_IMPLEMENTED;
  901. }
  902. NTSTATUS __stdcall DIDummy_HidP_GetData
  903. (
  904. IN HIDP_REPORT_TYPE ReportType,
  905. OUT PHIDP_DATA DataList,
  906. IN OUT PULONG DataLength,
  907. IN PHIDP_PREPARSED_DATA PreparsedData,
  908. IN PCHAR Report,
  909. IN ULONG ReportLength
  910. )
  911. {
  912. SquirtSqflPtszV( sqfl | sqflBenign,
  913. TEXT("DIDummy_HidP_GetData( %08x, %08x, $08x, %08x, %08x, %u )"),
  914. ReportType, DataList, DataLength, PreparsedData, Report, ReportLength );
  915. return HIDP_STATUS_NOT_IMPLEMENTED;
  916. }
  917. NTSTATUS __stdcall DIDummy_HidP_SetData
  918. (
  919. IN HIDP_REPORT_TYPE ReportType,
  920. IN PHIDP_DATA DataList,
  921. IN OUT PULONG DataLength,
  922. IN PHIDP_PREPARSED_DATA PreparsedData,
  923. IN OUT PCHAR Report,
  924. IN ULONG ReportLength
  925. )
  926. {
  927. SquirtSqflPtszV( sqfl | sqflBenign,
  928. TEXT("DIDummy_HidP_SetData( %08x, %08x, $08x, %08x, %08x, %u )"),
  929. ReportType, DataList, DataLength, PreparsedData, Report, ReportLength );
  930. return HIDP_STATUS_NOT_IMPLEMENTED;
  931. }
  932. NTSTATUS __stdcall DIDummy_HidP_GetUsageValue
  933. (
  934. IN HIDP_REPORT_TYPE ReportType,
  935. IN USAGE UsagePage,
  936. IN USHORT LinkCollection,
  937. IN USAGE Usage,
  938. OUT PULONG UsageValue,
  939. IN PHIDP_PREPARSED_DATA PreparsedData,
  940. IN PCHAR Report,
  941. IN ULONG ReportLength
  942. )
  943. {
  944. SquirtSqflPtszV( sqfl | sqflBenign,
  945. TEXT("DIDummy_HidP_GetUsageValue( %08x, %u, %u, %u, %08x, %08x, %08x, %u )"),
  946. ReportType, UsagePage, LinkCollection, Usage, UsageValue, PreparsedData, Report, ReportLength );
  947. return HIDP_STATUS_NOT_IMPLEMENTED;
  948. }
  949. ULONG __stdcall DIDummy_HidP_MaxUsageListLength
  950. (
  951. IN HIDP_REPORT_TYPE ReportType,
  952. IN USAGE UsagePage,
  953. IN PHIDP_PREPARSED_DATA PreparsedData
  954. )
  955. {
  956. SquirtSqflPtszV( sqfl | sqflBenign,
  957. TEXT("DIDummy_HidP_MaxUsageListLength( %08x, %u, %08x )"),
  958. ReportType, UsagePage, PreparsedData );
  959. return 0;
  960. }
  961. NTSTATUS __stdcall DIDummy_HidP_GetSpecificButtonCaps
  962. (
  963. IN HIDP_REPORT_TYPE ReportType,
  964. IN USAGE UsagePage,
  965. IN USHORT LinkCollection,
  966. IN USAGE Usage,
  967. OUT PHIDP_BUTTON_CAPS ButtonCaps,
  968. IN OUT PUSHORT ButtonCapsLength,
  969. IN PHIDP_PREPARSED_DATA PreparsedData
  970. )
  971. {
  972. SquirtSqflPtszV( sqfl | sqflBenign,
  973. TEXT("DIDummy_HidP_GetSpecificButtonCaps( %08x, %u, %u, %u, %08x, %08x, %08x )"),
  974. ReportType, UsagePage, LinkCollection, Usage, ButtonCaps, ButtonCapsLength, PreparsedData );
  975. return HIDP_STATUS_NOT_IMPLEMENTED;
  976. }
  977. NTSTATUS __stdcall DIDummy_HidP_TranslateUsagesToI8042ScanCodes
  978. (
  979. IN PUSAGE ChangedUsageList, // Those usages that changed
  980. IN ULONG UsageListLength,
  981. IN HIDP_KEYBOARD_DIRECTION KeyAction,
  982. IN OUT PHIDP_KEYBOARD_MODIFIER_STATE ModifierState,
  983. IN PHIDP_INSERT_SCANCODES InsertCodesProcedure,
  984. IN PVOID InsertCodesContext
  985. )
  986. {
  987. SquirtSqflPtszV( sqfl | sqflBenign,
  988. TEXT("DIDummy_HidP_TranslateUsagesToI8042ScanCodes( %08x, %u, %08x, %08x, %08x, %08x )"),
  989. ChangedUsageList, UsageListLength, KeyAction, ModifierState, InsertCodesProcedure, InsertCodesContext );
  990. return HIDP_STATUS_NOT_IMPLEMENTED;
  991. }
  992. ////////////////////////////////////////
  993. // winmm.dll dummy functions
  994. ////////////////////////////////////////
  995. MMRESULT WINAPI DIDummy_joyGetDevCaps
  996. (
  997. IN UINT uJoyID,
  998. OUT LPJOYCAPS pjc,
  999. IN UINT cbjc
  1000. )
  1001. {
  1002. SquirtSqflPtszV( sqfl | sqflBenign,
  1003. TEXT("DIDummy_joyGetDevCaps( %u, %08x, %u )"),
  1004. uJoyID, pjc, cbjc );
  1005. return MMSYSERR_ERROR;
  1006. }
  1007. MMRESULT WINAPI DIDummy_joyGetPosEx
  1008. (
  1009. IN UINT uJoyID,
  1010. OUT LPJOYINFOEX pji
  1011. )
  1012. {
  1013. SquirtSqflPtszV( sqfl | sqflBenign,
  1014. TEXT("DIDummy_joyGetPosEx( %u, %08x )"),
  1015. uJoyID, pji );
  1016. return MMSYSERR_ERROR;
  1017. }
  1018. MMRESULT WINAPI DIDummy_joyGetPos
  1019. (
  1020. IN UINT uJoyID,
  1021. OUT LPJOYINFO pji
  1022. )
  1023. {
  1024. SquirtSqflPtszV( sqfl | sqflBenign,
  1025. TEXT("DIDummy_joyGetPos( %u, %08x )"),
  1026. uJoyID, pji );
  1027. return MMSYSERR_ERROR;
  1028. }
  1029. UINT WINAPI DIDummy_joyConfigChanged
  1030. (
  1031. IN DWORD dwFlags
  1032. )
  1033. {
  1034. SquirtSqflPtszV( sqfl | sqflBenign,
  1035. TEXT("DIDummy_joyConfigChanged( %u )"),
  1036. dwFlags );
  1037. return MMSYSERR_ERROR;
  1038. }
  1039. MMRESULT WINAPI DIDummy_mmioClose
  1040. (
  1041. IN HMMIO hmmio,
  1042. IN UINT fuClose
  1043. )
  1044. {
  1045. SquirtSqflPtszV( sqfl | sqflBenign,
  1046. TEXT("DIDummy_mmioClose( %08x, %u )"),
  1047. hmmio, fuClose );
  1048. return MMSYSERR_ERROR;
  1049. }
  1050. HMMIO WINAPI DIDummy_mmioOpenA
  1051. (
  1052. IN OUT LPSTR pszFileName,
  1053. IN OUT LPMMIOINFO pmmioinfo,
  1054. IN DWORD fdwOpen
  1055. )
  1056. {
  1057. SquirtSqflPtszV( sqfl | sqflBenign,
  1058. TEXT("DIDummy_mmioOpenA( %s, %08x, %u )"),
  1059. pszFileName, pmmioinfo, fdwOpen );
  1060. return NULL;
  1061. }
  1062. MMRESULT WINAPI DIDummy_mmioDescend
  1063. (
  1064. IN HMMIO hmmio,
  1065. IN OUT LPMMCKINFO pmmcki,
  1066. IN const MMCKINFO FAR* pmmckiParent,
  1067. IN UINT fuDescend
  1068. )
  1069. {
  1070. SquirtSqflPtszV( sqfl | sqflBenign,
  1071. TEXT("DIDummy_mmioDescend( %08x, %08x, %08x, %u )"),
  1072. hmmio, pmmcki, pmmckiParent, fuDescend );
  1073. return MMSYSERR_ERROR;
  1074. }
  1075. MMRESULT WINAPI DIDummy_mmioCreateChunk
  1076. (
  1077. IN HMMIO hmmio,
  1078. IN LPMMCKINFO pmmcki,
  1079. IN UINT fuCreate
  1080. )
  1081. {
  1082. SquirtSqflPtszV( sqfl | sqflBenign,
  1083. TEXT("DIDummy_mmioCreateChunk( %08x, %08x, %u )"),
  1084. hmmio, pmmcki, fuCreate );
  1085. return MMSYSERR_ERROR;
  1086. }
  1087. LONG WINAPI DIDummy_mmioRead
  1088. (
  1089. IN HMMIO hmmio,
  1090. OUT HPSTR pch,
  1091. IN LONG cch
  1092. )
  1093. {
  1094. SquirtSqflPtszV( sqfl | sqflBenign,
  1095. TEXT("DIDummy_mmioRead( %08x, %08x, %u )"),
  1096. hmmio, pch, cch );
  1097. return 0;
  1098. }
  1099. LONG WINAPI DIDummy_mmioWrite
  1100. (
  1101. IN HMMIO hmmio,
  1102. IN const char _huge* pch,
  1103. IN LONG cch
  1104. )
  1105. {
  1106. SquirtSqflPtszV( sqfl | sqflBenign,
  1107. TEXT("DIDummy_mmioWrite( %08x, %08x, %u )"),
  1108. hmmio, pch, cch );
  1109. return 0;
  1110. }
  1111. MMRESULT WINAPI DIDummy_mmioAscend
  1112. (
  1113. IN HMMIO hmmio,
  1114. IN LPMMCKINFO pmmcki,
  1115. IN UINT fuAscend
  1116. )
  1117. {
  1118. SquirtSqflPtszV( sqfl | sqflBenign,
  1119. TEXT("DIDummy_mmioAscend( %08x, %08x, %u )"),
  1120. hmmio, pmmcki, fuAscend );
  1121. return MMSYSERR_ERROR;
  1122. }
  1123. ////////////////////////////////////////
  1124. // user32.dll dummy functions
  1125. ////////////////////////////////////////
  1126. #ifdef USE_WM_INPUT
  1127. BOOL WINAPI DIDummy_RegisterRawInputDevices
  1128. (
  1129. PCRAWINPUTDEVICE pRawInputDevices,
  1130. UINT uiNumDevices,
  1131. UINT cbSize
  1132. )
  1133. {
  1134. SquirtSqflPtszV( sqfl | sqflBenign,
  1135. TEXT("DIDummy_RegisterRawInputDevices( %08x, %u, %u )"),
  1136. pRawInputDevices, uiNumDevices, cbSize );
  1137. return FALSE;
  1138. }
  1139. UINT WINAPI DIDummy_GetRawInputData
  1140. (
  1141. HRAWINPUT hRawInput,
  1142. UINT uiCommand,
  1143. LPVOID pData,
  1144. PUINT pcbSize,
  1145. UINT cbSizeHeader
  1146. )
  1147. {
  1148. SquirtSqflPtszV( sqfl | sqflBenign,
  1149. TEXT("DIDummy_GetRawInputData( %08x, %u, %08x, %08x, %u )"),
  1150. hRawInput, uiCommand, pData, pcbSize, cbSizeHeader );
  1151. return -1;
  1152. }
  1153. #endif //#ifdef USE_WM_INPUT
  1154. #endif /* STATIC_DLLUSAGE */