05-16-2017 05:53 AM
hi everybody,
i'm tryng to read the value of a particular regster named ParentIDPrefix. It is visible on picture
i'm using this funcion:
RegReadString( HKEY_LOCAL_MACHINE, "\\SYSTEM\\CurrentControlSet\\Enum\\USB\\6&85f603c&0&2", "ParentIdPrefix", NULL, 0, &size);
but it doesn't work and returns thi error:
"Could not open Registry Key"
Can you help me?
05-17-2017 07:04 AM
Hi DamBalzani,
it could be a permission error. Did you try star LabVIEW as an administrator?
Best,
CorraDIT
05-17-2017 07:12 AM
...and by LabVIEW I mean LabWindows/CVI.
CorraDIT
05-17-2017 09:29 AM
i found a solution!
the application has the permission to read.
The problem is the function. The correct function is:
RegQueryInfoOnKey (HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Enum\\USB\\VID_0403&PID_6010&MI_00\\7&25052fd2&0&0000", NULL, &values, NULL, NULL, NULL);
But now I have another problem: I have 2 FTDI4232 on my board. How can I select one? Because the 2 devices give me the same information. How can i use the registry key to select one?
Thanks