04-27-2009 02:52 AM
Hello, Rolf,
I agree with you to 100% again.
We work in LabVIEW 8.5.
I already did a protection of the LabVIEW product using CINs. It's very easy and not takes long time, but there were no ActiveXs there.
However, it is a pity, that it is impossible to pass a pointer to ActiveX to CIN.
Great thank you,
Evgan
05-12-2009 04:36 AM
It is very easy to pass a pointer to ActiveX to CIN.
Register the pointer in the GIT (Global Interface Table) and pass its cookie to CIN.
Inside CIN it is possible to pull out the pointer using the cookie from GIT.
For explanation look "IGlobalInterfaceTable' interface in Help.
Evgan
04-21-2010 08:14 AM - edited 04-21-2010 08:18 AM
Another method is to abandon the CIN idea and use a DLL instead. In the parameter configuration for Call Library Node in at least LabVIEW 7.1 and later you can configure a parameter to be an ActivX Refnum and define if LabVIEW should pass the IDispatch or IUnknown interface pointer to the DLL.
Using the GIT is certainly another idea, but for the purpose of passing parameters inside the same application a somewhat heavyweight aproach. Also I believe that using the GIT has some implications in terms of lifetime control of an object and a possible performance penalty since the objects are actually marshalled in order to be able to get passed between processes.
04-21-2010 08:36 AM
My ActiveX works in the other process.
Evgan
04-21-2010 08:38 AM - edited 04-21-2010 08:39 AM
evgan wrote:My ActiveX works in the other process.
Evgan
Then GIT might be a solution, as well as using an IDL generated ActiveX interface library that takes care about marshalling data through RPC. For the purpose of the original post this would be however not important.