Share via


WHSInfoClass.IsRouterUPnPEnabled Method

Indicates whether the UPnP protocol is enabled on the router that is connected to the home server.

Namespace: Microsoft.HomeServer.SDK.Interop.v1
Assembly: Microsoft.HomeServer.SDK.Interop.v1 (in microsoft.homeserver.sdk.interop.v1.dll)

Usage

Syntax

'Declaration
Public Overridable Function IsRouterUPnPEnabled As Integer Implements IWHSInfo2.IsRouterUPnPEnabled
public virtual int IWHSInfo2.IsRouterUPnPEnabled ()
public:
virtual int IsRouterUPnPEnabled () = IWHSInfo2::IsRouterUPnPEnabled

Return Value

An instance of Int32 with a value of 0 or 1. If the UPnP protocol is enabled on the router, the value is 1; otherwise, the value is 0.

Remarks

Important

By default, port forwarding is not enabled. If you call this method while port forwarding is disabled, you receive the system error, ERROR_BAD_ENVIRONMENT.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows Server 2008, Windows Vista, Windows Server 2003, Windows XP

Target Platforms

Windows Home Server

See Also

Reference

WHSInfoClass Class
WHSInfoClass Members
Microsoft.HomeServer.SDK.Interop.v1 Namespace