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.

1093 lines
28 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (c) Microsoft Corporation. All rights reserved.
  5. //
  6. // File: HNetCfg.idl
  7. //
  8. //----------------------------------------------------------------------------
  9. cpp_quote("//+-------------------------------------------------------------------------")
  10. cpp_quote("//")
  11. cpp_quote("// Microsoft Windows")
  12. cpp_quote("// Copyright (c) Microsoft Corporation. All rights reserved.")
  13. cpp_quote("//")
  14. cpp_quote("//--------------------------------------------------------------------------")
  15. cpp_quote("#if ( _MSC_VER >= 800 )")
  16. cpp_quote("#pragma warning(disable:4201)")
  17. cpp_quote("#endif")
  18. #ifndef DO_NO_IMPORTS
  19. import "unknwn.idl";
  20. import "wtypes.idl";
  21. import "netcon.idl";
  22. import "netcfgx.idl";
  23. #endif
  24. cpp_quote("")
  25. cpp_quote("EXTERN_C const CLSID CLSID_HNetCfgMgr;")
  26. cpp_quote("EXTERN_C const CLSID CLSID_SharingManagerEnumPublicConnection;")
  27. cpp_quote("EXTERN_C const CLSID CLSID_SharingManagerEnumPrivateConnection;")
  28. cpp_quote("EXTERN_C const CLSID CLSID_SharingManagerEnumApplicationDefinition;")
  29. cpp_quote("EXTERN_C const CLSID CLSID_SharingManagerEnumPortMapping;")
  30. cpp_quote("EXTERN_C const CLSID CLSID_SharingApplicationDefinition;")
  31. cpp_quote("EXTERN_C const CLSID CLSID_SharingApplicationConfiguration;")
  32. cpp_quote("EXTERN_C const CLSID CLSID_NetSharingConfiguration;")
  33. // Reserved GUIDS for our use
  34. //
  35. // 85D18B6C-3032-11D4-9348-00C04F8EEB71 IID_IHNetCfgMgr
  36. // 85D18B6D-3032-11D4-9348-00C04F8EEB71 IID_IHNetBridgeSettings
  37. // 85D18B6E-3032-11D4-9348-00C04F8EEB71 IID_IHNetFirewallSettings
  38. // 85D18B6F-3032-11D4-9348-00C04F8EEB71 IID_IHNetIcsSettings
  39. // 85D18B70-3032-11D4-9348-00C04F8EEB71 IID_IHNetProtocolSettings
  40. // 85D18B71-3032-11D4-9348-00C04F8EEB71 IID_IHNetConnection
  41. // 85D18B72-3032-11D4-9348-00C04F8EEB71 IID_IHNetFirewalledConnection
  42. // 85D18B73-3032-11D4-9348-00C04F8EEB71 IID_IHNetIcsPublicConnection
  43. // 85D18B74-3032-11D4-9348-00C04F8EEB71 IID_IHNetIcsPrivateConnection
  44. // 85D18B75-3032-11D4-9348-00C04F8EEB71 IID_IHNetBridge
  45. // 85D18B76-3032-11D4-9348-00C04F8EEB71 IID_IHNetBridgedConnection
  46. // 85D18B77-3032-11D4-9348-00C04F8EEB71 IID_IEnumHNetBridges
  47. // 85D18B78-3032-11D4-9348-00C04F8EEB71 IID_IEnumHNetFirewalledConnections
  48. // 85D18B79-3032-11D4-9348-00C04F8EEB71 IID_IEnumHNetIcsPublicConnections
  49. // 85D18B7A-3032-11D4-9348-00C04F8EEB71 IID_IEnumHNetIcsPrivateConnections
  50. // 85D18B7B-3032-11D4-9348-00C04F8EEB71 IID_IEnumHNetApplicationProtocols
  51. // 85D18B7C-3032-11D4-9348-00C04F8EEB71 IID_IEnumHNetPortMappingProtocols
  52. // 85D18B7D-3032-11D4-9348-00C04F8EEB71 IID_IEnumHNetBridgedConnections
  53. // 85D18B7E-3032-11D4-9348-00C04F8EEB71 IID_IHNetPortMappingProtocol
  54. // 85D18B7F-3032-11D4-9348-00C04F8EEB71 IID_IHNetApplicationProtocol
  55. // 85D18B80-3032-11D4-9348-00C04F8EEB71 IID_IHNetPortMappingBinding
  56. // 85D18B81-3032-11D4-9348-00C04F8EEB71 IID_IEnumHNetPortMappingBindings
  57. // ...
  58. // 85D18B9C-3032-11D4-9348-00C04F8EEB71
  59. interface IHNetCfgMgr;
  60. interface IHNetBridgeSettings;
  61. interface IHNetFirewallSettings;
  62. interface IHNetIcsSettings;
  63. interface IHNetProtocolSettings;
  64. interface IHNetConnection;
  65. interface IHNetFirewalledConnection;
  66. interface IHNetIcsPublicConnection;
  67. interface IHNetIcsPrivateConnection;
  68. interface IHNetBridge;
  69. interface IHNetBridgedConnection;
  70. interface IHNetPortMappingProtocol;
  71. interface IHNetApplicationProtocol;
  72. interface IHNetPortMappingBinding;
  73. interface IEnumHNetBridges;
  74. interface IEnumHNetFirewalledConnections;
  75. interface IEnumHNetIcsPublicConnections;
  76. interface IEnumHNetIcsPrivateConnections;
  77. interface IEnumHNetApplicationProtocols;
  78. interface IEnumHNetPortMappingProtocols;
  79. interface IEnumHNetBridgedConnections;
  80. interface IEnumHNetPortMappingBindings;
  81. //+---------------------------------------------------------------------------
  82. // IHNetCfgMgr -- root interface for the home networking configuration
  83. // manager.
  84. //
  85. [
  86. local,
  87. object,
  88. uuid(85D18B6C-3032-11D4-9348-00C04F8EEB71),
  89. pointer_default(unique)
  90. ]
  91. interface IHNetCfgMgr : IUnknown
  92. {
  93. HRESULT
  94. GetIHNetConnectionForINetConnection(
  95. [in] INetConnection *pNetConnection,
  96. [out] IHNetConnection **ppHNetConnection
  97. );
  98. HRESULT
  99. GetIHNetConnectionForGuid(
  100. [in] GUID *pGuid,
  101. [in] BOOLEAN fLanConnection,
  102. [in] BOOLEAN fCreateEntries,
  103. [out] IHNetConnection **ppHNetConnection
  104. );
  105. };
  106. //+---------------------------------------------------------------------------
  107. // IHNetBridgeSettings -- interface to control system-wide bridge settings
  108. //
  109. [
  110. local,
  111. object,
  112. uuid(85D18B6D-3032-11D4-9348-00C04F8EEB71),
  113. pointer_default(unique),
  114. ]
  115. interface IHNetBridgeSettings : IUnknown
  116. {
  117. HRESULT
  118. EnumBridges(
  119. [out] IEnumHNetBridges **ppEnum
  120. );
  121. HRESULT
  122. CreateBridge(
  123. [out] IHNetBridge **ppHNetBridge,
  124. [in, defaultvalue(NULL)] INetCfg *pnetcfgExisting
  125. );
  126. HRESULT
  127. DestroyAllBridges(
  128. [out] ULONG *pcBridges,
  129. [in, defaultvalue(NULL)] INetCfg *pnetcfgExisting
  130. );
  131. };
  132. //+---------------------------------------------------------------------------
  133. // IHNetFirewallSettings -- interface to control system-wide firewall settings
  134. //
  135. [
  136. local,
  137. object,
  138. uuid(85D18B6E-3032-11D4-9348-00C04F8EEB71),
  139. pointer_default(unique)
  140. ]
  141. interface IHNetFirewallSettings : IUnknown
  142. {
  143. typedef struct tagHNET_FW_LOGGING_SETTINGS
  144. {
  145. [string] LPWSTR pszwPath;
  146. ULONG ulMaxFileSize;
  147. BOOLEAN fLogDroppedPackets;
  148. BOOLEAN fLogConnections;
  149. } HNET_FW_LOGGING_SETTINGS;
  150. HRESULT
  151. EnumFirewalledConnections(
  152. [out] IEnumHNetFirewalledConnections **ppEnum
  153. );
  154. HRESULT
  155. GetFirewallLoggingSettings(
  156. [out] HNET_FW_LOGGING_SETTINGS **ppSettings
  157. );
  158. HRESULT
  159. SetFirewallLoggingSettings(
  160. [in] HNET_FW_LOGGING_SETTINGS *pSettings
  161. );
  162. HRESULT
  163. DisableAllFirewalling(
  164. [out] ULONG *pcFirewalledConnections
  165. );
  166. };
  167. cpp_quote("VOID")
  168. cpp_quote("HNetFreeFirewallLoggingSettings(")
  169. cpp_quote(" HNET_FW_LOGGING_SETTINGS *pSettings")
  170. cpp_quote(" );")
  171. //+---------------------------------------------------------------------------
  172. // IHNetIcsSettings -- interface to control system-wide ICS settings
  173. //
  174. [
  175. local,
  176. object,
  177. uuid(85D18B6F-3032-11D4-9348-00C04F8EEB71),
  178. pointer_default(unique)
  179. ]
  180. interface IHNetIcsSettings : IUnknown
  181. {
  182. HRESULT
  183. EnumIcsPublicConnections(
  184. [out] IEnumHNetIcsPublicConnections **ppEnum
  185. );
  186. HRESULT
  187. EnumIcsPrivateConnections(
  188. [out] IEnumHNetIcsPrivateConnections **ppEnum
  189. );
  190. HRESULT
  191. DisableIcs(
  192. [out] ULONG *pcIcsPublicConnections,
  193. [out] ULONG *pcIcsPrivateConnections
  194. );
  195. HRESULT
  196. GetPossiblePrivateConnections(
  197. [in] IHNetConnection *pConn,
  198. [out] ULONG *pcPrivateConnections,
  199. [out, length_is(*pcPrivateConnections)]
  200. IHNetConnection **pprgPrivateConnections[],
  201. [out] LONG *pxCurrentPrivate
  202. );
  203. HRESULT
  204. GetAutodialSettings(
  205. [out] BOOLEAN *pfAutodialEnabled
  206. );
  207. HRESULT
  208. SetAutodialSettings(
  209. [in] BOOLEAN fEnableAutodial
  210. );
  211. HRESULT
  212. GetDhcpEnabled(
  213. [out] BOOLEAN *pfDhcpEnabled
  214. );
  215. HRESULT
  216. SetDhcpEnabled(
  217. [in] BOOLEAN fEnableDhcp
  218. );
  219. HRESULT
  220. GetDhcpScopeSettings(
  221. [out] DWORD *pdwScopeAddress,
  222. [out] DWORD *pdwScopeMask
  223. );
  224. HRESULT
  225. SetDhcpScopeSettings(
  226. [in] DWORD dwScopeAddress,
  227. [in] DWORD dwScopeMask
  228. );
  229. HRESULT
  230. EnumDhcpReservedAddresses(
  231. [out] IEnumHNetPortMappingBindings **ppEnum
  232. );
  233. HRESULT
  234. GetDnsEnabled(
  235. [out] BOOLEAN *pfDnsEnabled
  236. );
  237. HRESULT
  238. SetDnsEnabled(
  239. [in] BOOLEAN fEnableDns
  240. );
  241. HRESULT
  242. RefreshTargetComputerAddress(
  243. [in] OLECHAR *pszwName,
  244. [in] ULONG ulAddress
  245. );
  246. };
  247. typedef struct tagHNET_RESPONSE_RANGE
  248. {
  249. UCHAR ucIPProtocol;
  250. USHORT usStartPort;
  251. USHORT usEndPort;
  252. } HNET_RESPONSE_RANGE;
  253. typedef struct tagHNET_PORT_MAPPING_BINDING
  254. {
  255. OLECHAR *pszwTargetMachineName;
  256. ULONG ulTargetMachineAddress;
  257. } HNET_PORT_MAPPING_BINDING;
  258. //+---------------------------------------------------------------------------
  259. // IHNetProtocolSettings -- interface to control system-wide ICS and firewall
  260. // protocol settings (i.e., port mappings and
  261. // applications).
  262. //
  263. [
  264. local,
  265. object,
  266. uuid(85D18B70-3032-11D4-9348-00C04F8EEB71),
  267. pointer_default(unique)
  268. ]
  269. interface IHNetProtocolSettings : IUnknown
  270. {
  271. HRESULT
  272. EnumApplicationProtocols(
  273. [in] BOOLEAN fEnabledOnly,
  274. [out] IEnumHNetApplicationProtocols **ppEnum
  275. );
  276. HRESULT
  277. CreateApplicationProtocol(
  278. [in] OLECHAR *pszwName,
  279. [in] UCHAR ucOutgoingIPProtocol,
  280. [in] USHORT usOutgoingPort,
  281. [in] USHORT uscResponses,
  282. [in, size_is(uscResponses)] HNET_RESPONSE_RANGE rgResponses[],
  283. [out] IHNetApplicationProtocol **ppProtocol
  284. );
  285. HRESULT
  286. EnumPortMappingProtocols(
  287. [out] IEnumHNetPortMappingProtocols **ppEnum
  288. );
  289. HRESULT
  290. CreatePortMappingProtocol(
  291. [in] OLECHAR *pszwName,
  292. [in] UCHAR ucIPProtocol,
  293. [in] USHORT usPort,
  294. [out] IHNetPortMappingProtocol **ppProtocol
  295. );
  296. HRESULT
  297. FindPortMappingProtocol(
  298. [in] GUID *pGuid,
  299. [out] IHNetPortMappingProtocol **ppProtocol
  300. );
  301. };
  302. //+---------------------------------------------------------------------------
  303. // IHNetConnection -- interface to control home networking settings for
  304. // a connection
  305. //
  306. [
  307. local,
  308. object,
  309. uuid(85D18B71-3032-11D4-9348-00C04F8EEB71),
  310. pointer_default(unique)
  311. ]
  312. interface IHNetConnection : IUnknown
  313. {
  314. typedef struct tagHNET_CONN_PROPERTIES
  315. {
  316. BOOLEAN fLanConnection;
  317. BOOLEAN fFirewalled;
  318. BOOLEAN fIcsPublic;
  319. BOOLEAN fIcsPrivate;
  320. BOOLEAN fBridge;
  321. BOOLEAN fPartOfBridge;
  322. BOOLEAN fCanBeBridged;
  323. BOOLEAN fCanBeFirewalled;
  324. BOOLEAN fCanBeIcsPublic;
  325. BOOLEAN fCanBeIcsPrivate;
  326. } HNET_CONN_PROPERTIES;
  327. typedef struct tagHNET_FW_ICMP_SETTINGS
  328. {
  329. BOOLEAN fAllowOutboundDestinationUnreachable;
  330. BOOLEAN fAllowOutboundSourceQuench;
  331. BOOLEAN fAllowRedirect;
  332. BOOLEAN fAllowInboundEchoRequest;
  333. BOOLEAN fAllowInboundRouterRequest;
  334. BOOLEAN fAllowOutboundTimeExceeded;
  335. BOOLEAN fAllowOutboundParameterProblem;
  336. BOOLEAN fAllowInboundTimestampRequest;
  337. BOOLEAN fAllowInboundMaskRequest;
  338. } HNET_FW_ICMP_SETTINGS;
  339. HRESULT
  340. GetINetConnection(
  341. [out] INetConnection **ppNetConnection
  342. );
  343. HRESULT
  344. GetGuid(
  345. [out] GUID **ppGuid
  346. );
  347. HRESULT
  348. GetName(
  349. [out, string] OLECHAR **ppszwName
  350. );
  351. HRESULT
  352. GetRasPhonebookPath(
  353. [out, string] OLECHAR **ppszwPath
  354. );
  355. HRESULT
  356. GetProperties(
  357. [out] HNET_CONN_PROPERTIES **ppProperties
  358. );
  359. HRESULT
  360. GetControlInterface(
  361. REFIID iid,
  362. [iid_is(iid)] void **ppv
  363. );
  364. HRESULT
  365. Firewall(
  366. [out] IHNetFirewalledConnection **ppFirewalledConn
  367. );
  368. HRESULT
  369. SharePublic(
  370. [out] IHNetIcsPublicConnection **ppIcsPublicConn
  371. );
  372. HRESULT
  373. SharePrivate(
  374. [out] IHNetIcsPrivateConnection **ppIcsPrivateConn
  375. );
  376. //
  377. // The 4 methods below conceptually would only be called on a connection
  378. // that is firewalled (all 4) or shared (first two only). However, it's
  379. // possible to modify these settings in the UI before the connection is
  380. // actually firewalled or shared, so we must make the methods available
  381. // on all connections.
  382. //
  383. HRESULT
  384. EnumPortMappings(
  385. [in] BOOLEAN fEnabledOnly,
  386. [out] IEnumHNetPortMappingBindings **ppEnum
  387. );
  388. HRESULT
  389. GetBindingForPortMappingProtocol(
  390. [in] IHNetPortMappingProtocol *pProtocol,
  391. [out] IHNetPortMappingBinding **ppBinding
  392. );
  393. HRESULT
  394. GetIcmpSettings(
  395. [out] HNET_FW_ICMP_SETTINGS **ppSettings
  396. );
  397. HRESULT
  398. SetIcmpSettings(
  399. [in] HNET_FW_ICMP_SETTINGS *pSettings
  400. );
  401. HRESULT
  402. ShowAutoconfigBalloon(
  403. [out] BOOLEAN *pfShowBalloon
  404. );
  405. HRESULT
  406. DeleteRasConnectionEntry();
  407. };
  408. //+---------------------------------------------------------------------------
  409. // IHNetFirewalledConnection -- interface to control settings specific to a
  410. // firewalled connection
  411. //
  412. [
  413. local,
  414. object,
  415. uuid(85D18B72-3032-11D4-9348-00C04F8EEB71),
  416. pointer_default(unique)
  417. ]
  418. interface IHNetFirewalledConnection : IUnknown
  419. {
  420. HRESULT
  421. Unfirewall();
  422. };
  423. //+---------------------------------------------------------------------------
  424. // IHNetIcsPublicConnection -- interface to control settings specific to a
  425. // public ICS connection
  426. //
  427. [
  428. local,
  429. object,
  430. uuid(85D18B73-3032-11D4-9348-00C04F8EEB71),
  431. pointer_default(unique)
  432. ]
  433. interface IHNetIcsPublicConnection : IUnknown
  434. {
  435. HRESULT
  436. Unshare();
  437. };
  438. //+---------------------------------------------------------------------------
  439. // IHNetIcsPrivateConnection -- interface to control settings specific to a
  440. // private ICS connection
  441. //
  442. [
  443. local,
  444. object,
  445. uuid(85D18B74-3032-11D4-9348-00C04F8EEB71),
  446. pointer_default(unique)
  447. ]
  448. interface IHNetIcsPrivateConnection : IUnknown
  449. {
  450. HRESULT
  451. RemoveFromIcs();
  452. };
  453. //+---------------------------------------------------------------------------
  454. // IHNetBridge -- interface to control settings specific to a connection that
  455. // is a bridge
  456. //
  457. [
  458. local,
  459. object,
  460. uuid(85D18B75-3032-11D4-9348-00C04F8EEB71),
  461. pointer_default(unique)
  462. ]
  463. interface IHNetBridge : IUnknown
  464. {
  465. HRESULT
  466. EnumMembers(
  467. [out] IEnumHNetBridgedConnections **ppEnum
  468. );
  469. HRESULT
  470. AddMember(
  471. [in] IHNetConnection *pConn,
  472. [out] IHNetBridgedConnection **ppBridgedConn,
  473. [in, defaultvalue(NULL)] INetCfg *pnetcfgExisting
  474. );
  475. HRESULT
  476. Destroy(
  477. [in, defaultvalue(NULL)] INetCfg *pnetcfgExisting
  478. );
  479. };
  480. //+---------------------------------------------------------------------------
  481. // IHNetBridgedConnection -- interface to control settings specific to a
  482. // connection that is part of a bridge
  483. //
  484. [
  485. local,
  486. object,
  487. uuid(85D18B76-3032-11D4-9348-00C04F8EEB71),
  488. pointer_default(unique)
  489. ]
  490. interface IHNetBridgedConnection : IUnknown
  491. {
  492. HRESULT
  493. GetBridge(
  494. [out] IHNetBridge **ppBridge
  495. );
  496. HRESULT
  497. RemoveFromBridge(
  498. [in, defaultvalue(NULL)] INetCfg *pnetcfgExisting
  499. );
  500. };
  501. //+---------------------------------------------------------------------------
  502. // IHNetPortMappingProtocol -- interface that represents a port mapping
  503. // protocol definition
  504. //
  505. [
  506. local,
  507. object,
  508. uuid(85D18B7E-3032-11D4-9348-00C04F8EEB71),
  509. pointer_default(unique)
  510. ]
  511. interface IHNetPortMappingProtocol : IUnknown
  512. {
  513. HRESULT
  514. GetName(
  515. [out, string] OLECHAR **ppszwName
  516. );
  517. HRESULT
  518. SetName(
  519. [in, string] OLECHAR *pszwName
  520. );
  521. HRESULT
  522. GetIPProtocol(
  523. [out] UCHAR *pucProtocol
  524. );
  525. HRESULT
  526. SetIPProtocol(
  527. [in] UCHAR ucProtocol
  528. );
  529. HRESULT
  530. GetPort(
  531. [out] USHORT *pusPort
  532. );
  533. HRESULT
  534. SetPort(
  535. [in] USHORT usPort
  536. );
  537. HRESULT
  538. GetBuiltIn(
  539. [out] BOOLEAN *pfBuiltIn
  540. );
  541. HRESULT
  542. Delete();
  543. HRESULT
  544. GetGuid(
  545. [out] GUID **ppGuid
  546. );
  547. };
  548. //+---------------------------------------------------------------------------
  549. // IHNetPortMappingBinding -- interface that represents the port mapping
  550. // settings in use by a connection
  551. //
  552. [
  553. local,
  554. object,
  555. uuid(85D18B80-3032-11D4-9348-00C04F8EEB71),
  556. pointer_default(unique)
  557. ]
  558. interface IHNetPortMappingBinding : IUnknown
  559. {
  560. HRESULT
  561. GetConnection(
  562. [out] IHNetConnection **ppConnection
  563. );
  564. HRESULT
  565. GetProtocol(
  566. [out] IHNetPortMappingProtocol **ppProtocol
  567. );
  568. HRESULT
  569. GetEnabled(
  570. [out] BOOLEAN *pfEnabled
  571. );
  572. HRESULT
  573. SetEnabled(
  574. [in] BOOLEAN fEnable
  575. );
  576. HRESULT
  577. GetCurrentMethod(
  578. [out] BOOLEAN *pfUseName
  579. );
  580. HRESULT
  581. GetTargetComputerName(
  582. [out, string] OLECHAR **ppszwName
  583. );
  584. HRESULT
  585. SetTargetComputerName(
  586. [in, string] OLECHAR *pszwName
  587. );
  588. HRESULT
  589. GetTargetComputerAddress(
  590. [out] ULONG *pulAddress
  591. );
  592. HRESULT
  593. SetTargetComputerAddress(
  594. [in] ULONG ulAddress
  595. );
  596. HRESULT
  597. GetTargetPort(
  598. [out] USHORT *pusPort
  599. );
  600. HRESULT
  601. SetTargetPort(
  602. [in] USHORT usPort
  603. );
  604. };
  605. //+---------------------------------------------------------------------------
  606. // IHNetApplicationProtocol -- interface that represents an application
  607. // protocol definition
  608. //
  609. [
  610. local,
  611. object,
  612. uuid(85D18B7F-3032-11D4-9348-00C04F8EEB71),
  613. pointer_default(unique)
  614. ]
  615. interface IHNetApplicationProtocol : IUnknown
  616. {
  617. HRESULT
  618. GetName(
  619. [out, string] OLECHAR **ppszwName
  620. );
  621. HRESULT
  622. SetName(
  623. [in, string] OLECHAR *pszwName
  624. );
  625. HRESULT
  626. GetOutgoingIPProtocol(
  627. [out] UCHAR *pucProtocol
  628. );
  629. HRESULT
  630. SetOutgoingIPProtocol(
  631. [in] UCHAR ucProtocol
  632. );
  633. HRESULT
  634. GetOutgoingPort(
  635. [out] USHORT *pusPort
  636. );
  637. HRESULT
  638. SetOutgoingPort(
  639. [in] USHORT usPort
  640. );
  641. HRESULT
  642. GetResponseRanges(
  643. [out] USHORT *puscResponses,
  644. [out, length_is(*puscResponses)] HNET_RESPONSE_RANGE *prgResponseRange[]
  645. );
  646. HRESULT
  647. SetResponseRanges(
  648. [in] USHORT uscResponses,
  649. [in, size_is(uscResponses)] HNET_RESPONSE_RANGE rgResponseRange[]
  650. );
  651. HRESULT
  652. GetBuiltIn(
  653. [out] BOOLEAN *pfBuiltIn
  654. );
  655. HRESULT
  656. GetEnabled(
  657. [out] BOOLEAN *pfEnabled
  658. );
  659. HRESULT
  660. SetEnabled(
  661. [in] BOOLEAN fEnable
  662. );
  663. HRESULT
  664. Delete();
  665. };
  666. //+---------------------------------------------------------------------------
  667. // IEnumHNetBridges -- interface to enumerate connections that are bridges
  668. //
  669. [
  670. local,
  671. object,
  672. uuid(85D18B77-3032-11D4-9348-00C04F8EEB71),
  673. pointer_default(unique)
  674. ]
  675. interface IEnumHNetBridges : IUnknown
  676. {
  677. HRESULT
  678. Next(
  679. [in] ULONG cElt,
  680. [out, size_is(cElt), length_is(*pcEltFetched)]
  681. IHNetBridge **rgElt,
  682. [out] ULONG *pcEltFetched
  683. );
  684. HRESULT
  685. Skip(
  686. [in] ULONG cElt
  687. );
  688. HRESULT
  689. Reset();
  690. HRESULT
  691. Clone(
  692. [out] IEnumHNetBridges **ppEnum
  693. );
  694. };
  695. //+---------------------------------------------------------------------------
  696. // IEnumHNetFirewalledConnections -- interface to enumerate connections that
  697. // are firewalled
  698. //
  699. [
  700. local,
  701. object,
  702. uuid(85D18B78-3032-11D4-9348-00C04F8EEB71),
  703. pointer_default(unique)
  704. ]
  705. interface IEnumHNetFirewalledConnections : IUnknown
  706. {
  707. HRESULT
  708. Next(
  709. [in] ULONG cElt,
  710. [out, size_is(cElt), length_is(*pcEltFetched)]
  711. IHNetFirewalledConnection **rgElt,
  712. [out] ULONG *pcEltFetched
  713. );
  714. HRESULT
  715. Skip(
  716. [in] ULONG cElt
  717. );
  718. HRESULT
  719. Reset();
  720. HRESULT
  721. Clone(
  722. [out] IEnumHNetFirewalledConnections **ppEnum
  723. );
  724. };
  725. //+---------------------------------------------------------------------------
  726. // IEnumHNetIcsPublicConnections -- interface to enumerate connections that
  727. // ICS private
  728. //
  729. [
  730. local,
  731. object,
  732. uuid(85D18B79-3032-11D4-9348-00C04F8EEB71),
  733. pointer_default(unique)
  734. ]
  735. interface IEnumHNetIcsPublicConnections : IUnknown
  736. {
  737. HRESULT
  738. Next(
  739. [in] ULONG cElt,
  740. [out, size_is(cElt), length_is(*pcEltFetched)]
  741. IHNetIcsPublicConnection **rgElt,
  742. [out] ULONG *pcEltFetched
  743. );
  744. HRESULT
  745. Skip(
  746. [in] ULONG cElt
  747. );
  748. HRESULT
  749. Reset();
  750. HRESULT
  751. Clone(
  752. [out] IEnumHNetIcsPublicConnections **ppEnum
  753. );
  754. };
  755. //+---------------------------------------------------------------------------
  756. // IEnumHNetIcsPrivateConnections -- interface to enumerate connections that
  757. // are ICS private
  758. //
  759. [
  760. local,
  761. object,
  762. uuid(85D18B7A-3032-11D4-9348-00C04F8EEB71),
  763. pointer_default(unique)
  764. ]
  765. interface IEnumHNetIcsPrivateConnections : IUnknown
  766. {
  767. HRESULT
  768. Next(
  769. [in] ULONG cElt,
  770. [out, size_is(cElt), length_is(*pcEltFetched)]
  771. IHNetIcsPrivateConnection **rgElt,
  772. [out] ULONG *pcEltFetched
  773. );
  774. HRESULT
  775. Skip(
  776. [in] ULONG cElt
  777. );
  778. HRESULT
  779. Reset();
  780. HRESULT
  781. Clone(
  782. [out] IEnumHNetIcsPrivateConnections **ppEnum
  783. );
  784. };
  785. //+---------------------------------------------------------------------------
  786. // IEnumHNetApplicationProtocols -- interface to enumerate ICS and firewall
  787. // application (response) protocols
  788. //
  789. [
  790. local,
  791. object,
  792. uuid(85D18B7B-3032-11D4-9348-00C04F8EEB71),
  793. pointer_default(unique)
  794. ]
  795. interface IEnumHNetApplicationProtocols : IUnknown
  796. {
  797. HRESULT
  798. Next(
  799. [in] ULONG cElt,
  800. [out, size_is(cElt), length_is(*pcEltFetched)]
  801. IHNetApplicationProtocol **rgElt,
  802. [out] ULONG *pcEltFetched
  803. );
  804. HRESULT
  805. Skip(
  806. [in] ULONG cElt
  807. );
  808. HRESULT
  809. Reset();
  810. HRESULT
  811. Clone(
  812. [out] IEnumHNetApplicationProtocols **ppEnum
  813. );
  814. };
  815. //+---------------------------------------------------------------------------
  816. // IEnumHNetPortMappingProtocols -- interface to enumerate ICS and firewall
  817. // port mapping protocol definitions
  818. //
  819. [
  820. local,
  821. object,
  822. uuid(85D18B7C-3032-11D4-9348-00C04F8EEB71),
  823. pointer_default(unique)
  824. ]
  825. interface IEnumHNetPortMappingProtocols : IUnknown
  826. {
  827. HRESULT
  828. Next(
  829. [in] ULONG cElt,
  830. [out, size_is(cElt), length_is(*pcEltFetched)]
  831. IHNetPortMappingProtocol **rgElt,
  832. [out] ULONG *pcEltFetched
  833. );
  834. HRESULT
  835. Skip(
  836. [in] ULONG cElt
  837. );
  838. HRESULT
  839. Reset();
  840. HRESULT
  841. Clone(
  842. [out] IEnumHNetPortMappingProtocols **ppEnum
  843. );
  844. };
  845. //+---------------------------------------------------------------------------
  846. // IEnumHNetPortMappingBindings -- interface to enumerate the port mappings
  847. // that are actually in use by a connection
  848. //
  849. [
  850. local,
  851. object,
  852. uuid(85D18B81-3032-11D4-9348-00C04F8EEB71),
  853. pointer_default(unique)
  854. ]
  855. interface IEnumHNetPortMappingBindings : IUnknown
  856. {
  857. HRESULT
  858. Next(
  859. [in] ULONG cElt,
  860. [out, size_is(cElt), length_is(*pcEltFetched)]
  861. IHNetPortMappingBinding **rgElt,
  862. [out] ULONG *pcEltFetched
  863. );
  864. HRESULT
  865. Skip(
  866. [in] ULONG cElt
  867. );
  868. HRESULT
  869. Reset();
  870. HRESULT
  871. Clone(
  872. [out] IEnumHNetPortMappingBindings **ppEnum
  873. );
  874. };
  875. //+---------------------------------------------------------------------------
  876. // IEnumHNetBridgedConnections -- interface to enumerate connections that
  877. // are members in a bridge
  878. //
  879. [
  880. local,
  881. object,
  882. uuid(85D18B7D-3032-11D4-9348-00C04F8EEB71),
  883. pointer_default(unique)
  884. ]
  885. interface IEnumHNetBridgedConnections : IUnknown
  886. {
  887. HRESULT
  888. Next(
  889. [in] ULONG cElt,
  890. [out, size_is(cElt), length_is(*pcEltFetched)]
  891. IHNetBridgedConnection **rgElt,
  892. [out] ULONG *pcEltFetched
  893. );
  894. HRESULT
  895. Skip(
  896. [in] ULONG cElt
  897. );
  898. HRESULT
  899. Reset();
  900. HRESULT
  901. Clone(
  902. [out] IEnumHNetBridgedConnections **ppEnum
  903. );
  904. };
  905. cpp_quote("#ifndef NOTIFYFORMATBUFFERSIZE")
  906. cpp_quote("#define NOTIFYFORMATBUFFERSIZE 1024")
  907. cpp_quote("#endif")
  908. cpp_quote("#ifndef HNWCALLBACKBUFFERSIZE")
  909. cpp_quote("#define HNWCALLBACKBUFFERSIZE 1024")
  910. cpp_quote("#endif")
  911. cpp_quote("typedef VOID (STDMETHODCALLTYPE HNWCALLBACK)(LPCWSTR pszLogEntry, LPARAM lParam);")
  912. cpp_quote("typedef HNWCALLBACK *LPHNWCALLBACK;")
  913. cpp_quote("HRESULT APIENTRY")
  914. cpp_quote("HNetGetShareAndBridgeSettings(")
  915. cpp_quote(" OUT INetConnection **ppNetPublicConnection,")
  916. cpp_quote(" OUT INetConnection ***ppNetPrivateConnection,")
  917. cpp_quote(" OUT BOOLEAN *pbSharePublicConnection,")
  918. cpp_quote(" OUT BOOLEAN *pbFirewallPublicConnection")
  919. cpp_quote(" );")
  920. cpp_quote("HRESULT APIENTRY")
  921. cpp_quote("HNetSetShareAndBridgeSettings(")
  922. cpp_quote(" IN INetConnection *pNetPublicConnection,")
  923. cpp_quote(" IN INetConnection *pNetPrivateConnection[],")
  924. cpp_quote(" IN BOOLEAN bSharePublicConnection,")
  925. cpp_quote(" IN BOOLEAN bFirewallPublicConnection,")
  926. cpp_quote(" IN LPHNWCALLBACK lpHnwCallback,")
  927. cpp_quote(" IN LPARAM lpContext,")
  928. cpp_quote(" OUT INetConnection **pNetPrivateInterface")
  929. cpp_quote(" );")
  930. cpp_quote("typedef HRESULT (APIENTRY *LPFNHNETSETSHAREANDBRIDGESETTINGS)(")
  931. cpp_quote(" INetConnection *pNetPublicConnection,")
  932. cpp_quote(" INetConnection *pNetPrivateConnection[],")
  933. cpp_quote(" BOOLEAN bSharePublicConnection,")
  934. cpp_quote(" BOOLEAN bFirewallPublicConnection,")
  935. cpp_quote(" LPHNWCALLBACK lpHnwCallback,")
  936. cpp_quote(" LPARAM lpContext,")
  937. cpp_quote(" INetConnection **pNetPrivateInterface );")
  938. cpp_quote("HRESULT APIENTRY")
  939. cpp_quote("ObtainIcsErrorConditions(")
  940. cpp_quote(" IN LPHNWCALLBACK lpHnwCallback,")
  941. cpp_quote(" IN LPARAM lpContext );")
  942. cpp_quote("BOOL APIENTRY")
  943. cpp_quote("HNetSharedAccessSettingsDlg(")
  944. cpp_quote(" IN BOOL fSharedAccessMode,")
  945. cpp_quote(" IN HWND hwndOwner );")
  946. cpp_quote("BOOL APIENTRY")
  947. cpp_quote("HNetSharingAndFirewallSettingsDlg(")
  948. cpp_quote(" IN HWND hwndOwner,")
  949. cpp_quote(" IN IHNetCfgMgr *pHNetCfgMgr,")
  950. cpp_quote(" IN BOOL fShowFwOnlySettings,")
  951. cpp_quote(" IN OPTIONAL IHNetConnection *pHNetConn);")