Category Windchill servers, Object ProServer

Function ProServerRegister


Description
Registers a server in the session given its root location and an alias. NOTE: To automate registration of servers in interactive mode, use the standard config.fld setup to preregister the servers. To ensure that the servers are not preregistered when running Creo Parametric in batch non-graphics mode, set the environment variable PTC_WF_ROOT to an empty directory before starting Creo Parametric.
Replacement in Object TOOLKIT: pfcBaseSession::RegisterServer
Synopsis
#include <ProWTUtils.h>
ProErrorProServerRegister(
wchar_t* alias
/* (In)
The name used by Creo Parametric to refer to this server.
*/
wchar_t* location
/* (In)
The root location for the server.
*/
wchar_t* workspace
/* (In)
The name of the workspace to use.
*/
wchar_t** aliased_url
/* (Out)
Aliased url for the registered workspace. Free this string using ProWstringFree()
*/
)
Returns
PRO_TK_NO_ERRORThe function succeeded.
PRO_TK_BAD_INPUTSOne or more inputs was invalid.
PRO_TK_E_FOUNDA server with this alias or location/workspace is already registered.
PRO_TK_E_NOT_FOUNDThe server couldn't be found at the given location.
PRO_TK_INVALID_NAMEAuthentication failed.
PRO_TK_INVALID_DIRThe workspace couldn't be found or created.
PRO_TK_NO_LICENSEThere is no license to work with the server.
PRO_TK_INVALID_TYPEThe server version is not supported.
PRO_TK_GENERAL_ERRORIf any other error occures.

Manual References:

  1. Technical Summary of Changes for Creo 4.0 F000: Support for Pro/INTRALINK 3.4 Functions
  2. Data Management: Windchill Operations: Registering and Activating a Server
  3. Data Management: Windchill Operations: Registering and Activating a Server
  4. Data Management: Windchill Operations: To Register a Server with an Existing Workspace
  5. Data Management: Windchill Operations: Sample Batch Workflow

Sample Code References:

  1. pt_wc_server ( PTWCServerPopulate.c )