End Google Ads 201810 - BS.net 01 -->
Hi,
i need some help with CRegKey to read from registry
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
مواقع النشر (المفضلة)