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.

1326 lines
36 KiB

  1. //
  2. // mstub.cpp
  3. //
  4. #include "private.h"
  5. #include "mstub.h"
  6. #include "mproxy.h"
  7. #include "ithdmshl.h"
  8. #include "transmit.h"
  9. //////////////////////////////////////////////////////////////////////////////
  10. //
  11. // StubCreator
  12. //
  13. //////////////////////////////////////////////////////////////////////////////
  14. #define CREATENEWSTUB(interface_name) \
  15. if (IsEqualIID(riid, IID_ ## interface_name ## )) \
  16. { \
  17. CStub *pStub = new CStub ## interface_name ## ; \
  18. if (!pStub) \
  19. return NULL; \
  20. pStub->_iid = riid; \
  21. pStub->_ulStubId = ulStubId; \
  22. pStub->_dwStubTime = dwStubTime; \
  23. pStub->_dwStubThreadId = dwCurThreadId; \
  24. pStub->_dwStubProcessId = dwCurProcessId; \
  25. pStub->_dwSrcThreadId = dwSrcThreadId; \
  26. pStub->_punk = punk; \
  27. pStub->_punk->AddRef(); \
  28. return pStub; \
  29. }
  30. CStub *StubCreator(REFIID riid, IUnknown *punk, ULONG ulStubId, DWORD dwStubTime, DWORD dwCurThreadId, DWORD dwCurProcessId, DWORD dwSrcThreadId)
  31. {
  32. Assert(dwCurThreadId != dwSrcThreadId);
  33. CREATENEWSTUB(ITfLangBarMgr);
  34. CREATENEWSTUB(ITfLangBarItemMgr);
  35. CREATENEWSTUB(ITfLangBarItemSink);
  36. CREATENEWSTUB(IEnumTfLangBarItems);
  37. CREATENEWSTUB(ITfLangBarItem);
  38. CREATENEWSTUB(ITfLangBarItemButton);
  39. CREATENEWSTUB(ITfLangBarItemBitmapButton);
  40. CREATENEWSTUB(ITfLangBarItemBitmap);
  41. CREATENEWSTUB(ITfLangBarItemBalloon);
  42. CREATENEWSTUB(ITfMenu);
  43. CREATENEWSTUB(ITfInputProcessorProfiles);
  44. return NULL;
  45. }
  46. void StubPointerToParam(MARSHALPARAM *pParam, void *pv)
  47. {
  48. Assert(pParam->dwFlags & MPARAM_OUT);
  49. Assert(pParam->cbBufSize >= sizeof(void *));
  50. void **ppv = (void **)ParamToBufferPointer(pParam);
  51. *ppv = pv;
  52. }
  53. void StubParamPointerToParam(MARSHALPARAM *pParam, void *pv)
  54. {
  55. Assert(pParam->dwFlags & MPARAM_OUT);
  56. Assert(pParam->cbBufSize >= sizeof(void *));
  57. void *pBuf = ParamToBufferPointer(pParam);
  58. memcpy(pBuf, pv, pParam->cbBufSize);
  59. }
  60. void *ParamToMarshaledPointer(MARSHALMSG *pMsg, REFIID riid, ULONG ulParam, BOOL *pfNULLStack = NULL)
  61. {
  62. MARSHALINTERFACEPARAM *pmiparam = (MARSHALINTERFACEPARAM *)ParamToBufferPointer(pMsg, ulParam);
  63. void *pv = NULL;
  64. Assert(pfNULLStack || !pmiparam->fNULLStack);
  65. if (pfNULLStack)
  66. *pfNULLStack = pmiparam->fNULLStack;
  67. if (pmiparam->fNULLPointer)
  68. return NULL;
  69. CicCoUnmarshalInterface(riid, pMsg->dwSrcThreadId, pmiparam->ulStubId, pmiparam->dwStubTime, &pv);
  70. return pv;
  71. }
  72. BOOL ParamToArrayMarshaledPointer(ULONG ulCount, void **ppv, MARSHALMSG *pMsg, REFIID riid, ULONG ulParam, BOOL *pfNULLStack = NULL)
  73. {
  74. MARSHALINTERFACEPARAM *pmiparam = (MARSHALINTERFACEPARAM *)ParamToBufferPointer(pMsg, ulParam);
  75. Assert(pfNULLStack || !pmiparam->fNULLStack);
  76. if (pfNULLStack)
  77. *pfNULLStack = pmiparam->fNULLStack;
  78. if (pmiparam->fNULLPointer)
  79. return FALSE;
  80. ULONG ul;
  81. for (ul = 0; ul < ulCount; ul++)
  82. {
  83. CicCoUnmarshalInterface(riid, pMsg->dwSrcThreadId, pmiparam->ulStubId, pmiparam->dwStubTime, ppv);
  84. ppv++;
  85. pmiparam++;
  86. }
  87. return TRUE;
  88. }
  89. void ClearMarshaledPointer(IUnknown *punk)
  90. {
  91. if (!punk)
  92. return;
  93. CProxyIUnknown *pProxy = GetCProxyIUnknown(punk);
  94. if (!pProxy)
  95. return;
  96. if (pProxy->InternalRelease())
  97. pProxy->InternalRelease();
  98. else
  99. Assert(0);
  100. }
  101. HBITMAP ParamToHBITMAP(MARSHALMSG *pMsg , ULONG ulParam)
  102. {
  103. MARSHALPARAM *pParam = GetMarshalParam(pMsg, ulParam);
  104. HBITMAP hbmp = NULL;
  105. if (pParam->cbBufSize)
  106. {
  107. BYTE *pBuf = (BYTE *)ParamToBufferPointer(pParam);
  108. Cic_HBITMAP_UserUnmarshal(pBuf, &hbmp);
  109. }
  110. return hbmp;
  111. }
  112. #define PREPARE_PARAM_START() \
  113. if (!psb->GetMutex()->Enter()) \
  114. return E_FAIL; \
  115. _try \
  116. {
  117. #define PREPARE_PARAM_END() \
  118. } \
  119. _except(1) \
  120. { \
  121. Assert(0); \
  122. psb->GetMutex()->Leave(); \
  123. return E_FAIL; \
  124. } \
  125. psb->GetMutex()->Leave();
  126. //////////////////////////////////////////////////////////////////////////////
  127. //
  128. // CStubIUnknown
  129. //
  130. //////////////////////////////////////////////////////////////////////////////
  131. MSTUBCALL CStubIUnknown::_StubTbl[] =
  132. {
  133. stub_QueryInterface,
  134. stub_AddRef,
  135. stub_Release
  136. };
  137. HRESULT CStubIUnknown::stub_QueryInterface(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  138. {
  139. IID iid;
  140. void *pv;
  141. Assert(pMsg->ulParamNum == 2);
  142. PREPARE_PARAM_START()
  143. iid = *(IID *)ParamToBufferPointer(pMsg, 0);
  144. PREPARE_PARAM_END()
  145. HRESULT hrRet = _this->_punk->QueryInterface(iid, &pv);
  146. if (SUCCEEDED(hrRet))
  147. {
  148. _this->_AddRef();
  149. }
  150. else
  151. {
  152. pv = NULL;
  153. }
  154. CSTUB_PARAM_START()
  155. CSTUB_PARAM_POINTER_IN(&iid)
  156. CSTUB_PARAM_INTERFACE_OUT(&pv, iid)
  157. CSTUB_PARAM_END()
  158. CSTUB_PARAM_CALL(pMsg, hrRet, psb);
  159. CSTUB_PARAM_INTERFACE_OUT_RELEASE(pv)
  160. CSTUB_PARAM_RETURN()
  161. }
  162. HRESULT CStubIUnknown::stub_AddRef(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  163. {
  164. Assert(pMsg->ulParamNum == 0);
  165. pMsg->ulRet = _this->_punk->AddRef();
  166. _this->_AddRef();
  167. return S_OK;
  168. }
  169. HRESULT CStubIUnknown::stub_Release(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  170. {
  171. Assert(pMsg->ulParamNum == 0);
  172. pMsg->ulRet = _this->_punk->Release();
  173. if (!pMsg->ulRet)
  174. _this->_punk = NULL;
  175. _this->_Release();
  176. return S_OK;
  177. }
  178. //////////////////////////////////////////////////////////////////////////////
  179. //
  180. // CStubITfLangBarMgr
  181. //
  182. //////////////////////////////////////////////////////////////////////////////
  183. MSTUBCALL CStubITfLangBarMgr::_StubTbl[] =
  184. {
  185. stub_QueryInterface,
  186. stub_AddRef,
  187. stub_Release,
  188. stub_AdviseEventSink,
  189. stub_UnadviseEventSink,
  190. stub_GetThreadMarshalInterface,
  191. stub_GetThreadLangBarItemMgr,
  192. stub_GetInputProcessorProfiles,
  193. stub_RestoreLastFocus,
  194. stub_SetModalInput,
  195. stub_ShowFloating,
  196. stub_GetShowFloatingStatus,
  197. };
  198. HRESULT CStubITfLangBarMgr::stub_AdviseEventSink(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  199. {
  200. CSTUB_NOT_IMPL()
  201. }
  202. HRESULT CStubITfLangBarMgr::stub_UnadviseEventSink(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  203. {
  204. CSTUB_NOT_IMPL()
  205. }
  206. HRESULT CStubITfLangBarMgr::stub_GetThreadMarshalInterface(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  207. {
  208. CSTUB_NOT_IMPL()
  209. }
  210. HRESULT CStubITfLangBarMgr::stub_GetThreadLangBarItemMgr(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  211. {
  212. CSTUB_NOT_IMPL()
  213. }
  214. HRESULT CStubITfLangBarMgr::stub_GetInputProcessorProfiles(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  215. {
  216. CSTUB_NOT_IMPL()
  217. }
  218. HRESULT CStubITfLangBarMgr::stub_RestoreLastFocus(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  219. {
  220. CSTUB_NOT_IMPL()
  221. }
  222. HRESULT CStubITfLangBarMgr::stub_SetModalInput(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  223. {
  224. CSTUB_NOT_IMPL()
  225. }
  226. HRESULT CStubITfLangBarMgr::stub_ShowFloating(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  227. {
  228. CSTUB_NOT_IMPL()
  229. }
  230. HRESULT CStubITfLangBarMgr::stub_GetShowFloatingStatus(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  231. {
  232. CSTUB_NOT_IMPL()
  233. }
  234. //////////////////////////////////////////////////////////////////////////////
  235. //
  236. // CStubITfLangBarItemMgr
  237. //
  238. //////////////////////////////////////////////////////////////////////////////
  239. MSTUBCALL CStubITfLangBarItemMgr::_StubTbl[] =
  240. {
  241. stub_QueryInterface,
  242. stub_AddRef,
  243. stub_Release,
  244. stub_EnumItems,
  245. stub_GetItem,
  246. stub_AddItem,
  247. stub_RemoveItem,
  248. stub_AdviseItemSink,
  249. stub_UnadviseItemSink,
  250. stub_GetItemFloatingRect,
  251. stub_GetItemsStatus,
  252. stub_GetItemNum,
  253. stub_GetItems,
  254. stub_AdviseItemsSink,
  255. stub_UnadviseItemsSink,
  256. };
  257. HRESULT CStubITfLangBarItemMgr::stub_EnumItems(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  258. {
  259. HRESULT hrRet;
  260. void *pv = NULL;
  261. Assert(pMsg->ulParamNum == 1);
  262. hrRet = ((ITfLangBarItemMgr *)_this->_punk)->EnumItems((IEnumTfLangBarItems **)&pv);
  263. CSTUB_PARAM_START()
  264. CSTUB_PARAM_INTERFACE_OUT(&pv, IID_IEnumTfLangBarItems)
  265. CSTUB_PARAM_END()
  266. CSTUB_PARAM_CALL(pMsg, hrRet, psb);
  267. CSTUB_PARAM_INTERFACE_OUT_RELEASE(pv)
  268. CSTUB_PARAM_RETURN()
  269. }
  270. HRESULT CStubITfLangBarItemMgr::stub_GetItem(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  271. {
  272. CSTUB_NOT_IMPL()
  273. }
  274. HRESULT CStubITfLangBarItemMgr::stub_AddItem(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  275. {
  276. CSTUB_NOT_IMPL()
  277. }
  278. HRESULT CStubITfLangBarItemMgr::stub_RemoveItem(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  279. {
  280. CSTUB_NOT_IMPL()
  281. }
  282. HRESULT CStubITfLangBarItemMgr::stub_AdviseItemSink(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  283. {
  284. TraceMsg(TF_FUNC, "CStubITfLangbarItemMgr::AdviseItemSink");
  285. ITfLangBarItemSink *punk = NULL;
  286. DWORD dwCookie = 0;
  287. GUID guid = {0};
  288. PREPARE_PARAM_START()
  289. punk = (ITfLangBarItemSink *)ParamToMarshaledPointer(pMsg, IID_ITfLangBarItemSink, 0);
  290. guid = *(GUID *)ParamToBufferPointer(pMsg, 2);
  291. PREPARE_PARAM_END()
  292. HRESULT hrRet = ((ITfLangBarItemMgr *)_this->_punk)->AdviseItemSink(punk, &dwCookie, (REFGUID)guid);
  293. ClearMarshaledPointer(punk);
  294. CSTUB_PARAM_START()
  295. CSTUB_PARAM_INTERFACE_IN(NULL, IID_ITfLangBarItemSink)
  296. CSTUB_PARAM_POINTER_OUT(&dwCookie)
  297. CSTUB_PARAM_POINTER_IN(&guid)
  298. CSTUB_PARAM_END()
  299. CSTUB_PARAM_CALL(pMsg, hrRet, psb);
  300. CSTUB_PARAM_RETURN()
  301. }
  302. HRESULT CStubITfLangBarItemMgr::stub_UnadviseItemSink(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  303. {
  304. DWORD dwCookie = 0;
  305. PREPARE_PARAM_START()
  306. dwCookie = (DWORD)ParamToULONG(pMsg, 0);
  307. PREPARE_PARAM_END()
  308. pMsg->hrRet = ((ITfLangBarItemMgr *)_this->_punk)->UnadviseItemSink(dwCookie);
  309. return S_OK;
  310. }
  311. HRESULT CStubITfLangBarItemMgr::stub_GetItemFloatingRect(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  312. {
  313. DWORD dwThreadId = 0;
  314. GUID guid = {0};
  315. PREPARE_PARAM_START()
  316. dwThreadId = (DWORD)ParamToULONG(pMsg, 0);
  317. guid = *(GUID *)ParamToBufferPointer(pMsg, 1);
  318. PREPARE_PARAM_END()
  319. RECT rc;
  320. HRESULT hrRet = ((ITfLangBarItemMgr *)_this->_punk)->GetItemFloatingRect(dwThreadId, guid, &rc);
  321. CSTUB_PARAM_START()
  322. CSTUB_PARAM_ULONG_IN(dwThreadId)
  323. CSTUB_PARAM_POINTER_IN(&guid)
  324. CSTUB_PARAM_POINTER_OUT(&rc)
  325. CSTUB_PARAM_END()
  326. CSTUB_PARAM_CALL(pMsg, hrRet, psb)
  327. CSTUB_PARAM_RETURN()
  328. return S_OK;
  329. }
  330. HRESULT CStubITfLangBarItemMgr::stub_GetItemsStatus(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  331. {
  332. ULONG ulCount = 0;
  333. GUID *pguid = NULL;
  334. PREPARE_PARAM_START()
  335. ulCount = (ULONG)ParamToULONG(pMsg, 0);
  336. pguid = new GUID[ulCount];
  337. if (pguid)
  338. memcpy(pguid, ParamToBufferPointer(pMsg, 1), sizeof(GUID) * ulCount);
  339. PREPARE_PARAM_END()
  340. if (!pguid)
  341. return E_OUTOFMEMORY;
  342. DWORD *pdwStatus;
  343. pdwStatus = new DWORD[ulCount];
  344. if (!pdwStatus)
  345. {
  346. delete pguid;
  347. return E_OUTOFMEMORY;
  348. }
  349. HRESULT hrRet = ((ITfLangBarItemMgr *)_this->_punk)->GetItemsStatus(ulCount, pguid, pdwStatus);
  350. CSTUB_PARAM_START()
  351. CSTUB_PARAM_ULONG_IN(ulCount)
  352. CSTUB_PARAM_POINTER_ARRAY_IN(pguid, ulCount)
  353. CSTUB_PARAM_POINTER_ARRAY_OUT(pdwStatus, ulCount)
  354. CSTUB_PARAM_END()
  355. CSTUB_PARAM_CALL(pMsg, hrRet, psb)
  356. delete pdwStatus;
  357. delete pguid;
  358. CSTUB_PARAM_RETURN()
  359. return S_OK;
  360. }
  361. HRESULT CStubITfLangBarItemMgr::stub_GetItemNum(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  362. {
  363. HRESULT hrRet;
  364. DWORD dw;
  365. hrRet = ((ITfLangBarItemMgr *)_this->_punk)->GetItemNum(&dw);
  366. CSTUB_PARAM_START()
  367. CSTUB_PARAM_POINTER_OUT(&dw)
  368. CSTUB_PARAM_END()
  369. CSTUB_PARAM_CALL(pMsg, hrRet, psb)
  370. CSTUB_PARAM_RETURN()
  371. }
  372. HRESULT CStubITfLangBarItemMgr::stub_GetItems(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  373. {
  374. ULONG ulCount;
  375. ULONG ulFetched;
  376. HRESULT hrRet;
  377. IUnknown **ppunk;
  378. TF_LANGBARITEMINFO *pInfo;
  379. DWORD *pdwStatus;
  380. PREPARE_PARAM_START()
  381. ulCount = ParamToULONG(pMsg, 0);
  382. PREPARE_PARAM_END()
  383. ppunk = new IUnknown*[ulCount];
  384. if (!ppunk)
  385. return E_OUTOFMEMORY;
  386. pInfo = new TF_LANGBARITEMINFO[ulCount];
  387. if (!pInfo)
  388. {
  389. delete ppunk;
  390. return E_OUTOFMEMORY;
  391. }
  392. pdwStatus = new DWORD[ulCount];
  393. if (!pdwStatus)
  394. {
  395. delete ppunk;
  396. delete pInfo;
  397. return E_OUTOFMEMORY;
  398. }
  399. hrRet = ((ITfLangBarItemMgr *)_this->_punk)->GetItems(ulCount, (ITfLangBarItem **)ppunk, pInfo, pdwStatus, &ulFetched);
  400. CSTUB_PARAM_START()
  401. CSTUB_PARAM_ULONG_IN(ulCount)
  402. CSTUB_PARAM_INTERFACE_ARRAY_OUT(ppunk, IID_ITfLangBarItem, ulCount)
  403. CSTUB_PARAM_POINTER_ARRAY_OUT(pInfo, ulCount)
  404. CSTUB_PARAM_POINTER_ARRAY_OUT(pdwStatus, ulCount)
  405. CSTUB_PARAM_POINTER_OUT(&ulFetched)
  406. CSTUB_PARAM_END()
  407. CSTUB_PARAM_CALL(pMsg, hrRet, psb);
  408. CSTUB_PARAM_INTERFACE_ARRAY_OUT_RELEASE(ppunk, ulFetched)
  409. delete ppunk;
  410. delete pInfo;
  411. delete pdwStatus;
  412. CSTUB_PARAM_RETURN()
  413. }
  414. HRESULT CStubITfLangBarItemMgr::stub_AdviseItemsSink(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  415. {
  416. ULONG ulCount = 0;
  417. HRESULT hrRet;
  418. IUnknown **ppunk = NULL;
  419. DWORD *pdwCookie = NULL;
  420. GUID *pguid = NULL;
  421. PREPARE_PARAM_START()
  422. ulCount = ParamToULONG(pMsg, 0);
  423. ppunk = new IUnknown*[ulCount];
  424. if (ppunk)
  425. ParamToArrayMarshaledPointer(ulCount, (void **)ppunk, pMsg, IID_ITfLangBarItemSink, 1);
  426. pguid = new GUID[ulCount];
  427. if (pguid)
  428. memcpy(pguid, ParamToBufferPointer(pMsg, 2), sizeof(GUID) * ulCount);
  429. PREPARE_PARAM_END()
  430. if (!ppunk)
  431. {
  432. if (pguid)
  433. delete pguid;
  434. return E_OUTOFMEMORY;
  435. }
  436. if (!pguid)
  437. {
  438. delete ppunk;
  439. return E_OUTOFMEMORY;
  440. }
  441. pdwCookie = new DWORD[ulCount];
  442. if (!pdwCookie)
  443. {
  444. delete ppunk;
  445. delete pguid;
  446. return E_OUTOFMEMORY;
  447. }
  448. hrRet = ((ITfLangBarItemMgr *)_this->_punk)->AdviseItemsSink(ulCount, (ITfLangBarItemSink **)ppunk, pguid, pdwCookie);
  449. CSTUB_PARAM_START()
  450. CSTUB_PARAM_ULONG_IN(ulCount)
  451. CSTUB_PARAM_INTERFACE_ARRAY_IN(NULL, IID_ITfLangBarItemSink, ulCount)
  452. CSTUB_PARAM_POINTER_ARRAY_IN(pguid, ulCount)
  453. CSTUB_PARAM_POINTER_ARRAY_OUT(pdwCookie, ulCount)
  454. CSTUB_PARAM_END()
  455. CSTUB_PARAM_CALL(pMsg, hrRet, psb);
  456. CSTUB_PARAM_INTERFACE_ARRAY_OUT_RELEASE(ppunk, ulCount)
  457. delete ppunk;
  458. delete pdwCookie;
  459. delete pguid;
  460. CSTUB_PARAM_RETURN()
  461. }
  462. HRESULT CStubITfLangBarItemMgr::stub_UnadviseItemsSink(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  463. {
  464. ULONG ulCount;
  465. HRESULT hrRet;
  466. DWORD *pdwCookie;
  467. PREPARE_PARAM_START()
  468. ulCount = ParamToULONG(pMsg, 0);
  469. pdwCookie = new DWORD[ulCount];
  470. if (pdwCookie)
  471. memcpy(pdwCookie,ParamToBufferPointer(pMsg, 1), sizeof(DWORD) * ulCount);
  472. PREPARE_PARAM_END()
  473. if (!pdwCookie)
  474. return E_OUTOFMEMORY;
  475. hrRet = ((ITfLangBarItemMgr *)_this->_punk)->UnadviseItemsSink(ulCount, pdwCookie);
  476. CSTUB_PARAM_START()
  477. CSTUB_PARAM_ULONG_IN(ulCount)
  478. CSTUB_PARAM_POINTER_ARRAY_IN(pdwCookie, ulCount)
  479. CSTUB_PARAM_END()
  480. CSTUB_PARAM_CALL(pMsg, hrRet, psb);
  481. delete pdwCookie;
  482. CSTUB_PARAM_RETURN()
  483. }
  484. //////////////////////////////////////////////////////////////////////////////
  485. //
  486. // CStubITfLangBarItemSink
  487. //
  488. //////////////////////////////////////////////////////////////////////////////
  489. MSTUBCALL CStubITfLangBarItemSink::_StubTbl[] =
  490. {
  491. stub_QueryInterface,
  492. stub_AddRef,
  493. stub_Release,
  494. stub_OnUpdate,
  495. };
  496. HRESULT CStubITfLangBarItemSink::stub_OnUpdate(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  497. {
  498. DWORD dw = 0;
  499. PREPARE_PARAM_START()
  500. dw = (DWORD)ParamToULONG(pMsg, 0);
  501. PREPARE_PARAM_END()
  502. pMsg->hrRet = ((ITfLangBarItemSink *)_this->_punk)->OnUpdate(dw);
  503. return S_OK;
  504. }
  505. //////////////////////////////////////////////////////////////////////////////
  506. //
  507. // CStubIEnumTfLangBarItems
  508. //
  509. //////////////////////////////////////////////////////////////////////////////
  510. MSTUBCALL CStubIEnumTfLangBarItems::_StubTbl[] =
  511. {
  512. stub_QueryInterface,
  513. stub_AddRef,
  514. stub_Release,
  515. stub_Clone,
  516. stub_Next,
  517. stub_Reset,
  518. stub_Skip,
  519. };
  520. HRESULT CStubIEnumTfLangBarItems::stub_Clone(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  521. {
  522. CSTUB_NOT_IMPL()
  523. }
  524. HRESULT CStubIEnumTfLangBarItems::stub_Next(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  525. {
  526. ULONG ulCount;
  527. ULONG ulFetched;
  528. HRESULT hrRet;
  529. IUnknown **ppunk;
  530. PREPARE_PARAM_START()
  531. ulCount = ParamToULONG(pMsg, 0);
  532. PREPARE_PARAM_END()
  533. ppunk = new IUnknown*[ulCount];
  534. if (!ppunk)
  535. return E_OUTOFMEMORY;
  536. hrRet = ((IEnumTfLangBarItems *)_this->_punk)->Next(ulCount, (ITfLangBarItem **)ppunk, &ulFetched);
  537. CSTUB_PARAM_START()
  538. CSTUB_PARAM_ULONG_IN(ulCount)
  539. CSTUB_PARAM_INTERFACE_ARRAY_OUT(ppunk, IID_ITfLangBarItem, ulCount)
  540. CSTUB_PARAM_POINTER_OUT(&ulFetched)
  541. CSTUB_PARAM_END()
  542. CSTUB_PARAM_CALL(pMsg, hrRet, psb);
  543. CSTUB_PARAM_INTERFACE_ARRAY_OUT_RELEASE(ppunk, ulFetched)
  544. delete ppunk;
  545. CSTUB_PARAM_RETURN()
  546. }
  547. HRESULT CStubIEnumTfLangBarItems::stub_Reset(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  548. {
  549. CSTUB_NOT_IMPL()
  550. }
  551. HRESULT CStubIEnumTfLangBarItems::stub_Skip(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  552. {
  553. CSTUB_NOT_IMPL()
  554. }
  555. //////////////////////////////////////////////////////////////////////////////
  556. //
  557. // CStubITfLangBarItem
  558. //
  559. //////////////////////////////////////////////////////////////////////////////
  560. MSTUBCALL CStubITfLangBarItem::_StubTbl[] =
  561. {
  562. stub_QueryInterface,
  563. stub_AddRef,
  564. stub_Release,
  565. stub_GetInfo,
  566. stub_GetStatus,
  567. stub_Show,
  568. stub_GetTooltipString
  569. };
  570. HRESULT CStubITfLangBarItem::stub_GetInfo(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  571. {
  572. HRESULT hrRet;
  573. TF_LANGBARITEMINFO info;
  574. hrRet = ((ITfLangBarItem *)_this->_punk)->GetInfo(&info);
  575. CSTUB_PARAM_START()
  576. CSTUB_PARAM_POINTER_OUT(&info)
  577. CSTUB_PARAM_END()
  578. CSTUB_PARAM_CALL(pMsg, hrRet, psb)
  579. CSTUB_PARAM_RETURN()
  580. }
  581. HRESULT CStubITfLangBarItem::stub_GetStatus(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  582. {
  583. HRESULT hrRet;
  584. DWORD dw;
  585. hrRet = ((ITfLangBarItem *)_this->_punk)->GetStatus(&dw);
  586. CSTUB_PARAM_START()
  587. CSTUB_PARAM_POINTER_OUT(&dw)
  588. CSTUB_PARAM_END()
  589. CSTUB_PARAM_CALL(pMsg, hrRet, psb)
  590. CSTUB_PARAM_RETURN()
  591. }
  592. HRESULT CStubITfLangBarItem::stub_Show(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  593. {
  594. BOOL fShow = FALSE;
  595. PREPARE_PARAM_START()
  596. fShow = (BOOL)ParamToULONG(pMsg, 0);
  597. PREPARE_PARAM_END()
  598. pMsg->hrRet = ((ITfLangBarItem *)_this->_punk)->Show(fShow);
  599. return S_OK;
  600. }
  601. HRESULT CStubITfLangBarItem::stub_GetTooltipString(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  602. {
  603. BSTR bstr = NULL;
  604. HRESULT hrRet = ((ITfLangBarItem *)_this->_punk)->GetTooltipString(&bstr);
  605. CSTUB_PARAM_START()
  606. CSTUB_PARAM_BSTR_OUT(bstr)
  607. CSTUB_PARAM_END()
  608. CSTUB_PARAM_CALL(pMsg, hrRet, psb)
  609. CSTUB_PARAM_RETURN()
  610. }
  611. //////////////////////////////////////////////////////////////////////////////
  612. //
  613. // CStubITfLangBarItemButton
  614. //
  615. //////////////////////////////////////////////////////////////////////////////
  616. MSTUBCALL CStubITfLangBarItemButton::_StubTbl[] =
  617. {
  618. stub_QueryInterface,
  619. stub_AddRef,
  620. stub_Release,
  621. stub_GetInfo,
  622. stub_GetStatus,
  623. stub_Show,
  624. stub_GetTooltipString,
  625. stub_OnClick,
  626. stub_InitMenu,
  627. stub_OnMenuSelect,
  628. stub_GetIcon,
  629. stub_GetText,
  630. };
  631. HRESULT CStubITfLangBarItemButton::stub_OnClick(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  632. {
  633. TfLBIClick click;
  634. POINT pt;
  635. RECT rc;
  636. PREPARE_PARAM_START()
  637. click = (TfLBIClick)ParamToULONG(pMsg, 0);
  638. pt = *(POINT *)ParamToBufferPointer(pMsg, 1);
  639. rc = *(RECT *)ParamToBufferPointer(pMsg, 2);
  640. PREPARE_PARAM_END()
  641. pMsg->hrRet = ((ITfLangBarItemButton *)_this->_punk)->OnClick(click, pt, &rc);
  642. return S_OK;
  643. }
  644. HRESULT CStubITfLangBarItemButton::stub_InitMenu(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  645. {
  646. ITfMenu *punk = NULL;
  647. PREPARE_PARAM_START()
  648. punk = (ITfMenu *)ParamToMarshaledPointer(pMsg, IID_ITfMenu, 0);
  649. PREPARE_PARAM_END()
  650. pMsg->hrRet = ((ITfLangBarItemButton *)_this->_punk)->InitMenu(punk);
  651. CSTUB_PARAM_INTERFACE_OUT_RELEASE(punk)
  652. CSTUB_PARAM_RETURN()
  653. }
  654. HRESULT CStubITfLangBarItemButton::stub_OnMenuSelect(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  655. {
  656. ULONG ulId;
  657. PREPARE_PARAM_START()
  658. ulId = (ULONG)ParamToULONG(pMsg, 0);
  659. PREPARE_PARAM_END()
  660. pMsg->hrRet = ((ITfLangBarItemButton *)_this->_punk)->OnMenuSelect(ulId);
  661. return S_OK;
  662. }
  663. HRESULT CStubITfLangBarItemButton::stub_GetIcon(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  664. {
  665. HICON hIcon;
  666. HRESULT hrRet = ((ITfLangBarItemButton *)_this->_punk)->GetIcon(&hIcon);
  667. CSTUB_PARAM_START()
  668. CSTUB_PARAM_HICON_OUT(&hIcon)
  669. CSTUB_PARAM_END()
  670. CSTUB_PARAM_CALL(pMsg, hrRet, psb)
  671. CSTUB_PARAM_RETURN()
  672. }
  673. HRESULT CStubITfLangBarItemButton::stub_GetText(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  674. {
  675. BSTR bstr = NULL;
  676. HRESULT hrRet = ((ITfLangBarItemButton *)_this->_punk)->GetText(&bstr);
  677. CSTUB_PARAM_START()
  678. CSTUB_PARAM_BSTR_OUT(bstr)
  679. CSTUB_PARAM_END()
  680. CSTUB_PARAM_CALL(pMsg, hrRet, psb)
  681. CSTUB_PARAM_RETURN()
  682. }
  683. //////////////////////////////////////////////////////////////////////////////
  684. //
  685. // CStubITfLangBarItemBitmapButton
  686. //
  687. //////////////////////////////////////////////////////////////////////////////
  688. MSTUBCALL CStubITfLangBarItemBitmapButton::_StubTbl[] =
  689. {
  690. stub_QueryInterface,
  691. stub_AddRef,
  692. stub_Release,
  693. stub_GetInfo,
  694. stub_GetStatus,
  695. stub_Show,
  696. stub_GetTooltipString,
  697. stub_OnClick,
  698. stub_InitMenu,
  699. stub_OnMenuSelect,
  700. stub_GetPreferredSize,
  701. stub_DrawBitmap,
  702. stub_GetText,
  703. };
  704. HRESULT CStubITfLangBarItemBitmapButton::stub_OnClick(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  705. {
  706. TfLBIClick click;
  707. POINT pt;
  708. RECT rc;
  709. PREPARE_PARAM_START()
  710. click = (TfLBIClick)ParamToULONG(pMsg, 0);
  711. pt = *(POINT *)ParamToBufferPointer(pMsg, 1);
  712. rc = *(RECT *)ParamToBufferPointer(pMsg, 2);
  713. PREPARE_PARAM_END()
  714. pMsg->hrRet = ((ITfLangBarItemBitmapButton *)_this->_punk)->OnClick(click, pt, &rc);
  715. return S_OK;
  716. }
  717. HRESULT CStubITfLangBarItemBitmapButton::stub_InitMenu(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  718. {
  719. ITfMenu *punk;
  720. PREPARE_PARAM_START()
  721. punk = (ITfMenu *)ParamToMarshaledPointer(pMsg, IID_ITfMenu, 0);
  722. PREPARE_PARAM_END()
  723. pMsg->hrRet = ((ITfLangBarItemBitmapButton *)_this->_punk)->InitMenu(punk);
  724. CSTUB_PARAM_INTERFACE_OUT_RELEASE(punk)
  725. CSTUB_PARAM_RETURN()
  726. }
  727. HRESULT CStubITfLangBarItemBitmapButton::stub_OnMenuSelect(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  728. {
  729. ULONG ulId;
  730. PREPARE_PARAM_START()
  731. ulId = (ULONG)ParamToULONG(pMsg, 0);
  732. PREPARE_PARAM_END()
  733. pMsg->hrRet = ((ITfLangBarItemBitmapButton *)_this->_punk)->OnMenuSelect(ulId);
  734. return S_OK;
  735. }
  736. HRESULT CStubITfLangBarItemBitmapButton::stub_GetPreferredSize(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  737. {
  738. SIZE size;
  739. SIZE sizeOut;
  740. PREPARE_PARAM_START()
  741. size = *(SIZE *)ParamToBufferPointer(pMsg, 0);
  742. PREPARE_PARAM_END()
  743. HRESULT hrRet = ((ITfLangBarItemBitmapButton *)_this->_punk)->GetPreferredSize(&size, &sizeOut);
  744. CSTUB_PARAM_START()
  745. CSTUB_PARAM_POINTER_IN(&size)
  746. CSTUB_PARAM_POINTER_OUT(&sizeOut)
  747. CSTUB_PARAM_END()
  748. CSTUB_PARAM_CALL(pMsg, hrRet, psb)
  749. CSTUB_PARAM_RETURN()
  750. }
  751. HRESULT CStubITfLangBarItemBitmapButton::stub_DrawBitmap(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  752. {
  753. ULONG bmWidth;
  754. ULONG bmHeight;
  755. DWORD dwFlags;
  756. PREPARE_PARAM_START()
  757. bmWidth = (ULONG)ParamToULONG(pMsg, 0);
  758. bmHeight = (ULONG)ParamToULONG(pMsg, 1);
  759. dwFlags = (DWORD)ParamToULONG(pMsg, 2);
  760. PREPARE_PARAM_END()
  761. HBITMAP hbmp;
  762. HBITMAP hbmpMask;
  763. HRESULT hrRet = ((ITfLangBarItemBitmapButton *)_this->_punk)->DrawBitmap(bmWidth, bmHeight, dwFlags, &hbmp, &hbmpMask);
  764. CSTUB_PARAM_START()
  765. CSTUB_PARAM_ULONG_IN(bmWidth)
  766. CSTUB_PARAM_ULONG_IN(bmHeight)
  767. CSTUB_PARAM_ULONG_IN(dwFlags)
  768. CSTUB_PARAM_HBITMAP_OUT(&hbmp)
  769. CSTUB_PARAM_HBITMAP_OUT(&hbmpMask)
  770. CSTUB_PARAM_END()
  771. CSTUB_PARAM_CALL(pMsg, hrRet, psb)
  772. CSTUB_PARAM_RETURN()
  773. }
  774. HRESULT CStubITfLangBarItemBitmapButton::stub_GetText(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  775. {
  776. BSTR bstr = NULL;
  777. HRESULT hrRet = ((ITfLangBarItemBitmapButton *)_this->_punk)->GetText(&bstr);
  778. CSTUB_PARAM_START()
  779. CSTUB_PARAM_BSTR_OUT(bstr)
  780. CSTUB_PARAM_END()
  781. CSTUB_PARAM_CALL(pMsg, hrRet, psb)
  782. CSTUB_PARAM_RETURN()
  783. }
  784. //////////////////////////////////////////////////////////////////////////////
  785. //
  786. // CStubITfLangBarItemBitmap
  787. //
  788. //////////////////////////////////////////////////////////////////////////////
  789. MSTUBCALL CStubITfLangBarItemBitmap::_StubTbl[] =
  790. {
  791. stub_QueryInterface,
  792. stub_AddRef,
  793. stub_Release,
  794. stub_GetInfo,
  795. stub_GetStatus,
  796. stub_Show,
  797. stub_GetTooltipString,
  798. stub_OnClick,
  799. stub_GetPreferredSize,
  800. stub_DrawBitmap,
  801. };
  802. HRESULT CStubITfLangBarItemBitmap::stub_OnClick(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  803. {
  804. TfLBIClick click;
  805. POINT pt;
  806. RECT rc;
  807. PREPARE_PARAM_START()
  808. click = (TfLBIClick)ParamToULONG(pMsg, 0);
  809. pt = *(POINT *)ParamToBufferPointer(pMsg, 1);
  810. rc = *(RECT *)ParamToBufferPointer(pMsg, 2);
  811. PREPARE_PARAM_END()
  812. pMsg->hrRet = ((ITfLangBarItemBitmap *)_this->_punk)->OnClick(click, pt, &rc);
  813. return S_OK;
  814. }
  815. HRESULT CStubITfLangBarItemBitmap::stub_GetPreferredSize(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  816. {
  817. SIZE size;
  818. SIZE sizeOut;
  819. PREPARE_PARAM_START()
  820. size = *(SIZE *)ParamToBufferPointer(pMsg, 0);
  821. PREPARE_PARAM_END()
  822. HRESULT hrRet = ((ITfLangBarItemBitmap *)_this->_punk)->GetPreferredSize(&size, &sizeOut);
  823. CSTUB_PARAM_START()
  824. CSTUB_PARAM_POINTER_IN(&size)
  825. CSTUB_PARAM_POINTER_OUT(&sizeOut)
  826. CSTUB_PARAM_END()
  827. CSTUB_PARAM_CALL(pMsg, hrRet, psb)
  828. CSTUB_PARAM_RETURN()
  829. }
  830. HRESULT CStubITfLangBarItemBitmap::stub_DrawBitmap(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  831. {
  832. ULONG bmWidth;
  833. ULONG bmHeight;
  834. DWORD dwFlags;
  835. PREPARE_PARAM_START()
  836. bmWidth = (ULONG)ParamToULONG(pMsg, 0);
  837. bmHeight = (ULONG)ParamToULONG(pMsg, 1);
  838. dwFlags = (DWORD)ParamToULONG(pMsg, 2);
  839. PREPARE_PARAM_END()
  840. HBITMAP hbmp;
  841. HBITMAP hbmpMask;
  842. HRESULT hrRet = ((ITfLangBarItemBitmap *)_this->_punk)->DrawBitmap(bmWidth, bmHeight, dwFlags, &hbmp, &hbmpMask);
  843. CSTUB_PARAM_START()
  844. CSTUB_PARAM_ULONG_IN(bmWidth)
  845. CSTUB_PARAM_ULONG_IN(bmHeight)
  846. CSTUB_PARAM_ULONG_IN(dwFlags)
  847. CSTUB_PARAM_HBITMAP_OUT(&hbmp)
  848. CSTUB_PARAM_HBITMAP_OUT(&hbmpMask)
  849. CSTUB_PARAM_END()
  850. CSTUB_PARAM_CALL(pMsg, hrRet, psb)
  851. CSTUB_PARAM_RETURN()
  852. }
  853. //////////////////////////////////////////////////////////////////////////////
  854. //
  855. // CStubITfLangBarItemBalloon
  856. //
  857. //////////////////////////////////////////////////////////////////////////////
  858. MSTUBCALL CStubITfLangBarItemBalloon::_StubTbl[] =
  859. {
  860. stub_QueryInterface,
  861. stub_AddRef,
  862. stub_Release,
  863. stub_GetInfo,
  864. stub_GetStatus,
  865. stub_Show,
  866. stub_GetTooltipString,
  867. stub_OnClick,
  868. stub_GetPreferredSize,
  869. stub_GetBalloonInfo,
  870. };
  871. HRESULT CStubITfLangBarItemBalloon::stub_OnClick(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  872. {
  873. TfLBIClick click;
  874. POINT pt;
  875. RECT rc;
  876. PREPARE_PARAM_START()
  877. click = (TfLBIClick)ParamToULONG(pMsg, 0);
  878. pt = *(POINT *)ParamToBufferPointer(pMsg, 1);
  879. rc = *(RECT *)ParamToBufferPointer(pMsg, 2);
  880. PREPARE_PARAM_END()
  881. pMsg->hrRet = ((ITfLangBarItemBalloon *)_this->_punk)->OnClick(click, pt, &rc);
  882. return S_OK;
  883. }
  884. HRESULT CStubITfLangBarItemBalloon::stub_GetPreferredSize(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  885. {
  886. SIZE size;
  887. SIZE sizeOut;
  888. PREPARE_PARAM_START()
  889. size = *(SIZE *)ParamToBufferPointer(pMsg, 0);
  890. PREPARE_PARAM_END()
  891. HRESULT hrRet = ((ITfLangBarItemBalloon *)_this->_punk)->GetPreferredSize(&size, &sizeOut);
  892. CSTUB_PARAM_START()
  893. CSTUB_PARAM_POINTER_IN(&size)
  894. CSTUB_PARAM_POINTER_OUT(&sizeOut)
  895. CSTUB_PARAM_END()
  896. CSTUB_PARAM_CALL(pMsg, hrRet, psb)
  897. CSTUB_PARAM_RETURN()
  898. }
  899. HRESULT CStubITfLangBarItemBalloon::stub_GetBalloonInfo(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  900. {
  901. TF_LBBALLOONINFO info;
  902. HRESULT hrRet = ((ITfLangBarItemBalloon *)_this->_punk)->GetBalloonInfo(&info);
  903. CSTUB_PARAM_START()
  904. CSTUB_PARAM_TF_LBBALLOONINFO_OUT(&info)
  905. CSTUB_PARAM_END()
  906. CSTUB_PARAM_CALL(pMsg, hrRet, psb)
  907. CSTUB_PARAM_RETURN()
  908. }
  909. //////////////////////////////////////////////////////////////////////////////
  910. //
  911. // CStubITfMenu
  912. //
  913. //////////////////////////////////////////////////////////////////////////////
  914. MSTUBCALL CStubITfMenu::_StubTbl[] =
  915. {
  916. stub_QueryInterface,
  917. stub_AddRef,
  918. stub_Release,
  919. stub_AddItemMenu,
  920. };
  921. HRESULT CStubITfMenu::stub_AddItemMenu(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  922. {
  923. UINT uId = 0;
  924. DWORD dwFlags = 0;
  925. HBITMAP hbmp = NULL;
  926. HBITMAP hbmpMask = NULL;
  927. WCHAR *pchTemp = NULL;
  928. ULONG cch = 0;
  929. WCHAR *pch = NULL;
  930. BOOL fNULLStack;
  931. ITfMenu *pMenu = NULL;
  932. PREPARE_PARAM_START()
  933. uId = (ULONG)ParamToULONG(pMsg, 0);
  934. dwFlags = (ULONG)ParamToULONG(pMsg, 1);
  935. hbmp = ParamToHBITMAP(pMsg, 2);
  936. hbmpMask = ParamToHBITMAP(pMsg, 3);
  937. pchTemp = (WCHAR *)ParamToBufferPointer(pMsg, 4);
  938. cch = (ULONG)ParamToULONG(pMsg, 5);
  939. pch = new WCHAR[cch + 1];
  940. if (pch)
  941. wcsncpy(pch, pchTemp, cch);
  942. pMenu = (ITfMenu *)ParamToMarshaledPointer(pMsg, IID_ITfMenu, 6, &fNULLStack);
  943. PREPARE_PARAM_END()
  944. if (!pch)
  945. return E_OUTOFMEMORY;
  946. HRESULT hrRet = ((ITfMenu *)_this->_punk)->AddMenuItem(uId,
  947. dwFlags,
  948. hbmp,
  949. hbmpMask,
  950. pch,
  951. cch,
  952. !fNULLStack ? &pMenu : NULL);
  953. CSTUB_PARAM_START()
  954. CSTUB_PARAM_ULONG_IN(uId)
  955. CSTUB_PARAM_ULONG_IN(dwFlags)
  956. CSTUB_PARAM_HBITMAP_IN(hbmp)
  957. CSTUB_PARAM_HBITMAP_IN(hbmpMask)
  958. CSTUB_PARAM_POINTER_IN(pch)
  959. CSTUB_PARAM_ULONG_IN(cch)
  960. CSTUB_PARAM_INTERFACE_OUT(&pMenu, IID_ITfMenu)
  961. CSTUB_PARAM_END()
  962. CSTUB_PARAM_CALL(pMsg, hrRet, psb)
  963. CSTUB_PARAM_INTERFACE_OUT_RELEASE(pMenu)
  964. delete pch;
  965. CSTUB_PARAM_RETURN()
  966. }
  967. //////////////////////////////////////////////////////////////////////////////
  968. //
  969. // CStubITfInputProcessorProfiles
  970. //
  971. //////////////////////////////////////////////////////////////////////////////
  972. MSTUBCALL CStubITfInputProcessorProfiles::_StubTbl[] =
  973. {
  974. stub_QueryInterface,
  975. stub_AddRef,
  976. stub_Release,
  977. stub_Register,
  978. stub_Unregister,
  979. stub_AddLanguageProfile,
  980. stub_RemoveLanguageProfile,
  981. stub_EnumInputProcessorInfo,
  982. stub_GetDefaultLanguageProfile,
  983. stub_SetDefaultLanguageProfile,
  984. stub_ActivateLanguageProfile,
  985. stub_GetActiveLanguageProfile,
  986. stub_GetCurrentLanguage,
  987. stub_ChangeCurrentLanguage,
  988. stub_GetLanguageList,
  989. stub_EnumLanguageProfiles,
  990. stub_EnableLanguageProfile,
  991. stub_IsEnabledLanguageProfile,
  992. stub_EnableLanguageProfileByDefault,
  993. stub_SubstituteKeyboardLayout,
  994. };
  995. HRESULT CStubITfInputProcessorProfiles::stub_Register(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  996. {
  997. CSTUB_NOT_IMPL()
  998. }
  999. HRESULT CStubITfInputProcessorProfiles::stub_Unregister(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  1000. {
  1001. CSTUB_NOT_IMPL()
  1002. }
  1003. HRESULT CStubITfInputProcessorProfiles::stub_AddLanguageProfile(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  1004. {
  1005. CSTUB_NOT_IMPL()
  1006. }
  1007. HRESULT CStubITfInputProcessorProfiles::stub_RemoveLanguageProfile(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  1008. {
  1009. CSTUB_NOT_IMPL()
  1010. }
  1011. HRESULT CStubITfInputProcessorProfiles::stub_EnumInputProcessorInfo(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  1012. {
  1013. CSTUB_NOT_IMPL()
  1014. }
  1015. HRESULT CStubITfInputProcessorProfiles::stub_GetDefaultLanguageProfile(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  1016. {
  1017. CSTUB_NOT_IMPL()
  1018. }
  1019. HRESULT CStubITfInputProcessorProfiles::stub_SetDefaultLanguageProfile(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  1020. {
  1021. CSTUB_NOT_IMPL()
  1022. }
  1023. HRESULT CStubITfInputProcessorProfiles::stub_ActivateLanguageProfile(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  1024. {
  1025. CSTUB_NOT_IMPL()
  1026. }
  1027. HRESULT CStubITfInputProcessorProfiles::stub_GetActiveLanguageProfile(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  1028. {
  1029. CSTUB_NOT_IMPL()
  1030. }
  1031. HRESULT CStubITfInputProcessorProfiles::stub_GetLanguageProfileDescription(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  1032. {
  1033. CSTUB_NOT_IMPL()
  1034. }
  1035. HRESULT CStubITfInputProcessorProfiles::stub_GetCurrentLanguage(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  1036. {
  1037. LANGID langid;
  1038. HRESULT hrRet = ((ITfInputProcessorProfiles *)_this->_punk)->GetCurrentLanguage(&langid);
  1039. CSTUB_PARAM_START()
  1040. CSTUB_PARAM_POINTER_OUT(&langid)
  1041. CSTUB_PARAM_END()
  1042. CSTUB_PARAM_CALL(pMsg, hrRet, psb)
  1043. CSTUB_PARAM_RETURN()
  1044. }
  1045. HRESULT CStubITfInputProcessorProfiles::stub_ChangeCurrentLanguage(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  1046. {
  1047. CSTUB_NOT_IMPL()
  1048. }
  1049. HRESULT CStubITfInputProcessorProfiles::stub_GetLanguageList(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  1050. {
  1051. CSTUB_NOT_IMPL()
  1052. }
  1053. HRESULT CStubITfInputProcessorProfiles::stub_EnumLanguageProfiles(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  1054. {
  1055. CSTUB_NOT_IMPL()
  1056. }
  1057. HRESULT CStubITfInputProcessorProfiles::stub_EnableLanguageProfile(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  1058. {
  1059. CSTUB_NOT_IMPL()
  1060. }
  1061. HRESULT CStubITfInputProcessorProfiles::stub_IsEnabledLanguageProfile(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  1062. {
  1063. CSTUB_NOT_IMPL()
  1064. }
  1065. HRESULT CStubITfInputProcessorProfiles::stub_EnableLanguageProfileByDefault(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  1066. {
  1067. CSTUB_NOT_IMPL()
  1068. }
  1069. HRESULT CStubITfInputProcessorProfiles::stub_SubstituteKeyboardLayout(CStub *_this, MARSHALMSG *pMsg, CSharedBlock *psb)
  1070. {
  1071. CSTUB_NOT_IMPL()
  1072. }