windows-nt/Source/XPSP1/NT/public/internal/net/inc/hnetcfg.idl
2020-09-26 16:20:57 +08:00

1088 lines
26 KiB
Plaintext

//+---------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// File: HNetCfg.idl
//
//----------------------------------------------------------------------------
cpp_quote("//+-------------------------------------------------------------------------")
cpp_quote("//")
cpp_quote("// Microsoft Windows")
cpp_quote("// Copyright (c) Microsoft Corporation. All rights reserved.")
cpp_quote("//")
cpp_quote("//--------------------------------------------------------------------------")
cpp_quote("#if ( _MSC_VER >= 800 )")
cpp_quote("#pragma warning(disable:4201)")
cpp_quote("#endif")
#ifndef DO_NO_IMPORTS
import "unknwn.idl";
import "wtypes.idl";
import "netcon.idl";
import "netcfgx.idl";
#endif
cpp_quote("")
cpp_quote("EXTERN_C const CLSID CLSID_HNetCfgMgr;")
cpp_quote("EXTERN_C const CLSID CLSID_SharingManagerEnumPublicConnection;")
cpp_quote("EXTERN_C const CLSID CLSID_SharingManagerEnumPrivateConnection;")
cpp_quote("EXTERN_C const CLSID CLSID_SharingManagerEnumApplicationDefinition;")
cpp_quote("EXTERN_C const CLSID CLSID_SharingManagerEnumPortMapping;")
cpp_quote("EXTERN_C const CLSID CLSID_SharingApplicationDefinition;")
cpp_quote("EXTERN_C const CLSID CLSID_SharingApplicationConfiguration;")
cpp_quote("EXTERN_C const CLSID CLSID_NetSharingConfiguration;")
// Reserved GUIDS for our use
//
// 85D18B6C-3032-11D4-9348-00C04F8EEB71 IID_IHNetCfgMgr
// 85D18B6D-3032-11D4-9348-00C04F8EEB71 IID_IHNetBridgeSettings
// 85D18B6E-3032-11D4-9348-00C04F8EEB71 IID_IHNetFirewallSettings
// 85D18B6F-3032-11D4-9348-00C04F8EEB71 IID_IHNetIcsSettings
// 85D18B70-3032-11D4-9348-00C04F8EEB71 IID_IHNetProtocolSettings
// 85D18B71-3032-11D4-9348-00C04F8EEB71 IID_IHNetConnection
// 85D18B72-3032-11D4-9348-00C04F8EEB71 IID_IHNetFirewalledConnection
// 85D18B73-3032-11D4-9348-00C04F8EEB71 IID_IHNetIcsPublicConnection
// 85D18B74-3032-11D4-9348-00C04F8EEB71 IID_IHNetIcsPrivateConnection
// 85D18B75-3032-11D4-9348-00C04F8EEB71 IID_IHNetBridge
// 85D18B76-3032-11D4-9348-00C04F8EEB71 IID_IHNetBridgedConnection
// 85D18B77-3032-11D4-9348-00C04F8EEB71 IID_IEnumHNetBridges
// 85D18B78-3032-11D4-9348-00C04F8EEB71 IID_IEnumHNetFirewalledConnections
// 85D18B79-3032-11D4-9348-00C04F8EEB71 IID_IEnumHNetIcsPublicConnections
// 85D18B7A-3032-11D4-9348-00C04F8EEB71 IID_IEnumHNetIcsPrivateConnections
// 85D18B7B-3032-11D4-9348-00C04F8EEB71 IID_IEnumHNetApplicationProtocols
// 85D18B7C-3032-11D4-9348-00C04F8EEB71 IID_IEnumHNetPortMappingProtocols
// 85D18B7D-3032-11D4-9348-00C04F8EEB71 IID_IEnumHNetBridgedConnections
// 85D18B7E-3032-11D4-9348-00C04F8EEB71 IID_IHNetPortMappingProtocol
// 85D18B7F-3032-11D4-9348-00C04F8EEB71 IID_IHNetApplicationProtocol
// 85D18B80-3032-11D4-9348-00C04F8EEB71 IID_IHNetPortMappingBinding
// 85D18B81-3032-11D4-9348-00C04F8EEB71 IID_IEnumHNetPortMappingBindings
// ...
// 85D18B9C-3032-11D4-9348-00C04F8EEB71
interface IHNetCfgMgr;
interface IHNetBridgeSettings;
interface IHNetFirewallSettings;
interface IHNetIcsSettings;
interface IHNetProtocolSettings;
interface IHNetConnection;
interface IHNetFirewalledConnection;
interface IHNetIcsPublicConnection;
interface IHNetIcsPrivateConnection;
interface IHNetBridge;
interface IHNetBridgedConnection;
interface IHNetPortMappingProtocol;
interface IHNetApplicationProtocol;
interface IHNetPortMappingBinding;
interface IEnumHNetBridges;
interface IEnumHNetFirewalledConnections;
interface IEnumHNetIcsPublicConnections;
interface IEnumHNetIcsPrivateConnections;
interface IEnumHNetApplicationProtocols;
interface IEnumHNetPortMappingProtocols;
interface IEnumHNetBridgedConnections;
interface IEnumHNetPortMappingBindings;
//+---------------------------------------------------------------------------
// IHNetCfgMgr -- root interface for the home networking configuration
// manager.
//
[
local,
object,
uuid(85D18B6C-3032-11D4-9348-00C04F8EEB71),
pointer_default(unique)
]
interface IHNetCfgMgr : IUnknown
{
HRESULT
GetIHNetConnectionForINetConnection(
[in] INetConnection *pNetConnection,
[out] IHNetConnection **ppHNetConnection
);
HRESULT
GetIHNetConnectionForGuid(
[in] GUID *pGuid,
[in] BOOLEAN fLanConnection,
[in] BOOLEAN fCreateEntries,
[out] IHNetConnection **ppHNetConnection
);
};
//+---------------------------------------------------------------------------
// IHNetBridgeSettings -- interface to control system-wide bridge settings
//
[
local,
object,
uuid(85D18B6D-3032-11D4-9348-00C04F8EEB71),
pointer_default(unique),
]
interface IHNetBridgeSettings : IUnknown
{
HRESULT
EnumBridges(
[out] IEnumHNetBridges **ppEnum
);
HRESULT
CreateBridge(
[out] IHNetBridge **ppHNetBridge,
[in, defaultvalue(NULL)] INetCfg *pnetcfgExisting
);
HRESULT
DestroyAllBridges(
[out] ULONG *pcBridges,
[in, defaultvalue(NULL)] INetCfg *pnetcfgExisting
);
};
//+---------------------------------------------------------------------------
// IHNetFirewallSettings -- interface to control system-wide firewall settings
//
[
local,
object,
uuid(85D18B6E-3032-11D4-9348-00C04F8EEB71),
pointer_default(unique)
]
interface IHNetFirewallSettings : IUnknown
{
typedef struct tagHNET_FW_LOGGING_SETTINGS
{
[string] LPWSTR pszwPath;
ULONG ulMaxFileSize;
BOOLEAN fLogDroppedPackets;
BOOLEAN fLogConnections;
} HNET_FW_LOGGING_SETTINGS;
HRESULT
EnumFirewalledConnections(
[out] IEnumHNetFirewalledConnections **ppEnum
);
HRESULT
GetFirewallLoggingSettings(
[out] HNET_FW_LOGGING_SETTINGS **ppSettings
);
HRESULT
SetFirewallLoggingSettings(
[in] HNET_FW_LOGGING_SETTINGS *pSettings
);
HRESULT
DisableAllFirewalling(
[out] ULONG *pcFirewalledConnections
);
};
cpp_quote("VOID")
cpp_quote("HNetFreeFirewallLoggingSettings(")
cpp_quote(" HNET_FW_LOGGING_SETTINGS *pSettings")
cpp_quote(" );")
//+---------------------------------------------------------------------------
// IHNetIcsSettings -- interface to control system-wide ICS settings
//
[
local,
object,
uuid(85D18B6F-3032-11D4-9348-00C04F8EEB71),
pointer_default(unique)
]
interface IHNetIcsSettings : IUnknown
{
HRESULT
EnumIcsPublicConnections(
[out] IEnumHNetIcsPublicConnections **ppEnum
);
HRESULT
EnumIcsPrivateConnections(
[out] IEnumHNetIcsPrivateConnections **ppEnum
);
HRESULT
DisableIcs(
[out] ULONG *pcIcsPublicConnections,
[out] ULONG *pcIcsPrivateConnections
);
HRESULT
GetPossiblePrivateConnections(
[in] IHNetConnection *pConn,
[out] ULONG *pcPrivateConnections,
[out, length_is(*pcPrivateConnections)]
IHNetConnection **pprgPrivateConnections[],
[out] LONG *pxCurrentPrivate
);
HRESULT
GetAutodialSettings(
[out] BOOLEAN *pfAutodialEnabled
);
HRESULT
SetAutodialSettings(
[in] BOOLEAN fEnableAutodial
);
HRESULT
GetDhcpEnabled(
[out] BOOLEAN *pfDhcpEnabled
);
HRESULT
SetDhcpEnabled(
[in] BOOLEAN fEnableDhcp
);
HRESULT
GetDhcpScopeSettings(
[out] DWORD *pdwScopeAddress,
[out] DWORD *pdwScopeMask
);
HRESULT
SetDhcpScopeSettings(
[in] DWORD dwScopeAddress,
[in] DWORD dwScopeMask
);
HRESULT
EnumDhcpReservedAddresses(
[out] IEnumHNetPortMappingBindings **ppEnum
);
HRESULT
GetDnsEnabled(
[out] BOOLEAN *pfDnsEnabled
);
HRESULT
SetDnsEnabled(
[in] BOOLEAN fEnableDns
);
};
typedef struct tagHNET_RESPONSE_RANGE
{
UCHAR ucIPProtocol;
USHORT usStartPort;
USHORT usEndPort;
} HNET_RESPONSE_RANGE;
typedef struct tagHNET_PORT_MAPPING_BINDING
{
OLECHAR *pszwTargetMachineName;
ULONG ulTargetMachineAddress;
} HNET_PORT_MAPPING_BINDING;
//+---------------------------------------------------------------------------
// IHNetProtocolSettings -- interface to control system-wide ICS and firewall
// protocol settings (i.e., port mappings and
// applications).
//
[
local,
object,
uuid(85D18B70-3032-11D4-9348-00C04F8EEB71),
pointer_default(unique)
]
interface IHNetProtocolSettings : IUnknown
{
HRESULT
EnumApplicationProtocols(
[in] BOOLEAN fEnabledOnly,
[out] IEnumHNetApplicationProtocols **ppEnum
);
HRESULT
CreateApplicationProtocol(
[in] OLECHAR *pszwName,
[in] UCHAR ucOutgoingIPProtocol,
[in] USHORT usOutgoingPort,
[in] USHORT uscResponses,
[in, size_is(uscResponses)] HNET_RESPONSE_RANGE rgResponses[],
[out] IHNetApplicationProtocol **ppProtocol
);
HRESULT
EnumPortMappingProtocols(
[out] IEnumHNetPortMappingProtocols **ppEnum
);
HRESULT
CreatePortMappingProtocol(
[in] OLECHAR *pszwName,
[in] UCHAR ucIPProtocol,
[in] USHORT usPort,
[out] IHNetPortMappingProtocol **ppProtocol
);
HRESULT
FindPortMappingProtocol(
[in] GUID *pGuid,
[out] IHNetPortMappingProtocol **ppProtocol
);
};
//+---------------------------------------------------------------------------
// IHNetConnection -- interface to control home networking settings for
// a connection
//
[
local,
object,
uuid(85D18B71-3032-11D4-9348-00C04F8EEB71),
pointer_default(unique)
]
interface IHNetConnection : IUnknown
{
typedef struct tagHNET_CONN_PROPERTIES
{
BOOLEAN fLanConnection;
BOOLEAN fFirewalled;
BOOLEAN fIcsPublic;
BOOLEAN fIcsPrivate;
BOOLEAN fBridge;
BOOLEAN fPartOfBridge;
BOOLEAN fCanBeBridged;
BOOLEAN fCanBeFirewalled;
BOOLEAN fCanBeIcsPublic;
BOOLEAN fCanBeIcsPrivate;
} HNET_CONN_PROPERTIES;
typedef struct tagHNET_FW_ICMP_SETTINGS
{
BOOLEAN fAllowOutboundDestinationUnreachable;
BOOLEAN fAllowOutboundSourceQuench;
BOOLEAN fAllowRedirect;
BOOLEAN fAllowInboundEchoRequest;
BOOLEAN fAllowInboundRouterRequest;
BOOLEAN fAllowOutboundTimeExceeded;
BOOLEAN fAllowOutboundParameterProblem;
BOOLEAN fAllowInboundTimestampRequest;
BOOLEAN fAllowInboundMaskRequest;
} HNET_FW_ICMP_SETTINGS;
HRESULT
GetINetConnection(
[out] INetConnection **ppNetConnection
);
HRESULT
GetGuid(
[out] GUID **ppGuid
);
HRESULT
GetName(
[out, string] OLECHAR **ppszwName
);
HRESULT
GetRasPhonebookPath(
[out, string] OLECHAR **ppszwPath
);
HRESULT
GetProperties(
[out] HNET_CONN_PROPERTIES **ppProperties
);
HRESULT
GetControlInterface(
REFIID iid,
[iid_is(iid)] void **ppv
);
HRESULT
Firewall(
[out] IHNetFirewalledConnection **ppFirewalledConn
);
HRESULT
SharePublic(
[out] IHNetIcsPublicConnection **ppIcsPublicConn
);
HRESULT
SharePrivate(
[out] IHNetIcsPrivateConnection **ppIcsPrivateConn
);
//
// The 4 methods below conceptually would only be called on a connection
// that is firewalled (all 4) or shared (first two only). However, it's
// possible to modify these settings in the UI before the connection is
// actually firewalled or shared, so we must make the methods available
// on all connections.
//
HRESULT
EnumPortMappings(
[in] BOOLEAN fEnabledOnly,
[out] IEnumHNetPortMappingBindings **ppEnum
);
HRESULT
GetBindingForPortMappingProtocol(
[in] IHNetPortMappingProtocol *pProtocol,
[out] IHNetPortMappingBinding **ppBinding
);
HRESULT
GetIcmpSettings(
[out] HNET_FW_ICMP_SETTINGS **ppSettings
);
HRESULT
SetIcmpSettings(
[in] HNET_FW_ICMP_SETTINGS *pSettings
);
HRESULT
ShowAutoconfigBalloon(
[out] BOOLEAN *pfShowBalloon
);
HRESULT
DeleteRasConnectionEntry();
};
//+---------------------------------------------------------------------------
// IHNetFirewalledConnection -- interface to control settings specific to a
// firewalled connection
//
[
local,
object,
uuid(85D18B72-3032-11D4-9348-00C04F8EEB71),
pointer_default(unique)
]
interface IHNetFirewalledConnection : IUnknown
{
HRESULT
Unfirewall();
};
//+---------------------------------------------------------------------------
// IHNetIcsPublicConnection -- interface to control settings specific to a
// public ICS connection
//
[
local,
object,
uuid(85D18B73-3032-11D4-9348-00C04F8EEB71),
pointer_default(unique)
]
interface IHNetIcsPublicConnection : IUnknown
{
HRESULT
Unshare();
};
//+---------------------------------------------------------------------------
// IHNetIcsPrivateConnection -- interface to control settings specific to a
// private ICS connection
//
[
local,
object,
uuid(85D18B74-3032-11D4-9348-00C04F8EEB71),
pointer_default(unique)
]
interface IHNetIcsPrivateConnection : IUnknown
{
HRESULT
RemoveFromIcs();
};
//+---------------------------------------------------------------------------
// IHNetBridge -- interface to control settings specific to a connection that
// is a bridge
//
[
local,
object,
uuid(85D18B75-3032-11D4-9348-00C04F8EEB71),
pointer_default(unique)
]
interface IHNetBridge : IUnknown
{
HRESULT
EnumMembers(
[out] IEnumHNetBridgedConnections **ppEnum
);
HRESULT
AddMember(
[in] IHNetConnection *pConn,
[out] IHNetBridgedConnection **ppBridgedConn,
[in, defaultvalue(NULL)] INetCfg *pnetcfgExisting
);
HRESULT
Destroy(
[in, defaultvalue(NULL)] INetCfg *pnetcfgExisting
);
};
//+---------------------------------------------------------------------------
// IHNetBridgedConnection -- interface to control settings specific to a
// connection that is part of a bridge
//
[
local,
object,
uuid(85D18B76-3032-11D4-9348-00C04F8EEB71),
pointer_default(unique)
]
interface IHNetBridgedConnection : IUnknown
{
HRESULT
GetBridge(
[out] IHNetBridge **ppBridge
);
HRESULT
RemoveFromBridge(
[in, defaultvalue(NULL)] INetCfg *pnetcfgExisting
);
};
//+---------------------------------------------------------------------------
// IHNetPortMappingProtocol -- interface that represents a port mapping
// protocol definition
//
[
local,
object,
uuid(85D18B7E-3032-11D4-9348-00C04F8EEB71),
pointer_default(unique)
]
interface IHNetPortMappingProtocol : IUnknown
{
HRESULT
GetName(
[out, string] OLECHAR **ppszwName
);
HRESULT
SetName(
[in, string] OLECHAR *pszwName
);
HRESULT
GetIPProtocol(
[out] UCHAR *pucProtocol
);
HRESULT
SetIPProtocol(
[in] UCHAR ucProtocol
);
HRESULT
GetPort(
[out] USHORT *pusPort
);
HRESULT
SetPort(
[in] USHORT usPort
);
HRESULT
GetBuiltIn(
[out] BOOLEAN *pfBuiltIn
);
HRESULT
Delete();
HRESULT
GetGuid(
[out] GUID **ppGuid
);
};
//+---------------------------------------------------------------------------
// IHNetPortMappingBinding -- interface that represents the port mapping
// settings in use by a connection
//
[
local,
object,
uuid(85D18B80-3032-11D4-9348-00C04F8EEB71),
pointer_default(unique)
]
interface IHNetPortMappingBinding : IUnknown
{
HRESULT
GetConnection(
[out] IHNetConnection **ppConnection
);
HRESULT
GetProtocol(
[out] IHNetPortMappingProtocol **ppProtocol
);
HRESULT
GetEnabled(
[out] BOOLEAN *pfEnabled
);
HRESULT
SetEnabled(
[in] BOOLEAN fEnable
);
HRESULT
GetCurrentMethod(
[out] BOOLEAN *pfUseName
);
HRESULT
GetTargetComputerName(
[out, string] OLECHAR **ppszwName
);
HRESULT
SetTargetComputerName(
[in, string] OLECHAR *pszwName
);
HRESULT
GetTargetComputerAddress(
[out] ULONG *pulAddress
);
HRESULT
SetTargetComputerAddress(
[in] ULONG ulAddress
);
HRESULT
GetTargetPort(
[out] USHORT *pusPort
);
HRESULT
SetTargetPort(
[in] USHORT usPort
);
};
//+---------------------------------------------------------------------------
// IHNetApplicationProtocol -- interface that represents an application
// protocol definition
//
[
local,
object,
uuid(85D18B7F-3032-11D4-9348-00C04F8EEB71),
pointer_default(unique)
]
interface IHNetApplicationProtocol : IUnknown
{
HRESULT
GetName(
[out, string] OLECHAR **ppszwName
);
HRESULT
SetName(
[in, string] OLECHAR *pszwName
);
HRESULT
GetOutgoingIPProtocol(
[out] UCHAR *pucProtocol
);
HRESULT
SetOutgoingIPProtocol(
[in] UCHAR ucProtocol
);
HRESULT
GetOutgoingPort(
[out] USHORT *pusPort
);
HRESULT
SetOutgoingPort(
[in] USHORT usPort
);
HRESULT
GetResponseRanges(
[out] USHORT *puscResponses,
[out, length_is(*puscResponses)] HNET_RESPONSE_RANGE *prgResponseRange[]
);
HRESULT
SetResponseRanges(
[in] USHORT uscResponses,
[in, size_is(uscResponses)] HNET_RESPONSE_RANGE rgResponseRange[]
);
HRESULT
GetBuiltIn(
[out] BOOLEAN *pfBuiltIn
);
HRESULT
GetEnabled(
[out] BOOLEAN *pfEnabled
);
HRESULT
SetEnabled(
[in] BOOLEAN fEnable
);
HRESULT
Delete();
};
//+---------------------------------------------------------------------------
// IEnumHNetBridges -- interface to enumerate connections that are bridges
//
[
local,
object,
uuid(85D18B77-3032-11D4-9348-00C04F8EEB71),
pointer_default(unique)
]
interface IEnumHNetBridges : IUnknown
{
HRESULT
Next(
[in] ULONG cElt,
[out, size_is(cElt), length_is(*pcEltFetched)]
IHNetBridge **rgElt,
[out] ULONG *pcEltFetched
);
HRESULT
Skip(
[in] ULONG cElt
);
HRESULT
Reset();
HRESULT
Clone(
[out] IEnumHNetBridges **ppEnum
);
};
//+---------------------------------------------------------------------------
// IEnumHNetFirewalledConnections -- interface to enumerate connections that
// are firewalled
//
[
local,
object,
uuid(85D18B78-3032-11D4-9348-00C04F8EEB71),
pointer_default(unique)
]
interface IEnumHNetFirewalledConnections : IUnknown
{
HRESULT
Next(
[in] ULONG cElt,
[out, size_is(cElt), length_is(*pcEltFetched)]
IHNetFirewalledConnection **rgElt,
[out] ULONG *pcEltFetched
);
HRESULT
Skip(
[in] ULONG cElt
);
HRESULT
Reset();
HRESULT
Clone(
[out] IEnumHNetFirewalledConnections **ppEnum
);
};
//+---------------------------------------------------------------------------
// IEnumHNetIcsPublicConnections -- interface to enumerate connections that
// ICS private
//
[
local,
object,
uuid(85D18B79-3032-11D4-9348-00C04F8EEB71),
pointer_default(unique)
]
interface IEnumHNetIcsPublicConnections : IUnknown
{
HRESULT
Next(
[in] ULONG cElt,
[out, size_is(cElt), length_is(*pcEltFetched)]
IHNetIcsPublicConnection **rgElt,
[out] ULONG *pcEltFetched
);
HRESULT
Skip(
[in] ULONG cElt
);
HRESULT
Reset();
HRESULT
Clone(
[out] IEnumHNetIcsPublicConnections **ppEnum
);
};
//+---------------------------------------------------------------------------
// IEnumHNetIcsPrivateConnections -- interface to enumerate connections that
// are ICS private
//
[
local,
object,
uuid(85D18B7A-3032-11D4-9348-00C04F8EEB71),
pointer_default(unique)
]
interface IEnumHNetIcsPrivateConnections : IUnknown
{
HRESULT
Next(
[in] ULONG cElt,
[out, size_is(cElt), length_is(*pcEltFetched)]
IHNetIcsPrivateConnection **rgElt,
[out] ULONG *pcEltFetched
);
HRESULT
Skip(
[in] ULONG cElt
);
HRESULT
Reset();
HRESULT
Clone(
[out] IEnumHNetIcsPrivateConnections **ppEnum
);
};
//+---------------------------------------------------------------------------
// IEnumHNetApplicationProtocols -- interface to enumerate ICS and firewall
// application (response) protocols
//
[
local,
object,
uuid(85D18B7B-3032-11D4-9348-00C04F8EEB71),
pointer_default(unique)
]
interface IEnumHNetApplicationProtocols : IUnknown
{
HRESULT
Next(
[in] ULONG cElt,
[out, size_is(cElt), length_is(*pcEltFetched)]
IHNetApplicationProtocol **rgElt,
[out] ULONG *pcEltFetched
);
HRESULT
Skip(
[in] ULONG cElt
);
HRESULT
Reset();
HRESULT
Clone(
[out] IEnumHNetApplicationProtocols **ppEnum
);
};
//+---------------------------------------------------------------------------
// IEnumHNetPortMappingProtocols -- interface to enumerate ICS and firewall
// port mapping protocol definitions
//
[
local,
object,
uuid(85D18B7C-3032-11D4-9348-00C04F8EEB71),
pointer_default(unique)
]
interface IEnumHNetPortMappingProtocols : IUnknown
{
HRESULT
Next(
[in] ULONG cElt,
[out, size_is(cElt), length_is(*pcEltFetched)]
IHNetPortMappingProtocol **rgElt,
[out] ULONG *pcEltFetched
);
HRESULT
Skip(
[in] ULONG cElt
);
HRESULT
Reset();
HRESULT
Clone(
[out] IEnumHNetPortMappingProtocols **ppEnum
);
};
//+---------------------------------------------------------------------------
// IEnumHNetPortMappingBindings -- interface to enumerate the port mappings
// that are actually in use by a connection
//
[
local,
object,
uuid(85D18B81-3032-11D4-9348-00C04F8EEB71),
pointer_default(unique)
]
interface IEnumHNetPortMappingBindings : IUnknown
{
HRESULT
Next(
[in] ULONG cElt,
[out, size_is(cElt), length_is(*pcEltFetched)]
IHNetPortMappingBinding **rgElt,
[out] ULONG *pcEltFetched
);
HRESULT
Skip(
[in] ULONG cElt
);
HRESULT
Reset();
HRESULT
Clone(
[out] IEnumHNetPortMappingBindings **ppEnum
);
};
//+---------------------------------------------------------------------------
// IEnumHNetBridgedConnections -- interface to enumerate connections that
// are members in a bridge
//
[
local,
object,
uuid(85D18B7D-3032-11D4-9348-00C04F8EEB71),
pointer_default(unique)
]
interface IEnumHNetBridgedConnections : IUnknown
{
HRESULT
Next(
[in] ULONG cElt,
[out, size_is(cElt), length_is(*pcEltFetched)]
IHNetBridgedConnection **rgElt,
[out] ULONG *pcEltFetched
);
HRESULT
Skip(
[in] ULONG cElt
);
HRESULT
Reset();
HRESULT
Clone(
[out] IEnumHNetBridgedConnections **ppEnum
);
};
cpp_quote("#ifndef NOTIFYFORMATBUFFERSIZE")
cpp_quote("#define NOTIFYFORMATBUFFERSIZE 1024")
cpp_quote("#endif")
cpp_quote("#ifndef HNWCALLBACKBUFFERSIZE")
cpp_quote("#define HNWCALLBACKBUFFERSIZE 1024")
cpp_quote("#endif")
cpp_quote("typedef VOID (STDMETHODCALLTYPE HNWCALLBACK)(LPCWSTR pszLogEntry, LPARAM lParam);")
cpp_quote("typedef HNWCALLBACK *LPHNWCALLBACK;")
cpp_quote("HRESULT APIENTRY")
cpp_quote("HNetGetShareAndBridgeSettings(")
cpp_quote(" OUT INetConnection **ppNetPublicConnection,")
cpp_quote(" OUT INetConnection ***ppNetPrivateConnection,")
cpp_quote(" OUT BOOLEAN *pbSharePublicConnection,")
cpp_quote(" OUT BOOLEAN *pbFirewallPublicConnection")
cpp_quote(" );")
cpp_quote("HRESULT APIENTRY")
cpp_quote("HNetSetShareAndBridgeSettings(")
cpp_quote(" IN INetConnection *pNetPublicConnection,")
cpp_quote(" IN INetConnection *pNetPrivateConnection[],")
cpp_quote(" IN BOOLEAN bSharePublicConnection,")
cpp_quote(" IN BOOLEAN bFirewallPublicConnection,")
cpp_quote(" IN LPHNWCALLBACK lpHnwCallback,")
cpp_quote(" IN LPARAM lpContext,")
cpp_quote(" OUT INetConnection **pNetPrivateInterface")
cpp_quote(" );")
cpp_quote("typedef HRESULT (APIENTRY *LPFNHNETSETSHAREANDBRIDGESETTINGS)(")
cpp_quote(" INetConnection *pNetPublicConnection,")
cpp_quote(" INetConnection *pNetPrivateConnection[],")
cpp_quote(" BOOLEAN bSharePublicConnection,")
cpp_quote(" BOOLEAN bFirewallPublicConnection,")
cpp_quote(" LPHNWCALLBACK lpHnwCallback,")
cpp_quote(" LPARAM lpContext,")
cpp_quote(" INetConnection **pNetPrivateInterface );")
cpp_quote("HRESULT APIENTRY")
cpp_quote("ObtainIcsErrorConditions(")
cpp_quote(" IN LPHNWCALLBACK lpHnwCallback,")
cpp_quote(" IN LPARAM lpContext );")
cpp_quote("BOOL APIENTRY")
cpp_quote("HNetSharedAccessSettingsDlg(")
cpp_quote(" IN BOOL fSharedAccessMode,")
cpp_quote(" IN HWND hwndOwner );")
cpp_quote("BOOL APIENTRY")
cpp_quote("HNetSharingAndFirewallSettingsDlg(")
cpp_quote(" IN HWND hwndOwner,")
cpp_quote(" IN IHNetCfgMgr *pHNetCfgMgr,")
cpp_quote(" IN BOOL fShowFwOnlySettings,")
cpp_quote(" IN OPTIONAL IHNetConnection *pHNetConn);")