| Author |
Message |
Lycander
Lead Dog


Joined: 24 May 2002 Age: 25 Posts: 12196
Location: The Constitution State
|
Posted:
Tue Apr 08, 2003 11:14 am Post subject: Windows Reg keys |
|
I was about to put this in the Rant forum but I figure I might get better responses here.
I'm writing this program in C++/MFC, but use regular Win32 API calls to get at the registry keys. I navigate my way to the CEAPPMGR.EXE key and it only has one entry, "(Default)".
So I go:
if(RegQueryValueEx(hkCS,"(Default)",0,&dwType,appMgr,&dwSize) != ERROR_SUCCESS)
MessageBox("Failed to query CEAppMgr.exe","",MB_OK);
And the message box pops up telling me it failed to query the value in that key. This value I'm trying to get is the one and only, and all the other keys have at least one "(Default)" entry in them although I haven't tried getting at those from other keys yet.
Anyone know something I don't?
apMgr is a BYTE* I initialize:
appMgr = (BYTE*)LocalAlloc(LPTR, 100);
So it's a buffer that's 100 bytes long. Should be enough to hold the path and filename of CEAPPMGR.EXE stored in this reg key. |
_________________ To the top of hunger mountain
I found my solitary ways
Where I could live on nuts and honey
And take my shelter in a cave
|
|
|
|
|
Lycander
Lead Dog


Joined: 24 May 2002 Age: 25 Posts: 12196
Location: The Constitution State
|
Posted:
Tue Apr 08, 2003 11:59 am Post subject: |
|
Never mind, this really does belong in the Rant forum.
Apparently all I have to do is pass NULL instead of specifying that I want the "(Default)" value. Stupid Microsoft, they could have told me that in the docs so I didn't have to run around like an idiot trying to find the answer. I should have just went with instinct on this one.
*Lets out a stream of obscenities in the general direction of Redmond* |
_________________ To the top of hunger mountain
I found my solitary ways
Where I could live on nuts and honey
And take my shelter in a cave
|
|
|
|
|
tecgod13
Tail-Wagger


Joined: 13 Aug 2002 Posts: 2853
Location: Western Massachusetts
|
Posted:
Tue Apr 08, 2003 2:28 pm Post subject: |
|
Lycander wrote:*Lets out a stream of obscenities in the general direction of Redmond*
Can I join in too? |
_________________ "The problem with America is stupidity. I'm not saying there should be a capital punishment for stupidity, but why don't we just take the safety labels off of everything and let the problem solve itself?"
http://www.livejournal.com/users/tecgod13/
|
|
|
|
|
Lycander
Lead Dog


Joined: 24 May 2002 Age: 25 Posts: 12196
Location: The Constitution State
|
Posted:
Tue Apr 08, 2003 3:03 pm Post subject: |
|
*Gives you a beer*
Sure, come join me. The beer helps with the profanity. |
_________________ To the top of hunger mountain
I found my solitary ways
Where I could live on nuts and honey
And take my shelter in a cave
|
|
|
|
|
tecgod13
Tail-Wagger


Joined: 13 Aug 2002 Posts: 2853
Location: Western Massachusetts
|
Posted:
Tue Apr 08, 2003 3:20 pm Post subject: |
|
mmmm beer...
Oh don't even get me started on profanity while drunk. One of my least favorite rules while playing asshole was the swearing rule. That would get me more drunk, then more swearing, then more drunk, then I'm no good at playing and end up asshole, and more swearing.. ... you get the picture...
Not to mention what I'd like to say about Win2K now that it crashes everytime I try installing it... grrrr
*goes to get more beer, or liquor, or both* |
_________________ "The problem with America is stupidity. I'm not saying there should be a capital punishment for stupidity, but why don't we just take the safety labels off of everything and let the problem solve itself?"
http://www.livejournal.com/users/tecgod13/
|
|
|
|
|
Lycander
Lead Dog


Joined: 24 May 2002 Age: 25 Posts: 12196
Location: The Constitution State
|
Posted:
Fri Apr 11, 2003 7:51 am Post subject: |
|
I just got started with the profanity towards installing RH Linux. Only one time in my life was I able to install and boot that distro. Grr... I'm doing a Gentoo now - left my machine back home compiling. You'd think that this kind of install would really get me cursing, but no it's actually going pretty well. Well to be honest, at the part where I had to use Vi to edit text files, I had to take myself outside so I wouldn't hurt myself or my computer. I kept getting stuck in "ex" insert mode, and every piece of doc I read says to press ESC to get out of it. That's what I did and I'm still stuck!
Fixed it by making the conf file in Windows and putting it on a floppy and copy/replace the old conf file with that. And that worked so I was able to move on.
Further down in the install guide they tell me "Oh yeah, by the way, use nano to edit the conf files."
F******CK!!!!!! Damn you Gentoo!!! This sort of info would have be useful 2 hours ago! Hehe. I mean I know how to use Vim, but plain ol' Vi was acting weird on me. |
_________________ To the top of hunger mountain
I found my solitary ways
Where I could live on nuts and honey
And take my shelter in a cave
|
|
|
|
|
csign
Moderator


Joined: 26 May 2001 Posts: 8155
Location: Borneo
|
Posted:
Fri Apr 11, 2003 3:19 pm Post subject: |
|
install mc or one of the nicer editors(nano seems to be named often). But seeing that every editor execpt cat is nicer than vi i could also say install a different editor |
|
|
|
|
|
|
|
|