Click here to Skip to main content
15,887,332 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Help with double pointers and const Pin
CPallini9-Apr-15 8:52
mveCPallini9-Apr-15 8:52 
GeneralRe: Help with double pointers and const Pin
Stefan_Lang10-Apr-15 0:27
Stefan_Lang10-Apr-15 0:27 
GeneralRe: Help with double pointers and const Pin
Stefan_Lang10-Apr-15 0:14
Stefan_Lang10-Apr-15 0:14 
GeneralRe: Help with double pointers and const Pin
CPallini10-Apr-15 5:16
mveCPallini10-Apr-15 5:16 
Questionrecovering storage Pin
Member 115916078-Apr-15 9:24
Member 115916078-Apr-15 9:24 
AnswerRe: recovering storage Pin
Richard MacCutchan8-Apr-15 20:20
mveRichard MacCutchan8-Apr-15 20:20 
Answer[Repost] Pin
Sascha Lefèvre8-Apr-15 20:33
professionalSascha Lefèvre8-Apr-15 20:33 
QuestionBuffer data size Pin
_Flaviu7-Apr-15 21:46
_Flaviu7-Apr-15 21:46 
Hi all. I have a doubt: how ulSize data buffer size should be:
C++
CString sValue;
ULONG ulSize = _MAX_PATH;
lRet = RegQueryValueEx(hKey, NULL, NULL, NULL, (BYTE*)sValue.GetBuffer(_MAX_PATH), &ulSize);
sValue.ReleaseBuffer();
or
C++
CString sValue;
ULONG ulSize = _MAX_PATH * sizeof(TCHAR);
lRet = RegQueryValueEx(hKey, NULL, NULL, NULL, (BYTE*)sValue.GetBuffer(_MAX_PATH), &ulSize);
sValue.ReleaseBuffer();

I guess that ulSize should be _MAX_PATH * sizeof(TCHAR); like in the second code ... but I am not sure ... can you tell me how is right ?

Thank you.

modified 8-Apr-15 5:37am.

AnswerRe: Buffer data size Pin
Jochen Arndt8-Apr-15 1:58
professionalJochen Arndt8-Apr-15 1:58 
GeneralRe: Buffer data size Pin
_Flaviu8-Apr-15 20:44
_Flaviu8-Apr-15 20:44 
AnswerRe: Buffer data size Pin
Richard MacCutchan8-Apr-15 2:40
mveRichard MacCutchan8-Apr-15 2:40 
Questionc graphics Pin
vinay dahiya6-Apr-15 12:07
vinay dahiya6-Apr-15 12:07 
AnswerRe: c graphics Pin
Richard MacCutchan6-Apr-15 21:00
mveRichard MacCutchan6-Apr-15 21:00 
AnswerRe: c graphics Pin
CPallini6-Apr-15 21:14
mveCPallini6-Apr-15 21:14 
AnswerRe: c graphics Pin
Stefan_Lang8-Apr-15 3:59
Stefan_Lang8-Apr-15 3:59 
QuestionI need to design a visual design tools for a private GUI library. Pin
yu-jian6-Apr-15 6:38
yu-jian6-Apr-15 6:38 
AnswerRe: I need to design a visual design tools for a private GUI library. Pin
David Crow6-Apr-15 7:46
David Crow6-Apr-15 7:46 
AnswerRe: I need to design a visual design tools for a private GUI library. Pin
Sascha Lefèvre6-Apr-15 8:22
professionalSascha Lefèvre6-Apr-15 8:22 
QuestionIoleUndoManager with Excel application Pin
jaafar tribak6-Apr-15 5:45
jaafar tribak6-Apr-15 5:45 
GeneralRe: IoleUndoManager with Excel application Pin
David Crow6-Apr-15 7:50
David Crow6-Apr-15 7:50 
GeneralRe: IoleUndoManager with Excel application Pin
jaafar tribak6-Apr-15 13:14
jaafar tribak6-Apr-15 13:14 
QuestionCFileDialog gives error "C:Windows\system32\config\systemprofile\desktop refers to location not available........ Pin
N3KK5-Apr-15 21:06
N3KK5-Apr-15 21:06 
AnswerRe: CFileDialog gives error "C:Windows\system32\config\systemprofile\desktop refers to location not available........ Pin
Richard MacCutchan5-Apr-15 21:56
mveRichard MacCutchan5-Apr-15 21:56 
GeneralRe: CFileDialog gives error "C:Windows\system32\config\systemprofile\desktop refers to location not available........ Pin
N3KK5-Apr-15 22:16
N3KK5-Apr-15 22:16 
GeneralRe: CFileDialog gives error "C:Windows\system32\config\systemprofile\desktop refers to location not available........ Pin
Richard MacCutchan5-Apr-15 22:35
mveRichard MacCutchan5-Apr-15 22:35 

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.