Click or drag to resize

RuntimeManagerLoad Method (String, String)

Loads a protected PTX file.

Namespace:  OpenTestSystem.Otx.Runtime.Api
Assembly:  OpenTestSystem.Otx.Runtime.Api (in OpenTestSystem.Otx.Runtime.Api.dll) Version: 5.5.0.0 (6.1.0.31040)
Syntax
public void Load(
	string fileName,
	string password
)

Parameters

fileName
Type: SystemString
The path of ptx file to load.
password
Type: SystemString
The password to decrypt the ptx file.

Implements

IRuntimeManagerLoad(String, String)
Exceptions
ExceptionCondition
ArgumentExceptionFilename is an empty string ("").
ArgumentNullExceptionFilename is null.
FileNotFoundExceptionThe file cannot be found.
Examples
Simple sample which loads a protected PTX file.
C#
static class Program
{
    static void Main()
    { 
        RuntimeManager rt = new RuntimeManager();
        if (rt.IsProtected("C:\\Sample.ptx"))
        {
            rt.Load("C:\\Sample.ptx", "MyPassword");
        }
        else
        {
            rt.Load("C:\\Sample.ptx");
        }
    } 
}
See Also