C_DetachFromThread

Call C_DetachFromThread to detach a model from the calling thread, as a precursor to calling C_AttachToThread. C_DetachFromThread must be called from the thread which has affinity to the model.

void C_DetachFromThread(

TOrcFxAPIHandle ModelHandle,

int *lpStatus

);

Parameters

ModelHandle (IN)

The handle of the model.

lpStatus (OUT)

Points to a variable in which the status result for the function call will be returned.

Remarks

A model can be assigned affinity to a different thread by taking the following steps:

  1. Call C_DetachFromThread from the thread to which the model currently has affinity.
  2. Call C_AttachToThread from a different thread, after which the model will have affinity to this thread.

See also

C_AttachToThread.