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.

192 lines
6.1 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1998 - 1999
  6. //
  7. // File: scrdenrl.idl
  8. //
  9. //--------------------------------------------------------------------------
  10. // scrdenrl.idl : IDL source for scrdenrl.dll
  11. //
  12. // This file will be processed by the MIDL tool to
  13. // produce the type library (scrdenrl.tlb) and marshalling code.
  14. import "oaidl.idl";
  15. import "ocidl.idl";
  16. [
  17. object,
  18. uuid(753988a1-1357-436d-9cf5-f089bdd67d64),
  19. dual,
  20. helpstring("ISCrdEnr Interface"),
  21. pointer_default(unique)
  22. ]
  23. interface ISCrdEnr : IDispatch
  24. {
  25. [propget]
  26. HRESULT CSPCount(
  27. [out, retval] long *pVal);
  28. [propget]
  29. HRESULT CSPName(
  30. [out, retval] BSTR *pVal);
  31. [propput]
  32. HRESULT CSPName(
  33. [in] BSTR newVal);
  34. HRESULT selectUserName(
  35. [in] DWORD dwFlags);
  36. HRESULT enroll(
  37. [in] DWORD dwFlags);
  38. HRESULT getEnrolledCertificateName(
  39. [in] DWORD dwFlags,
  40. [retval][out] BSTR *pBstrCertName );
  41. HRESULT selectSigningCertificate(
  42. [in] DWORD dwFlags,
  43. [in] BSTR bstrCertTemplateName);
  44. HRESULT resetUser();
  45. HRESULT enumCSPName(
  46. [in] DWORD dwIndex,
  47. [in] DWORD dwFlags,
  48. [retval][out] BSTR *pbstrCSPName);
  49. HRESULT enumCertTemplateName(
  50. [in] DWORD dwIndex,
  51. [in] DWORD dwFlags,
  52. [retval][out] BSTR *pbstrCertTemplateName);
  53. HRESULT getCACount(
  54. [in] BSTR bstrCertTemplateName,
  55. [retval][out] long *pdwCACount);
  56. HRESULT getCAName(
  57. [in] DWORD dwFlags,
  58. [in] BSTR bstrCertTemplateName,
  59. [retval][out] BSTR *pbstrCAName);
  60. HRESULT setCAName(
  61. [in] DWORD dwFlags,
  62. [in] BSTR bstrCertTemplateName,
  63. [in] BSTR bstrCAName);
  64. HRESULT enumCAName(
  65. [in] DWORD dwIndex,
  66. [in] DWORD dwFlags,
  67. [in] BSTR bstrCertTemplateName,
  68. [retval][out] BSTR *pbstrCAName);
  69. HRESULT getSigningCertificateName(
  70. [in] DWORD dwFlags,
  71. [retval][out] BSTR *pbstrSigningCertName);
  72. HRESULT getUserName(
  73. [in] DWORD dwFlags,
  74. [retval][out] BSTR *pbstrUserName);
  75. HRESULT setUserName(
  76. [in] DWORD dwFlags,
  77. [in] BSTR bstrUserName);
  78. HRESULT setSigningCertificate(
  79. [in] DWORD dwFlags,
  80. [in] BSTR bstrCertTemplateName);
  81. HRESULT getCertTemplateCount(
  82. [in] DWORD dwFlags,
  83. [retval][out] long *pdwCertTemplateCount);
  84. HRESULT getCertTemplateName(
  85. [in] DWORD dwFlags,
  86. [retval][out] BSTR *pbstrCertTemplateName);
  87. HRESULT setCertTemplateName(
  88. [in] DWORD dwFlags,
  89. [in] BSTR bstrCertTemplateName);
  90. [propget]
  91. HRESULT EnrollmentStatus(
  92. [out, retval] LONG *plEnrollStatus);
  93. HRESULT getCertTemplateInfo(
  94. [in] BSTR bstrCertTemplateName,
  95. [in] LONG lType,
  96. [retval][out] VARIANT *pvarCertTemplateInfo);
  97. };
  98. [
  99. uuid(a7f33724-809a-4159-af92-de049a933a05),
  100. version(1.0),
  101. helpstring("scrdenrl 1.0 Type Library")
  102. ]
  103. library SCRDENRLLib
  104. {
  105. importlib("stdole32.tlb");
  106. importlib("stdole2.tlb");
  107. [
  108. uuid(c2bbea20-1f2b-492f-8a06-b1c5ffeace3b),
  109. helpstring("SCrdEnr Class")
  110. ]
  111. coclass SCrdEnr
  112. {
  113. [default] interface ISCrdEnr;
  114. };
  115. };
  116. //flags for both getCertTemplateCount and enumCertTemplateName
  117. // By default, all cert template will be returned.
  118. // SCARD_ENROLL_CERT_TEMPLATE_DISPLAY_NAME is for enumCertTemplateName
  119. // by default, the name parameter will be the certificate template's real name
  120. cpp_quote("#define SCARD_ENROLL_USER_CERT_TEMPLATE 0x01")
  121. cpp_quote("#define SCARD_ENROLL_MACHINE_CERT_TEMPLATE 0x02")
  122. cpp_quote("#define SCARD_ENROLL_CERT_TEMPLATE_DISPLAY_NAME 0x04")
  123. cpp_quote("#define SCARD_ENROLL_ENTERPRISE_CERT_TEMPLATE 0x08")
  124. cpp_quote("#define SCARD_ENROLL_OFFLINE_CERT_TEMPLATE 0x10")
  125. cpp_quote("#define SCARD_ENROLL_CROSS_CERT_TEMPLATE 0x20")
  126. //flags for setCAName, getCAName, and enumCAName
  127. // SCARD_ENROLL_CA_MACHINE_NAME treats the name as the CA's machine name.
  128. // SCARD_ENROLL_CA_UNIQUE_NAMEwill treats the name as the CA's unique name.
  129. // ie, the machinename\realName
  130. // by default, the name parameter will be the CA's real name.
  131. cpp_quote("#define SCARD_ENROLL_CA_MACHINE_NAME 0x01")
  132. cpp_quote("#define SCARD_ENROLL_CA_DISPLAY_NAME 0x02")
  133. cpp_quote("#define SCARD_ENROLL_CA_UNIQUE_NAME 0x03")
  134. // flags for getSigningCertificateName, getEnrolledCertificateName
  135. // If this flag is set, we will not diaplay the certiifcate common dialogue.
  136. cpp_quote("#define SCARD_ENROLL_NO_DISPLAY_CERT 0x01")
  137. // flag for setUserName and getUserName. This flag will allow setUserName
  138. // and getUserName to treat the name parameter as the user's UPN name.
  139. // By default, the name parameter will be the user's SAM compatible name
  140. cpp_quote("#define SCARD_ENROLL_UPN_NAME 0x01")
  141. //flags for getCertTemplateInfo
  142. cpp_quote("#define SCARD_CTINFO_KEYSPEC 0x01")
  143. cpp_quote("#define SCARD_CTINFO_KEYFLAGS 0x02")
  144. cpp_quote("#define SCARD_CTINFO_EXT_OID 0x03")
  145. cpp_quote("#define SCARD_CTINFO_EXT_MAJOR 0x04")
  146. cpp_quote("#define SCARD_CTINFO_EXT_MINOR 0x05")
  147. cpp_quote("#define SCARD_CTINFO_EXT_MINOR_FLAG 0x06")
  148. cpp_quote("#define SCARD_CTINFO_SUBJECTFLAG 0x07")
  149. cpp_quote("#define SCARD_CTINFO_CSPLIST_FIRST 0x08")
  150. cpp_quote("#define SCARD_CTINFO_CSPLIST_NEXT 0x09")
  151. cpp_quote("#define SCARD_CTINFO_GENERALFLAGS 0x0A")
  152. cpp_quote("#define SCARD_CTINFO_ENROLLMENTFLAGS 0x0B")
  153. cpp_quote("#define SCARD_CTINFO_PRIVATEKEYFLAGS 0x0C")
  154. cpp_quote("#define SCARD_CTINFO_RA_SIGNATURES 0x0D")
  155. //flags for selectSigningCertificate
  156. cpp_quote("#define SCARD_SELECT_TEMPLATENAME 0x0")
  157. cpp_quote("#define SCARD_SELECT_EKU 0x1")