03-03-2009 06:10 AM
I'm porting software from another library I have that uses Native Windows. After writing a small test program in NI CVI 9.0, I've found that the function RegGetValue() when used, results in a program that won't run (won't even debug, with an error about files not being in the path). Remove that single line and it works so far as it is supposed to.
The Programmer's Toolbox in CVI9 has a function to read the registry, but why won't it work with the standard Windows SDK? Is there any way I can get RegGetValue() to work as documented by MSDN within CVI?
I've tried including ADVAPI32.LIB and ADVAPI32_LVRT.LIB and neither work (from the lib/MSVC folder)
It worries me that the WinSDK is not compatible with CVI and I don't know where I can find such compatibility information.
Thanks,
Jason.
Solved! Go to Solution.
03-03-2009 08:01 AM
03-03-2009 09:46 AM - edited 03-03-2009 09:46 AM
Hello Jason,
I am running on a Vista machine, and had no trouble with the following code:
Also, for future reference, the help topic Availability of Interface to Application Programmatic Interface (API) Functions has a listing of all the Win32 API functions that are supported in CVI 9.0.
NickB
National Instruments
03-03-2009 09:55 AM
Oh my! I do feel tiny - you're right it's not supported on WinXP SP2, but was being ported from something that was running on a Vista box.
Then that explains quite nicely why it linked (NI help file mentions the function call in the base package) but why it couldn't be debugged because at load time the reference doesn't exist. Only the error message was a bit confusing.