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.
892 lines
25 KiB
892 lines
25 KiB
//+---------------------------------------------------------------------------
|
|
//
|
|
// Microsoft Windows
|
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
//
|
|
// File: netconp.idl
|
|
//
|
|
// Private connections interfaces.
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
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 "objidl.idl";
|
|
import "netcon.idl";
|
|
import "netcfgx.idl";
|
|
import "netcfgp.idl";
|
|
#endif
|
|
import "upnp.idl";
|
|
|
|
cpp_quote("")
|
|
cpp_quote("EXTERN_C const CLSID CLSID_NetConnectionUiUtilities;")
|
|
cpp_quote("EXTERN_C const CLSID CLSID_NetConnectionHNetUtil;")
|
|
cpp_quote("EXTERN_C const CLSID GUID_NETSHELL_PROPS;")
|
|
cpp_quote("EXTERN_C const CLSID CLSID_ConnectionManager2;")
|
|
cpp_quote("")
|
|
|
|
// Reserved GUIDS for our use
|
|
//
|
|
// FAEDCF50-31FE-11D1-AAD2-00805FC1270E IID_INetConnectionUiLock
|
|
// FAEDCF51-31FE-11D1-AAD2-00805FC1270E IID_INetConnectionWizardUi
|
|
// FAEDCF52-31FE-11D1-AAD2-00805FC1270E IID_INetConnectionWizardUiContext
|
|
// FAEDCF53-31FE-11D1-AAD2-00805FC1270E IID_INetInboundConnection
|
|
// FAEDCF54-31FE-11D1-AAD2-00805FC1270E IID_INetLanConnection
|
|
// FAEDCF55-31FE-11D1-AAD2-00805FC1270E IID_INetSharedAccessConnection
|
|
// FAEDCF56-31FE-11D1-AAD2-00805FC1270E IID_INetLanConnectionWizardUi
|
|
// FAEDCF57-31FE-11D1-AAD2-00805FC1270E IID_INetRasConnection
|
|
// FAEDCF58-31FE-11D1-AAD2-00805FC1270E IID_INetRasConnectionIpUiInfo
|
|
// FAEDCF59-31FE-11D1-AAD2-00805FC1270E IID_IPersistNetConnection
|
|
// FAEDCF5A-31FE-11D1-AAD2-00805FC1270E
|
|
// FAEDCF5B-31FE-11D1-AAD2-00805FC1270E IID_INetConnectionBrandingInfo
|
|
// FAEDCF5C-31FE-11D1-AAD2-00805FC1270E IID_INetConnectionNotifySink
|
|
// FAEDCF5D-31FE-11D1-AAD2-00805FC1270E IID_INetConnectionManagerDebug
|
|
// FAEDCF5E-31FE-11D1-AAD2-00805FC1270E IID_INetConnectionUiUtilities
|
|
// FAEDCF5F-31FE-11D1-AAD2-00805FC1270E IID_INetConnectionRefresh
|
|
// FAEDCF60-31FE-11D1-AAD2-00805FC1270E IID_INetConnectionCMUtil
|
|
// FAEDCF61-31FE-11D1-AAD2-00805FC1270E
|
|
// FAEDCF62-31FE-11D1-AAD2-00805FC1270E
|
|
// FAEDCF63-31FE-11D1-AAD2-00805FC1270E
|
|
// FAEDCF64-31FE-11D1-AAD2-00805FC1270E IID_INetConnectionHNetUtil
|
|
// FAEDCF65-31FE-11D1-AAD2-00805FC1270E IID_INetConnectionSysTray
|
|
// FAEDCF66-31FE-11D1-AAD2-00805FC1270E IID_INetDefaultConnection
|
|
// FAEDCF67-31FE-11D1-AAD2-00805FC1270E IID_ISharedAccessBeaconFinder
|
|
// FAEDCF68-31FE-11D1-AAD2-00805FC1270E IID_INetMachinePolicies
|
|
// FAEDCF69-31FE-11D1-AAD2-00805FC1270E IID_INetConnectionManager2
|
|
// FAEDCF6A-31FE-11D1-AAD2-00805FC1270E IID_INetConnection2
|
|
// FAEDCF6B-31FE-11D1-AAD2-00805FC1270E IID_ISharedAccessBeacon
|
|
// FAEDCF6C-31FE-11D1-AAD2-00805FC1270E
|
|
// ...
|
|
// FAEDCFA3-31FE-11D1-AAD2-00805FC1270E
|
|
// FAEDCFA4-31FE-11D1-AAD2-00805FC1270E
|
|
// FAEDCFA5-31FE-11D1-AAD2-00805FC1270E
|
|
|
|
interface INetConnectionUiLock;
|
|
interface INetConnectionWizardUi;
|
|
interface INetConnectionWizardUiContext;
|
|
interface INetInboundConnection;
|
|
interface INetLanConnection;
|
|
interface INetSharedAccessConnection;
|
|
interface INetLanConnectionWizardUi;
|
|
interface INetRasConnection;
|
|
interface INetRasConnectionIpUiInfo;
|
|
interface IPersistNetConnection;
|
|
interface INetConnectionBrandingInfo;
|
|
interface INetConnectionNotifySink;
|
|
interface INetConnectionUiUtilities;
|
|
interface INetConnectionRefresh;
|
|
interface INetConnectionCMUtil;
|
|
interface INetConnectionHNetUtil;
|
|
interface INetConnectionSysTray;
|
|
interface INetDefaultConnection;
|
|
interface ISharedAccessBeaconFinder;
|
|
interface INetMachinePolicies;
|
|
interface INetConnectionManager2;
|
|
interface INetConnection2;
|
|
|
|
//#if DBG
|
|
interface INetConnectionManagerDebug;
|
|
//#endif
|
|
|
|
//+---------------------------------------------------------------------------
|
|
// INetConnectionUiLock -
|
|
//
|
|
[
|
|
local,
|
|
object,
|
|
uuid(FAEDCF50-31FE-11D1-AAD2-00805FC1270E),
|
|
pointer_default(unique)
|
|
]
|
|
interface INetConnectionUiLock : IUnknown
|
|
{
|
|
HRESULT QueryLock (
|
|
[out, string] LPWSTR* ppszwLockHolder);
|
|
};
|
|
|
|
//+---------------------------------------------------------------------------
|
|
// INetConnectionWizardUi -
|
|
//
|
|
[
|
|
local,
|
|
object,
|
|
uuid(FAEDCF51-31FE-11D1-AAD2-00805FC1270E),
|
|
pointer_default(unique)
|
|
]
|
|
interface INetConnectionWizardUi : IUnknown
|
|
{
|
|
HRESULT QueryMaxPageCount (
|
|
[in] INetConnectionWizardUiContext* pContext,
|
|
[out] DWORD* pcMaxPages);
|
|
|
|
HRESULT AddPages (
|
|
[in] INetConnectionWizardUiContext* pContext,
|
|
[in] LPFNADDPROPSHEETPAGE pfnAddPage,
|
|
[in] LPARAM lParam);
|
|
|
|
typedef enum tagNETCON_WIZARD_FLAGS
|
|
{
|
|
NCWF_RENAME_DISABLE = 0x0001,
|
|
NCWF_SHORTCUT_ENABLE = 0x0002,
|
|
NCWF_ALLUSER_CONNECTION= 0x0004,
|
|
NCWF_GLOBAL_CREDENTIALS= 0x0008,
|
|
NCWF_FIREWALLED = 0x0010,
|
|
NCWF_DEFAULT = 0x0020,
|
|
NCWF_SHARED = 0x0040,
|
|
NCWF_INCOMINGCONNECTION= 0x0080,
|
|
} NETCON_WIZARD_FLAGS;
|
|
|
|
HRESULT GetNewConnectionInfo(
|
|
[out] DWORD* pdwFlags,
|
|
[out] NETCON_MEDIATYPE* pMediaType);
|
|
|
|
HRESULT GetSuggestedConnectionName (
|
|
[out, string] LPWSTR* pszwSuggestedName);
|
|
|
|
HRESULT SetConnectionName (
|
|
[in, string] LPCWSTR pszwConnectionName);
|
|
|
|
HRESULT GetNewConnection(
|
|
[out] INetConnection** ppCon);
|
|
|
|
};
|
|
|
|
//+---------------------------------------------------------------------------
|
|
// INetConnectionWizardUiContext -
|
|
//
|
|
[
|
|
local,
|
|
object,
|
|
uuid(FAEDCF52-31FE-11D1-AAD2-00805FC1270E),
|
|
pointer_default(unique)
|
|
]
|
|
interface INetConnectionWizardUiContext : IUnknown
|
|
{
|
|
typedef enum tagSETUP_MODE_FLAGS
|
|
{
|
|
NCWUC_SETUPMODE_MINIMAL = 0x0,
|
|
NCWUC_SETUPMODE_TYPICAL = 0x1,
|
|
NCWUC_SETUPMODE_LAPTOP = 0x2,
|
|
NCWUC_SETUPMODE_CUSTOM = 0x3,
|
|
} SETUP_MODE_FLAGS;
|
|
|
|
typedef enum tagUNATTENDED_MODE_FLAGS
|
|
{
|
|
UM_DEFAULTHIDE = 0x1,
|
|
UM_GUIATTENDED = 0x2,
|
|
UM_PROVIDEDEFAULT = 0x3,
|
|
UM_READONLY = 0x4,
|
|
UM_FULLUNATTENDED = 0x5
|
|
} UM_MODE;
|
|
|
|
typedef enum tagPRODUCT_TYPE_FLAGS
|
|
{
|
|
NCWUC_PRODUCT_WORKSTATION = 0x0,
|
|
NCWUC_PRODUCT_SERVER_DC = 0x1,
|
|
NCWUC_PRODUCT_SERVER_STANDALONE = 0x2,
|
|
} PRODUCT_TYPE_FLAGS;
|
|
|
|
typedef enum tagOPERATION_FLAGS
|
|
{
|
|
NCWUC_SETUPOPER_UPGRADE = 0x4,
|
|
NCWUC_SETUPOPER_UNATTENDED = 0x8,
|
|
NCWUC_SETUPOPER_POSTINSTALL = 0x10,
|
|
} OPERATION_FLAGS;
|
|
|
|
DWORD GetSetupMode();
|
|
DWORD GetProductType();
|
|
DWORD GetOperationFlags();
|
|
DWORD GetUnattendedModeFlags();
|
|
HRESULT GetINetCfg(
|
|
[out] INetCfg ** ppINetCfg);
|
|
};
|
|
|
|
//+---------------------------------------------------------------------------
|
|
// INetInboundConnection -
|
|
//
|
|
[
|
|
object,
|
|
uuid(FAEDCF53-31FE-11D1-AAD2-00805FC1270E),
|
|
pointer_default(unique)
|
|
]
|
|
interface INetInboundConnection : IUnknown
|
|
{
|
|
HRESULT GetServerConnectionHandle (
|
|
[out] ULONG_PTR* phRasSrvCon);
|
|
|
|
HRESULT InitializeAsConfigConnection (
|
|
[in] BOOL fStartRemoteAccess);
|
|
};
|
|
|
|
//+---------------------------------------------------------------------------
|
|
// INetLanConnection -
|
|
//
|
|
[
|
|
object,
|
|
uuid(FAEDCF54-31FE-11D1-AAD2-00805FC1270E),
|
|
pointer_default(unique)
|
|
]
|
|
interface INetLanConnection : IUnknown
|
|
{
|
|
typedef enum tagLANCON_INFO_FLAGS
|
|
{
|
|
LCIF_NAME = 0x1,
|
|
LCIF_ICON = 0x2,
|
|
LCIF_COMP = 0x8,
|
|
LCIF_ALL = 0xFF,
|
|
} LANCON_INFO_FLAGS;
|
|
|
|
typedef struct tagLANCON_INFO
|
|
{
|
|
[string] LPWSTR szwConnName;
|
|
BOOL fShowIcon;
|
|
GUID guid;
|
|
} LANCON_INFO;
|
|
|
|
HRESULT GetInfo (
|
|
[in] DWORD dwMask,
|
|
[out] LANCON_INFO* pLanConInfo);
|
|
|
|
HRESULT SetInfo (
|
|
[in] DWORD dwMask,
|
|
[in] const LANCON_INFO* pLanConInfo);
|
|
|
|
HRESULT GetDeviceGuid (
|
|
[out, ref] GUID* pguid);
|
|
};
|
|
|
|
// Export functions and protptype typedefs
|
|
//
|
|
cpp_quote("")
|
|
cpp_quote("EXTERN_C HRESULT WINAPI HrLanConnectionNameFromGuidOrPath (")
|
|
cpp_quote(" /* [in] */ const GUID* pguid,")
|
|
cpp_quote(" /* [in] */ LPCWSTR pszwPath,")
|
|
cpp_quote(" /* [out] */ LPWSTR pszwName,")
|
|
cpp_quote(" /* [inout] */ LPDWORD pcchMax);")
|
|
cpp_quote("")
|
|
|
|
cpp_quote("")
|
|
cpp_quote("typedef HRESULT")
|
|
cpp_quote("(WINAPI* PHRLANCONNECTIONNAMEFROMGUIDORPATH)(")
|
|
cpp_quote(" const GUID*,")
|
|
cpp_quote(" LPCWSTR,")
|
|
cpp_quote(" LPWSTR,")
|
|
cpp_quote(" LPDWORD")
|
|
cpp_quote(" );")
|
|
cpp_quote("")
|
|
|
|
cpp_quote("")
|
|
cpp_quote("EXTERN_C HRESULT WINAPI HrPnpInstanceIdFromGuid (")
|
|
cpp_quote(" /* [in] */ const GUID* pguid,")
|
|
cpp_quote(" /* [out] */ LPWSTR szwInstance,")
|
|
cpp_quote(" /* [in] */ UINT cchInstance);")
|
|
cpp_quote("")
|
|
|
|
cpp_quote("")
|
|
cpp_quote("typedef HRESULT")
|
|
cpp_quote("(WINAPI* PHRPNPINSTANCEIDFROMGUID)(")
|
|
cpp_quote(" const GUID*,")
|
|
cpp_quote(" LPWSTR,")
|
|
cpp_quote(" UINT")
|
|
cpp_quote(" );")
|
|
cpp_quote("")
|
|
|
|
cpp_quote("")
|
|
cpp_quote("EXTERN_C HRESULT WINAPI HrGetPnpDeviceStatus (")
|
|
cpp_quote(" /* [in] */ const GUID* pguid,")
|
|
cpp_quote(" /* [out] */ NETCON_STATUS *pStatus);")
|
|
cpp_quote("")
|
|
|
|
cpp_quote("")
|
|
cpp_quote("typedef HRESULT")
|
|
cpp_quote("(WINAPI* PHRGETPNPDEVICESTATUS)(")
|
|
cpp_quote(" const GUID*,")
|
|
cpp_quote(" NETCON_STATUS*")
|
|
cpp_quote(" );")
|
|
cpp_quote("")
|
|
|
|
cpp_quote("")
|
|
cpp_quote("EXTERN_C HRESULT WINAPI HrQueryLanMediaState (")
|
|
cpp_quote(" /* [in] */ const GUID* pguid,")
|
|
cpp_quote(" /* [out] */ BOOL *pfEnabled);")
|
|
cpp_quote("")
|
|
|
|
cpp_quote("")
|
|
cpp_quote("typedef HRESULT")
|
|
cpp_quote("(WINAPI* PHRQUERYLANMEDIASTATE)(")
|
|
cpp_quote(" const GUID*,")
|
|
cpp_quote(" BOOL*")
|
|
cpp_quote(" );")
|
|
cpp_quote("")
|
|
|
|
//+---------------------------------------------------------------------------
|
|
// INetSharedAccessConnection -
|
|
//
|
|
[
|
|
object,
|
|
uuid(FAEDCF55-31FE-11D1-AAD2-00805FC1270E),
|
|
pointer_default(unique)
|
|
]
|
|
interface INetSharedAccessConnection : IUnknown
|
|
{
|
|
typedef enum tagSHAREDACCESSCON_INFO_FLAGS
|
|
{
|
|
SACIF_ICON = 0x1,
|
|
SACIF_ALL = 0xFF,
|
|
} SHAREDACCESSCON_INFO_FLAGS;
|
|
|
|
typedef struct tagSHAREDACCESSCON_INFO
|
|
{
|
|
BOOL fShowIcon;
|
|
} SHAREDACCESSCON_INFO;
|
|
|
|
HRESULT GetInfo (
|
|
[in] DWORD dwMask,
|
|
[out] SHAREDACCESSCON_INFO* pLanConInfo);
|
|
|
|
HRESULT SetInfo (
|
|
[in] DWORD dwMask,
|
|
[in] const SHAREDACCESSCON_INFO* pLanConInfo);
|
|
|
|
|
|
typedef enum tagSAHOST_SERVICES
|
|
{
|
|
SAHOST_SERVICE_OSINFO = 0,
|
|
SAHOST_SERVICE_WANCOMMONINTERFACECONFIG,
|
|
SAHOST_SERVICE_WANIPCONNECTION,
|
|
SAHOST_SERVICE_WANPPPCONNECTION,
|
|
SAHOST_SERVICE_NATSTATICPORTMAPPING,
|
|
SAHOST_SERVICE_MAX,
|
|
} SAHOST_SERVICES;
|
|
|
|
HRESULT GetLocalAdapterGUID([out] GUID* pGuid);
|
|
HRESULT GetService([in] SAHOST_SERVICES ulService, [out] IUPnPService** ppService);
|
|
};
|
|
|
|
|
|
//+---------------------------------------------------------------------------
|
|
// INetLanConnectionWizardUi -
|
|
//
|
|
[
|
|
local,
|
|
object,
|
|
uuid(FAEDCF56-31FE-11D1-AAD2-00805FC1270E),
|
|
pointer_default(unique)
|
|
]
|
|
interface INetLanConnectionWizardUi : IUnknown
|
|
{
|
|
HRESULT SetDeviceComponent (
|
|
[in] const GUID* pguid);
|
|
};
|
|
|
|
//+---------------------------------------------------------------------------
|
|
// INetRasConnection -
|
|
//
|
|
[
|
|
object,
|
|
uuid(FAEDCF57-31FE-11D1-AAD2-00805FC1270E),
|
|
pointer_default(unique)
|
|
]
|
|
interface INetRasConnection : IUnknown
|
|
{
|
|
typedef struct tagRASCON_INFO
|
|
{
|
|
[string] LPWSTR pszwPbkFile;
|
|
[string] LPWSTR pszwEntryName;
|
|
GUID guidId;
|
|
} RASCON_INFO;
|
|
|
|
HRESULT GetRasConnectionInfo (
|
|
[out] RASCON_INFO* pRasConInfo);
|
|
|
|
HRESULT SetRasConnectionInfo (
|
|
[in] const RASCON_INFO* pRasConInfo);
|
|
|
|
HRESULT GetRasConnectionHandle(
|
|
[out] ULONG_PTR* phRasConn);
|
|
};
|
|
|
|
|
|
//+---------------------------------------------------------------------------
|
|
// INetDefaultConnection -
|
|
//
|
|
[
|
|
object,
|
|
uuid(FAEDCF66-31FE-11D1-AAD2-00805FC1270E),
|
|
pointer_default(unique)
|
|
]
|
|
interface INetDefaultConnection : IUnknown
|
|
{
|
|
HRESULT SetDefault ([in] BOOL bDefault);
|
|
|
|
HRESULT GetDefault ([out] BOOL* pbDefault);
|
|
};
|
|
|
|
//+---------------------------------------------------------------------------
|
|
// INetRasConnectionIpUiInfo -
|
|
//
|
|
[
|
|
object,
|
|
uuid(FAEDCF58-31FE-11D1-AAD2-00805FC1270E),
|
|
pointer_default(unique)
|
|
]
|
|
interface INetRasConnectionIpUiInfo : IUnknown
|
|
{
|
|
typedef enum tagRASCON_IPUI_FLAGS
|
|
{
|
|
RCUIF_PPP = 0x01,
|
|
RCUIF_SLIP = 0x02,
|
|
RCUIF_USE_IP_ADDR = 0x04,
|
|
RCUIF_USE_NAME_SERVERS = 0x08,
|
|
RCUIF_USE_REMOTE_GATEWAY = 0x10,
|
|
RCUIF_USE_HEADER_COMPRESSION = 0x20,
|
|
RCUIF_VPN = 0x40,
|
|
RCUIF_DEMAND_DIAL = 0x80,
|
|
RCUIF_USE_DISABLE_REGISTER_DNS = 0x0100,
|
|
RCUIF_USE_PRIVATE_DNS_SUFFIX = 0x0200,
|
|
RCUIF_NOT_ADMIN = 0x0400,
|
|
RCUIF_ENABLE_NBT = 0x0800
|
|
} RASCON_UIINFO_FLAGS;
|
|
|
|
typedef struct tagRASCON_IPUI
|
|
{
|
|
// This is the GUID of the phonebook entry and can be used as the
|
|
// GUID of the 'fake' RAS adapter to TCP/IP.
|
|
//
|
|
GUID guidConnection;
|
|
|
|
// dwFlags defines how to interpret rest of the data.
|
|
// RCUIF_SLIP : pszwIpAddr et al. must be specified
|
|
// RCUIF_USE_IP_ADDR : use pszwIpAddr, otherwise automatic
|
|
// RCUIF_USE_NAME_SERVERS : use Dns and Wins address, otherwise automatic
|
|
// RCUIF_USE_REMOTE_GATEWAY : prioritize remote network
|
|
// RCUIF_USE_HEADER_COMPRESSION : use IP header compression
|
|
// RCUIF_VPN : use IP header compression should be disabled
|
|
//
|
|
DWORD dwFlags;
|
|
|
|
// 16 characters for an IP address is adequate for the form
|
|
// aaa.bbb.ccc.ddd\0
|
|
//
|
|
WCHAR pszwIpAddr [16];
|
|
WCHAR pszwDnsAddr [16];
|
|
WCHAR pszwDns2Addr [16];
|
|
WCHAR pszwWinsAddr [16];
|
|
WCHAR pszwWins2Addr [16];
|
|
DWORD dwFrameSize;
|
|
WCHAR pszwDnsSuffix[256];
|
|
|
|
} RASCON_IPUI;
|
|
|
|
HRESULT GetUiInfo (
|
|
[out] RASCON_IPUI* pInfo);
|
|
};
|
|
|
|
//+---------------------------------------------------------------------------
|
|
// IPersistNetConnection -
|
|
//
|
|
[
|
|
object,
|
|
uuid(FAEDCF59-31FE-11D1-AAD2-00805FC1270E),
|
|
pointer_default(unique)
|
|
]
|
|
interface IPersistNetConnection : IPersist
|
|
{
|
|
HRESULT GetSizeMax (
|
|
[out] ULONG* pcbSize);
|
|
|
|
HRESULT Load (
|
|
[in, size_is(cbSize)] const BYTE* pbBuf,
|
|
[in] ULONG cbSize);
|
|
|
|
HRESULT Save (
|
|
[out, size_is(cbSize)] BYTE* pbBuf,
|
|
[in] ULONG cbSize);
|
|
};
|
|
|
|
//+---------------------------------------------------------------------------
|
|
// Network Connection Branding Information
|
|
//
|
|
[
|
|
object,
|
|
uuid(FAEDCF5B-31FE-11D1-AAD2-00805FC1270E),
|
|
pointer_default(unique)
|
|
]
|
|
interface INetConnectionBrandingInfo : IUnknown
|
|
{
|
|
typedef struct tagCON_BRANDING_INFO
|
|
{
|
|
[string] LPWSTR szwLargeIconPath;
|
|
[string] LPWSTR szwSmallIconPath;
|
|
[string] LPWSTR szwTrayIconPath;
|
|
} CON_BRANDING_INFO;
|
|
|
|
HRESULT GetBrandingIconPaths(
|
|
[out] CON_BRANDING_INFO ** ppConBrandInfo);
|
|
|
|
typedef struct tagCON_TRAY_MENU_ENTRY
|
|
{
|
|
[string] LPWSTR szwMenuText;
|
|
[string] LPWSTR szwMenuCmdLine;
|
|
[string] LPWSTR szwMenuParams;
|
|
|
|
} CON_TRAY_MENU_ENTRY;
|
|
|
|
typedef struct tagCON_TRAY_MENU_DATA
|
|
{
|
|
DWORD dwCount;
|
|
[ size_is(dwCount) ] CON_TRAY_MENU_ENTRY * pctme;
|
|
} CON_TRAY_MENU_DATA;
|
|
|
|
HRESULT GetTrayMenuEntries(
|
|
[out] CON_TRAY_MENU_DATA ** ppMenuData);
|
|
};
|
|
|
|
//+---------------------------------------------------------------------------
|
|
// Network Connection 2 interfaces.
|
|
//
|
|
[
|
|
object,
|
|
uuid(FAEDCF69-31FE-11D1-AAD2-00805FC1270E),
|
|
pointer_default(unique)
|
|
]
|
|
interface INetConnectionManager2 : IUnknown
|
|
{
|
|
HRESULT EnumConnectionProperties(
|
|
[out] LPSAFEARRAY* ppsaConnectionProperties);
|
|
};
|
|
|
|
[
|
|
object,
|
|
uuid(FAEDCF6A-31FE-11D1-AAD2-00805FC1270E),
|
|
pointer_default(unique)
|
|
]
|
|
interface INetConnection2 : IUnknown
|
|
{
|
|
typedef enum tagNETCON_SUBMEDIATYPE
|
|
{
|
|
NCSM_NONE,
|
|
NCSM_LAN,
|
|
NCSM_WIRELESS,
|
|
NCSM_ATM,
|
|
NCSM_ELAN,
|
|
NCSM_1394,
|
|
NCSM_DIRECT,
|
|
NCSM_IRDA,
|
|
NCSM_CM
|
|
} NETCON_SUBMEDIATYPE;
|
|
|
|
typedef struct tagNETCON_PROPERTIES_EX
|
|
{
|
|
DWORD dwSize;
|
|
GUID guidId;
|
|
BSTR bstrName;
|
|
BSTR bstrDeviceName;
|
|
NETCON_STATUS ncStatus;
|
|
NETCON_MEDIATYPE ncMediaType;
|
|
NETCON_SUBMEDIATYPE ncSubMediaType;
|
|
DWORD dwCharacter;
|
|
CLSID clsidThisObject;
|
|
CLSID clsidUiObject;
|
|
BSTR bstrPhoneOrHostAddress;
|
|
BSTR bstrPersistData;
|
|
} NETCON_PROPERTIES_EX;
|
|
|
|
HRESULT GetPropertiesEx(
|
|
[out] NETCON_PROPERTIES_EX** ppConnectionPropertiesEx);
|
|
};
|
|
|
|
|
|
//+---------------------------------------------------------------------------
|
|
// Network Connection Notify Sink
|
|
//
|
|
[
|
|
object,
|
|
uuid(FAEDCF5C-31FE-11D1-AAD2-00805FC1270E),
|
|
pointer_default(unique)
|
|
]
|
|
interface INetConnectionNotifySink : IUnknown
|
|
{
|
|
HRESULT
|
|
ConnectionAdded (
|
|
[in] const NETCON_PROPERTIES_EX* pPropsEx);
|
|
|
|
HRESULT
|
|
ConnectionBandWidthChange (
|
|
[in] const GUID* pguidId);
|
|
|
|
HRESULT
|
|
ConnectionDeleted (
|
|
[in] const GUID* pguidId);
|
|
|
|
HRESULT
|
|
ConnectionModified (
|
|
[in] const NETCON_PROPERTIES_EX* pPropsEx);
|
|
|
|
HRESULT
|
|
ConnectionRenamed (
|
|
[in] const GUID* pguidId,
|
|
[in, string] LPCWSTR pszwNewName);
|
|
|
|
HRESULT
|
|
ConnectionStatusChange (
|
|
[in] const GUID* pguidId,
|
|
[in] NETCON_STATUS Status);
|
|
|
|
HRESULT
|
|
RefreshAll ();
|
|
|
|
HRESULT
|
|
ConnectionAddressChange(
|
|
[in] const GUID* pguidId );
|
|
|
|
HRESULT
|
|
ShowBalloon (
|
|
[in] const GUID* pguidId,
|
|
[in] const BSTR szCookie,
|
|
[in] const BSTR szBalloonText);
|
|
|
|
HRESULT
|
|
DisableEvents (
|
|
[in] const BOOL fDisable,
|
|
[in] const ULONG ulDisableTimeout);
|
|
};
|
|
|
|
//+---------------------------------------------------------------------------
|
|
// INetConnectionUiUtilities -
|
|
//
|
|
[
|
|
local,
|
|
object,
|
|
uuid(FAEDCF5E-31FE-11D1-AAD2-00805FC1270E),
|
|
pointer_default(unique)
|
|
]
|
|
interface INetConnectionUiUtilities : IUnknown
|
|
{
|
|
HRESULT QueryUserAndRemoveComponent(
|
|
HWND hwndParent,
|
|
INetCfg* pnc,
|
|
INetCfgComponent* pncc);
|
|
|
|
typedef enum tagQUERY_USER_FOR_REBOOT_FLAGS
|
|
{
|
|
QUFR_PROMPT = 0x1,
|
|
QUFR_REBOOT = 0x2
|
|
} QUERY_USER_FOR_REBOOT_FLAGS;
|
|
|
|
HRESULT QueryUserForReboot(
|
|
HWND hwndParent,
|
|
LPCTSTR pszCaption,
|
|
DWORD dwFlags);
|
|
|
|
HRESULT DisplayAddComponentDialog (
|
|
HWND hwndParent,
|
|
INetCfg* pnc,
|
|
CI_FILTER_INFO* pcfi);
|
|
|
|
typedef enum tagNCPERM_FLAGS
|
|
{
|
|
NCPERM_NewConnectionWizard = 0,
|
|
NCPERM_Statistics = 1,
|
|
NCPERM_AddRemoveComponents = 2,
|
|
NCPERM_RasConnect = 3,
|
|
NCPERM_LanConnect = 4,
|
|
NCPERM_DeleteConnection = 5,
|
|
NCPERM_DeleteAllUserConnection = 6,
|
|
NCPERM_RenameConnection = 7,
|
|
NCPERM_RenameMyRasConnection = 8,
|
|
NCPERM_ChangeBindState = 9,
|
|
NCPERM_AdvancedSettings = 10,
|
|
NCPERM_DialupPrefs = 11,
|
|
NCPERM_LanChangeProperties = 12,
|
|
NCPERM_RasChangeProperties = 13,
|
|
NCPERM_LanProperties = 14,
|
|
NCPERM_RasMyProperties = 15,
|
|
NCPERM_RasAllUserProperties = 16,
|
|
NCPERM_ShowSharedAccessUi = 17,
|
|
NCPERM_AllowAdvancedTCPIPConfig = 18,
|
|
NCPERM_OpenConnectionsFolder = 19,
|
|
NCPERM_PersonalFirewallConfig = 20,
|
|
NCPERM_AllowNetBridge_NLA = 21,
|
|
NCPERM_ICSClientApp = 22,
|
|
NCPERM_EnDisComponentsAllUserRas = 23,
|
|
NCPERM_EnDisComponentsMyRas = 24,
|
|
NCPERM_ChangeMyRasProperties = 25,
|
|
NCPERM_ChangeAllUserRasProperties = 26,
|
|
NCPERM_RenameLanConnection = 27,
|
|
NCPERM_RenameAllUserRasConnection = 28,
|
|
NCPERM_IpcfgOperation = 29,
|
|
NCPERM_Repair = 30
|
|
} NCPERM_FLAGS;
|
|
|
|
BOOL UserHasPermission(DWORD dwPerm);
|
|
};
|
|
|
|
[
|
|
object,
|
|
uuid(FAEDCF5F-31FE-11D1-AAD2-00805FC1270E),
|
|
pointer_default(unique)
|
|
]
|
|
interface INetConnectionRefresh : IUnknown
|
|
{
|
|
HRESULT
|
|
RefreshAll();
|
|
|
|
HRESULT
|
|
ConnectionAdded(
|
|
[in] INetConnection* pConnection);
|
|
|
|
HRESULT
|
|
ConnectionDeleted (
|
|
[in] const GUID* pguidId);
|
|
|
|
HRESULT
|
|
ConnectionModified (
|
|
[in] INetConnection* pConnection);
|
|
|
|
HRESULT
|
|
ConnectionRenamed (
|
|
[in] INetConnection* pConnection);
|
|
|
|
HRESULT
|
|
ConnectionStatusChanged (
|
|
[in] const GUID* pguidId,
|
|
[in] const NETCON_STATUS ncs );
|
|
|
|
HRESULT
|
|
ShowBalloon (
|
|
[in] const GUID* pguidId,
|
|
[in] const BSTR szCookie,
|
|
[in] const BSTR szBalloonText);
|
|
|
|
HRESULT
|
|
DisableEvents (
|
|
[in] const BOOL fDisable,
|
|
[in] const ULONG ulDisableTimeout);
|
|
};
|
|
|
|
[
|
|
object,
|
|
uuid(FAEDCF60-31FE-11D1-AAD2-00805FC1270E),
|
|
pointer_default(unique)
|
|
]
|
|
interface INetConnectionCMUtil : IUnknown
|
|
{
|
|
HRESULT MapCMHiddenConnectionToOwner([in] REFGUID guidHidden, [out] GUID * pguidOwner);
|
|
};
|
|
|
|
[
|
|
object,
|
|
uuid(FAEDCF64-31FE-11D1-AAD2-00805FC1270E),
|
|
pointer_default(unique)
|
|
]
|
|
interface INetConnectionHNetUtil : IUnknown
|
|
{
|
|
HRESULT NotifyUpdate();
|
|
};
|
|
|
|
//+---------------------------------------------------------------------------
|
|
// INetConnectionSysTray -
|
|
//
|
|
[
|
|
object,
|
|
uuid(FAEDCF65-31FE-11D1-AAD2-00805FC1270E),
|
|
pointer_default(unique)
|
|
]
|
|
interface INetConnectionSysTray : IUnknown
|
|
{
|
|
HRESULT ShowIcon(
|
|
[in] const BOOL bShowIcon);
|
|
HRESULT IconStateChanged();
|
|
};
|
|
|
|
//+---------------------------------------------------------------------------
|
|
// INetConnectionMachinePolicies -
|
|
//
|
|
[
|
|
object,
|
|
uuid(FAEDCF68-31FE-11D1-AAD2-00805FC1270E),
|
|
pointer_default(unique)
|
|
]
|
|
interface INetMachinePolicies : IUnknown
|
|
{
|
|
HRESULT VerifyPermission(
|
|
[in] const DWORD ulPerm,
|
|
[out] BOOL* pPermission);
|
|
};
|
|
|
|
|
|
//#if DBG DBG not defined for MIDL :(
|
|
|
|
//+---------------------------------------------------------------------------
|
|
// Network Connection Debug interface
|
|
//
|
|
[
|
|
object,
|
|
uuid(FAEDCF5D-31FE-11D1-AAD2-00805FC1270E),
|
|
pointer_default(unique)
|
|
]
|
|
interface INetConnectionManagerDebug : IUnknown
|
|
{
|
|
HRESULT
|
|
NotifyTestStart ();
|
|
|
|
HRESULT
|
|
NotifyTestStop ();
|
|
};
|
|
|
|
//#endif // DBG
|
|
|
|
|
|
[
|
|
uuid(FAEDCF6B-31FE-11D1-AAD2-00805FC1270E),
|
|
pointer_default(unique)
|
|
]
|
|
interface ISharedAccessBeacon : IUnknown
|
|
{
|
|
HRESULT GetMediaType([out] NETCON_MEDIATYPE* pMediaType);
|
|
HRESULT GetLocalAdapterGUID([out] GUID* pGuid);
|
|
HRESULT GetService([in] SAHOST_SERVICES ulService, [out] IUPnPService**);
|
|
HRESULT GetUniqueDeviceName([out] BSTR* pUDN);
|
|
};
|
|
|
|
|
|
//+---------------------------------------------------------------------------
|
|
// Shared Access Beacon Finder - This interface is for CSharedAccessConnection only, others should go through INetSharedAccessConnection
|
|
//
|
|
[
|
|
uuid(FAEDCF67-31FE-11D1-AAD2-00805FC1270E),
|
|
pointer_default(unique)
|
|
]
|
|
interface ISharedAccessBeaconFinder : IUnknown
|
|
{
|
|
typedef struct tagSHAREDACCESS_HOST_INFO
|
|
{
|
|
BSTR WANAccessType;
|
|
IUPnPService* pOSInfo;
|
|
IUPnPService* pWANCommonInterfaceConfig;
|
|
IUPnPService* pWANConnection;
|
|
GUID LocalAdapterGuid;
|
|
} SHAREDACCESS_HOST_INFO;
|
|
|
|
HRESULT GetSharedAccessBeacon([in] BSTR DeviceId, [out] ISharedAccessBeacon** ppSharedAccessBeacon);
|
|
};
|
|
|
|
cpp_quote("")
|
|
cpp_quote("EXTERN_C HRESULT WINAPI HrGetIconFromMediaType (")
|
|
cpp_quote(" /* [in] */ DWORD dwIconSize,")
|
|
cpp_quote(" /* [in] */ NETCON_MEDIATYPE ncm,")
|
|
cpp_quote(" /* [in] */ NETCON_SUBMEDIATYPE ncsm,")
|
|
cpp_quote(" /* [in] */ DWORD dwConnectionIcon,")
|
|
cpp_quote(" /* [in] */ DWORD dwCharacteristics,")
|
|
cpp_quote(" /* [out] */ HICON *phIcon);")
|
|
cpp_quote("")
|