03-10-2015 07:56 AM
Hi, I am having some issues using the nisysconfig API to programaticaly retrieve the DAQ's device name. What I mean is this:
When you open MAX and get the list of devices, they will have names such as "Dev1", "Dev2", etc. I am trying to retrieve this same information in C++. I am using NISysCfgGetResourceProperty but I can't seem to get this property to come back. I've been able to retrieve the serial #, product name, etc, but not this device name. Any ideas?
Here is a snippet of my code:
NISysCfgSessionHandle sessionHandle; NISysCfgInitializeSession("localhost", NULL, NULL, (NISysCfgLocale)0, (NISysCfgBool)false, 100000, NULL, &sessionHandle); std::cout << "Initialized session" << std::endl; NISysCfgEnumResourceHandle resourceEnumHandle; NISysCfgFindHardware(sessionHandle, NISysCfgFilterModeMatchValuesAny, NULL, NULL, &resourceEnumHandle); std::cout << "Find hardware" << std::endl; NISysCfgResourceHandle resourceHandle; char productName[NISYSCFG_SIMPLE_STRING_LENGTH]; NISysCfgGetResourceProperty(resourceHandle, NISysCfgResourcePropertyProductName, &productName);
Solved! Go to Solution.
03-10-2015 10:35 AM
You want the "Alias" not the product name