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.

1116 lines
24 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1995 - 1999
  6. //
  7. // File: csdisp.h
  8. //
  9. // Contents: IDispatch helper functions
  10. //
  11. // History: 09-Dec-96 vich created
  12. //
  13. //--------------------------------------------------------------------------
  14. #ifndef __CSDISP_H__
  15. #define __CSDISP_H__
  16. typedef struct _DISPATCHTABLE
  17. {
  18. OLECHAR **apszNames;
  19. DWORD cdispid;
  20. DWORD idispid;
  21. } DISPATCHTABLE;
  22. class DISPATCHINTERFACE
  23. {
  24. public:
  25. DISPATCHINTERFACE()
  26. {
  27. pDispatch = NULL;
  28. pUnknown = NULL;
  29. pDispatchTable = NULL;
  30. m_cDispatchTable = 0;
  31. m_fiidValid = FALSE;
  32. m_adispid = NULL;
  33. m_dwVersion = 0;
  34. }
  35. VOID SetIID(
  36. OPTIONAL IN IID const *piid)
  37. {
  38. if (NULL != piid)
  39. {
  40. m_iid = *piid;
  41. m_fiidValid = TRUE;
  42. }
  43. }
  44. IID const *GetIID() { return(m_fiidValid? &m_iid : NULL); }
  45. IDispatch *pDispatch;
  46. IUnknown *pUnknown;
  47. DISPATCHTABLE *pDispatchTable;
  48. DWORD m_cDispatchTable;
  49. DWORD m_cdispid;
  50. DISPID *m_adispid;
  51. DWORD m_dwVersion;
  52. DWORD m_ClassContext;
  53. private:
  54. IID m_iid;
  55. BOOL m_fiidValid;
  56. };
  57. #define DECLARE_DISPATCH_ENTRY(apszMethod) \
  58. { apszMethod, ARRAYSIZE(apszMethod), },
  59. // DispatchSetup Flags:
  60. #define DISPSETUP_COM 0x00000000
  61. #define DISPSETUP_IDISPATCH 0x00000001
  62. #define DISPSETUP_COMFIRST 0x00000002 // Try COM, then IDispatch
  63. HRESULT
  64. DispatchInvoke(
  65. IN DISPATCHINTERFACE *pDispatchInterface,
  66. IN LONG MethodIndex,
  67. IN DWORD cvar,
  68. IN VARIANT avar[],
  69. IN LONG Type,
  70. OPTIONAL OUT VOID *pretval);
  71. HRESULT
  72. DispatchGetReturnValue(
  73. IN OUT VARIANT *pvar,
  74. IN LONG Type,
  75. OUT VOID *pretval);
  76. HRESULT
  77. DispatchGetIds(
  78. IN IDispatch *pDispatch,
  79. IN DWORD cDispatchTable,
  80. IN OUT DISPATCHTABLE *pDispatchTable,
  81. IN OUT DISPATCHINTERFACE *pDispatchInterface);
  82. HRESULT
  83. DispatchSetup(
  84. IN DWORD Flags,
  85. IN DWORD ClassContext,
  86. OPTIONAL IN TCHAR const *pszProgID, // for IDispatch
  87. OPTIONAL IN CLSID const *pclsid, // for COM
  88. OPTIONAL IN IID const *piid, // for COM
  89. IN DWORD cDispatchTable,
  90. IN OUT DISPATCHTABLE *pDispatchTable,
  91. IN OUT DISPATCHINTERFACE *pDispatchInterface);
  92. HRESULT
  93. DispatchSetup2(
  94. IN DWORD Flags,
  95. IN DWORD ClassContext,
  96. IN WCHAR const *pwszClass, // wszRegKeyAdminClsid
  97. IN CLSID const *pclsid,
  98. IN DWORD cver,
  99. IN IID const * const *ppiid, // cver elements
  100. IN DWORD const *pcDispatch, // cver elements
  101. IN OUT DISPATCHTABLE *pDispatchTable,
  102. IN OUT DISPATCHINTERFACE *pDispatchInterface);
  103. VOID
  104. DispatchRelease(
  105. IN OUT DISPATCHINTERFACE *pDispatchInterface);
  106. HRESULT
  107. DispatchSetErrorInfo(
  108. IN HRESULT hrError,
  109. IN WCHAR const *pwszDescription,
  110. OPTIONAL IN WCHAR const *pwszProgId,
  111. OPTIONAL IN IID const *piid);
  112. // Temporary:
  113. #define ConvertWszToBstr myConvertWszToBstr
  114. #define ConvertSzToBstr myConvertSzToBstr
  115. #define ConvertWszToSz myConvertWszToSz
  116. #define ConvertSzToWsz myConvertSzToWsz
  117. BOOL
  118. myConvertWszToBstr(
  119. OUT BSTR *pbstr,
  120. IN WCHAR const *pwc,
  121. IN LONG cb);
  122. BOOL
  123. myConvertSzToBstr(
  124. OUT BSTR *pbstr,
  125. IN CHAR const *pch,
  126. IN LONG cch);
  127. //+-------------------------------------------------------------------------
  128. // ICertConfig dispatch support
  129. HRESULT
  130. Config_Init(
  131. IN DWORD Flags, // See DispatchSetup() Flags
  132. IN OUT DISPATCHINTERFACE *pdiConfig);
  133. VOID
  134. Config_Release(
  135. IN OUT DISPATCHINTERFACE *pdiConfig);
  136. HRESULT
  137. Config_Reset(
  138. IN DISPATCHINTERFACE *pdiConfig,
  139. IN LONG Index,
  140. OUT LONG *pcount);
  141. HRESULT
  142. Config_Next(
  143. IN DISPATCHINTERFACE *pdiConfig,
  144. OUT LONG *pcount);
  145. HRESULT
  146. Config_GetField(
  147. IN DISPATCHINTERFACE *pdiConfig,
  148. IN WCHAR const *pwszField,
  149. OUT BSTR *pbstr);
  150. HRESULT
  151. Config_GetConfig(
  152. IN DISPATCHINTERFACE *pdiConfig,
  153. IN LONG Flags,
  154. OUT BSTR *pbstrConfig);
  155. HRESULT
  156. Config2_SetSharedFolder(
  157. IN DISPATCHINTERFACE *pdiConfig,
  158. IN WCHAR const *pwszSharedFolder);
  159. HRESULT
  160. ConfigDump(
  161. IN DWORD Flags, // See DispatchSetup() Flags
  162. IN WCHAR const *pwszEntry, // localized L"Entry"
  163. OPTIONAL IN WCHAR const *pwszLocalSuffix, // localized L"(Local)"
  164. OPTIONAL IN WCHAR const *pwszMach1,
  165. OPTIONAL IN WCHAR const *pwszMach2);
  166. HRESULT
  167. ConfigDumpSetDisplayNames(
  168. IN WCHAR const * const *apwszFieldNames,
  169. IN WCHAR const * const *apwszDisplayNames,
  170. IN DWORD cNames);
  171. HRESULT
  172. ConfigDumpEntry(
  173. IN DISPATCHINTERFACE *pdiConfig,
  174. IN WCHAR const *pwszEntry, // localized L"Entry"
  175. IN LONG Index, // less than 0 skip index, entry, & suffix print
  176. OPTIONAL IN WCHAR const *pwszSuffix);
  177. HRESULT
  178. ConfigGetConfig(
  179. IN DWORD Flags, // See DispatchSetup() Flags
  180. IN DWORD dwDefault, // see CC_ defines in certcli.h
  181. OUT BSTR *pstrConfig);
  182. //+-------------------------------------------------------------------------
  183. // ICertRequest dispatch support
  184. HRESULT
  185. Request_Init(
  186. IN DWORD Flags, // See DispatchSetup() Flags
  187. IN OUT DISPATCHINTERFACE *pdiRequest);
  188. VOID
  189. Request_Release(
  190. IN OUT DISPATCHINTERFACE *pdiRequest);
  191. HRESULT
  192. Request_Submit(
  193. IN DISPATCHINTERFACE *pdiRequest,
  194. IN LONG Flags,
  195. IN WCHAR const *pwszRequest,
  196. IN DWORD cbRequest,
  197. IN WCHAR const *pwszAttributes,
  198. IN WCHAR const *pwszConfig,
  199. OUT LONG *pDisposition);
  200. HRESULT
  201. Request_RetrievePending(
  202. IN DISPATCHINTERFACE *pdiRequest,
  203. IN LONG RequestId,
  204. IN WCHAR const *pwszConfig,
  205. OUT LONG *pDisposition);
  206. HRESULT
  207. Request_GetLastStatus(
  208. IN DISPATCHINTERFACE *pdiRequest,
  209. OUT LONG *pLastStatus);
  210. HRESULT
  211. Request_GetRequestId(
  212. IN DISPATCHINTERFACE *pdiRequest,
  213. OUT LONG *pRequestId);
  214. HRESULT
  215. Request_GetDispositionMessage(
  216. IN DISPATCHINTERFACE *pdiRequest,
  217. OUT BSTR *pstrMessage);
  218. HRESULT
  219. Request_GetCertificate(
  220. IN DISPATCHINTERFACE *pdiRequest,
  221. IN DWORD Flags,
  222. OUT BSTR *pstrCert);
  223. HRESULT
  224. Request_GetCACertificate(
  225. IN DISPATCHINTERFACE *pdiRequest,
  226. IN LONG fExchangeCertificate,
  227. IN WCHAR const *pwszConfig,
  228. IN DWORD Flags,
  229. OUT BSTR *pstrCert);
  230. HRESULT
  231. Request2_GetIssuedCertificate(
  232. IN DISPATCHINTERFACE *pdiRequest,
  233. IN WCHAR const *pwszConfig,
  234. IN LONG RequestId,
  235. IN WCHAR const *pwszSerialNumber,
  236. OUT LONG *pDisposition);
  237. HRESULT
  238. Request2_GetErrorMessageText(
  239. IN LONG hrMessage,
  240. IN LONG Flags,
  241. OUT BSTR *pstrErrorMessageText);
  242. HRESULT
  243. Request2_GetCAProperty(
  244. IN DISPATCHINTERFACE *pdiRequest,
  245. IN WCHAR const *pwszConfig,
  246. IN LONG PropId,
  247. IN LONG PropIndex,
  248. IN LONG PropType,
  249. IN LONG Flags,
  250. OUT VOID *pPropertyValue);
  251. HRESULT
  252. Request2_GetCAPropertyFlags(
  253. IN DISPATCHINTERFACE *pdiRequest,
  254. IN WCHAR const *pwszConfig,
  255. IN LONG PropId,
  256. OUT LONG *pPropFlags);
  257. HRESULT
  258. Request2_GetCAPropertyDisplayName(
  259. IN DISPATCHINTERFACE *pdiRequest,
  260. IN WCHAR const *pwszConfig,
  261. IN LONG PropId,
  262. OUT BSTR *pstrDisplayName);
  263. HRESULT
  264. Request2_GetFullResponseProperty(
  265. IN DISPATCHINTERFACE *pdiRequest,
  266. IN LONG PropId,
  267. IN LONG PropIndex,
  268. IN LONG PropType,
  269. IN LONG Flags,
  270. OUT VOID *pPropertyValue);
  271. //+-------------------------------------------------------------------------
  272. // ICertServerExit dispatch support
  273. HRESULT
  274. CIExit_Init(
  275. IN DWORD Flags, // See DispatchSetup() Flags
  276. IN OUT DISPATCHINTERFACE *pdiCIExit);
  277. VOID
  278. CIExit_Release(
  279. IN OUT DISPATCHINTERFACE *pdiCIExit);
  280. HRESULT
  281. CIExit_SetContext(
  282. IN DISPATCHINTERFACE *pdiCIExit,
  283. IN LONG Context);
  284. HRESULT
  285. CIExit_GetRequestProperty(
  286. IN DISPATCHINTERFACE *pdiCIExit,
  287. IN WCHAR const *pwszPropName,
  288. IN LONG PropertyType,
  289. OUT BSTR *pbstrPropValue);
  290. HRESULT
  291. CIExit_GetRequestAttribute(
  292. IN DISPATCHINTERFACE *pdiCIExit,
  293. IN WCHAR const *pwszPropName,
  294. OUT BSTR *pbstrPropValue);
  295. HRESULT
  296. CIExit_GetCertificateProperty(
  297. IN DISPATCHINTERFACE *pdiCIExit,
  298. IN WCHAR const *pwszPropName,
  299. IN LONG PropertyType,
  300. OUT BSTR *pbstrPropValue);
  301. HRESULT
  302. CIExit_GetCertificateExtension(
  303. IN DISPATCHINTERFACE *pdiCIExit,
  304. IN WCHAR const *pwszExtensionName,
  305. IN LONG Type,
  306. OUT BSTR *pbstrValue);
  307. HRESULT
  308. CIExit_GetCertificateExtensionFlags(
  309. IN DISPATCHINTERFACE *pdiCIExit,
  310. OUT LONG *pExtFlags);
  311. HRESULT
  312. CIExit_EnumerateExtensionsSetup(
  313. IN DISPATCHINTERFACE *pdiCIExit,
  314. IN LONG Flags);
  315. HRESULT
  316. CIExit_EnumerateExtensions(
  317. IN DISPATCHINTERFACE *pdiCIExit,
  318. OUT BSTR *pstrExtensionName);
  319. HRESULT
  320. CIExit_EnumerateExtensionsClose(
  321. IN DISPATCHINTERFACE *pdiCIExit);
  322. HRESULT
  323. CIExit_EnumerateAttributesSetup(
  324. IN DISPATCHINTERFACE *pdiCIExit,
  325. IN LONG Flags);
  326. HRESULT
  327. CIExit_EnumerateAttributes(
  328. IN DISPATCHINTERFACE *pdiCIExit,
  329. OUT BSTR *pstrAttributeName);
  330. HRESULT
  331. CIExit_EnumerateAttributesClose(
  332. IN DISPATCHINTERFACE *pdiCIExit);
  333. //+-------------------------------------------------------------------------
  334. // ICertServerPolicy dispatch support
  335. HRESULT
  336. CIPolicy_Init(
  337. IN DWORD Flags, // See DispatchSetup() Flags
  338. IN OUT DISPATCHINTERFACE *pdiCIPolicy);
  339. VOID
  340. CIPolicy_Release(
  341. IN OUT DISPATCHINTERFACE *pdiCIPolicy);
  342. HRESULT
  343. CIPolicy_SetContext(
  344. IN DISPATCHINTERFACE *pdiCIPolicy,
  345. IN LONG Context);
  346. HRESULT
  347. CIPolicy_GetRequestProperty(
  348. IN DISPATCHINTERFACE *pdiCIPolicy,
  349. IN WCHAR const *pwszPropName,
  350. IN LONG PropertyType,
  351. OUT BSTR *pbstrPropValue);
  352. HRESULT
  353. CIPolicy_GetRequestAttribute(
  354. IN DISPATCHINTERFACE *pdiCIPolicy,
  355. IN WCHAR const *pwszPropName,
  356. OUT BSTR *pbstrPropValue);
  357. HRESULT
  358. CIPolicy_GetCertificateProperty(
  359. IN DISPATCHINTERFACE *pdiCIPolicy,
  360. IN WCHAR const *pwszPropName,
  361. IN LONG PropertyType,
  362. OUT BSTR *pbstrPropValue);
  363. HRESULT
  364. CIPolicy_SetCertificateProperty(
  365. IN DISPATCHINTERFACE *pdiCIPolicy,
  366. IN WCHAR const *pwszPropName,
  367. IN LONG PropertyType,
  368. IN WCHAR const *pwszPropValue);
  369. HRESULT
  370. CIPolicy_GetCertificateExtension(
  371. IN DISPATCHINTERFACE *pdiCIPolicy,
  372. IN WCHAR const *pwszExtensionName,
  373. IN LONG Type,
  374. OUT BSTR *pbstrValue);
  375. HRESULT
  376. CIPolicy_GetCertificateExtensionFlags(
  377. IN DISPATCHINTERFACE *pdiCIPolicy,
  378. OUT LONG *pExtFlags);
  379. HRESULT
  380. CIPolicy_SetCertificateExtension(
  381. IN DISPATCHINTERFACE *pdiCIPolicy,
  382. IN WCHAR const *pwszExtensionName,
  383. IN LONG Type,
  384. IN LONG ExtFlags,
  385. IN void const *pvValue);
  386. HRESULT
  387. CIPolicy_EnumerateExtensionsSetup(
  388. IN DISPATCHINTERFACE *pdiCIPolicy,
  389. IN LONG Flags);
  390. HRESULT
  391. CIPolicy_EnumerateExtensions(
  392. IN DISPATCHINTERFACE *pdiCIPolicy,
  393. OUT BSTR *pstrExtensionName);
  394. HRESULT
  395. CIPolicy_EnumerateExtensionsClose(
  396. IN DISPATCHINTERFACE *pdiCIPolicy);
  397. HRESULT
  398. CIPolicy_EnumerateAttributesSetup(
  399. IN DISPATCHINTERFACE *pdiCIPolicy,
  400. IN LONG Flags);
  401. HRESULT
  402. CIPolicy_EnumerateAttributes(
  403. IN DISPATCHINTERFACE *pdiCIPolicy,
  404. OUT BSTR *pstrAttributeName);
  405. HRESULT
  406. CIPolicy_EnumerateAttributesClose(
  407. IN DISPATCHINTERFACE *pdiCIPolicy);
  408. //+-------------------------------------------------------------------------
  409. // ICertAdmin dispatch support
  410. HRESULT
  411. Admin_Init(
  412. IN DWORD Flags, // See DispatchSetup() Flags
  413. IN OUT DISPATCHINTERFACE *pdiAdmin);
  414. VOID
  415. Admin_Release(
  416. IN OUT DISPATCHINTERFACE *pdiAdmin);
  417. HRESULT
  418. Admin_IsValidCertificate(
  419. IN DISPATCHINTERFACE *pdiAdmin,
  420. IN WCHAR const *pwszConfig,
  421. IN WCHAR const *pwszSerialNumber,
  422. OUT LONG *pDisposition);
  423. HRESULT
  424. Admin_GetRevocationReason(
  425. IN DISPATCHINTERFACE *pdiAdmin,
  426. OUT LONG *pReason);
  427. HRESULT
  428. Admin_RevokeCertificate(
  429. IN DISPATCHINTERFACE *pdiAdmin,
  430. IN WCHAR const *pwszConfig,
  431. IN WCHAR const *pwszSerialNumber,
  432. IN LONG Reason,
  433. IN DATE Date);
  434. HRESULT
  435. Admin_SetRequestAttributes(
  436. IN DISPATCHINTERFACE *pdiAdmin,
  437. IN WCHAR const *pwszConfig,
  438. IN LONG RequestId,
  439. IN WCHAR const *pwszAttributes);
  440. HRESULT
  441. Admin_SetCertificateExtension(
  442. IN DISPATCHINTERFACE *pdiAdmin,
  443. IN WCHAR const *pwszConfig,
  444. IN LONG RequestId,
  445. IN WCHAR const *pwszExtensionName,
  446. IN LONG Type,
  447. IN LONG Flags,
  448. IN VARIANT const *pvarValue);
  449. HRESULT
  450. Admin_DenyRequest(
  451. IN DISPATCHINTERFACE *pdiAdmin,
  452. IN WCHAR const *pwszConfig,
  453. IN LONG RequestId);
  454. HRESULT
  455. Admin_ResubmitRequest(
  456. IN DISPATCHINTERFACE *pdiAdmin,
  457. IN WCHAR const *pwszConfig,
  458. IN LONG RequestId,
  459. OUT LONG *pDisposition);
  460. HRESULT
  461. Admin_PublishCRL(
  462. IN DISPATCHINTERFACE *pdiAdmin,
  463. IN WCHAR const *pwszConfig,
  464. IN DATE Date);
  465. HRESULT
  466. Admin_GetCRL(
  467. IN DISPATCHINTERFACE *pdiAdmin,
  468. IN WCHAR const *pwszConfig,
  469. IN LONG Flags,
  470. OUT BSTR *pstrCRL);
  471. HRESULT
  472. Admin_ImportCertificate(
  473. IN DISPATCHINTERFACE *pdiAdmin,
  474. IN WCHAR const *pwszConfig,
  475. IN WCHAR const *pwszCertificate,
  476. IN DWORD cbCertificate,
  477. IN LONG dwFlags,
  478. OUT LONG *RequestId);
  479. HRESULT
  480. Admin2_PublishCRLs(
  481. IN DISPATCHINTERFACE *pdiAdmin,
  482. IN WCHAR const *pwszConfig,
  483. IN DATE Date,
  484. IN LONG CRLFlags); // CA_CRL_*
  485. HRESULT
  486. Admin2_GetCAProperty(
  487. IN DISPATCHINTERFACE *pdiAdmin,
  488. IN WCHAR const *pwszConfig,
  489. IN LONG PropId,
  490. IN LONG PropIndex,
  491. IN LONG PropType,
  492. IN LONG Flags,
  493. OUT VOID *pPropertyValue);
  494. HRESULT
  495. Admin2_SetCAProperty(
  496. IN WCHAR const *pwszConfig,
  497. IN LONG PropId, // CR_PROP_*
  498. IN LONG PropIndex,
  499. IN LONG PropType, // PROPTYPE_*
  500. IN VARIANT *pvarPropertyValue);
  501. HRESULT
  502. Admin2_GetCAPropertyFlags(
  503. IN DISPATCHINTERFACE *pdiAdmin,
  504. IN WCHAR const *pwszConfig,
  505. IN LONG PropId,
  506. OUT LONG *pPropFlags);
  507. HRESULT
  508. Admin2_GetCAPropertyDisplayName(
  509. IN DISPATCHINTERFACE *pdiAdmin,
  510. IN WCHAR const *pwszConfig,
  511. IN LONG PropId,
  512. OUT BSTR *pstrDisplayName);
  513. HRESULT
  514. Admin2_GetArchivedKey(
  515. IN DISPATCHINTERFACE *pdiAdmin,
  516. IN WCHAR const *pwszConfig,
  517. IN LONG RequestId,
  518. IN LONG Flags, // CR_OUT_*
  519. OUT BSTR *pstrArchivedKey);
  520. HRESULT
  521. Admin2_GetConfigEntry(
  522. IN DISPATCHINTERFACE *pdiAdmin,
  523. IN WCHAR const *pwszConfig,
  524. IN WCHAR const *pwszNodePath,
  525. IN WCHAR const *pwszEntryName,
  526. OUT VARIANT *pvarEntry);
  527. HRESULT
  528. Admin2_SetConfigEntry(
  529. IN DISPATCHINTERFACE *pdiAdmin,
  530. IN WCHAR const *pwszConfig,
  531. IN WCHAR const *pwszNodePath,
  532. IN WCHAR const *pwszEntryName,
  533. IN VARIANT const *pvarEntry);
  534. HRESULT
  535. Admin2_ImportKey(
  536. IN DISPATCHINTERFACE *pdiAdmin,
  537. IN WCHAR const *pwszConfig,
  538. IN LONG RequestId,
  539. IN WCHAR const *pwszCertHash,
  540. IN LONG Flags,
  541. IN WCHAR const *pwszKey,
  542. IN DWORD cbKey);
  543. HRESULT
  544. Admin2_GetMyRoles(
  545. IN DISPATCHINTERFACE *pdiAdmin,
  546. IN WCHAR const *pwszConfig,
  547. OUT LONG *pRoles); // CA_ACCESS_*
  548. HRESULT
  549. Admin2_DeleteRow(
  550. IN DISPATCHINTERFACE *pdiAdmin,
  551. IN WCHAR const *pwszConfig,
  552. IN LONG Flags, // CDR_*
  553. IN DATE Date,
  554. IN LONG Table, // CVRC_TABLE_*
  555. IN LONG RowId,
  556. OUT LONG *pcDeleted);
  557. HRESULT
  558. AdminRevokeCertificate(
  559. IN DWORD Flags,
  560. OPTIONAL IN WCHAR const *pwszConfig,
  561. IN WCHAR const *pwszSerialNumber,
  562. IN LONG Reason,
  563. IN DATE Date);
  564. //+-------------------------------------------------------------------------
  565. // ICertView dispatch support
  566. HRESULT
  567. View_Init(
  568. IN DWORD Flags, // See DispatchSetup() Flags
  569. IN OUT DISPATCHINTERFACE *pdiView);
  570. VOID
  571. View_Release(
  572. IN OUT DISPATCHINTERFACE *pdiView);
  573. HRESULT
  574. View_OpenConnection(
  575. IN DISPATCHINTERFACE *pdiView,
  576. IN WCHAR const *pwszConfig);
  577. HRESULT
  578. View_EnumCertViewColumn(
  579. IN DISPATCHINTERFACE *pdiView,
  580. IN LONG fResultColumn,
  581. IN OUT DISPATCHINTERFACE *pdiViewColumn);
  582. HRESULT
  583. View_GetColumnCount(
  584. IN DISPATCHINTERFACE *pdiView,
  585. IN LONG fResultColumn,
  586. OUT LONG *pcColumn);
  587. HRESULT
  588. View_GetColumnIndex(
  589. IN DISPATCHINTERFACE *pdiView,
  590. IN LONG fResultColumn,
  591. IN WCHAR const *pwszColumnName,
  592. OUT LONG *pColumnIndex);
  593. HRESULT
  594. View_SetResultColumnCount(
  595. IN DISPATCHINTERFACE *pdiView,
  596. IN LONG cResultColumn);
  597. HRESULT
  598. View_SetResultColumn(
  599. IN DISPATCHINTERFACE *pdiView,
  600. IN LONG ColumnIndex);
  601. HRESULT
  602. View_SetRestriction(
  603. IN DISPATCHINTERFACE *pdiView,
  604. IN LONG ColumnIndex,
  605. IN LONG SeekOperator,
  606. IN LONG SortOrder,
  607. IN VARIANT const *pvarValue);
  608. HRESULT
  609. View_OpenView(
  610. IN DISPATCHINTERFACE *pdiView,
  611. IN OUT DISPATCHINTERFACE *pdiViewRow);
  612. HRESULT
  613. View2_SetTable(
  614. IN DISPATCHINTERFACE *pdiView,
  615. IN LONG Table);
  616. //+-------------------------------------------------------------------------
  617. // IEnumCERTVIEWCOLUMN dispatch support
  618. interface IEnumCERTVIEWCOLUMN;
  619. HRESULT
  620. ViewColumn_Init2(
  621. IN BOOL fIDispatch,
  622. IN IEnumCERTVIEWCOLUMN *pEnumColumn,
  623. IN OUT DISPATCHINTERFACE *pdiViewColumn);
  624. VOID
  625. ViewColumn_Release(
  626. IN OUT DISPATCHINTERFACE *pdiViewColumn);
  627. HRESULT
  628. ViewColumn_Next(
  629. IN DISPATCHINTERFACE *pdiViewColumn,
  630. OUT LONG *pIndex);
  631. HRESULT
  632. ViewColumn_GetName(
  633. IN DISPATCHINTERFACE *pdiViewColumn,
  634. OUT BSTR *pstrOut);
  635. HRESULT
  636. ViewColumn_GetDisplayName(
  637. IN DISPATCHINTERFACE *pdiViewColumn,
  638. OUT BSTR *pstrOut);
  639. HRESULT
  640. ViewColumn_GetType(
  641. IN DISPATCHINTERFACE *pdiViewColumn,
  642. OUT LONG *pType);
  643. HRESULT
  644. ViewColumn_IsIndexed(
  645. IN DISPATCHINTERFACE *pdiViewColumn,
  646. OUT LONG *pIndexed);
  647. HRESULT
  648. ViewColumn_GetMaxLength(
  649. IN DISPATCHINTERFACE *pdiViewColumn,
  650. OUT LONG *pMaxLength);
  651. HRESULT
  652. ViewColumn_GetValue(
  653. IN DISPATCHINTERFACE *pdiViewColumn,
  654. IN LONG Flags,
  655. IN LONG ColumnType,
  656. OUT VOID *pColumnValue);
  657. HRESULT
  658. ViewColumn_Skip(
  659. IN DISPATCHINTERFACE *pdiViewColumn,
  660. IN LONG celt);
  661. HRESULT
  662. ViewColumn_Reset(
  663. IN DISPATCHINTERFACE *pdiViewColumn);
  664. HRESULT
  665. ViewColumn_Clone(
  666. IN DISPATCHINTERFACE *pdiViewColumn,
  667. IN OUT DISPATCHINTERFACE *pdiViewColumnClone);
  668. //+-------------------------------------------------------------------------
  669. // IEnumCERTVIEWATTRIBUTE dispatch support
  670. interface IEnumCERTVIEWATTRIBUTE;
  671. HRESULT
  672. ViewAttribute_Init2(
  673. IN BOOL fIDispatch,
  674. IN IEnumCERTVIEWATTRIBUTE *pEnumAttribute,
  675. IN OUT DISPATCHINTERFACE *pdiViewAttribute);
  676. VOID
  677. ViewAttribute_Release(
  678. IN OUT DISPATCHINTERFACE *pdiViewAttribute);
  679. HRESULT
  680. ViewAttribute_Next(
  681. IN DISPATCHINTERFACE *pdiViewAttribute,
  682. OUT LONG *pIndex);
  683. HRESULT
  684. ViewAttribute_GetName(
  685. IN DISPATCHINTERFACE *pdiViewAttribute,
  686. OUT BSTR *pstrOut);
  687. HRESULT
  688. ViewAttribute_GetValue(
  689. IN DISPATCHINTERFACE *pdiViewAttribute,
  690. OUT BSTR *pstrOut);
  691. HRESULT
  692. ViewAttribute_Skip(
  693. IN DISPATCHINTERFACE *pdiViewAttribute,
  694. IN LONG celt);
  695. HRESULT
  696. ViewAttribute_Reset(
  697. IN DISPATCHINTERFACE *pdiViewAttribute);
  698. HRESULT
  699. ViewAttribute_Clone(
  700. IN DISPATCHINTERFACE *pdiViewAttribute,
  701. IN OUT DISPATCHINTERFACE *pdiViewAttributeClone);
  702. //+-------------------------------------------------------------------------
  703. // IEnumCERTVIEWEXTENSION dispatch support
  704. interface IEnumCERTVIEWEXTENSION;
  705. HRESULT
  706. ViewExtension_Init2(
  707. IN BOOL fIDispatch,
  708. IN IEnumCERTVIEWEXTENSION *pEnumExtension,
  709. IN OUT DISPATCHINTERFACE *pdiViewExtension);
  710. VOID
  711. ViewExtension_Release(
  712. IN OUT DISPATCHINTERFACE *pdiViewExtension);
  713. HRESULT
  714. ViewExtension_Next(
  715. IN DISPATCHINTERFACE *pdiViewExtension,
  716. OUT LONG *pIndex);
  717. HRESULT
  718. ViewExtension_GetName(
  719. IN DISPATCHINTERFACE *pdiViewExtension,
  720. OUT BSTR *pstrOut);
  721. HRESULT
  722. ViewExtension_GetFlags(
  723. IN DISPATCHINTERFACE *pdiViewExtension,
  724. OUT LONG *pFlags);
  725. HRESULT
  726. ViewExtension_GetValue(
  727. IN DISPATCHINTERFACE *pdiViewExtension,
  728. IN LONG Type,
  729. IN LONG Flags,
  730. OUT VOID *pValue);
  731. HRESULT
  732. ViewExtension_Skip(
  733. IN DISPATCHINTERFACE *pdiViewExtension,
  734. IN LONG celt);
  735. HRESULT
  736. ViewExtension_Reset(
  737. IN DISPATCHINTERFACE *pdiViewExtension);
  738. HRESULT
  739. ViewExtension_Clone(
  740. IN DISPATCHINTERFACE *pdiViewExtension,
  741. IN OUT DISPATCHINTERFACE *pdiViewExtensionClone);
  742. //+-------------------------------------------------------------------------
  743. // IEnumCERTVIEWROW dispatch support
  744. interface IEnumCERTVIEWROW;
  745. HRESULT
  746. ViewRow_Init2(
  747. IN BOOL fIDispatch,
  748. IN IEnumCERTVIEWROW *pEnumRow,
  749. IN OUT DISPATCHINTERFACE *pdiViewRow);
  750. VOID
  751. ViewRow_Release(
  752. IN OUT DISPATCHINTERFACE *pdiViewRow);
  753. HRESULT
  754. ViewRow_Next(
  755. IN DISPATCHINTERFACE *pdiViewRow,
  756. OUT LONG *pIndex);
  757. HRESULT
  758. ViewRow_GetMaxIndex(
  759. IN DISPATCHINTERFACE *pdiViewRow,
  760. OUT LONG *pIndex);
  761. HRESULT
  762. ViewRow_EnumCertViewColumn(
  763. IN DISPATCHINTERFACE *pdiViewRow,
  764. IN OUT DISPATCHINTERFACE *pdiViewColumn);
  765. HRESULT
  766. ViewRow_EnumCertViewAttribute(
  767. IN DISPATCHINTERFACE *pdiViewRow,
  768. IN LONG Flags,
  769. IN OUT DISPATCHINTERFACE *pdiViewAttribute);
  770. HRESULT
  771. ViewRow_EnumCertViewExtension(
  772. IN DISPATCHINTERFACE *pdiViewRow,
  773. IN LONG Flags,
  774. IN OUT DISPATCHINTERFACE *pdiViewExtension);
  775. HRESULT
  776. ViewRow_Skip(
  777. IN DISPATCHINTERFACE *pdiViewRow,
  778. IN LONG celt);
  779. HRESULT
  780. ViewRow_Reset(
  781. IN DISPATCHINTERFACE *pdiViewRow);
  782. HRESULT
  783. ViewRow_Clone(
  784. IN DISPATCHINTERFACE *pdiViewRow,
  785. IN OUT DISPATCHINTERFACE *pdiViewRowClone);
  786. //+-------------------------------------------------------------------------
  787. // IManageModule dispatch support
  788. HRESULT
  789. ManageModule_Init(
  790. IN DWORD Flags,
  791. IN WCHAR const *pszProgID,
  792. IN CLSID const *pclsid,
  793. IN OUT DISPATCHINTERFACE *pdiManage);
  794. HRESULT
  795. ManageModule_Init2(
  796. IN BOOL fIDispatch,
  797. IN ICertManageModule *pManage,
  798. OUT DISPATCHINTERFACE *pdiManage);
  799. VOID
  800. ManageModule_Release(
  801. IN OUT DISPATCHINTERFACE *pdiManage);
  802. HRESULT
  803. ManageModule_GetProperty(
  804. IN DISPATCHINTERFACE *pdiManage,
  805. IN WCHAR const *pwszConfig,
  806. IN WCHAR const *pwszStorageLocation,
  807. IN WCHAR const *pwszPropertyName,
  808. IN DWORD dwFlags,
  809. IN LONG PropertyType,
  810. OUT VOID *pProperty);
  811. HRESULT
  812. ManageModule_SetProperty(
  813. IN DISPATCHINTERFACE *pdiManage,
  814. IN WCHAR const *pwszConfig,
  815. IN WCHAR const *pwszStorageLocation,
  816. IN WCHAR const *pwszPropertyName,
  817. IN DWORD dwFlags,
  818. IN LONG PropertyType,
  819. IN VOID *pProperty);
  820. HRESULT
  821. ManageModule_Configure(
  822. IN DISPATCHINTERFACE *pdiManage,
  823. IN WCHAR const *pwszConfig,
  824. IN WCHAR const *pwszStorageLocation,
  825. IN DWORD dwFlags);
  826. //+-------------------------------------------------------------------------
  827. // ICertPolicy dispatch support
  828. #define POLICY_VERIFYREQUEST 0
  829. #define POLICY_GETDESCRIPTION 1
  830. #define POLICY_INITIALIZE 2
  831. #define POLICY_SHUTDOWN 3
  832. #define POLICY2_GETMANAGEMODULE 4
  833. #define CPOLICYDISPATCH_V1 POLICY2_GETMANAGEMODULE
  834. #define CPOLICYDISPATCH_V2 CPOLICYDISPATCH
  835. extern DWORD s_acPolicyDispatch[2];
  836. extern IID const *s_apPolicyiid[2];
  837. extern DISPATCHTABLE g_adtPolicy[];
  838. extern DWORD CPOLICYDISPATCH;
  839. HRESULT
  840. Policy_Initialize(
  841. IN DISPATCHINTERFACE *pdiPolicy,
  842. IN WCHAR const *pwszConfig);
  843. HRESULT
  844. Policy_ShutDown(
  845. IN DISPATCHINTERFACE *pdiPolicy);
  846. HRESULT
  847. Policy_VerifyRequest(
  848. IN DISPATCHINTERFACE *pdiPolicy,
  849. IN WCHAR const *pwszConfig,
  850. IN LONG Context,
  851. IN LONG bNewRequest,
  852. IN LONG Flags,
  853. OUT LONG *pResult);
  854. HRESULT
  855. Policy_GetDescription(
  856. IN DISPATCHINTERFACE *pdiPolicy,
  857. OUT BSTR *pstrDescription);
  858. HRESULT
  859. Policy2_GetManageModule(
  860. IN DISPATCHINTERFACE *pdiPolicy,
  861. OUT DISPATCHINTERFACE *pdiManageModule);
  862. HRESULT
  863. Policy_Init(
  864. IN DWORD Flags,
  865. IN LPCWSTR pcwszProgID,
  866. IN CLSID const *pclsid,
  867. OUT DISPATCHINTERFACE *pdiCIPolicy);
  868. VOID
  869. Policy_Release(
  870. IN OUT DISPATCHINTERFACE *pdiManage);
  871. //+-------------------------------------------------------------------------
  872. // ICertExit dispatch support
  873. #define EXIT_INITIALIZE 0
  874. #define EXIT_NOTIFY 1
  875. #define EXIT_GETDESCRIPTION 2
  876. #define EXIT2_GETMANAGEMODULE 3
  877. #define CEXITDISPATCH_V1 EXIT2_GETMANAGEMODULE
  878. #define CEXITDISPATCH_V2 CEXITDISPATCH
  879. extern DISPATCHTABLE g_adtExit[];
  880. extern DWORD CEXITDISPATCH;
  881. extern DWORD s_acExitDispatch[2];
  882. extern IID const *s_apExitiid[2];
  883. HRESULT
  884. Exit_Init(
  885. IN DWORD Flags,
  886. IN LPCWSTR pcwszProgID,
  887. IN CLSID const *pclsid,
  888. OUT DISPATCHINTERFACE *pdi);
  889. VOID
  890. Exit_Release(
  891. IN OUT DISPATCHINTERFACE *pdiManage);
  892. HRESULT
  893. Exit_Initialize(
  894. IN DISPATCHINTERFACE *pdiExit,
  895. IN BSTR strDescription,
  896. IN WCHAR const *pwszConfig,
  897. OUT LONG *pEventMask);
  898. HRESULT
  899. Exit_Notify(
  900. IN DISPATCHINTERFACE *pdiExit,
  901. IN BSTR strDescription,
  902. IN LONG ExitEvent,
  903. IN LONG Context);
  904. HRESULT
  905. Exit_GetDescription(
  906. IN DISPATCHINTERFACE *pdiExit,
  907. OUT BSTR *pstrDescription);
  908. HRESULT
  909. Exit2_GetManageModule(
  910. IN DISPATCHINTERFACE *pdiExit,
  911. OUT DISPATCHINTERFACE *pdiManageModule);
  912. #endif // __CSDISP_H__