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.

1087 lines
26 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. };
  242. typedef struct tagHNET_RESPONSE_RANGE
  243. {
  244. UCHAR ucIPProtocol;
  245. USHORT usStartPort;
  246. USHORT usEndPort;
  247. } HNET_RESPONSE_RANGE;
  248. typedef struct tagHNET_PORT_MAPPING_BINDING
  249. {
  250. OLECHAR *pszwTargetMachineName;
  251. ULONG ulTargetMachineAddress;
  252. } HNET_PORT_MAPPING_BINDING;
  253. //+---------------------------------------------------------------------------
  254. // IHNetProtocolSettings -- interface to control system-wide ICS and firewall
  255. // protocol settings (i.e., port mappings and
  256. // applications).
  257. //
  258. [
  259. local,
  260. object,
  261. uuid(85D18B70-3032-11D4-9348-00C04F8EEB71),
  262. pointer_default(unique)
  263. ]
  264. interface IHNetProtocolSettings : IUnknown
  265. {
  266. HRESULT
  267. EnumApplicationProtocols(
  268. [in] BOOLEAN fEnabledOnly,
  269. [out] IEnumHNetApplicationProtocols **ppEnum
  270. );
  271. HRESULT
  272. CreateApplicationProtocol(
  273. [in] OLECHAR *pszwName,
  274. [in] UCHAR ucOutgoingIPProtocol,
  275. [in] USHORT usOutgoingPort,
  276. [in] USHORT uscResponses,
  277. [in, size_is(uscResponses)] HNET_RESPONSE_RANGE rgResponses[],
  278. [out] IHNetApplicationProtocol **ppProtocol
  279. );
  280. HRESULT
  281. EnumPortMappingProtocols(
  282. [out] IEnumHNetPortMappingProtocols **ppEnum
  283. );
  284. HRESULT
  285. CreatePortMappingProtocol(
  286. [in] OLECHAR *pszwName,
  287. [in] UCHAR ucIPProtocol,
  288. [in] USHORT usPort,
  289. [out] IHNetPortMappingProtocol **ppProtocol
  290. );
  291. HRESULT
  292. FindPortMappingProtocol(
  293. [in] GUID *pGuid,
  294. [out] IHNetPortMappingProtocol **ppProtocol
  295. );
  296. };
  297. //+---------------------------------------------------------------------------
  298. // IHNetConnection -- interface to control home networking settings for
  299. // a connection
  300. //
  301. [
  302. local,
  303. object,
  304. uuid(85D18B71-3032-11D4-9348-00C04F8EEB71),
  305. pointer_default(unique)
  306. ]
  307. interface IHNetConnection : IUnknown
  308. {
  309. typedef struct tagHNET_CONN_PROPERTIES
  310. {
  311. BOOLEAN fLanConnection;
  312. BOOLEAN fFirewalled;
  313. BOOLEAN fIcsPublic;
  314. BOOLEAN fIcsPrivate;
  315. BOOLEAN fBridge;
  316. BOOLEAN fPartOfBridge;
  317. BOOLEAN fCanBeBridged;
  318. BOOLEAN fCanBeFirewalled;
  319. BOOLEAN fCanBeIcsPublic;
  320. BOOLEAN fCanBeIcsPrivate;
  321. } HNET_CONN_PROPERTIES;
  322. typedef struct tagHNET_FW_ICMP_SETTINGS
  323. {
  324. BOOLEAN fAllowOutboundDestinationUnreachable;
  325. BOOLEAN fAllowOutboundSourceQuench;
  326. BOOLEAN fAllowRedirect;
  327. BOOLEAN fAllowInboundEchoRequest;
  328. BOOLEAN fAllowInboundRouterRequest;
  329. BOOLEAN fAllowOutboundTimeExceeded;
  330. BOOLEAN fAllowOutboundParameterProblem;
  331. BOOLEAN fAllowInboundTimestampRequest;
  332. BOOLEAN fAllowInboundMaskRequest;
  333. } HNET_FW_ICMP_SETTINGS;
  334. HRESULT
  335. GetINetConnection(
  336. [out] INetConnection **ppNetConnection
  337. );
  338. HRESULT
  339. GetGuid(
  340. [out] GUID **ppGuid
  341. );
  342. HRESULT
  343. GetName(
  344. [out, string] OLECHAR **ppszwName
  345. );
  346. HRESULT
  347. GetRasPhonebookPath(
  348. [out, string] OLECHAR **ppszwPath
  349. );
  350. HRESULT
  351. GetProperties(
  352. [out] HNET_CONN_PROPERTIES **ppProperties
  353. );
  354. HRESULT
  355. GetControlInterface(
  356. REFIID iid,
  357. [iid_is(iid)] void **ppv
  358. );
  359. HRESULT
  360. Firewall(
  361. [out] IHNetFirewalledConnection **ppFirewalledConn
  362. );
  363. HRESULT
  364. SharePublic(
  365. [out] IHNetIcsPublicConnection **ppIcsPublicConn
  366. );
  367. HRESULT
  368. SharePrivate(
  369. [out] IHNetIcsPrivateConnection **ppIcsPrivateConn
  370. );
  371. //
  372. // The 4 methods below conceptually would only be called on a connection
  373. // that is firewalled (all 4) or shared (first two only). However, it's
  374. // possible to modify these settings in the UI before the connection is
  375. // actually firewalled or shared, so we must make the methods available
  376. // on all connections.
  377. //
  378. HRESULT
  379. EnumPortMappings(
  380. [in] BOOLEAN fEnabledOnly,
  381. [out] IEnumHNetPortMappingBindings **ppEnum
  382. );
  383. HRESULT
  384. GetBindingForPortMappingProtocol(
  385. [in] IHNetPortMappingProtocol *pProtocol,
  386. [out] IHNetPortMappingBinding **ppBinding
  387. );
  388. HRESULT
  389. GetIcmpSettings(
  390. [out] HNET_FW_ICMP_SETTINGS **ppSettings
  391. );
  392. HRESULT
  393. SetIcmpSettings(
  394. [in] HNET_FW_ICMP_SETTINGS *pSettings
  395. );
  396. HRESULT
  397. ShowAutoconfigBalloon(
  398. [out] BOOLEAN *pfShowBalloon
  399. );
  400. HRESULT
  401. DeleteRasConnectionEntry();
  402. };
  403. //+---------------------------------------------------------------------------
  404. // IHNetFirewalledConnection -- interface to control settings specific to a
  405. // firewalled connection
  406. //
  407. [
  408. local,
  409. object,
  410. uuid(85D18B72-3032-11D4-9348-00C04F8EEB71),
  411. pointer_default(unique)
  412. ]
  413. interface IHNetFirewalledConnection : IUnknown
  414. {
  415. HRESULT
  416. Unfirewall();
  417. };
  418. //+---------------------------------------------------------------------------
  419. // IHNetIcsPublicConnection -- interface to control settings specific to a
  420. // public ICS connection
  421. //
  422. [
  423. local,
  424. object,
  425. uuid(85D18B73-3032-11D4-9348-00C04F8EEB71),
  426. pointer_default(unique)
  427. ]
  428. interface IHNetIcsPublicConnection : IUnknown
  429. {
  430. HRESULT
  431. Unshare();
  432. };
  433. //+---------------------------------------------------------------------------
  434. // IHNetIcsPrivateConnection -- interface to control settings specific to a
  435. // private ICS connection
  436. //
  437. [
  438. local,
  439. object,
  440. uuid(85D18B74-3032-11D4-9348-00C04F8EEB71),
  441. pointer_default(unique)
  442. ]
  443. interface IHNetIcsPrivateConnection : IUnknown
  444. {
  445. HRESULT
  446. RemoveFromIcs();
  447. };
  448. //+---------------------------------------------------------------------------
  449. // IHNetBridge -- interface to control settings specific to a connection that
  450. // is a bridge
  451. //
  452. [
  453. local,
  454. object,
  455. uuid(85D18B75-3032-11D4-9348-00C04F8EEB71),
  456. pointer_default(unique)
  457. ]
  458. interface IHNetBridge : IUnknown
  459. {
  460. HRESULT
  461. EnumMembers(
  462. [out] IEnumHNetBridgedConnections **ppEnum
  463. );
  464. HRESULT
  465. AddMember(
  466. [in] IHNetConnection *pConn,
  467. [out] IHNetBridgedConnection **ppBridgedConn,
  468. [in, defaultvalue(NULL)] INetCfg *pnetcfgExisting
  469. );
  470. HRESULT
  471. Destroy(
  472. [in, defaultvalue(NULL)] INetCfg *pnetcfgExisting
  473. );
  474. };
  475. //+---------------------------------------------------------------------------
  476. // IHNetBridgedConnection -- interface to control settings specific to a
  477. // connection that is part of a bridge
  478. //
  479. [
  480. local,
  481. object,
  482. uuid(85D18B76-3032-11D4-9348-00C04F8EEB71),
  483. pointer_default(unique)
  484. ]
  485. interface IHNetBridgedConnection : IUnknown
  486. {
  487. HRESULT
  488. GetBridge(
  489. [out] IHNetBridge **ppBridge
  490. );
  491. HRESULT
  492. RemoveFromBridge(
  493. [in, defaultvalue(NULL)] INetCfg *pnetcfgExisting
  494. );
  495. };
  496. //+---------------------------------------------------------------------------
  497. // IHNetPortMappingProtocol -- interface that represents a port mapping
  498. // protocol definition
  499. //
  500. [
  501. local,
  502. object,
  503. uuid(85D18B7E-3032-11D4-9348-00C04F8EEB71),
  504. pointer_default(unique)
  505. ]
  506. interface IHNetPortMappingProtocol : IUnknown
  507. {
  508. HRESULT
  509. GetName(
  510. [out, string] OLECHAR **ppszwName
  511. );
  512. HRESULT
  513. SetName(
  514. [in, string] OLECHAR *pszwName
  515. );
  516. HRESULT
  517. GetIPProtocol(
  518. [out] UCHAR *pucProtocol
  519. );
  520. HRESULT
  521. SetIPProtocol(
  522. [in] UCHAR ucProtocol
  523. );
  524. HRESULT
  525. GetPort(
  526. [out] USHORT *pusPort
  527. );
  528. HRESULT
  529. SetPort(
  530. [in] USHORT usPort
  531. );
  532. HRESULT
  533. GetBuiltIn(
  534. [out] BOOLEAN *pfBuiltIn
  535. );
  536. HRESULT
  537. Delete();
  538. HRESULT
  539. GetGuid(
  540. [out] GUID **ppGuid
  541. );
  542. };
  543. //+---------------------------------------------------------------------------
  544. // IHNetPortMappingBinding -- interface that represents the port mapping
  545. // settings in use by a connection
  546. //
  547. [
  548. local,
  549. object,
  550. uuid(85D18B80-3032-11D4-9348-00C04F8EEB71),
  551. pointer_default(unique)
  552. ]
  553. interface IHNetPortMappingBinding : IUnknown
  554. {
  555. HRESULT
  556. GetConnection(
  557. [out] IHNetConnection **ppConnection
  558. );
  559. HRESULT
  560. GetProtocol(
  561. [out] IHNetPortMappingProtocol **ppProtocol
  562. );
  563. HRESULT
  564. GetEnabled(
  565. [out] BOOLEAN *pfEnabled
  566. );
  567. HRESULT
  568. SetEnabled(
  569. [in] BOOLEAN fEnable
  570. );
  571. HRESULT
  572. GetCurrentMethod(
  573. [out] BOOLEAN *pfUseName
  574. );
  575. HRESULT
  576. GetTargetComputerName(
  577. [out, string] OLECHAR **ppszwName
  578. );
  579. HRESULT
  580. SetTargetComputerName(
  581. [in, string] OLECHAR *pszwName
  582. );
  583. HRESULT
  584. GetTargetComputerAddress(
  585. [out] ULONG *pulAddress
  586. );
  587. HRESULT
  588. SetTargetComputerAddress(
  589. [in] ULONG ulAddress
  590. );
  591. HRESULT
  592. GetTargetPort(
  593. [out] USHORT *pusPort
  594. );
  595. HRESULT
  596. SetTargetPort(
  597. [in] USHORT usPort
  598. );
  599. };
  600. //+---------------------------------------------------------------------------
  601. // IHNetApplicationProtocol -- interface that represents an application
  602. // protocol definition
  603. //
  604. [
  605. local,
  606. object,
  607. uuid(85D18B7F-3032-11D4-9348-00C04F8EEB71),
  608. pointer_default(unique)
  609. ]
  610. interface IHNetApplicationProtocol : IUnknown
  611. {
  612. HRESULT
  613. GetName(
  614. [out, string] OLECHAR **ppszwName
  615. );
  616. HRESULT
  617. SetName(
  618. [in, string] OLECHAR *pszwName
  619. );
  620. HRESULT
  621. GetOutgoingIPProtocol(
  622. [out] UCHAR *pucProtocol
  623. );
  624. HRESULT
  625. SetOutgoingIPProtocol(
  626. [in] UCHAR ucProtocol
  627. );
  628. HRESULT
  629. GetOutgoingPort(
  630. [out] USHORT *pusPort
  631. );
  632. HRESULT
  633. SetOutgoingPort(
  634. [in] USHORT usPort
  635. );
  636. HRESULT
  637. GetResponseRanges(
  638. [out] USHORT *puscResponses,
  639. [out, length_is(*puscResponses)] HNET_RESPONSE_RANGE *prgResponseRange[]
  640. );
  641. HRESULT
  642. SetResponseRanges(
  643. [in] USHORT uscResponses,
  644. [in, size_is(uscResponses)] HNET_RESPONSE_RANGE rgResponseRange[]
  645. );
  646. HRESULT
  647. GetBuiltIn(
  648. [out] BOOLEAN *pfBuiltIn
  649. );
  650. HRESULT
  651. GetEnabled(
  652. [out] BOOLEAN *pfEnabled
  653. );
  654. HRESULT
  655. SetEnabled(
  656. [in] BOOLEAN fEnable
  657. );
  658. HRESULT
  659. Delete();
  660. };
  661. //+---------------------------------------------------------------------------
  662. // IEnumHNetBridges -- interface to enumerate connections that are bridges
  663. //
  664. [
  665. local,
  666. object,
  667. uuid(85D18B77-3032-11D4-9348-00C04F8EEB71),
  668. pointer_default(unique)
  669. ]
  670. interface IEnumHNetBridges : IUnknown
  671. {
  672. HRESULT
  673. Next(
  674. [in] ULONG cElt,
  675. [out, size_is(cElt), length_is(*pcEltFetched)]
  676. IHNetBridge **rgElt,
  677. [out] ULONG *pcEltFetched
  678. );
  679. HRESULT
  680. Skip(
  681. [in] ULONG cElt
  682. );
  683. HRESULT
  684. Reset();
  685. HRESULT
  686. Clone(
  687. [out] IEnumHNetBridges **ppEnum
  688. );
  689. };
  690. //+---------------------------------------------------------------------------
  691. // IEnumHNetFirewalledConnections -- interface to enumerate connections that
  692. // are firewalled
  693. //
  694. [
  695. local,
  696. object,
  697. uuid(85D18B78-3032-11D4-9348-00C04F8EEB71),
  698. pointer_default(unique)
  699. ]
  700. interface IEnumHNetFirewalledConnections : IUnknown
  701. {
  702. HRESULT
  703. Next(
  704. [in] ULONG cElt,
  705. [out, size_is(cElt), length_is(*pcEltFetched)]
  706. IHNetFirewalledConnection **rgElt,
  707. [out] ULONG *pcEltFetched
  708. );
  709. HRESULT
  710. Skip(
  711. [in] ULONG cElt
  712. );
  713. HRESULT
  714. Reset();
  715. HRESULT
  716. Clone(
  717. [out] IEnumHNetFirewalledConnections **ppEnum
  718. );
  719. };
  720. //+---------------------------------------------------------------------------
  721. // IEnumHNetIcsPublicConnections -- interface to enumerate connections that
  722. // ICS private
  723. //
  724. [
  725. local,
  726. object,
  727. uuid(85D18B79-3032-11D4-9348-00C04F8EEB71),
  728. pointer_default(unique)
  729. ]
  730. interface IEnumHNetIcsPublicConnections : IUnknown
  731. {
  732. HRESULT
  733. Next(
  734. [in] ULONG cElt,
  735. [out, size_is(cElt), length_is(*pcEltFetched)]
  736. IHNetIcsPublicConnection **rgElt,
  737. [out] ULONG *pcEltFetched
  738. );
  739. HRESULT
  740. Skip(
  741. [in] ULONG cElt
  742. );
  743. HRESULT
  744. Reset();
  745. HRESULT
  746. Clone(
  747. [out] IEnumHNetIcsPublicConnections **ppEnum
  748. );
  749. };
  750. //+---------------------------------------------------------------------------
  751. // IEnumHNetIcsPrivateConnections -- interface to enumerate connections that
  752. // are ICS private
  753. //
  754. [
  755. local,
  756. object,
  757. uuid(85D18B7A-3032-11D4-9348-00C04F8EEB71),
  758. pointer_default(unique)
  759. ]
  760. interface IEnumHNetIcsPrivateConnections : IUnknown
  761. {
  762. HRESULT
  763. Next(
  764. [in] ULONG cElt,
  765. [out, size_is(cElt), length_is(*pcEltFetched)]
  766. IHNetIcsPrivateConnection **rgElt,
  767. [out] ULONG *pcEltFetched
  768. );
  769. HRESULT
  770. Skip(
  771. [in] ULONG cElt
  772. );
  773. HRESULT
  774. Reset();
  775. HRESULT
  776. Clone(
  777. [out] IEnumHNetIcsPrivateConnections **ppEnum
  778. );
  779. };
  780. //+---------------------------------------------------------------------------
  781. // IEnumHNetApplicationProtocols -- interface to enumerate ICS and firewall
  782. // application (response) protocols
  783. //
  784. [
  785. local,
  786. object,
  787. uuid(85D18B7B-3032-11D4-9348-00C04F8EEB71),
  788. pointer_default(unique)
  789. ]
  790. interface IEnumHNetApplicationProtocols : IUnknown
  791. {
  792. HRESULT
  793. Next(
  794. [in] ULONG cElt,
  795. [out, size_is(cElt), length_is(*pcEltFetched)]
  796. IHNetApplicationProtocol **rgElt,
  797. [out] ULONG *pcEltFetched
  798. );
  799. HRESULT
  800. Skip(
  801. [in] ULONG cElt
  802. );
  803. HRESULT
  804. Reset();
  805. HRESULT
  806. Clone(
  807. [out] IEnumHNetApplicationProtocols **ppEnum
  808. );
  809. };
  810. //+---------------------------------------------------------------------------
  811. // IEnumHNetPortMappingProtocols -- interface to enumerate ICS and firewall
  812. // port mapping protocol definitions
  813. //
  814. [
  815. local,
  816. object,
  817. uuid(85D18B7C-3032-11D4-9348-00C04F8EEB71),
  818. pointer_default(unique)
  819. ]
  820. interface IEnumHNetPortMappingProtocols : IUnknown
  821. {
  822. HRESULT
  823. Next(
  824. [in] ULONG cElt,
  825. [out, size_is(cElt), length_is(*pcEltFetched)]
  826. IHNetPortMappingProtocol **rgElt,
  827. [out] ULONG *pcEltFetched
  828. );
  829. HRESULT
  830. Skip(
  831. [in] ULONG cElt
  832. );
  833. HRESULT
  834. Reset();
  835. HRESULT
  836. Clone(
  837. [out] IEnumHNetPortMappingProtocols **ppEnum
  838. );
  839. };
  840. //+---------------------------------------------------------------------------
  841. // IEnumHNetPortMappingBindings -- interface to enumerate the port mappings
  842. // that are actually in use by a connection
  843. //
  844. [
  845. local,
  846. object,
  847. uuid(85D18B81-3032-11D4-9348-00C04F8EEB71),
  848. pointer_default(unique)
  849. ]
  850. interface IEnumHNetPortMappingBindings : IUnknown
  851. {
  852. HRESULT
  853. Next(
  854. [in] ULONG cElt,
  855. [out, size_is(cElt), length_is(*pcEltFetched)]
  856. IHNetPortMappingBinding **rgElt,
  857. [out] ULONG *pcEltFetched
  858. );
  859. HRESULT
  860. Skip(
  861. [in] ULONG cElt
  862. );
  863. HRESULT
  864. Reset();
  865. HRESULT
  866. Clone(
  867. [out] IEnumHNetPortMappingBindings **ppEnum
  868. );
  869. };
  870. //+---------------------------------------------------------------------------
  871. // IEnumHNetBridgedConnections -- interface to enumerate connections that
  872. // are members in a bridge
  873. //
  874. [
  875. local,
  876. object,
  877. uuid(85D18B7D-3032-11D4-9348-00C04F8EEB71),
  878. pointer_default(unique)
  879. ]
  880. interface IEnumHNetBridgedConnections : IUnknown
  881. {
  882. HRESULT
  883. Next(
  884. [in] ULONG cElt,
  885. [out, size_is(cElt), length_is(*pcEltFetched)]
  886. IHNetBridgedConnection **rgElt,
  887. [out] ULONG *pcEltFetched
  888. );
  889. HRESULT
  890. Skip(
  891. [in] ULONG cElt
  892. );
  893. HRESULT
  894. Reset();
  895. HRESULT
  896. Clone(
  897. [out] IEnumHNetBridgedConnections **ppEnum
  898. );
  899. };
  900. cpp_quote("#ifndef NOTIFYFORMATBUFFERSIZE")
  901. cpp_quote("#define NOTIFYFORMATBUFFERSIZE 1024")
  902. cpp_quote("#endif")
  903. cpp_quote("#ifndef HNWCALLBACKBUFFERSIZE")
  904. cpp_quote("#define HNWCALLBACKBUFFERSIZE 1024")
  905. cpp_quote("#endif")
  906. cpp_quote("typedef VOID (STDMETHODCALLTYPE HNWCALLBACK)(LPCWSTR pszLogEntry, LPARAM lParam);")
  907. cpp_quote("typedef HNWCALLBACK *LPHNWCALLBACK;")
  908. cpp_quote("HRESULT APIENTRY")
  909. cpp_quote("HNetGetShareAndBridgeSettings(")
  910. cpp_quote(" OUT INetConnection **ppNetPublicConnection,")
  911. cpp_quote(" OUT INetConnection ***ppNetPrivateConnection,")
  912. cpp_quote(" OUT BOOLEAN *pbSharePublicConnection,")
  913. cpp_quote(" OUT BOOLEAN *pbFirewallPublicConnection")
  914. cpp_quote(" );")
  915. cpp_quote("HRESULT APIENTRY")
  916. cpp_quote("HNetSetShareAndBridgeSettings(")
  917. cpp_quote(" IN INetConnection *pNetPublicConnection,")
  918. cpp_quote(" IN INetConnection *pNetPrivateConnection[],")
  919. cpp_quote(" IN BOOLEAN bSharePublicConnection,")
  920. cpp_quote(" IN BOOLEAN bFirewallPublicConnection,")
  921. cpp_quote(" IN LPHNWCALLBACK lpHnwCallback,")
  922. cpp_quote(" IN LPARAM lpContext,")
  923. cpp_quote(" OUT INetConnection **pNetPrivateInterface")
  924. cpp_quote(" );")
  925. cpp_quote("typedef HRESULT (APIENTRY *LPFNHNETSETSHAREANDBRIDGESETTINGS)(")
  926. cpp_quote(" INetConnection *pNetPublicConnection,")
  927. cpp_quote(" INetConnection *pNetPrivateConnection[],")
  928. cpp_quote(" BOOLEAN bSharePublicConnection,")
  929. cpp_quote(" BOOLEAN bFirewallPublicConnection,")
  930. cpp_quote(" LPHNWCALLBACK lpHnwCallback,")
  931. cpp_quote(" LPARAM lpContext,")
  932. cpp_quote(" INetConnection **pNetPrivateInterface );")
  933. cpp_quote("HRESULT APIENTRY")
  934. cpp_quote("ObtainIcsErrorConditions(")
  935. cpp_quote(" IN LPHNWCALLBACK lpHnwCallback,")
  936. cpp_quote(" IN LPARAM lpContext );")
  937. cpp_quote("BOOL APIENTRY")
  938. cpp_quote("HNetSharedAccessSettingsDlg(")
  939. cpp_quote(" IN BOOL fSharedAccessMode,")
  940. cpp_quote(" IN HWND hwndOwner );")
  941. cpp_quote("BOOL APIENTRY")
  942. cpp_quote("HNetSharingAndFirewallSettingsDlg(")
  943. cpp_quote(" IN HWND hwndOwner,")
  944. cpp_quote(" IN IHNetCfgMgr *pHNetCfgMgr,")
  945. cpp_quote(" IN BOOL fShowFwOnlySettings,")
  946. cpp_quote(" IN OPTIONAL IHNetConnection *pHNetConn);")