Click here to Skip to main content
15,921,276 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Resource Question Pin
Paul M Watt30-May-02 5:32
mentorPaul M Watt30-May-02 5:32 
GeneralRe: Resource Question Pin
Renjith Ramachandran30-May-02 6:21
Renjith Ramachandran30-May-02 6:21 
GeneralRe: Resource Question Pin
Bill Wilson30-May-02 12:09
Bill Wilson30-May-02 12:09 
Generalproblem reading string from registry Pin
Lucky the code machine30-May-02 2:18
Lucky the code machine30-May-02 2:18 
GeneralRe: problem reading string from registry Pin
Claudius Mokler30-May-02 3:11
Claudius Mokler30-May-02 3:11 
GeneralRe: problem reading string from registry Pin
Lucky the code machine30-May-02 3:31
Lucky the code machine30-May-02 3:31 
GeneralRe: problem reading string from registry Pin
Renjith Ramachandran30-May-02 3:30
Renjith Ramachandran30-May-02 3:30 
GeneralRe: problem reading string from registry Pin
Le centriste30-May-02 3:32
Le centriste30-May-02 3:32 
Lucky the code machine wrote:
char* text;
//unsigned long* buffer;
DWORD* buffer;
unsigned long PerServer;
unsigned long Per1_0Server;
CRegKey reg;


You don't initialize your variables. do this instead:

TCHAR text[1024]; //May be any length suitable for the value 
//unsigned long* buffer;
DWORD buffer = 1024;
unsigned long PerServer;
unsigned long Per1_0Server;
CRegKey reg;

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


Often, when a method asks for a pointer to value, it asks for a placeholder to return something to you. but the this pointer must point to valid memory area. Also, note use of TCHAR and _T("").



Michel

It is a lovely language, but it takes a very long time to say anything in it, because we do not say anything in it, unless it is worth taking a very long time to say, and to listen to.

- TreeBeard
QuestionBlitting two different graphic bit depths? Pin
Alan Chambers30-May-02 1:59
Alan Chambers30-May-02 1:59 
AnswerRe: Blitting two different graphic bit depths? Pin
Paul M Watt30-May-02 5:35
mentorPaul M Watt30-May-02 5:35 
GeneralCD ROM Information Pin
30-May-02 1:30
suss30-May-02 1:30 
GeneralRe: CD ROM Information Pin
Ed Gadziemski30-May-02 11:13
professionalEd Gadziemski30-May-02 11:13 
GeneralRe: CD ROM Information Pin
30-May-02 19:42
suss30-May-02 19:42 
GeneralRe: CD ROM Information Pin
30-May-02 19:43
suss30-May-02 19:43 
GeneralSetTitle on CDoc class Pin
LittleYellowBird30-May-02 1:33
LittleYellowBird30-May-02 1:33 
GeneralRe: SetTitle on CDoc class Pin
Michael P Butler30-May-02 1:47
Michael P Butler30-May-02 1:47 
GeneralRe: SetTitle on CDoc class Pin
LittleYellowBird30-May-02 2:02
LittleYellowBird30-May-02 2:02 
GeneralRe: SetTitle on CDoc class Pin
Michael P Butler30-May-02 2:09
Michael P Butler30-May-02 2:09 
GeneralRe: SetTitle on CDoc class Pin
LittleYellowBird30-May-02 3:55
LittleYellowBird30-May-02 3:55 
GeneralPGPEncode fails for RSA keys Pin
Nish Nishant30-May-02 1:14
sitebuilderNish Nishant30-May-02 1:14 
GeneralRe: PGPEncode fails for RSA keys Pin
Renjith Ramachandran30-May-02 3:49
Renjith Ramachandran30-May-02 3:49 
QuestionHi,all, I want to paint a bias and never use LineTo(),Because I want get every point's coordinate in the bias.How can i do? Pin
30-May-02 0:43
suss30-May-02 0:43 
AnswerRe: Hi,all, I want to paint a bias and never use LineTo(),Because I want get every point's coordinate in the bias.How can i do? Pin
mhamsa30-May-02 1:06
mhamsa30-May-02 1:06 
Generalthanks. but Polyline only paint points to dc, Pin
30-May-02 1:18
suss30-May-02 1:18 
AnswerRe: Hi,all, I want to paint a bias and never use LineTo(),Because I want get every point's coordinate in the bias.How can i do? Pin
jbarton30-May-02 3:54
jbarton30-May-02 3:54 

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.