Click here to Skip to main content
15,905,679 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: program too big for mem Pin
Ted Ferenc6-Feb-03 7:46
Ted Ferenc6-Feb-03 7:46 
GeneralEncrypting technique for simple CString Pin
Willem B6-Feb-03 4:29
Willem B6-Feb-03 4:29 
GeneralRe: Encrypting technique for simple CString Pin
Chris Losinger6-Feb-03 5:01
professionalChris Losinger6-Feb-03 5:01 
GeneralRe: Encrypting technique for simple CString Pin
Miguel Ortiz6-Feb-03 8:43
Miguel Ortiz6-Feb-03 8:43 
GeneralCSplitterWnd is evil! Pin
SomeUser6-Feb-03 3:47
SomeUser6-Feb-03 3:47 
GeneralRe: CSplitterWnd is evil! Pin
Zdeslav Vojkovic6-Feb-03 5:54
Zdeslav Vojkovic6-Feb-03 5:54 
GeneralRe: CSplitterWnd is evil! Pin
SomeUser6-Feb-03 7:03
SomeUser6-Feb-03 7:03 
GeneralRegistry Reading with CRegKey Pin
naradaji6-Feb-03 3:42
naradaji6-Feb-03 3:42 
Hi,
I'm using CRegKey to read a value from the registry. It's the name of the Citrix ICA Client:
HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\ICA Client
and the key is ClientName.

I use the following:
CRegKey regKey;<br />
			LONG Errr = regKey.Open(HKEY_LOCAL_MACHINE, "Software\\Citrix\\ICA Client", KEY_READ);<br />
			ASSERT(ERROR_SUCCESS == Errr);<br />
<br />
			CString csValue;<br />
			LPTSTR lpBuf = csValue.GetBufferSetLength(MAX_PATH);<br />
			ULONG length = MAX_PATH;<br />
			<br />
			Errr = regKey.QueryValue(lpBuf,"ClientName", &length);<br />
			ASSERT(ERROR_SUCCESS == Errr);<br />
<br />
			csValue.ReleaseBuffer();<br />
			MessageBox(csValue);


And the messagebox displays an empty string!
What am I doing wrong?

Thanks,

-- narada
GeneralRe: Registry Reading with CRegKey Pin
naradaji6-Feb-03 4:04
naradaji6-Feb-03 4:04 
Generalcreating a grayscale "rainbow" in code Pin
ns6-Feb-03 3:17
ns6-Feb-03 3:17 
GeneralRe: creating a grayscale "rainbow" in code Pin
David Chamberlain6-Feb-03 10:18
David Chamberlain6-Feb-03 10:18 
GeneralRe: creating a grayscale "rainbow" in code Pin
ns7-Feb-03 5:05
ns7-Feb-03 5:05 
GeneralRe: Windows Service and MAPIInitialize() Pin
6-Feb-03 3:08
suss6-Feb-03 3:08 
GeneralRecurrence detection Pin
RChin6-Feb-03 2:09
RChin6-Feb-03 2:09 
Generalwhat is the question? Pin
6-Feb-03 2:34
suss6-Feb-03 2:34 
GeneralRe: what is the question? Pin
RChin6-Feb-03 3:43
RChin6-Feb-03 3:43 
GeneralRe: what is the question? Pin
AlexO6-Feb-03 4:08
AlexO6-Feb-03 4:08 
GeneralPrgramatic Control of Toolbar Pin
Jawache6-Feb-03 1:51
Jawache6-Feb-03 1:51 
GeneralRe: Prgramatic Control of Toolbar Pin
KarstenK6-Feb-03 2:23
mveKarstenK6-Feb-03 2:23 
GeneralRe: Prgramatic Control of Toolbar Pin
Jawache6-Feb-03 3:48
Jawache6-Feb-03 3:48 
GeneralGradient Progress Bar Pin
Ambit6-Feb-03 1:50
Ambit6-Feb-03 1:50 
GeneralRe: Gradient Progress Bar Pin
Kayembi6-Feb-03 9:04
Kayembi6-Feb-03 9:04 
GeneralRe: Gradient Progress Bar Pin
Chris Richardson6-Feb-03 18:52
Chris Richardson6-Feb-03 18:52 
GeneralRe: Gradient Progress Bar Pin
Ambit7-Feb-03 5:06
Ambit7-Feb-03 5:06 
General#define Pin
Rage6-Feb-03 1:30
professionalRage6-Feb-03 1:30 

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.