Click here to Skip to main content
15,889,096 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Something about CxImage class Pin
Hamid_RT21-Oct-07 19:38
Hamid_RT21-Oct-07 19:38 
GeneralRe: Something about CxImage class Pin
Jane13125-Oct-07 3:35
Jane13125-Oct-07 3:35 
GeneralRe: Something about CxImage class Pin
Hamid_RT25-Oct-07 4:42
Hamid_RT25-Oct-07 4:42 
GeneralRe: Something about CxImage class Pin
Jane13125-Oct-07 15:35
Jane13125-Oct-07 15:35 
GeneralRe: Something about CxImage class Pin
Hamid_RT25-Oct-07 20:48
Hamid_RT25-Oct-07 20:48 
QuestionRe: Something about CxImage class Pin
Hamid_RT28-Oct-07 21:23
Hamid_RT28-Oct-07 21:23 
GeneralRe: Something about CxImage class Pin
quiettimes8-Jan-08 23:46
quiettimes8-Jan-08 23:46 
QuestionCRegKey::QueryValue (...) fails [modified] Pin
Nelek5-Oct-07 2:47
protectorNelek5-Oct-07 2:47 
Hi,

Im trying to read a value of the registry in VC++ using the class CRegKey from the < atlbase.h >
but something is not working. Using the VC++ help I have tried with this code:

CRegKey rkMyRegKey;
CString szValue = "";
LONG lnResult = -9999;
ULONG iLength = sizeof(szValue);
lnResult = rkMyRegKey.Open(HKEY_LOCAL_MACHINE, "SOFTWARE\\DELTALOGIC\\AGLink\\Device0");
lnResult = rkMyRegKey.QueryValue((LPTSTR) &szValue, "IFPARA_TCPIP", &iLength);
rkMyRegKey.Close ();


and it works half correct. The variable iLength gives me the value 1252 in the debugger (the large in Bytes of the entry I want to read), but the szValue has no values and the lnResult is 234 (being 0 = ERROR_SUCCESS) in the previous line. I have look for the error but I didn't found the meaning of the value 234.


After checking the forum and found a post this (march 07)[^] and I have tried this.

HKEY hWkKey;
CString szValue = "";
LONG lnResult = RegOpenKeyEx (HKEY_LOCAL_MACHINE, "SOFTWARE\\DELTALOGIC\\AGLink\\Device0", 0, KEY_ALL_ACCESS, &hWkKey);

if(lnResult == ERROR_SUCCESS)
{   ULONG iLength = sizeof(szValue);
    lnResult = RegQueryValueEx(hWkKey, "IFPARA_TCPIP", 0, NULL, (BYTE *) &szValue, &iLength);

    if (lnResult != ERROR_SUCCESS)
        AfxMessageBox ("Error by requesting the value");
}

RegFlushKey(hWkKey);
RegCloseKey(hWkKey);


And I got the same 234 error and the same value 1252 for iLength, but no result in the szValue.

Can someone tell me what am I not understanding?


-- modified at 9:02 Friday 5th October, 2007

Greetings.

--------
M.D.V.

If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?

Help me to understand what I'm saying, and I'll explain it better to you

Wink | ;)

AnswerRe: CRegKey::QueryValue (...) fails Pin
David Crow5-Oct-07 3:34
David Crow5-Oct-07 3:34 
GeneralRe: CRegKey::QueryValue (...) fails Pin
Nelek8-Oct-07 3:45
protectorNelek8-Oct-07 3:45 
AnswerRe: CRegKey::QueryValue (...) fails Pin
Rahul Vaishnav5-Oct-07 4:18
Rahul Vaishnav5-Oct-07 4:18 
GeneralRe: CRegKey::QueryValue (...) fails Pin
David Crow5-Oct-07 5:42
David Crow5-Oct-07 5:42 
GeneralRe: CRegKey::QueryValue (...) fails Pin
Nelek8-Oct-07 3:47
protectorNelek8-Oct-07 3:47 
AnswerRe: CRegKey::QueryValue (...) fails Pin
Roger Stoltz5-Oct-07 4:38
Roger Stoltz5-Oct-07 4:38 
GeneralRe: CRegKey::QueryValue (...) fails Pin
Nelek8-Oct-07 3:59
protectorNelek8-Oct-07 3:59 
GeneralRe: CRegKey::QueryValue (...) fails Pin
Roger Stoltz15-Oct-07 1:37
Roger Stoltz15-Oct-07 1:37 
QuestionI wanted to see (and play with) an example using CORBA, so I downloaded a 60 day trial of Borlands Visibroker. Pin
Andy2025-Oct-07 2:42
Andy2025-Oct-07 2:42 
QuestionRe: I wanted to see (and play with) an example using CORBA, so I downloaded a 60 day trial of Borlands Visibroker. Pin
rosdiana28-May-08 23:18
rosdiana28-May-08 23:18 
AnswerRe: I wanted to see (and play with) an example using CORBA, so I downloaded a 60 day trial of Borlands Visibroker. Pin
Andy2025-Jun-08 1:27
Andy2025-Jun-08 1:27 
GeneralRe: I wanted to see (and play with) an example using CORBA, so I downloaded a 60 day trial of Borlands Visibroker. Pin
rosdiana9-Jun-08 22:21
rosdiana9-Jun-08 22:21 
GeneralRe: I wanted to see (and play with) an example using CORBA, so I downloaded a 60 day trial of Borlands Visibroker. Pin
Andy20212-Jun-08 2:20
Andy20212-Jun-08 2:20 
QuestionRe: I wanted to see (and play with) an example using CORBA, so I downloaded a 60 day trial of Borlands Visibroker. Pin
rosdiana3-Jul-08 22:27
rosdiana3-Jul-08 22:27 
AnswerRe: I wanted to see (and play with) an example using CORBA, so I downloaded a 60 day trial of Borlands Visibroker. Pin
Andy2027-Jul-08 6:21
Andy2027-Jul-08 6:21 
GeneralRe: I wanted to see (and play with) an example using CORBA, so I downloaded a 60 day trial of Borlands Visibroker. Pin
rosdiana28-Jul-08 19:42
rosdiana28-Jul-08 19:42 
GeneralRe: I wanted to see (and play with) an example using CORBA, so I downloaded a 60 day trial of Borlands Visibroker. Pin
Andy20229-Jul-08 0:51
Andy20229-Jul-08 0:51 

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.