07-29-2007 05:31 AM
07-29-2007 06:27 AM
07-29-2007 08:02 AM
07-29-2007 08:53 AM
If this is a .NET DLL, then you can use the .NET primitives.
If not, I really don't know. You can call exported functions from DLLs using the Call Library Function node, but I don't think it will give you what you want, because the only interfaces LV has for working with external classes are ActiveX and .NET. Since I don't know VB, I don't think I can help you any more.
07-29-2007 09:08 AM
07-29-2007 11:11 PM
07-29-2007 11:14 PM
07-30-2007 02:55 PM
Hi HaD,
So the first thing to remember is that all Visual Basic DLLs are ActiveX DLLs and not Win32 DLLs. The Call Library Function node is only used for standard Windows DLLs (flat-based API) and not ActiveX DLLs (object-based API).
Before I begin, there is an entire LabVIEW help topic entitled "Using ActiveX with LabVIEW" that is devoted to discussing how to use ActiveX objects, properties, methods and events with LabVIEW. It’s a great page.
To achieve what you want, you need to simply follow the steps in the "Calling an ActiveX Object from LabVIEW" help topic. Basically, you will drop down an automation refnum on your front panel and then right-click the refnum and select Select ActiveX Class. Then browse to your VB DLL and then make sure to select the "Show Creatable Objects Only" option. Now, based upon what classes you said your VB DLL has, you should see the yyyClass. Then in the dialog box, choose that yyyClass class. Switch to the block diagram and drop down an Automation Open function (from the ActiveX palette). Wire your reference into this Automation Open function which is needed to instantiate the yyyClass into an object. Then you can use Invoke Nodes and Property Nodes on this reference and access methods and properties. You essentially now have the yy object.
Hope this helps!
Best Regards,
07-31-2007 03:32 AM
Thank you Jonathan N
It works!