| Description |
| Causes the Creo Parametric TOOLKIT program to connect to an existing Creo Parametric process using a specified display. It is intended for use in simple and full asynchronous modes. |
| Synopsis |
| #include <ProCore.h> |
| ProError | ProEngineerConnect | ( |
| char* proe_session_id | |
| /*
(In) |
| This argument can be either empty string or identification string returned by ProEngineerConnectIdExtract. If it is ID string, the Creo Parametric TOOLKIT application will try to connect to the specified Creo Parametric session; if this attempt fails, the application will try to connect to any Creo Parametric session. |
| */ |
| char* display | |
| /*
(In) |
| The name of the display Creo Parametric is using. If this is NULL, match any display. If this is an empty string, assume the local host. |
| */ |
| char* user | |
| /*
(In) |
| The name of the user running the Creo Parametric to connect to. If this is NULL, match any user. If this is an empty string, assume the current user. |
| */ |
| char* textpath | |
| /*
(In) |
| The path under which the Creo Parametric TOOLKIT message and menu files are held. This is used in full asynchronous mode, or in simple asynchronous mode if text files are read (e.g., ProMessageToBuffer() is called). Otherwise, pass a null string. |
| */ |
| ProBoolean allow_random | |
| /*
(In) |
| If there is more than one Creo Parametric matching the constraints specified in arguments "display" and "user", choose one at random if this argument is PRO_B_TRUE; if it is PRO_B_FALSE, return an error. |
| */ |
| unsigned int timeout_sec | |
| /*
(In) |
| The time, in seconds, to wait for Creo Parametric to respond to the connection request. |
| */ |
| ProBoolean* random_choice | |
| /*
(Out) |
| If this is PRO_B_TRUE, more than one Creo Parametric met the specified criteria (allow_random was TRUE) and the function arbitrarily chose one Creo Parametric session. |
| */ |
| ProProcessHandle* p_handle | |
| /*
(Out) |
| A pointer to a process handle to be used in subsequent calls to Creo Parametric. |
| */ |
| ) |
| Returns |
|
| PRO_TK_NO_ERROR | | The connection succeeded. |
| PRO_TK_CANT_ACCESS | | No network access. |
| PRO_TK_NOT_EXIST | | No Creo Parametric session exists. |
| PRO_TK_E_IN_USE | | Creo Parametric session did not respond to request for connection. |
| PRO_TK_ABORT | | Call to Creo Parametric interrupted. |
| PRO_TK_CANT_MODIFY | | Cannot register connection with name server. If the environment variable PRO_COMM_MSG_EXE is not set, this value is returned. |
| PRO_TK_CANT_OPEN | | Cannot process request for connection to Creo Parametric session. |
| PRO_TK_E_DEADLOCK | | The application and Creo Parametric deadlocked while trying to make a connection. |
| PRO_TK_E_NOT_FOUND | | No Creo Parametric session with the specified characteristics could be found, or information on the session could not be read from the name server. |
| PRO_TK_E_BUSY | | Creo Parametric session did not respond to request for initialization within timeout_sec seconds. |
| PRO_TK_E_AMBIGUOUS | | More than one Creo Parametric session with the specified characteristics was found and random_choice was PRO_B_FALSE, preventing a session from being chosen. |
| PRO_TK_OUT_OF_MEMORY | | There was insufficient memory to build a query to the name server. |
| PRO_TK_COMM_ERROR | | Creo Parametric session refused connection. (This can happen if application initialization fails.) |
| PRO_TK_INVALID_DIR | | textpath is not a valid directory. |
| other | | Error status returned by the application's user_initialize(). Special cases: - if the application is running in native mode instead of Unicode, PRO_TK_BAD_INPUTS may indicate that prodev_text_path could not be converted to or from Unicode.
- PRO_TK_APP_CREO_BARRED indicates an attempt to connect to a Creo application that does not support Creo Parametric TOOLKIT.
|
|