LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

problems to read a registry key REG_SZ

hi everybody,

i'm tryng to read the value of a particular regster named ParentIDPrefix. It is visible on picture

reg.png

 

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?

0 Kudos
Message 1 of 4
(2,684 Views)

Hi DamBalzani,

 

it could be a permission error. Did you try star LabVIEW as an administrator?

 

Best,

 

CorraDIT

0 Kudos
Message 2 of 4
(2,635 Views)

...and by LabVIEW I mean LabWindows/CVI.

 

CorraDIT

0 Kudos
Message 3 of 4
(2,634 Views)

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

 

 

0 Kudos
Message 4 of 4
(2,627 Views)