Category Creo Parametric fundamentals, Object ProFile

Function ProFileOpenRegister


Description
Register a file type with the 'File -> Open' dialog interface of Creo Parametric.

NOTE: The ProFileMdlnameOpen OR ProFileMdlfiletypeOpen API opens a standard file dialog. ProFileOpenRegister does not work with this API.

Replacement in Object TOOLKIT: pfcBaseSession::UIRegisterFileOpen
Synopsis
#include <ProUtil.h>
ProErrorProFileOpenRegister(
wchar_t* file_type
/* (In)
File type
*/
wchar_t* file_description
/* (In)
Short description of the file.
*/
ProFileOpenAccessFunction access_function
/* (In)
File Access function; NULL is always available
*/
ProFileOpenOperationAction oper_action
/* (In)
Action on selection of the file type
*/
ProAppData app_data
/* (In)
The application data, may be NULL
*/
)
Returns
PRO_TK_NO_ERRORFile type is registered in the dialog.
PRO_TK_BAD_INPUTSOne or more input arguments was invalid.
PRO_TK_OUT_OF_MEMORYCouldn't allocate memory for new type.
PRO_TK_E_IN_USEAlready registered by this app.
PRO_TK_GENERAL_ERRORFailed to register type.

Manual References:

  1. Core: Utilities: File Handling
  2. Core: Utilities: File Handling

Sample Code References:

  1. pt_examples ( TestMisc.c )