kmtambasc98
April 10th, 1999, 04:04 PM
I am using an ATL-derived Inproc COM server in a project, and I am trying to compile a release build. I am using the "Release Min-Dependency" build. The following is the code in question:
CRegKey regkey;
regkey.Open(HKEY_LOCAL_MACHINE, "DATAFILES");
TCHAR path[MAX_PATH];
DWORD count;
regkey.QueryValue(path, "Install Folder", &count);
When I run in Debug mode, this code works fine. When I am running in Release-MinDependancy, The "path" variable is empty the first time, but after stepping through the "QueryValue" line, if I set the next statement back to the QueryValue function call, it works the second time around.
Also, hardcoding the "path" variable allows my software to work correctly. However, this variable needs to be read by the registry, as my software is dependant on the location of another software package.
In order to step through this release build, I used some of the techniques in the Debug section of this website.
Any ideas?? (calling QueryValue twice isn't a good fix... :) )
Thanks in advance,
Kevin
CRegKey regkey;
regkey.Open(HKEY_LOCAL_MACHINE, "DATAFILES");
TCHAR path[MAX_PATH];
DWORD count;
regkey.QueryValue(path, "Install Folder", &count);
When I run in Debug mode, this code works fine. When I am running in Release-MinDependancy, The "path" variable is empty the first time, but after stepping through the "QueryValue" line, if I set the next statement back to the QueryValue function call, it works the second time around.
Also, hardcoding the "path" variable allows my software to work correctly. However, this variable needs to be read by the registry, as my software is dependant on the location of another software package.
In order to step through this release build, I used some of the techniques in the Debug section of this website.
Any ideas?? (calling QueryValue twice isn't a good fix... :) )
Thanks in advance,
Kevin