01-03-2006 12:08 PM
01-04-2006 01:16 AM
01-04-2006 07:39 AM
01-04-2006 08:59 AM
01-04-2006 02:59 PM
viFindRsrc(resManHndle, instrDescriptor, &lst, &retCnt, jnk);
if (retCnt <= 0)
{
ViUInt16 jnk1, jnk2;
ViChar jnk3[80], unAliasedName[80], jnk4[80];
ViStatus ret;
ret = viParseRsrcEx(resManHndle,
instrDescriptor,
&jnk1,
&jnk2,
jnk3,
unAliasedName,
jnk4);
if (ret == VI_SUCCESS)
{
viFindRsrc(resManHndle, unAliasedName, &lst, &retCnt, jnk);
}
}
The above code tries to do a viFindRsrc and when it fails it checks to see if the device name is an alias name and gets the real connection string for that. After getting an alias string it does another viFindRsrc to determine if the device is there or not.
THE ABOVE CODE HAS TO WORK RIGHT!?!?!? NOPE!!!!!
Strangely enough the MAX string for the device is:USB0::0x16AA::0x3004::141050-0002::RAW, but the return string from viParseRsrcEx returns USB0::0x16AA::0x3004::141050-0002::0::RAW.
Notice the extra ::0 in the result of viParseRsrcEx.
You pass this string back to viFindRsrc and it promptly indicates the device isn't there - even though it is.
Edit the string in the debugger to remove the ::0 and voilet it works.
Any ideas would be appreciated.
01-05-2006 11:55 AM