Overview
This section explains using Creo TOOLKIT in Asynchronous Mode.
Asynchronous mode is a multiprocess mode in which the Creo TOOLKIT application and Creo Parametric can perform concurrent operations. Unlike synchronous mode, the asynchronous mode uses remote procedure calls (rpc) as the means of communication between the application and Creo Parametric.
Another important difference between synchronous and asynchronous modes is in the startup of the Creo TOOLKIT application. In synchronous mode, the application is started by Creo Parametric, based on information contained in the registry file. In asynchronous mode, the application is started independently of Creo Parametric and subsequently either starts or connects to a Creo Parametric process. The application can contain its own main() or wmain() function. Use wmain() if the application needs to receive command-line arguments as wchar_t, for example if the input contains non-usascii characters. Note that an asynchronous application will not appear in the Auxiliary Applications dialog box.
The section
How Creo Toolkit Works in
Fundamentals section describes two modes—DLL and multiprocess (or “spawned”). These modes are synchronous modes in the sense that the
Creo TOOLKIT application and
Creo Parametric do not perform operations concurrently. In spawn mode, each process can send a message to the other to ask for some operation, but each waits for a returning message that reports that the operation is complete. Control alternates between the two processes, one of which is always in a wait state.
Asynchronous mode applications operate with the same method of communication as spawn mode (multiprocess). The use of rpc in spawn mode causes this mode to perform significantly slower than DLL communications. For this reason, you should be careful not to apply asynchronous mode when it is not needed. Note that asynchronous mode is not the only mode in which your application can have explicit control over
Creo Parametric. You can also run
Creo Parametric in batch mode using
Creo TOOLKIT applications; for more information on batch mode operation, refer to the section
Using Creo Toolkit to Make a Batch Creo Parametric Session.