Click here to Skip to main content

C / C++ / MFC

 
AnswerRe: why gSOAP only require the root CA when accessing HTTPS? PinmvpRichard MacCutchan25-Sep-13 22:39 
Questionhow to make this working: srand(time(NULL)); Pinmembermrby12325-Sep-13 13:58 
AnswerRe: how to make this working: srand(time(NULL)); PinprofessionalRichard Andrew x6425-Sep-13 14:12 
QuestionCRegKey read from registry? Pinmemberbosfan25-Sep-13 7:19 
Hi,
i need some help with CRegKey to read from registry Frown | :(

Here what works fine:

int *target = NULL;
AfxGetApp()->GetProfileBinary(m_strKey, _T("key"), (BYTE **)&target, &bytes);


but i need to do this with registry key, like:

// CRegKey is there and opened without errors
int *target = NULL;
myregkey.QueryBinaryValue(_T("key"), (BYTE**)&target, &bytes);

Error is allways ERROR_MORE_DATA what means they are more information to read as i do?
To write binary data to registry works fine to, only read is my problem now.
Only for example here how i write binary to registry:

int *value = new int[count];
myregkey.SetBinaryValue(_T("key"), (BYTE*)value, sizeof(int) * count);


Can somebody help me how to read binary from registry with CRegKey::QueryBinaryValue??

Thanks in advance
bosfan
AnswerRe: CRegKey read from registry? PinprofessionalRichard Andrew x6425-Sep-13 8:47 
GeneralRe: CRegKey read from registry? Pinmemberbosfan25-Sep-13 22:46 
AnswerRe: CRegKey read from registry? PinmvpRichard MacCutchan25-Sep-13 22:37 
GeneralRe: CRegKey read from registry? Pinmemberbosfan25-Sep-13 22:45 
GeneralRe: CRegKey read from registry? PinmvpRichard MacCutchan25-Sep-13 23:03 
GeneralRe: CRegKey read from registry? Pinmemberbosfan25-Sep-13 23:32 

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

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


Advertise | Privacy | Mobile
Web01 | 2.8.150414.1 | Last Updated 21 Apr 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid