LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

how to use ActiveX Server

I have built a ActiveX Server(.exe),now I'm building a client.There are some prombles.Firstly,I found all examples provided by CVI have a .fp file,they make us every easy to use the server.So I wonder how to built a .fp for my own server.I know we can build it for dll by using "Tool->Create activex controller",but it isn't available for servers which were in exe form.
The other one is that: I use
const GUID SERVER={0x510F1E46,0xE3CB,0x4A61,0x8D,0x41,0x1A,0x99,0xF3,0x01,0x95,0xF3};
const IID DATAACESS={0x073C63BB,0xF40E,0x4517,0xAD,0xE9,0x33,0x63,0xC9,0x30,0xD3,0xD3};

......
CA_CreateObjectByClassId (&SERVER, NULL, &objhandle);

......
void *Interface_Ptr=NULL;
CA_ServerGetIaceFromObjHandle (objhandle, &DATAACESS, Interface_Ptr);
In
this way,I have got the pointer to the Interface,then how can I use methods within the interface?
I found using "Interface_Ptr->Setrad(objhandle,rad); " is wrong. the error is
" client.c - 3 errors

43, 27 Left operand of -> has incompatible type 'pointer to void'.
43, 33 Found 'pointer to void' expected a function."
please help me. Thanks in advanced.
0 Kudos
Message 1 of 2
(2,736 Views)
Hello,

You can use Tools->Create ActiveX Controller for ActiveX EXEs. Your problem is probably that you need to register your EXE before running the controller wizard. You can register any ActiveX exe by running /RegServer from a command prompt (where is the name of the executable of course. This should solve your second problem as well since the ActiveX controller wizard will handle all of the low level ActiveX stuff which you are tying to do and will give you some fairly simple functions to create an object and call methods or properties from it.

Regards,
Ryan K.
0 Kudos
Message 2 of 2
(2,736 Views)