Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

ProToolkitTaskExecute

kashish

New member
< http-equiv="Content-" content="text/; charset=utf-8">< name="ProgId" content="Word.">< name="Generator" content="Microsoft Word 11">< name="Originator" content="Microsoft Word 11">



I am trying to call a function
 
Kashish,


The function you are trying to call in the external dll is prototyped incorrectly. Read the API Wizard under User's Guide->Task Based Application Libraries->Creating Pro/TOOLKIT DLL Task Libraries. That section says the following:


Use the preprocessor macro PRO_TK_DLL_EXPORT on any function that must be accessible to external applications.


The prototype for your exported function must look like this.


Code:
extern "C" PRO_TK_DLL_EXPORT ProError AutoSetPods(ProArgument* inputs, ProArgument** outputs)
 
Hi Williaps,





Thanks for the prompt response. I tried to use the suggested prototype but it's not working for me...








I am copying the relevant code I am
using to make this call here -<br style="">
<br style="">




------------------------------------------------------------ ----

ProArgument*
input_arguments = NULL;

ProArgument*
output_arguments = NULL;



status =
ProArrayAlloc( 1, sizeof(ProArgument), 1,
(ProArray*)&input_arguments);



ProStringToWstring(input_arguments[0].label,"I");

input_arguments[0].value.type=PRO_VALUE_TYPE_INT;

input_arguments[0].value.v.i=10;





ProError
function_return = PRO_TK_NO_ERROR;







status = ProToolkitTaskExecute( handle, "User_Test_Task", input_arguments,
&output_arguments, &function_return );



------------------------------------------------------------ ----







After execution of <b style=""><i style="">ProToolkitTaskExecute
[/i][/b]call, value of status is set to <b style=""><i style="">PRO_TK_E_NOT_FOUND[/i][/b].







Before making the above call the
corresponding dll is successfully loaded into the memory using following API call
 
I checked with DLL Export View Freeware and found that "User_Test_Task" is not listed as exported function.

I have used PRO_TK_DLL_EXPORT to export the function.



Am I missing
something here?





Thanks,

Kashish
 

Sponsor

Articles From 3DCAD World

Back
Top