DicomObjects.NET.8.48 Documentation
DicomObjects Namespace / DicomLicense Class / ActivateOnLine Method
The string provided by Medical Connections, allowing you to activate DicomObjects
A string identifying the PC and or institution at which this copy is being activated
A second string with the same function
An "out" parameter, into which an explantion of the result is placed.
Example

In This Topic
    ActivateOnLine Method
    In This Topic
    Attempt to obtain a DicomObjects license on-line
    Syntax
    'Declaration
     
    
    Public Shared Function ActivateOnLine( _
       ByVal AuthorisationString As System.String, _
       ByVal CustomerInfo1 As System.String, _
       ByVal CustomerInfo2 As System.String, _
       ByRef Result As System.String _
    ) As DicomLicense
    public static DicomLicense ActivateOnLine( 
       System.string AuthorisationString,
       System.string CustomerInfo1,
       System.string CustomerInfo2,
       out System.string Result
    )

    Parameters

    AuthorisationString
    The string provided by Medical Connections, allowing you to activate DicomObjects
    CustomerInfo1
    A string identifying the PC and or institution at which this copy is being activated
    CustomerInfo2
    A second string with the same function
    Result
    An "out" parameter, into which an explantion of the result is placed.

    Return Value

    A valid DicomLicense object if the activation succeeded or if already activated using this Authorisation string.

    null if the activation failed.

    Remarks

    This is the main method used to activate a DicomObjects license, and is used both explicitly by developers and internally by the LicenseDialog when so requested.

    The result indicates whether the method succeeded, and further information (whether successful or not) is available in the Result paramaeter

    If a license has previously been activated on the same machine, using the same authorisation string, then the method returns true, but the fact is noted in the Result

    The license server to be contacted is specified by LicenseServer, but this should not normally be changed.

    Example
    string key = "YOUR_ACTIVATION_KEY";
    string info_1 = "YOUR_NAME"; // can be anything
    string info_2 = "YOUR_COMPANY"; // can be anything
                        
    // result will show the status of the operation i.e. "License Obtained and Stored OK"
    DicomLicense lic = DicomLicense.ActivateOnLine(key, info_1, info_2, out string result);
    Requirements

    Target Platforms: .NET CLR 4.8 or higher

    See Also