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.

239 lines
9.0 KiB

  1. // COMhelper.idl : IDL source for COMhelper.dll
  2. //
  3. // This file will be processed by the MIDL tool to
  4. // produce the type library (COMhelper.tlb) and marshalling code.
  5. import "oaidl.idl";
  6. import "ocidl.idl";
  7. interface ISystemSetting;
  8. interface INetWorks;
  9. interface IComputer;
  10. interface ILocalSetting;
  11. interface IAccountNames;
  12. interface ICryptRandom;
  13. [
  14. object,
  15. uuid(C844CA86-7B60-4460-A0A6-74FEC5ED508F),
  16. dual,
  17. helpstring("INetworkTools Interface"),
  18. pointer_default(unique)
  19. ]
  20. interface INetworkTools : IDispatch
  21. {
  22. [id(1), helpstring("Ping another system")] HRESULT Ping([in] BSTR bstrIP, [out, retval] BOOL* bFoundSystem);
  23. };
  24. [
  25. object,
  26. uuid(AD3235EE-4BAD-4306-AEE0-BCFAE2A67074),
  27. dual,
  28. helpstring("IAccountNames Interface"),
  29. pointer_default(unique)
  30. ]
  31. interface IAccountNames : IDispatch
  32. {
  33. [id(1), helpstring("method Translate")] HRESULT Translate([in] BSTR Name, [out, retval] BSTR * pbstrName);
  34. [id(2), helpstring("Return well-known name for Everyone group")] HRESULT Everyone([out, retval] BSTR * pbstrName);
  35. [id(3), helpstring("Return well-known name for local Administrator")] HRESULT Administrator([out, retval] BSTR * pbstrName);
  36. [id(4), helpstring("Return well-known name for local Administrators group")] HRESULT Administrators([out, retval] BSTR * pbstrName);
  37. [id(5), helpstring("Return well-known name for local Guest account")] HRESULT Guest([out, retval] BSTR * pbstrName);
  38. [id(6), helpstring("Return well-known name for local Guests group")] HRESULT Guests([out, retval] BSTR * pbstrName);
  39. [id(7), helpstring("Return well-known name for local System account")] HRESULT System([out, retval] BSTR * pbstrName);
  40. };
  41. [
  42. object,
  43. uuid(43D38498-732C-4405-9210-F9E51C5CCB3D),
  44. dual,
  45. helpstring("INetWorks Interface"),
  46. pointer_default(unique)
  47. ]
  48. interface INetWorks : IDispatch
  49. {
  50. [id(1), helpstring("method EnumNics")] HRESULT EnumNics([out, retval] VARIANT * pvarNicNames);
  51. [id(2), helpstring("method EnumProtocol")] HRESULT EnumProtocol([in] BSTR Name, [out] VARIANT * ProtocolName, [out] VARIANT * IsBonded);
  52. [id(3), helpstring("method SetNicProtocol")] HRESULT SetNicProtocol([in] BSTR NicName, [in] BSTR ProtocolName, [in] BOOL bind);
  53. };
  54. [
  55. object,
  56. uuid(58D819BD-AD45-4E85-B317-4D22B4B9F597),
  57. dual,
  58. helpstring("IComputer Interface"),
  59. pointer_default(unique)
  60. ]
  61. interface IComputer : IDispatch
  62. {
  63. [propget, id(1), helpstring("property ComputerName")] HRESULT ComputerName([out, retval] BSTR *pVal);
  64. [propput, id(1), helpstring("property ComputerName")] HRESULT ComputerName([in] BSTR newVal);
  65. [propget, id(2), helpstring("property FullQualifiedComputerName")] HRESULT FullQualifiedComputerName([out, retval] BSTR *pVal);
  66. [propput, id(2), helpstring("property FullQualifiedComputerName")] HRESULT FullQualifiedComputerName([in] BSTR newVal);
  67. [propget, id(3), helpstring("property WorkgroupName")] HRESULT WorkgroupName([out, retval] BSTR *pVal);
  68. [propput, id(3), helpstring("property WorkgroupName")] HRESULT WorkgroupName([in] BSTR newVal);
  69. [propget, id(4), helpstring("property DomainName")] HRESULT DomainName([out, retval] BSTR *pVal);
  70. [propput, id(4), helpstring("property DomainName")] HRESULT DomainName([in] BSTR newVal);
  71. [id(5), helpstring("method EnumTrustedDomains")] HRESULT EnumTrustedDomains([out,retval] VARIANT *pvarTDomains);
  72. [id(6), helpstring("method LogonInfo")] HRESULT LogonInfo([in] BSTR UserName, [in] BSTR Password);
  73. };
  74. [
  75. object,
  76. uuid(4A0AEDA3-5F50-42A6-922E-B4F2F2E67016),
  77. dual,
  78. helpstring("ILocalSetting Interface"),
  79. pointer_default(unique)
  80. ]
  81. interface ILocalSetting : IDispatch
  82. {
  83. [propget, id(1), helpstring("property Language")] HRESULT Language([out, retval] BSTR *pVal);
  84. [propput, id(1), helpstring("property Language")] HRESULT Language([in] BSTR newVal);
  85. [propget, id(2), helpstring("property Time")] HRESULT Time([out, retval] DATE *pVal);
  86. [propput, id(2), helpstring("property Time")] HRESULT Time([in] DATE newVal);
  87. [propget, id(3), helpstring("property TimeZone")] HRESULT TimeZone([out, retval] BSTR *pVal);
  88. [propput, id(3), helpstring("property TimeZone")] HRESULT TimeZone([in] BSTR newVal);
  89. [id(4), helpstring("method EnumTimeZones")] HRESULT EnumTimeZones([out,retval] VARIANT *pvarTZones);
  90. };
  91. [
  92. object,
  93. uuid(1EC2C8EE-AD0E-4066-9C4E-6707DFF66848),
  94. dual,
  95. helpstring("ISystemSetting Interface"),
  96. pointer_default(unique)
  97. ]
  98. interface ISystemSetting : IDispatch
  99. {
  100. [propget, id(1), helpstring("property NetWorks")] HRESULT NetWorks([out, retval] INetWorks **pVal);
  101. [propget, id(2), helpstring("property Computer")] HRESULT Computer([out, retval] IComputer **pVal);
  102. [propget, id(3), helpstring("property LocalSetting")] HRESULT LocalSetting([out, retval] ILocalSetting **pVal);
  103. [id(4), helpstring("method Apply")] HRESULT Apply([in] BOOL bDeferReboot);
  104. [id(5), helpstring("method IsRebootRequired")] HRESULT IsRebootRequired([out] VARIANT * WarningMessage, [out, retval] BOOL* Reboot);
  105. [id(6), helpstring("Sleep")] HRESULT Sleep([in] DWORD dwMilliSecs);
  106. };
  107. [
  108. object,
  109. uuid(3D56A25D-6A2F-4FF1-ADD4-3E0748404E80),
  110. dual,
  111. helpstring("IBackup Interface"),
  112. pointer_default(unique)
  113. ]
  114. interface IBackup : IDispatch
  115. {
  116. [id(1), helpstring("method Backup")] HRESULT Backup([in] BSTR BackupDirName);
  117. [id(2), helpstring("method Restore")] HRESULT Restore([in] BSTR RestoreFromDirName);
  118. [id(3), helpstring("method EnumBackupDirNames")] HRESULT EnumBackupDirNames([out] VARIANT * BackupDirNames, [out] VARIANT * DirDates, [out] VARIANT * DirFlags);
  119. [id(4), helpstring("method DeleteBackup")] HRESULT DeleteBackup([in] BSTR BackupDirName);
  120. };
  121. [
  122. object,
  123. uuid(D75C7A2D-0F68-4DA5-B7EA-F201F3B3995C),
  124. dual,
  125. helpstring("IReboot Interface"),
  126. pointer_default(unique)
  127. ]
  128. interface IReboot : IDispatch
  129. {
  130. [id(1), helpstring("method Shutdown")] HRESULT Shutdown([in] BOOL RebootFlag);
  131. };
  132. [
  133. object,
  134. uuid(CDEB3E42-8496-4c62-9F6E-6E9C4BE88FF8),
  135. dual,
  136. helpstring("ICryptRandom Interface"),
  137. pointer_default(unique)
  138. ]
  139. interface ICryptRandom : IDispatch
  140. {
  141. [id(1), helpstring("Generate a string of hex values representing cryptographically random data of the specified length.")]
  142. HRESULT GetRandomHexString([in] long EffectiveByteSize,
  143. [out, retval] BSTR *RandomData);
  144. };
  145. [
  146. uuid(64E29446-6C67-46A8-9320-757158427090),
  147. version(1.0),
  148. helpstring("COMhelper 1.0 Type Library")
  149. ]
  150. library COMHELPERLib
  151. {
  152. importlib("stdole32.tlb");
  153. importlib("stdole2.tlb");
  154. [
  155. uuid(0F0B086F-C590-4C6A-95AD-9343116D07EF),
  156. helpstring("NetWorks Class"),
  157. noncreatable
  158. ]
  159. coclass NetWorks
  160. {
  161. [default] interface INetWorks;
  162. };
  163. [
  164. uuid(D9826F8B-4DF6-48DE-BC62-704BDB455C46),
  165. helpstring("Computer Class"),
  166. noncreatable
  167. ]
  168. coclass Computer
  169. {
  170. [default] interface IComputer;
  171. };
  172. [
  173. uuid(6FD26469-1C45-4C0F-9A3A-0EDBE3C3C11F),
  174. helpstring("LocalSetting Class"),
  175. noncreatable
  176. ]
  177. coclass LocalSetting
  178. {
  179. [default] interface ILocalSetting;
  180. };
  181. [
  182. uuid(5BC6115D-C1AA-4132-8221-3A2DDAD679C3),
  183. helpstring("SystemSetting Class")
  184. ]
  185. coclass SystemSetting
  186. {
  187. [default] interface ISystemSetting;
  188. };
  189. [
  190. uuid(C1EF95AF-E3C9-4562-A45C-4F3E8D9C41E1),
  191. helpstring("Backup Class")
  192. ]
  193. coclass Backup
  194. {
  195. [default] interface IBackup;
  196. };
  197. [
  198. uuid(9AAF3A87-A3F8-412D-AF08-DF930865B06B),
  199. helpstring("Reboot Class")
  200. ]
  201. coclass Reboot
  202. {
  203. [default] interface IReboot;
  204. };
  205. [
  206. uuid(ACC458EE-8076-4A41-A96E-173AA6133487),
  207. helpstring("AccountNames Class"),
  208. ]
  209. coclass AccountNames
  210. {
  211. [default] interface IAccountNames;
  212. };
  213. [
  214. uuid(1A6CA650-71FB-4224-BDD5-603693F66D64),
  215. helpstring("NetworkTools Class"),
  216. ]
  217. coclass NetworkTools
  218. {
  219. [default] interface INetworkTools;
  220. };
  221. [
  222. uuid(14F570F9-5026-41d9-B04A-10B42F3167E3),
  223. helpstring("CryptRandom class: helper function(s) for generating cryptographically random data."),
  224. ]
  225. coclass CryptRandom
  226. {
  227. [default] interface ICryptRandom;
  228. };
  229. };