Showing results for 
Search instead for 
Did you mean: 
Showing results for 
Search instead for 
Did you mean: 




Hi threre,

I am trying to use ProOutputFileWrite() function and I have a little problem.

I don't really know where the problem is because all the functions return PRO_TK_NO_ERROR except from ProOutputFileWrite() that flew.

So the inputarguments that i pass must to be wrong.

I'd like to get some help.


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.


I use it like this:

ProPath wfilename;
ProError ret = PRO_TK_NO_ERROR;

ProStringToWstring(wfilename, getTemppath());
wcscat_s(wfilename, PRO_PATH_SIZE,L"proProgram.txt");
ret = ProOutputFileWrite(mdl, wfilename, PRO_PROGRAM_FILE, NULL, NULL, NULL, NULL );
if (ret == PRO_TK_NO_ERROR) {

Best regards,



After i try your code I found out that my problem is with this two arguments arg1 and arg2 and I don't know how to fix it.

for the PRO_CONNECTOR_PARAMS_FILE the function ask for arg1 = int* pointing to a ProIdTableand arg2 = int* pointing to the number,component identifier.

somthing in the way i pass thearguments wrong.

You declare the c_id_table to an int*here :

arg1 = (int*)c_id_table; and

arg2 = (int*)comp_num;

Std. C declaration of getting a pointer from an Integer is this.

I think arg 1 would be declared as something like this:

int * arg1;

arg1 = &c_id_table;

arg2 = &comp_num;

If the function need the argument as void pointers you need to redeclare them on some compiler options with a cast like:

(void *) &c_id_table;

Best regards,


Attention: Creo 7.0 Customers
Please consider upgrading
End of Life announcement here.

NEW Creo+ Topics:
PTC Control Center
Creo+ Portal
Real-time Collaboration