Click here to Skip to main content
15,850,103 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Assignment Code Pin
dtaylor0116-Oct-08 15:36
dtaylor0116-Oct-08 15:36 
GeneralRe: Assignment Code Pin
BobInNJ16-Oct-08 15:40
BobInNJ16-Oct-08 15:40 
GeneralRe: Assignment Code [modified] Pin
dtaylor0116-Oct-08 15:46
dtaylor0116-Oct-08 15:46 
GeneralRe: Assignment Code Pin
BobInNJ16-Oct-08 15:57
BobInNJ16-Oct-08 15:57 
GeneralRe: Assignment Code Pin
dtaylor0116-Oct-08 16:05
dtaylor0116-Oct-08 16:05 
QuestionRegEnumValue() returns garbage value for DWORD and BINARY Datatype! Pin
Supriya Tonape16-Oct-08 12:38
Supriya Tonape16-Oct-08 12:38 
AnswerRe: RegEnumValue() returns garbage value for DWORD and BINARY Datatype! Pin
CPallini16-Oct-08 13:07
mveCPallini16-Oct-08 13:07 
GeneralRe: RegEnumValue() returns garbage value for DWORD and BINARY Datatype! Pin
Supriya Tonape17-Oct-08 11:18
Supriya Tonape17-Oct-08 11: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 11:51
mveCPallini17-Oct-08 11:51 
GeneralRe: RegEnumValue() returns garbage value for DWORD and BINARY Datatype! Pin
Supriya Tonape19-Oct-08 0:21
Supriya Tonape19-Oct-08 0:21 
QuestionRe: RegEnumValue() returns garbage value for DWORD and BINARY Datatype! Pin
CPallini19-Oct-08 11:39
mveCPallini19-Oct-08 11:39 
AnswerRe: RegEnumValue() returns garbage value for DWORD and BINARY Datatype! Pin
Supriya Tonape21-Oct-08 2:26
Supriya Tonape21-Oct-08 2:26 
GeneralRe: RegEnumValue() returns garbage value for DWORD and BINARY Datatype! Pin
CPallini21-Oct-08 2:53
mveCPallini21-Oct-08 2:53 
QuestionUsing activex controls Pin
Rhett860616-Oct-08 11:45
Rhett860616-Oct-08 11:45 
Question_beginthread vs _beginthreadex -- FYI Pin
bulg16-Oct-08 11:34
bulg16-Oct-08 11:34 
AnswerRe: _beginthread vs _beginthreadex -- FYI Pin
Mark Salsbery16-Oct-08 11:44
Mark Salsbery16-Oct-08 11:44 
QuestionA Very Simple MFC Application Pin
BobInNJ16-Oct-08 8:57
BobInNJ16-Oct-08 8:57 
AnswerRe: A Very Simple MFC Application Pin
led mike16-Oct-08 9:08
led mike16-Oct-08 9:08 
GeneralRe: A Very Simple MFC Application Pin
BobInNJ16-Oct-08 10:54
BobInNJ16-Oct-08 10:54 
AnswerRe: A Very Simple MFC Application Pin
Mark Salsbery16-Oct-08 9:30
Mark Salsbery16-Oct-08 9:30 
GeneralRe: A Very Simple MFC Application Pin
BobInNJ16-Oct-08 11:06
BobInNJ16-Oct-08 11:06 
GeneralRe: A Very Simple MFC Application Pin
Mark Salsbery16-Oct-08 11:19
Mark Salsbery16-Oct-08 11:19 
GeneralRe: A Very Simple MFC Application Pin
BobInNJ16-Oct-08 11:38
BobInNJ16-Oct-08 11:38 
GeneralRe: A Very Simple MFC Application Pin
Mark Salsbery16-Oct-08 11:42
Mark Salsbery16-Oct-08 11:42 
GeneralRe: A Very Simple MFC Application Pin
BobInNJ16-Oct-08 11:47
BobInNJ16-Oct-08 11: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.