ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/proj/trunk/VTBFileUtil2/DiscBrowse.cxx
(Generate patch)

Comparing trunk/VTBFileUtil2/DiscBrowse.cxx (file contents):
Revision 290 by douglas, 2003-09-04T18:57:00-07:00 vs.
Revision 291 by douglas, 2003-09-05T01:57:00-07:00

# Line 2 | Line 2
2   //
3   // Douglas Thrift
4   //
5 < // $Id: DiscBrowse.cxx,v 1.8 2003/09/05 01:57:00 douglas Exp $
5 > // $Id: DiscBrowse.cxx,v 1.9 2003/09/05 08:57:00 douglas Exp $
6  
7   #include "DiscBrowse.h"
8  
# Line 151 | Line 151 | void DiscBrowse::saveDir(void)
151   {
152          HKEY key;
153  
154 <        if (RegCreateKeyEx(HKEY_CURRENT_USER,
154 >        if (LONG code = RegCreateKeyEx(HKEY_CURRENT_USER,
155                  "Software\\DouglasThrift\\VTBFileUtil2", 0, NULL,
156                  REG_OPTION_NON_VOLATILE, KEY_QUERY_VALUE | KEY_SET_VALUE, NULL, &key,
157                  NULL) == ERROR_SUCCESS)
# Line 172 | Line 172 | void DiscBrowse::saveDir(void)
172  
173                  if (discDir != data || type != REG_SZ)
174                  {
175 <                        if (RegSetValueEx(key, "DiscDir", 0, REG_SZ,
175 >                        if (code = RegSetValueEx(key, "DiscDir", 0, REG_SZ,
176                                  LPBYTE(discDir.c_str()), discDir.length() + 1) !=
177                                  ERROR_SUCCESS)
178                          {
179 <                                error();
179 >                                error(NULL, code);
180                          }
181                  }
182  
# Line 184 | Line 184 | void DiscBrowse::saveDir(void)
184          }
185          else
186          {
187 <                error();
187 >                error(NULL, code);
188          }
189   }
190  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines