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.

417 lines
9.7 KiB

  1. __foldwin32sstuff __foldwin32sstuff;
  2. foldstyleinitialization = true;
  3. /*
  4. * USER Win32 thunks
  5. */
  6. /*
  7. * Open issues:
  8. *
  9. * ANSI/Unicode translation
  10. * resource template conversion
  11. * htask definition?
  12. * COLOR_SHADOW
  13. * input model ramifications?
  14. * VOID->BOOL return code conversion (always returns TRUE)
  15. */
  16. enablemapdirect3216 = true;
  17. flatthunks = false; /* BUGBUG [KevinR] 01-Sep-1993 */
  18. #include "types.thk"
  19. #include "usrtypes.thk"
  20. WORD GetClassInfoEx(HANDLE hInst, LPSTR lpszClassName, LPSTR lpWndClassEx) =
  21. DWORD GetClassInfoExA(HANDLE hInst, LPSTR lpszClassName, LPSTR lpWndClassEx)
  22. {
  23. body = special;
  24. faulterrorcode = 4096 + 0;
  25. }
  26. DWORD GetSetClassData(HWND, INT, DWORD, UINT) =
  27. DWORD GetSetClassData(HWND, INT, DWORD, UINT)
  28. {
  29. /*
  30. * LATER: GCL_MENUNAME -- how to map?
  31. * for now, pass it through. ok for atoms (MAKEINTRESOURCE).
  32. */
  33. body = special;
  34. faulterrorcode = 4096 + 0;
  35. }
  36. DWORD GetSetWindowData(HWND, INT, DWORD, UINT) =
  37. DWORD GetSetWindowData(HWND, INT, DWORD, UINT)
  38. {
  39. body=special;
  40. faulterrorcode = 4096 + 0;
  41. }
  42. // This is now handled as a hand-coded flatthunk.
  43. //
  44. ///*
  45. // * createw.c "CreateWindow and related APIs and support routines."
  46. // */
  47. //
  48. //HWND CreateWindowEx32(DWORD, LPSTR, LPSTR, DWORD, UINT, UINT, UINT,
  49. // UINT, HWND, HMENU, HANDLE, DWORD, WORD wIDHi) =
  50. //
  51. //localheap HWND CreateWindowExA(DWORD, LPSTR, LPSTR, DWORD, UINT, UINT, UINT,
  52. // UINT, HWND, HMENU, HANDLE, DWORD, WORD wIDHi deleted)
  53. //{
  54. // body = special;
  55. //}
  56. /*
  57. * Switch table based on uAction.
  58. */
  59. BOOL SystemParametersInfo32(UINT uAction, UINT, DWORD, UINT) =
  60. BOOL SystemParametersInfoA(UINT uAction, UINT, DWORD, UINT)
  61. {
  62. body=special;
  63. faulterrorcode = 4096+0;
  64. }
  65. HWND CreateDialogIndirectParam( HANDLE hInstance, LPSTR lpDialogTemplate,
  66. HWND hWndParent, FARPROC lpDialogFunc, DWORD dwInitParam) =
  67. localheap HWND CreateDialogIndirectParamA( HANDLE hInstance, LPSTR lpDialogTemplate,
  68. HWND hWndParent, FARPROC lpDialogFunc, DWORD dwInitParam)
  69. {
  70. /*
  71. * !!! resource conversion
  72. */
  73. body=special;
  74. }
  75. /* Like DialogBoxIndirectParam but takes a linear address of the dialog
  76. * template rather than a handle. The real entry point is in user.c
  77. */
  78. INT DialogBoxIndirectParam( HANDLE hInstance, LPSTR hDialogTemplate,
  79. HWND hWndParent, FARPROC lpDialogFunc, DWORD dwInitParam) =
  80. localheap INT DialogBoxIndirectParamA( HANDLE hInstance, LPSTR hDialogTemplate,
  81. HWND hWndParent, FARPROC lpDialogFunc, DWORD dwInitParam)
  82. {
  83. /*
  84. * !!! resource conversion
  85. */
  86. body=special;
  87. }
  88. HANDLE SetClipboardData32(UINT, HANDLE) =
  89. HANDLE SetClipboardData(UINT, HANDLE)
  90. {
  91. body=special;
  92. faulterrorcode = 4096+0;
  93. }
  94. HANDLE GetClipboardData32(UINT) =
  95. HANDLE GetClipboardData(UINT)
  96. {
  97. body=special;
  98. faulterrorcode = 4096+0;
  99. }
  100. HMENU LoadMenuIndirect(LPSTR) =
  101. HMENU LoadMenuIndirectA(LPSTR)
  102. {
  103. body=special;
  104. faulterrorcode = 4096+0;
  105. }
  106. /*
  107. * mnchange.c
  108. *
  109. * BOOL FAR PASCAL ChangeMenu( hMenu, cmdInsert, lpNewItem, cmd, flags)
  110. *
  111. * HMENU hMenu;
  112. * WORD cmdInsert;
  113. * LPSTR lpNewItem;
  114. * WORD cmd;
  115. * WORD flags;
  116. * /* effects: Stub routine for compatability with the old menu code.
  117. * */
  118. * {
  119. * if ( !hMenu)
  120. * return( FALSE);
  121. *
  122. * /* These next two statements take care of sleazyness needed for
  123. * * compatability with old changemenu.
  124. * */
  125. * if ( ( flags & MF_SEPARATOR) && cmdInsert==0 && !( flags & MF_CHANGE))
  126. * {
  127. * flags |= MF_APPEND;
  128. * }
  129. *
  130. * if ( !lpNewItem)
  131. * flags |= MF_SEPARATOR;
  132. *
  133. * if ( flags & MF_REMOVE)
  134. * /* MUST be MF_BYPOSITION for Win2.x compatability.
  135. * */
  136. * return( RemoveMenu( hMenu, cmdInsert,
  137. * ( flags & ~MF_REMOVE) | MF_BYPOSITION));
  138. *
  139. * if ( flags & MF_DELETE)
  140. * return( DeleteMenu( hMenu, cmdInsert, flags & ~MF_DELETE));
  141. *
  142. * if ( flags & MF_CHANGE)
  143. * return( ModifyMenu( hMenu, cmdInsert,
  144. * ( flags & ~MF_CHANGE) &
  145. * ( 0x07F | MF_HELP | MF_BYPOSITION | MF_BYCOMMAND | MF_SEPARATOR),
  146. * cmd, lpNewItem));
  147. *
  148. * if ( flags & MF_APPEND)
  149. * return( AppendMenu( hMenu, flags & ~MF_APPEND, cmd, lpNewItem));
  150. *
  151. * /* Default is insert */
  152. * return( InsertMenu( hMenu, cmdInsert, flags & ~MF_INSERT, cmd, lpNewItem));
  153. * }
  154. *
  155. */
  156. BOOL ChangeMenu( HMENU hMenu, UINT cmdInsert, LPSTR lpNewItem,
  157. UINT cmd, UINT flags) =
  158. BOOL ChangeMenuA( HMENU hMenu, UINT cmdInsert, LPSTR lpNewItem,
  159. UINT cmd, UINT flags)
  160. {
  161. lpNewItem = raw pack unpack;
  162. lpNewItemSeg = local 4;
  163. faulterrorcode = 4096+0;
  164. }
  165. BOOL GetMenuItemInfo32(HMENU, UINT, BOOL, LPMENUITEMINFO lpMenuItemInfo) =
  166. BOOL GetMenuItemInfoA(HMENU, UINT, BOOL, LPMENUITEMINFO lpMenuItemInfo)
  167. {
  168. body = special;
  169. faulterrorcode = 4096+0;
  170. }
  171. BOOL SetMenuItemInfo32(HMENU, UINT, BOOL, LPMENUITEMINFO lpMenuItemInfo) =
  172. BOOL SetMenuItemInfoA(HMENU, UINT, BOOL, LPMENUITEMINFO lpMenuItemInfo)
  173. {
  174. body = special;
  175. faulterrorcode = 4096+0;
  176. }
  177. BOOL InsertMenuItem32(HMENU, UINT, BOOL, LPMENUITEMINFO lpMenuItemInfo) =
  178. BOOL InsertMenuItemA(HMENU, UINT, BOOL, LPMENUITEMINFO lpMenuItemInfo)
  179. {
  180. body = special;
  181. faulterrorcode = 4096+0;
  182. }
  183. BOOL InsertMenu( HMENU hMenu, WORD nPosition, WORD wFlags, WORD wIDNewItem,
  184. LPSTR lpNewItem) =
  185. BOOL InsertMenuA( HMENU hMenu, UINT nPosition, UINT wFlags, UINT wIDNewItem,
  186. LPSTR lpNewItem)
  187. {
  188. lpNewItem = raw pack unpack;
  189. lpNewItemSeg = local 4;
  190. faulterrorcode = 4096+0;
  191. }
  192. BOOL ModifyMenu( HMENU hMenu, WORD nPosition, WORD wFlags, WORD wIDNewItem,
  193. LPSTR lpNewItem) =
  194. BOOL ModifyMenuA( HMENU hMenu, UINT nPosition, UINT wFlags, UINT wIDNewItem,
  195. LPSTR lpNewItem)
  196. {
  197. lpNewItem = raw pack unpack;
  198. lpNewItemSeg = local 4;
  199. faulterrorcode = 4096+0;
  200. }
  201. HHOOK SetWindowsHookEx32(int nType, DWORD pfn, DWORD hmod, DWORD hThread) =
  202. HHOOK SetWindowsHookExA(int nType, DWORD pfn, DWORD hmod, DWORD hThread)
  203. {
  204. body=special;
  205. faulterrorcode = 4096+0;
  206. }
  207. BOOL UnhookWindowsHook(int nType, DWORD pfn) =
  208. BOOL UnhookWindowsHook(int nType, DWORD pfn)
  209. {
  210. body=special;
  211. faulterrorcode = 4096+0;
  212. }
  213. BOOL WinHelp( HWND hWnd, LPSTR lpHelpFile, WORD wCommand, DWORD dwData) =
  214. BOOL WinHelpA( HWND hWnd, LPSTR lpHelpFile, DWORD wCommand, DWORD dwData)
  215. {
  216. /*
  217. * if wCommand == HELP_KEY or HELP_MULTIKEY
  218. * dwData is a pointer, so convert
  219. *
  220. * !!! MULTIKEYHELP structure not thunked yet
  221. */
  222. body = special;
  223. faulterrorcode = 4096+0;
  224. }
  225. HCONVLIST DdeConnectList(DWORD idInst, HSZ hszService, HSZ hszTopic,
  226. HCONVLIST hConvList, PCONVCONTEXT16 pCC) =
  227. HCONVLIST DdeConnectList(DWORD idInst, HSZ hszService, HSZ hszTopic,
  228. HCONVLIST hConvList, PCONVCONTEXT32 pCC)
  229. {
  230. pCC = push;
  231. faulterrorcode = 4096+0;
  232. }
  233. HCONV DdeConnect(DWORD idInst, HSZ hszService, HSZ hszTopic,
  234. PCONVCONTEXT16 pCC) =
  235. HCONV DdeConnect(DWORD idInst, HSZ hszService, HSZ hszTopic,
  236. PCONVCONTEXT32 pCC)
  237. {
  238. pCC = push;
  239. faulterrorcode = 4096+0;
  240. }
  241. UINT DdeQueryConvInfo(HCONV hConv, DWORD idTransaction, PCONVINFO16 pConvInfo) =
  242. UINT DdeQueryConvInfo(HCONV hConv, DWORD idTransaction, PCONVINFO32 pConvInfo)
  243. {
  244. body = special;
  245. faulterrorcode = 4096+0;
  246. }
  247. HDDEDATA DdeClientTransaction(LPBYTE pData, DWORD cbData, HCONV hConv,
  248. HSZ hszItem, UINT wFmt, UINT wType, DWORD dwTimeout,
  249. LPDWORD pdwResult) =
  250. HDDEDATA DdeClientTransaction(LPBYTE pData, DWORD cbData, HCONV hConv,
  251. HSZ hszItem, UINT wFmt, UINT wType, DWORD dwTimeout,
  252. LPDWORD pdwResult)
  253. {
  254. body = special;
  255. faulterrorcode = 4096+0;
  256. }
  257. //LPBYTE DdeAccessData(HDDEDATA hData, LPDWORD pcbDataSize) =
  258. //LPBYTE DdeAccessData(HDDEDATA hData, LPDWORD pcbDataSize)
  259. //{
  260. // hData = push;
  261. //}
  262. //BOOL DdeUnaccessData(HDDEDATA hData) =
  263. //BOOL DdeUnaccessData(HDDEDATA hData)
  264. //{
  265. // hData = push;
  266. //}
  267. DWORD PackDDElParam( WORD msg, WORD lParamLo, WORD lParamHi) =
  268. DWORD PackDDElParam(DWORD msg, DWORD lParamLo, DWORD lParamHi)
  269. {
  270. body=special;
  271. faulterrorcode = 4096+0;
  272. }
  273. DWORD UnpackDDElParam( WORD msg, DWORD lParam, DWORD pHi, DWORD pLo) =
  274. DWORD UnpackDDElParam(DWORD msg, DWORD lParam, DWORD pHi, DWORD pLo)
  275. {
  276. body=special;
  277. faulterrorcode = 4096+0;
  278. }
  279. BOOL FreeDDElParam( WORD msg, DWORD lParam) =
  280. BOOL FreeDDElParam(DWORD msg, DWORD lParam)
  281. {
  282. body=special;
  283. faulterrorcode = 4096+0;
  284. }
  285. HACCEL CreateAcceleratorTable(LPACCEL16 lpAccel, INT cEntries) =
  286. HACCEL CreateAcceleratorTable(LPACCEL32 lpAccel, INT cEntries)
  287. {
  288. cEntries = countof lpAccel;
  289. faulterrorcode = 4096+0;
  290. }
  291. INT CopyAcceleratorTable(HACCEL hacclOriginal, LPACCEL16 lpaccelCopy, INT cAccel) =
  292. INT CopyAcceleratorTable(HACCEL hacclOriginal, LPACCEL32 lpaccelCopy, INT cAccel)
  293. {
  294. lpaccelCopy = output;
  295. cAccel = countof lpaccelCopy;
  296. faulterrorcode = 4096+0;
  297. }
  298. BOOL mouse_event(DWORD dwFlags, DWORD dx, DWORD dy, DWORD cButtons, DWORD dwExtraInfo) =
  299. BOOL mouse_event(DWORD dwFlags, DWORD dx, DWORD dy, DWORD cButtons, DWORD dwExtraInfo)
  300. {
  301. body=special;
  302. }
  303. BOOL keybd_event(BYTE bVirtualKey, BYTE bScanCode, DWORD dwFlags, DWORD dwExtraInfo) =
  304. BOOL keybd_event(BYTE bVirtualKey, BYTE bScanCode, DWORD dwFlags, DWORD dwExtraInfo)
  305. {
  306. body=special;
  307. }
  308. BOOL CleanUpDesktopRectangles(LPVOID arc,
  309. UINT count,
  310. UINT iPrimary,
  311. UINT flags)=
  312. BOOL AlignRects(LPVOID arc,
  313. DWORD count,
  314. DWORD iPrimary,
  315. DWORD flags)
  316. {
  317. body=special;
  318. faulterrorcode = 4096 + 0;
  319. }
  320. BOOL FlashWindowEx( LPFLASHWINFO) =
  321. BOOL FlashWindowEx( LPFLASHWINFO)
  322. {
  323. body=special;
  324. faulterrorcode = 0;
  325. }