Advertisement
Guest User

Untitled

a guest
Nov 29th, 2011
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.59 KB | None | 0 0
  1.  if(IsFailed(r))
  2.         goto CATCH;
  3.  
  4.     // change value: section1 { entry1 = 3 }
  5.     r = reg.SetValue(sect1, entry1, 3);
  6.     if(IsFailed(r))
  7.         goto CATCH;
  8.  
  9.     // add value: section2 { entry2 = 1.1234599 }
  10.     r = reg.AddValue(sect2, entry2, 1.1234599);
  11.     if(IsFailed(r))
  12.         goto CATCH;
  13.  
  14.     // get value: section1 { entry1 = ? }
  15.     r = reg.GetValue(sect1, entry1, iVal);
  16.     if(IsFailed(r))
  17.         goto CATCH;
  18.  
  19.     // write to the file
  20.     r = reg.Flush();
  21.     if(IsFailed(r))
  22.         goto CATCH;
  23.  
  24.     return;
  25.  
  26. CATCH:
  27.     // Do some error handling
  28.     return;
  29.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement