11-17-2009 03:09 PM
I am trying to write the registry using the function RegWriteString as follows
iLocalFail = RegWriteString(REGKEY_HKCU, "Software\\Custom PDF Printer\\OutputFile", "OutputFile", caFilenameWithPathInfo); I get a Default and OutputFile under the Custom PDF Printer\Outputfile key, see attachment NI Write.jpg.
When I use the Microsoft RegCreateKeyEx and RegSetValue functions
lReturnValue = RegCreateKeyEx(HKEY_CURRENT_USER, "Software\\Custom PDF Printer", 0, NULL , REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, 0, &hKeyHandle, &ulReturnValue);
lReturnValue = RegSetValue(hKeyHandle, "OutputFile", REG_SZ, caFilenameWithPathInfo, strlen(caFilenameWithPathInfo));
I only get the Default value set to the filename, see attachment Microsoft Write.jpg.
The program that I am setting the registry for wants the Microsoft results. The NI functions make the program cleaner, but why are the results different.
Solved! Go to Solution.
11-17-2009 04:55 PM
Hey Paul -
To get what you're looking for, you just need to pass NULL to the "ValueName" parameter:
NickB
National Instruments
11-18-2009 08:06 AM