02-02-2006 11:48 AM
02-02-2006
02:41 PM
- last edited on
06-24-2024
11:07 AM
by
Content Cleaner
Hello TestStandUser,
Based on your explanation, I can't tel what you're describing. Are you attempting to add a reference to the driver's dll in your project? If so, you will likely not get the results you are looking for. Adding an unmanaged dll to a managed code project (which, by definition, all vb.net projects are) will cause the environment to try and generate a COM interop assembly for the component. I'm guessing that what you're seeing is the constant identifiers for the properties, which would be available from the driver's type library. the C API itself is not visible because there is no automated interop support for C API's in the .NET framework. If you want to use unmanaged C or C++ code in a .NET project, you must use a part of the .NET Framework called Platform Invoke, also referred to as P/Invoke. There are numerous resources related to P/Invoke on MSDN - here's a link to start with.
We also have some online resources available to describe how to use IVI-C instrument drivers in .NET languages, available here:
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000x2jLCAQ&l=en-US
As noted in the above NI Developer Zone article, Measurement Studio includes the Measurement Studio Instrument Driver .NET Wizard, which creates a .NET class around an existing IVI-C driver. If you are a Measurement Studio customer, I believe this tool will provide exactly the kind of class-based driver API you are looking for.
Please let me know if there are other resources that would help you with your problem.
Glenn Burnside