My last post was not clear, so I hope I could make my question clearer this time and provide as many as information as possible.
I am trying to write a visual basic program to talk with an electric load (6060B) through GBIP. I am using visual studio 2013, the target frame that I am using is .NET FRAMEWORK 4.5. After searching the internet, I decided to use VISA library from National Instrument.
So the problem is how to reference VISA library to my project so I can use the provided functions. I did the research, I understand that I have to link the visa32.dll to my project, but it failed.
I tried to use regsrv32 command to register the visa.dll but it also failed. Then I tried something new that I put the visa32.bas in the project folder so I could use all the function in the visa library; however, it generated a error that complaining about the keyword of "Global".
E.g. Global Const VI_SPEC_VERSION = &H00300000&..
the compiler complains about the "Global". How could I solve this?
I think I just run out of idea now. Any hit or suggestion will be appreciated.
Thank you in advance.
After a lot of researching, I finally figured it out.
VISA has API in COM, C, .Net. Since I am using .NET Framework 4.5, I have to use VISA.NET API. Now I know the reason why when I wrote ViSession, the compiler complained because ViSession is covered in VISA C rather than VISA.NET. Then the problem left is to add the reference to the project. Follow the link below, and you will successfully do so.
http://www.ni.com/tutorial/2739/en/
Here I thank everyone who post comments to guide me to the right track..I hope my answer could help others as well.