Click here to Skip to main content
15,914,488 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Assignment Code Pin
dtaylor0116-Oct-08 14:36
dtaylor0116-Oct-08 14:36 
GeneralRe: Assignment Code Pin
BobInNJ16-Oct-08 14:40
BobInNJ16-Oct-08 14:40 
GeneralRe: Assignment Code [modified] Pin
dtaylor0116-Oct-08 14:46
dtaylor0116-Oct-08 14:46 
GeneralRe: Assignment Code Pin
BobInNJ16-Oct-08 14:57
BobInNJ16-Oct-08 14:57 
GeneralRe: Assignment Code Pin
dtaylor0116-Oct-08 15:05
dtaylor0116-Oct-08 15:05 
QuestionRegEnumValue() returns garbage value for DWORD and BINARY Datatype! Pin
Supriya Tonape16-Oct-08 11:38
Supriya Tonape16-Oct-08 11:38 
AnswerRe: RegEnumValue() returns garbage value for DWORD and BINARY Datatype! Pin
CPallini16-Oct-08 12:07
mveCPallini16-Oct-08 12:07 
GeneralRe: RegEnumValue() returns garbage value for DWORD and BINARY Datatype! Pin
Supriya Tonape17-Oct-08 10:18
Supriya Tonape17-Oct-08 10:18 
The Registry Key Value Type is 'REG_DWORD' and 'REG_BINARY'.
You can create any new key in registry and then create new key values for it which has datatype as above(Selecting 'DWORD Value' and 'BINARY Value') and plz have a look at datavalue to see how data looks like.. For 'REG_SZ' values I am getting data in buffer properly.

Sample Code : (Assume regkey handle and open proc is passing and I am able to access it thru another APIs)

// Enumerate the key values.
if (dwValues)
{
.
.
for (i=0, retCode=ERROR_SUCCESS; i<dwvalues;>
{
.
.

retCode = RegEnumValue(
hkScanKey, // Handle to an open registry key
i, // The index of the value to be retrieved
pszRegValueName, // Pointer to a buffer that receives the name of the value
&dwRegValNameLen, // Size of the buffer pointed to by the 'pszRegValueName'
NULL, // Reserved
&dwRegValType, // Type of data
(LPBYTE)pszRegValData, // Data for the value
&dwRegValLen); // Size of Data

.
.
}
}

so whenever it finds any value with datatype 'REG_DWORD' or 'REG_BINARY' , the buffer 'pszRegValData' has some garbage value or unreadble val...

Regards,
Supriya Tonape
GeneralRe: RegEnumValue() returns garbage value for DWORD and BINARY Datatype! Pin
CPallini17-Oct-08 10:51
mveCPallini17-Oct-08 10:51 
GeneralRe: RegEnumValue() returns garbage value for DWORD and BINARY Datatype! Pin
Supriya Tonape18-Oct-08 23:21
Supriya Tonape18-Oct-08 23:21 
QuestionRe: RegEnumValue() returns garbage value for DWORD and BINARY Datatype! Pin
CPallini19-Oct-08 10:39
mveCPallini19-Oct-08 10:39 
AnswerRe: RegEnumValue() returns garbage value for DWORD and BINARY Datatype! Pin
Supriya Tonape21-Oct-08 1:26
Supriya Tonape21-Oct-08 1:26 
GeneralRe: RegEnumValue() returns garbage value for DWORD and BINARY Datatype! Pin
CPallini21-Oct-08 1:53
mveCPallini21-Oct-08 1:53 
QuestionUsing activex controls Pin
Rhett860616-Oct-08 10:45
Rhett860616-Oct-08 10:45 
Question_beginthread vs _beginthreadex -- FYI Pin
bulg16-Oct-08 10:34
bulg16-Oct-08 10:34 
AnswerRe: _beginthread vs _beginthreadex -- FYI Pin
Mark Salsbery16-Oct-08 10:44
Mark Salsbery16-Oct-08 10:44 
QuestionA Very Simple MFC Application Pin
BobInNJ16-Oct-08 7:57
BobInNJ16-Oct-08 7:57 
AnswerRe: A Very Simple MFC Application Pin
led mike16-Oct-08 8:08
led mike16-Oct-08 8:08 
GeneralRe: A Very Simple MFC Application Pin
BobInNJ16-Oct-08 9:54
BobInNJ16-Oct-08 9:54 
AnswerRe: A Very Simple MFC Application Pin
Mark Salsbery16-Oct-08 8:30
Mark Salsbery16-Oct-08 8:30 
GeneralRe: A Very Simple MFC Application Pin
BobInNJ16-Oct-08 10:06
BobInNJ16-Oct-08 10:06 
GeneralRe: A Very Simple MFC Application Pin
Mark Salsbery16-Oct-08 10:19
Mark Salsbery16-Oct-08 10:19 
GeneralRe: A Very Simple MFC Application Pin
BobInNJ16-Oct-08 10:38
BobInNJ16-Oct-08 10:38 
GeneralRe: A Very Simple MFC Application Pin
Mark Salsbery16-Oct-08 10:42
Mark Salsbery16-Oct-08 10:42 
GeneralRe: A Very Simple MFC Application Pin
BobInNJ16-Oct-08 10:47
BobInNJ16-Oct-08 10:47 

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.