60 [id(1), helpstring(
"method Register. This is a convenience method for attaching one or more callback interface(s) without using the IConnectionPoint interface directly.")]
61 HRESULT Register([in]
IVpnApiEvents * pVpnApiEvents, [out, retval] DWORD * pdwCookie);
63 [id(2), helpstring(
"method Unregister. This is a convenience method for detaching a callback interface without using the IConnectionPoint interface directly.")]
64 HRESULT Unregister([in] DWORD dwCookie);
66 [id(3), helpstring(
"method Attach. This is the first method that is called to configure the VPN API engine. An event callback IVpnApiEvents is assumed to be already associated, prior to calling this method. Languages like C# would use this method after wiring up the events.")]
67 HRESULT Attach([in, defaultvalue(ClientType_GUI)]
enum ClientType clientType,
68 [in, defaultvalue(-1)] VARIANT_BOOL bRequestFullCapabilities,
69 [in, defaultvalue(-1)] VARIANT_BOOL bSuppressAutoConnect);
71 [id(4), helpstring(
"method Detach. This is the last method that is called to terminate the VPN API engine. Languages like C# would use this method after wiring up the events.")]
74 [id(5), helpstring(
"method RegisterAndAttach. This method combines Register and Attach into a single convenience method. This supports only one IVpnApiEvents instance per IVpnApi instance. Languages that handle connection points under the covers, like C#, would not use this method, but would instead simply use Attach().")]
76 [in, defaultvalue(ClientType_GUI)]
enum ClientType clientType,
77 [in, defaultvalue(-1)] VARIANT_BOOL bRequestFullCapabilities,
78 [in, defaultvalue(-1)] VARIANT_BOOL bSuppressAutoConnect);
80 [id(6), helpstring(
"method UnregisterAndDetach. This method combines Unregister and Detach into a single convenience method. This supports only one IVpnApiEvents instance per IVpnApi instance. Languages that handle connection points under the covers, like C#, would not use this method, but would instead simply use Detach().")]
81 HRESULT UnregisterAndDetach();
83 [id(7), propput, helpstring(
"property EnableConsumerDrivenEventModel. Call this before attaching, to enable a consumer-driven event model. This enables the IVpnApiEvents::VpnEventAvailableNotification. It's required to always enable this as the old event model is deprecated.")]
84 HRESULT EnableConsumerDrivenEventModel([in] VARIANT_BOOL bEnable);
86 [id(8), helpstring(
"method ProcessEvents. Use this method if the consumer-driven event model is configured and an IVpnApiEvents::VpnEventAvailableNotification was fired.")]
87 HRESULT ProcessEvents();
89 [id (9), propget, helpstring(
"property HasFullCapabilities. Indicates whether this instance of the VPN API engine is the principal instance.")]
90 HRESULT HasFullCapabilities([out, retval] VARIANT_BOOL* pbHasFullCapabilities);
92 [id(10), propget, helpstring(
"property IsConnected. Indicates that there is a VPN connection.")]
93 HRESULT IsConnected([out, retval] VARIANT_BOOL* pbIsConnected);
95 [id(11), propget, helpstring(
"property IsVPNServiceAvailable. Indicates that the VPN Service is active. (This is also delivered to the IVpnApiEvents callback.)")]
96 HRESULT IsVPNServiceAvailable([out, retval] VARIANT_BOOL* pbIsVPNServiceAvailable);
98 [id(12), propget, helpstring(
"property HostNames. Obtains a collection of hostname strings from the profile.")]
101 [id(13), propget, helpstring(
"property DefaultHostName. Obtains the default hostname from the profile or the last hostname from a previous connection.")]
102 HRESULT DefaultHostName([out, retval] BSTR* pstrGetDefaultHostName);
104 [id(14), helpstring(
"method ConnectVpn. Connects to the secure gateway using a hostname or ip address.")]
105 HRESULT ConnectVpn([in] BSTR strHostNameOrAddress);
107 [id(15), helpstring(
"method DisconnectVpn. Disconnects from the secure gateway VPN session")]
108 HRESULT DisconnectVpn();
110 [id(16), helpstring(
"method GetState. Causes the VPN API engine to invoke the IVpnApiEvents::VpnStateNotification method to deliver the current state.")]
113 [id(17), helpstring(
"method ResetStats. Resets the the internal stat counters back to initial values.")]
114 HRESULT ResetStats();
116 [id(18), helpstring(
"method StartStats. Starts the automatic stats notification mechanism. This results in IVpnApiEvents::VpnStatsNotification being fired periodically.")]
117 HRESULT StartStats();
119 [id(19), helpstring(
"method StopStats. Stops the automatic stats notification mechanism.")]
122 [id(20), helpstring(
"method UserSubmit. The caller must release the IConnectPromptInfo object, obtained from IVpnApiEvents::VpnUserPromptNotification, prior to calling this method.")]
123 HRESULT UserSubmit();
125 [id(21), propget, helpstring(
"property Preferences. Obtains a collection of IPreference interface instances.")]
128 [id(22), helpstring(
"method SavePreferences. The caller must release the IPreferenceInfo object prior to calling this method.")]
129 HRESULT SavePreferences();
131 [id(23), propput, helpstring(
"property BannerResponse. Call this with the user response to the banner.")]
132 HRESULT BannerResponse([in] VARIANT_BOOL bResponse);
134 [id(24), propget, helpstring(
"property OperatingMode. Indicates if an operating mode is enabled.")]
135 HRESULT IsOperatingMode([in]
enum OperatingMode eOperatingMode, [out, retval] VARIANT_BOOL* pbIsEnabled);
137 [id(25), helpstring(
"method GetStats. Causes the VPN API engine to invoke the IVpnApiEvents::VpnStatsNotification method to deliver the current stats.")]
140 [id(26), propget, helpstring(
"property LastVpnError. Indicates the last error seen while establishing VPN.")]
141 HRESULT LastVpnError([out, retval]
enum VPNError* peLastVpnError);
143 [id(27), propput, helpstring(
"property CertBlockedResponse. Call this with the user response to the CertBlockedCB.")]
144 HRESULT CertBlockedResponse([in] VARIANT_BOOL bUnblock);
146 [id(28), propput, helpstring(
"property CertWarningResponse. Call this with the user response to the CertWarningCB.")]
147 HRESULT CertWarningResponse([in] VARIANT_BOOL bConnect, [in] VARIANT_BOOL bImport);
149 [id(29), propput, helpstring(
"property PreConnectReminderResponse. Call this with the user response to the pre-connect reminder.")]
150 HRESULT PreConnectReminderResponse([in] VARIANT_BOOL bResponse);
152 [id(99), propget, helpstring(
"property VpnStatsTranslatedLabel. Allows for pre-fetching translated labels for various VPN statistics prior to obtaining an IVpnStats interface")]
153 HRESULT VpnStatsTranslatedLabel([in]
enum VPNStatsTag eVPNStatsTag, [out, retval] BSTR* pstrTranslatedLabel);
158 [id(998), propget, helpstring(
"property UpgradeRegistryKeyName. returns the name of the registry key to monitor for core software upgrade completions.")]
159 HRESULT UpgradeRegistryKeyName([out, retval] BSTR* pstrUpgradeRegistryKeyName);
160 [id(999), propget, helpstring(
"property UpgradeRegistryValueName. returns the name of the registry value to query for core software upgrade completions when the key change is notified.")]
161 HRESULT UpgradeRegistryValueName([out, retval] BSTR* pstrUpgradeRegistryValueName);
179 [id(1000), helpstring(
"method VpnStatsNotification. Callback containing a IVpnStats object to be queried for stats.")]
180 HRESULT VpnStatsNotification([in]
IVpnStats * pVpnStats);
182 [id(1001), helpstring(
"method VpnStateNotification. Callback containing the state of the VPN session")]
183 HRESULT VpnStateNotification([in]
enum VPNState eState, [in]
enum VPNSubState eSubState, [in] BSTR strState);
185 [id(1002), helpstring(
"method VpnBannerNotification. Callback containing a Banner notification string.")]
186 HRESULT VpnBannerNotification([in] BSTR strBannerMessage);
188 [id(1003), helpstring(
"method VpnStateNotification. Callback containing a notice pertaining to the VPN session")]
189 HRESULT VpnNoticeNotification([in] BSTR strNoticeMessage, [in]
enum MessageType eMessageType);
191 [id(1004), helpstring(
"method VpnExitNotification. Callback containing a notice indicating to shutdown the VPN API release to COM component.")]
192 HRESULT VpnExitNotification([in] BSTR strExitMessage, [in]
long exitCode);
194 [id(1005), helpstring(
"method VpnServiceReadyNotification. Callback indicating the VPN Service is online")]
195 HRESULT VpnServiceReadyNotification();
197 [id(1006), helpstring(
"method VpnUserPromptNotification. Callback indicating the VPN Service is online")]
200 [id(1007), helpstring(
"method VpnWMHintNotification. Callback containing UI behavior hint and reason.")]
201 HRESULT VpnWMHintNotification([in]
enum WMHint eHint, [in]
enum WMHintReason eReason);
203 [id(1008), helpstring(
"method VpnWebLaunchHostNotification. Callback containing the Active Host pertaining to the VPN session")]
204 HRESULT VpnWebLaunchHostNotification([in] BSTR strActiveHost);
206 [id(1009), helpstring(
"method VpnEventAvailableNotification. Callback indicating an API Event is available to consume. This notification is sent only if configured to use the consumer-driven event model. A COM user then calls IVpnApi::ProcessEvents.")]
207 HRESULT VpnEventAvailableNotification();
209 [id(1010), helpstring(
"method VpnCertBlockedNotification. Callback indicating strUntrustedServer is an untrusted server.")]
210 HRESULT VpnCertBlockedNotification([in] BSTR strUntrustedServer);
212 [id(1011), helpstring(
"method VpnCertWarningNotification. Callback indicating strUntrustedServer is an untrusted server because of the certificate errors in pCertErrors.")]
213 HRESULT VpnCertWarningNotification([in] BSTR strUntrustedServer, [in]
IStringCollection *pCertErrors, [in] VARIANT_BOOL bImportAllowed);
215 [id(1012), helpstring(
"method VpnPreConnectReminderNotification. Callback containing a pre-connect reminder notification string.")]
216 HRESULT VpnPreConnectReminderNotification([in] BSTR strPreConnectReminderMessage);
234 [id(100), propget, helpstring(
"property SecureRoutes. Obtains a collection of IRouteInfo interface instances.")]
237 [id(101), propget, helpstring(
"property NonsecureRoutes. Obtains a collection of IRouteInfo interface instances.")]
240 [id(102), propget, helpstring(
"property ProtocolInfo. Obtains a collection of IProtocolInfo interface instances.")]
243 [id(103), propget, helpstring(
"property FirewallInfo. Obtains a collection of IFirewallInfo interface instances.")]
246 [id(DISPID_VALUE), propget, helpstring(
"property StatValue. Obtains the value for various VPN statistics associated IVpnStats interface. (NOTE: This is functionally the same as GetVpnStatsTranslatedLabel.)")]
247 HRESULT StatValue([in]
enum VPNStatsTag eVPNStatsTag, [out,retval] BSTR* pstrStatValue);
249 [id(104), propget, helpstring(
"property TranslatedLabel. Obtains the translated labels for various VPN statistics associated IVpnStats interface. (NOTE: This is functionally the same as GetVpnStatsTranslatedLabel.)")]
250 HRESULT TranslatedLabel([in]
enum VPNStatsTag eVPNStatsTag, [out,retval] BSTR* pstrTranslatedLabel);
268 [id(200), propget, helpstring(
"property ConnectPromptType. The type of prompt entry.")]
269 HRESULT ConnectPromptType([out, retval]
enum ConnectPromptType* peConnectPromptType);
271 [id(201), propget, helpstring(
"property CountPromptEntry. The number of prompt entries in the collection.")]
272 HRESULT CountPromptEntry([out, retval]
unsigned long* pulEntryCount);
274 [id(202), propget, helpstring(
"property Message. Provides a message associated with the credentials being entered.")]
275 HRESULT Message([out, retval] BSTR* pMessage);
277 [id(203), propget, helpstring(
"property PromptNames. Obtains a collection of prompt name strings if available.")]
280 [id(DISPID_VALUE), propget, helpstring(
"property PromptEntry. Obtains a prompt entry based on a tag value provided.")]
281 HRESULT PromptEntry([in] BSTR strPromptName, [out, retval]
IPromptEntry ** ppPromptEntry);
283 [id(205), propget, helpstring(
"property PromptEntries. Obtains a collection of prompt entries.")]
286 [id(206), propget, helpstring(
"property HasAuthenticationError. Indicates whether an authentication error has occurred.")]
287 HRESULT HasAuthenticationError([out, retval] VARIANT_BOOL* pbAuthErr);
289 [id(207), propget, helpstring(
"property SubmitButtonName. Provides the name to be used for the Submit Button.")]
290 HRESULT SubmitButtonName([out, retval] BSTR* pstrSubmitButton);
292 [id(208), propget, helpstring(
"property HasEnrollmentCA. Indicates an Enrollment CA is available.")]
293 HRESULT HasEnrollmentCA([out, retval] VARIANT_BOOL* pbCAAvailable);
295 [id(209), propput, helpstring(
"property UseEnrollmentCA. Inform the VPN API to use the Enrollement CA.")]
296 HRESULT UseEnrollmentCA([in] VARIANT_BOOL bUseCA);
298 [id(210), propput, helpstring(
"property TunnelGroup. Allows the setting of the currently selected Tunnel group")]
299 HRESULT TunnelGroup([in] BSTR strSelectedTunnelGroup);
301 [id(211), propget, helpstring(
"property IsCanceled. Indicates if the user has canceled the prompt.")]
302 HRESULT IsCanceled([out, retval] VARIANT_BOOL* pbIsCanceled);
304 [id(212), propput, helpstring(
"property Canceled. Inform the VPNAPI that the user has canceled the prompt.")]
305 HRESULT Canceled([in] VARIANT_BOOL bIsCanceled);
323 [id(301), propget, helpstring(
"property Value. Gets the current value for the prompt entry.")]
324 HRESULT Value([out, retval] BSTR* pstrValue);
326 [id(301), propput, helpstring(
"property Value. Sets a value explicitly for a prompt entry.")]
327 HRESULT Value([in] BSTR strValue);
329 [id(302), propget, helpstring(
"property PromptName. This is the non-translated prompt.")]
330 HRESULT PromptName([out, retval] BSTR* pstrPromptName);
332 [id(303), propget, helpstring(
"property PromptLabel. This is the translated prompt.")]
333 HRESULT PromptLabel([out, retval] BSTR* pstrPromptLabel);
335 [id(304), propget, helpstring(
"property PromptType. Obtains the type of prompt (for example, password), etc.")]
336 HRESULT PromptType([out, retval]
enum PromptType* pPromptType);
338 [id(305), propget, helpstring(
"property IsEnabled. Indicates whether this should be user editable.")]
339 HRESULT IsEnabled([out, retval] VARIANT_BOOL* pbIsEnabled);
341 [id(306), propget, helpstring(
"property IsVisible. Indicates whether this should be displayed to the user.")]
342 HRESULT IsVisible([out, retval] VARIANT_BOOL* pbIsVisible);
344 [id(307), propget, helpstring(
"property ValueOptions. Obtains a collection of value option strings.")]
345 HRESULT ValueOptions([out, retval]
IStringCollection** ppValueOptionsCollection);
347 [id(308), propget, helpstring(
"property IsEntryGroup")]
348 HRESULT IsEntryGroup([out, retval] VARIANT_BOOL* pbIsEntryGroup);
388 [id(501), propget, helpstring(
"property ProtocolLabel. Obtain a protocol label string from the enumerated type.")]
389 HRESULT ProtocolLabel([in]
enum ProtocolInfoTag eProtocolInfoTag,
390 [out, retval] BSTR* pstrProtocolLabel);
392 [id(DISPID_VALUE), propget, helpstring(
"property ProtocolValue. Obtain a protocol value string from the enumerated type.")]
393 HRESULT ProtocolValue([in]
enum ProtocolInfoTag eProtocolInfoTag,
394 [out, retval] BSTR* pstrProtocolValue);
396 [id(503), propget, helpstring(
"property IsActive. Indicates if the protocol is active.")]
397 HRESULT IsActive([out, retval] VARIANT_BOOL * pbIsActive);
415 [id(541), propget, helpstring(
"property Permission of a firewall rule")]
416 HRESULT Permission([out, retval] BSTR* pstrPermission);
418 [id(542), propget, helpstring(
"property Protocol for a firewall rule.")]
419 HRESULT Protocol([out, retval] BSTR* pstrProtocol);
421 [id(543), propget, helpstring(
"property Interface for a firewall rule.")]
422 HRESULT Interface([out, retval] BSTR* pstrInterface);
424 [id(544), propget, helpstring(
"property Source Port Range for a firewall rule.")]
425 HRESULT SrcPortRange([out, retval] BSTR* pstrSrcPortRange);
427 [id(545), propget, helpstring(
"property Destination Port Range for a firewall rule.")]
428 HRESULT DstPortRange([out, retval] BSTR* pstrDstPortRange);
430 [id(546), propget, helpstring(
"property Destination Address for a firewall rule.")]
431 HRESULT DstAddr([out, retval] BSTR* pstrDstAddr);
450 [id(601), propget, helpstring(
"property CountPreferences. The number of preferences available.")]
451 HRESULT CountPreferences([out, retval]
unsigned long * pulCountPreferences);
453 [id(DISPID_VALUE), propget, helpstring(
"property Preference. Gets the instance of an IPreference interface associated with the preference tag.")]
454 HRESULT Preference([in]
enum PreferenceId ePreferenceId, [out, retval]
IPreference** ppPreference);
456 [id(603), propget, helpstring(
"property Preferences. Obtains a collection of IPreference interface instances.")]
459 [id(604), propget, helpstring(
"property PreferenceHeading. The heading string for preferences.")]
460 HRESULT PreferenceHeading([out, retval] BSTR * pstrPreferenceHeading);
478 [id(701), propget, helpstring(
"property PreferenceValue. Gets the current value for the preference entry.")]
479 HRESULT PreferenceValue([out, retval] BSTR* pstrPreferenceValue);
481 [id(701), propput, helpstring(
"property PreferenceValue. Sets the value explicitly for a preference entry.")]
482 HRESULT PreferenceValue([in] BSTR strPreferenceValue);
484 [id(703), propget, helpstring(
"property PreferenceId. Gets the preference identifier enumeration value for the preference entry.")]
485 HRESULT PreferenceId([out, retval]
enum PreferenceId * pPreferenceId);
487 [id(704), propget, helpstring(
"property Children. Obtains a collection of IPreference interface instances that are sub-entries of this preference.")]
490 [id(705), propget, helpstring(
"property PromptEntry. Obtains a prompt entry instance associated with this preference.")]
491 HRESULT PromptEntry([out, retval]
IPromptEntry ** ppPromptEntry);
Definition VpnApi.idl:322