Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
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.
Thankes
Hi,
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,
Eike
Hi,
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,
Eike