07-12-2010 06:34 AM
I'm happy to hear that it works.
Nevertheless, I try to answer at least your first remaining question:
First, I was wrong about the struct being passed. What's actually being passed is a pointer to a struct. Is there a way I can handle this in LV (dereference the pointer and get the data).
When using COM or .NET from LV you don't have to touch pointers directly. LV knows how to handle data (pointer and non-pointer) types by reading the type library (COM) resp. assembly information (.NET). As mentioned above, problems arise with COM structs and other types that aren't automation compatible: LV can't handle them. In .NET these types can be used, there are wrappers and constructors for them as well: They're exposed as refnum types.
11-12-2010 04:23 AM
I am in the similar boat (labwindows CVI)
I have some C++ sample client code for using COM objects
Below is the code flow in C++.
1)Creates an instance of base INIT class(INIT is a class/interface)
2)passes the IUnknown to QueryInterface function and gets the interface pointer of the specific event
(the returned interface pointer will be inherited of the required event type)
3) registers the events.....
I got a requirement to implement the same in C , used the activex Controller template and generated the .c file , .h file and fp file
for the registered active X server
Step 1) NewIINIT class function and will get the CAObjHandle for the INIT interface(class)
after this step i am befuddled about how to go !
Please help me out if you can
Can the above process be implemented in CVI ..is it feasible
Thanks in advance
Satish
11-15-2010 11:02 AM
Hi Satish,
We noticed your post is a duplicate from the following thread:
http://forums.ni.com/t5/LabWindows-CVI/COM-Client-in-C/td-p/1309170
Your question will be better answered in that thread since it is under the correct product forum.
Thank you!