11-29-2010 12:36 PM
Hello,
The reason you are not getting anything returned is because the string is not initialized to a certain length before it is returned. Basically, the function that you are calling returns a pointer to a string but doesn't return the length of the string. If you use the following code it should work correctly:
Dim sDevices As String *50
Dim IReturn As Long
IReturn = DAQmx(GetSysDevNames(sDevices, 256)
MsgBox(sDevices)
This should now show you the devices you have on your system and should have a return code of 0. Have a great day!
Best Regards,
Adam G
11-30-2010 10:43 PM
Adam,
That worked.Thanks. Been awhile since I did any VB6... I'm looking for one other function from .Net NiDAQmx... Can you tell me what the equivalent of:
DaqSystem.Local.LoadDevice(sDAQDevice).DeviceID
Thanks!
12-01-2010 01:33 PM
Hello,
I don't know if there is an exact function that will do what the .NET one does, but I believe this one is pretty close: DAQmxGetDevProductType.
Best Regards,
Adam G