Category Manufacturing, Object ProMfgdb

Callback ProMfgdbLoginAction


Description
Type for callback used by Creo Parametric to initiate an access to the database. To register this user-specified function for use by Creo Parametric, specify the function as an input argument to ProMfgdbRegister().
Synopsis
#include <ProMfgdb.h>
ProError(*ProMfgdbLoginAction)(
ProName dbname
/* (In)
A name used to identify the database.
*/
ProName user_name
/* (In)
A user name for database access.
*/
ProName password
/* (In)
A password for database access.
*/
int timeout
/* (In)
The timeout period in seconds. If the database does not respond during this period, the function returns with status PRO_TK_TIMED_OUT. The value -1 means no timeout.
*/
ProAppData appdata
/* (In)
Pointer to data specific to the Creo Parametric TOOLKIT application which was passed in the call to ProMfgdbRegister(). Database program can cache connection information into the appdata for subsequent connection requests.
*/
ProLine error
/* (Out)
Text of an error message that Creo Parametric displays to the user if the function returns an error status. To support more than one language, provide a message file containing the translations and use ProMessageToBuffer() to translate the string.
*/
)
Returns
PRO_TK_NO_ERRORDatabase access available.
PRO_TK_BAD_INPUTSDatabase not found.
PRO_TK_TIMED_OUTThe database could not be accessed within the timeout period.

Manual References:

  1. Production Applications: Customized Tool Database: Registering the External Database