Click here to Skip to main content
15,904,817 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalamutithreads server Pin
smallcoder9-Jan-03 2:27
smallcoder9-Jan-03 2:27 
GeneralPostThreadMessage? Pin
AlexO9-Jan-03 4:30
AlexO9-Jan-03 4:30 
GeneralRe: PostThreadMessage? Pin
smallcoder9-Jan-03 4:59
smallcoder9-Jan-03 4:59 
GeneralRe: PostThreadMessage? Pin
AlexO9-Jan-03 5:35
AlexO9-Jan-03 5:35 
GeneralRe: PostThreadMessage? Pin
AlexO9-Jan-03 5:38
AlexO9-Jan-03 5:38 
GeneralRe: PostThreadMessage? Pin
smallcoder9-Jan-03 6:41
smallcoder9-Jan-03 6:41 
GeneralRe: PostThreadMessage? Pin
AlexO9-Jan-03 7:12
AlexO9-Jan-03 7:12 
GeneralProblem with the registry Pin
Jochem9-Jan-03 1:31
Jochem9-Jan-03 1:31 
The problem is that all data that i save in the registry is gone after windows (2000) is restarted. All data appears to be ok after the application closes. But after the restart the key is completely gone.

The code used in the app:

Opening the key:
HKEY hKeyRoot = HKEY_CURRENT_USER;
LPCTSTR pszPath = "Software\\Companyname\\My App Name\\Settings"
HKEY hKey;
DWORD dw;

RegCreateKeyEx(hKeyRoot, pszPath, 0L, NULL, REG_OPTION_VOLATILE, KEY_ALL_ACCESS, NULL, &hKey, &dw);

Writing:

int iValue = 8;
LPCTSTR pszKey = "MyInteger";
hKey as returned by RegCreateKeyEx

RegSetValueEx(hKey, pszKey, 0L, REG_DWORD, (CONST BYTE*)&iValue, sizeof(int));

Does anyone know how to prevent this and why it happens?

Thanks

I'm smart enough to know that i'm stupid and i'm stupid enough to think that i'm smart
GeneralRe: Problem with the registry Pin
Joan M9-Jan-03 1:39
professionalJoan M9-Jan-03 1:39 
GeneralRe: Problem with the registry Pin
Jochem9-Jan-03 2:37
Jochem9-Jan-03 2:37 
GeneralRe: Problem with the registry Pin
Anonymous9-Jan-03 3:23
Anonymous9-Jan-03 3:23 
GeneralRe: Problem with the registry Pin
Ramu Pulipati9-Jan-03 1:40
Ramu Pulipati9-Jan-03 1:40 
GeneralRe: Problem with the registry Pin
Jochem9-Jan-03 2:39
Jochem9-Jan-03 2:39 
GeneralRe: Problem with the registry Pin
Joan M9-Jan-03 1:42
professionalJoan M9-Jan-03 1:42 
GeneralRe: Problem with the registry Pin
Michael Dunn9-Jan-03 5:39
sitebuilderMichael Dunn9-Jan-03 5:39 
GeneralPrinting a Bitmap Pin
fordge9-Jan-03 1:26
fordge9-Jan-03 1:26 
GeneralRe: Printing a Bitmap Pin
Roger Allen9-Jan-03 1:40
Roger Allen9-Jan-03 1:40 
Generala Good Chart ActiveX! Pin
Ehsan Baghaki9-Jan-03 1:19
Ehsan Baghaki9-Jan-03 1:19 
GeneralRun Time Error When Using CDatabase Pin
Muhammad Asim Ghaznavi9-Jan-03 0:27
Muhammad Asim Ghaznavi9-Jan-03 0:27 
GeneralRe: Run Time Error When Using CDatabase Pin
Ramu Pulipati9-Jan-03 2:00
Ramu Pulipati9-Jan-03 2:00 
GeneralRe: Run Time Error When Using CDatabase Pin
Muhammad Asim Ghaznavi10-Jan-03 0:22
Muhammad Asim Ghaznavi10-Jan-03 0:22 
GeneralCPropertySheet... Pin
Raphael Kindt9-Jan-03 0:24
Raphael Kindt9-Jan-03 0:24 
GeneralRe: CPropertySheet... Pin
Joan M9-Jan-03 0:40
professionalJoan M9-Jan-03 0:40 
GeneralSample: Pin
Joan M9-Jan-03 2:00
professionalJoan M9-Jan-03 2:00 
Generalimporting from a DLL... Pin
Joan M9-Jan-03 0:15
professionalJoan M9-Jan-03 0:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.