Skip to content

Init_Instance

Init_Instance initializes the Document Filters engine and authenticates the license. Init_Instance must always be the first call made by any application to the Document Filters library.

Prototype

void Init_Instance(
    IGR_LONG Reserved,
    const char* InstallPath,
    Instance_Status_Block* InstanceBlock,
    IGR_SHORT* InstanceHandle,
    Error_Control_Block* ISYSError);

Parameters

Reserved: IGR_LONG

Reserved. Must be 0.

InstallPath: ANSI string

Path to installed executables and data files.

InstanceBlock: Pointer to Instance_Status_Block

Prior to the call: Contains your application License Code.

After the call: Returns your licensee information.

InstanceHandle: Pointer to IGR_SHORT

Returns an instance handle.

ISYSError: Pointer to Error_Control_Block

Returns error details if the call fails.

Return value

None

Sample code

Error_Control_Block ISYSError;
IGR_SHORT DocumentFilters;
Instance_Status_Block ISB;

strncpy(ISB.Licensee_ID1, "Your License Key Here", 40);
Init_Instance(0, "Your Document Filters Executables Path Here", &ISB, 
              &DocumentFilters, &ISYSError);

// Process documents...

Close_Instance(&ISYSError);

Additional information

The application must call Close_Instance when finished.

See also