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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

ProOutputFileWrite

ktoooly
1-Newbie

ProOutputFileWrite

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


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.
3 REPLIES 3

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

Top Tags