03-13-2009 05:05 PM
I am trying to build a simple dll of the attached code but am not having any luck with the header file syntax.
I am using ActiveX property nodes and automation refnums.
Appreciate any advice. Thanks!
03-14-2009 07:19 AM
Well I don't think LabVIEW likes the fact that your FP terminals share the same name.
Ton
03-14-2009 02:06 PM
03-15-2009 04:08 AM - edited 03-15-2009 04:10 AM
madison7 wrote:I am trying to build a simple dll of the attached code but am not having any luck with the header file syntax.
I am using ActiveX property nodes and automation refnums.
Appreciate any advice. Thanks!
My guess is that LabVIEW has trouble to decide what data type to use for the ActiveX refnum. This is not a standard C type. In fact any refnums in LabVIEW are private and only meaningful in the process that created them. The only way you could make that work at all is by convertin/typecasting those refnums into an uInt32 and treat it as such. But that will require you to provide a complete DLL API to any method and property of your ActiveX object hierarchy your user might ever want to use, including the CreateObject method. A non LabVIEW process could never do anything meaningful with those refnums other than passing them back to the same DLL. And even when you would use this DLL in a LabVIEW application, would it only work when the LabVIEW version used to create the DLL is the same as the one calling into that DLL. Otherwise the DLL will run in its own LabVIEW runtime engine process and the refnums from the LabVIEW host process would be meaningless for the DLL and vice versa.
For what is this?? If it is for use in any Visual (Basic, C, etc) language it would be much easier for your users to simply use the ActiveX object directly.
If it is for LabVIEW just let the user use your VIs instead.
Rolf Kalbermatter
03-15-2009 07:09 AM