Click here to Skip to main content
15,895,833 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: convert a CString to a char Pin
Lucky the code machine29-May-02 7:15
Lucky the code machine29-May-02 7:15 
GeneralRe: convert a CString to a char Pin
ed987129-May-02 7:17
ed987129-May-02 7:17 
GeneralRe: convert a CString to a char Pin
Martin Ziacek29-May-02 7:23
Martin Ziacek29-May-02 7:23 
GeneralRead / Write Registry Pin
Lucky the code machine29-May-02 7:08
Lucky the code machine29-May-02 7:08 
GeneralRe: Read / Write Registry Pin
Martin Ziacek29-May-02 7:19
Martin Ziacek29-May-02 7:19 
GeneralRe: Read / Write Registry Pin
Lucky the code machine29-May-02 7:17
Lucky the code machine29-May-02 7:17 
GeneralRe: Read / Write Registry Pin
Martin Ziacek29-May-02 7:28
Martin Ziacek29-May-02 7:28 
GeneralRe: Read / Write Registry Pin
Lucky the code machine30-May-02 2:15
Lucky the code machine30-May-02 2:15 
I hope im not being a pain. I tryed this and it worked fine:

char* text;
//unsigned long* buffer;
DWORD* buffer;
unsigned long PerServer;
unsigned long Per1_0Server;
CRegKey reg;

reg.Open(HKEY_CURRENT_USER,"Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings");
reg.QueryValue(PerServer,"MaxConnectionsPerServer");

but when i try to read a string (the windows version name) with:

reg.Open(HKEY_LOCAL_MACHINE,"Software\\Microsoft\\Windows\\CurrentVersion");
reg.QueryValue(text,"ProductName",buffer);

i get an assertation error on the line "pdwCount!=null;" (in CRegKey) if i change buffer to anything using "buffer=(unsigned long*)999;" i dont get the error but i get no data.

Am i being stupid? I cant see where im going wrong.

An Expert is somone who has previously made ALL the Mistakes, I dream of this day. - Lucky
GeneralRe: Read / Write Registry Pin
Martin Ziacek29-May-02 7:31
Martin Ziacek29-May-02 7:31 
GeneralRe: Read / Write Registry Pin
Lucky the code machine29-May-02 7:29
Lucky the code machine29-May-02 7:29 
GeneralWindow Programming (Saving Results) Pin
29-May-02 7:01
suss29-May-02 7:01 
GeneralRe: Window Programming (Saving Results) Pin
Nish Nishant29-May-02 7:02
sitebuilderNish Nishant29-May-02 7:02 
GeneralCount Number of Items in a struct Pin
Anton A. Loukine29-May-02 6:36
Anton A. Loukine29-May-02 6:36 
GeneralRe: Count Number of Items in a struct Pin
Rama Krishna Vavilala29-May-02 6:49
Rama Krishna Vavilala29-May-02 6:49 
GeneralRe: Count Number of Items in a struct Pin
Anton A. Loukine29-May-02 6:49
Anton A. Loukine29-May-02 6:49 
GeneralRe: Count Number of Items in a struct Pin
Rama Krishna Vavilala29-May-02 7:23
Rama Krishna Vavilala29-May-02 7:23 
GeneralRe: Count Number of Items in a struct Pin
Rama Krishna Vavilala29-May-02 6:55
Rama Krishna Vavilala29-May-02 6:55 
GeneralRe: Count Number of Items in a struct Pin
Anton A. Loukine29-May-02 6:50
Anton A. Loukine29-May-02 6:50 
GeneralRe: Count Number of Items in a struct Pin
Joaquín M López Muñoz29-May-02 8:47
Joaquín M López Muñoz29-May-02 8:47 
GeneralRe: Count Number of Items in a struct Pin
Michael Dunn29-May-02 17:56
sitebuilderMichael Dunn29-May-02 17:56 
GeneralTrick or thread Pin
Zizilamoroso29-May-02 6:24
Zizilamoroso29-May-02 6:24 
GeneralRe: Trick or thread Pin
Rama Krishna Vavilala29-May-02 6:50
Rama Krishna Vavilala29-May-02 6:50 
GeneralRe: Trick or thread Pin
Zizilamoroso29-May-02 7:03
Zizilamoroso29-May-02 7:03 
GeneralRe: Trick or thread Pin
Nish Nishant29-May-02 7:14
sitebuilderNish Nishant29-May-02 7:14 
GeneralRe: Trick or thread Pin
Zizilamoroso29-May-02 8:11
Zizilamoroso29-May-02 8:11 

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.