10-24-2011 07:36 AM
I just want to use Labwindows to write a instrument control Dll for .Net program, it seems I should use Intptr to store the instrument handle in .Net, but ViSession in CVI seems not proper.
Could some gent can give an example? Thanks very much!
:manhappy:
10-25-2011 09:11 AM
ViSession is the correct type for this in C/CVI. ViSession is a UInt32, so you should use System.UInt32 for this in .NET. In .NET, System.IntPtr maps to any pointer type - void* in C. I am not sure why you want to use IntPtr in .NET for this - you should use the type from the native instrument driver, which is ViSession (UInt32) in this case.
10-26-2011 03:24 AM