VpeEnableMultiThreading

<< Click to Display Table of Contents >>

Navigation:  Management Functions >

VpeEnableMultiThreading

Previous pageReturn to chapter overviewNext page

[Professional Edition or higher]

By default, VPE is not thread-safe. If you are using VPE in a multi-threaded environment, set the property EnableMultiThreading = True, to activate the thread-safe code of VPE.

On some platforms it might be required to purchase and install a special server license (for each server), before this property can be used.

void VpeEnableMultiThreading(

VpeHandle hDoc,

int yes_no

)

VpeHandle hDoc

Document Handle

int yes_no

Value

Description

True

VPE's thread-safe code is activated

False

VPE's thread-safe code is not active

Default:

False

Remarks:

VPE documents must be created and used separately per thread, i.e. each thread must create a VPE document itself by calling OpenDoc(), and one thread must not use the document handle of another thread for calls to the VPE API.

 

VPE will operate slower, if the thread-safe code is activated, due to acquiring and releasing thread-locks.

 

Once the thread-safe code has been activated, it is activated for all VPE documents that are currently open - and that will be opened later - by the calling application instance. Furthermore the thread-safe code can not be deactivated by the application instance.

 

The trial versions of VPE as well allow to activate the thread-safe code for testing purposes.

 

However, if you activated mutli-threading and call later the VpeLicense() method, the licensing will fail. You must license VPE by calling VpeLicense() before you activate the thread-safe code.