Freigeben über


IVsAppContainerDeveloperLicensing.AcquireDeveloperLicense Method

Acquires the developer license on the specified machine.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop.11.0 (in Microsoft.VisualStudio.Shell.Interop.11.0.dll)

Syntax

'Declaration
Function AcquireDeveloperLicense ( _
    ByRef pbstrMachine As String _
) As DateTime
DateTime AcquireDeveloperLicense(
    ref string pbstrMachine
)
DateTime AcquireDeveloperLicense(
    [InAttribute] String^% pbstrMachine
)
abstract AcquireDeveloperLicense : 
        pbstrMachine:string byref -> DateTime
function AcquireDeveloperLicense(
    pbstrMachine : String
) : DateTime

Parameters

  • pbstrMachine
    Type: String%

    [in] The machine for which the license is acquired. If this parameter is null or empty, this method is applied to the local machine.

Return Value

Type: DateTime
The expiration date of the developer license.

Remarks

The following results can be returned from this method:

S_OK

The function succeeded.

E_FAIL

Unspecified error (this is not expected).

E_INVALIDARG

One or more arguments are invalid.

E_OUTOFMEMORY

Insufficient memory.

HRESULT_FROM_WIN32(ERROR_NOT_FOUND)

The license was not found.

HRESULT_FROM_WIN32(ERROR_NOT_AUTHENTICATED)

The call requires authentication.

HRESULT_FROM_WIN32(ERROR_NETWORK_UNREACHABLE)

The network cannot be reached.

HRESULT_FROM_WIN32(ERROR_ACCESS_DENIED)

The caller does not have access to the resource (license).

HRESULT_FROM_WIN32(ERROR_BAD_NET_NAME)

The specified machine does not exist.

HRESULT_FROM_WIN32(ERROR_CANCELLED)

The licensing sequence was cancelled.

E_WS_LICENSE_EXPIRED

The developer license is expired.

E_WS_USER_NOT_AUTHORIZED

The user or machine requesting the license is not authorized to get any license. You should map this result to a “contact support” message.

.NET Framework Security

See Also

Reference

IVsAppContainerDeveloperLicensing Interface

Microsoft.VisualStudio.Shell.Interop Namespace