C/C++ Windows API

Moderators: Lundin
Number of threads: 443
Number of posts: 1215

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
get registry value Posted by yuriythebest on 30 Aug 2008 at 5:21 PM
right - I have the directory to my app stored in

HKEY_CURRENT_USER/ Software/myAppName


name= (default)


how do I read it? I've tried searching the RegGetValue but couldn't get it to work/ understand how it works.
Report
Re: get registry value Posted by carly on 30 Aug 2008 at 11:24 PM

: how do I read it? I've tried searching the RegGetValue but couldn't
: get it to work/ understand how it works.

Just copy MSDN samples and it works in 2 seconds
or see adv. win32 api forum,
news://194.177.96.26/comp.os.ms-windows.programmer.win32
where it has been given hundreds of times...


Report
Re: get registry value Posted by BitByBit_Thor on 1 Sept 2008 at 3:40 AM
:
: : how do I read it? I've tried searching the RegGetValue but couldn't
: : get it to work/ understand how it works.
:
: Just copy MSDN samples and it works in 2 seconds
: or see adv. win32 api forum,
: news://194.177.96.26/comp.os.ms-windows.programmer.win32
: where it has been given hundreds of times...
:
:
:

To add a little bit of descriptive text to help you oversee how the registry works:
You need to Open the keys first. Then you can modify the Values of an open key, enumerate them, and also enumerate the sub-keys of your open key.
Don't forget to close all the open handles (open keys) when you're done with them.
MSDN is your friend. Look for RegOpenKeyEx and/or RegCreateKeyEx for opening the key (http://msdn.microsoft.com/en-us/library/ms724897(VS.85).aspx)
RegCloseKey is used to close the key
Best Regards,
Richard

The way I see it... Well, it's all pretty blurry
Report
Re: get registry value Posted by Flamingkat on 1 Sept 2008 at 7:34 AM
:
: : how do I read it? I've tried searching the RegGetValue but couldn't
: : get it to work/ understand how it works.
:
: Just copy MSDN samples and it works in 2 seconds
: or see adv. win32 api forum,
: news://194.177.96.26/comp.os.ms-windows.programmer.win32
: where it has been given hundreds of times...
:
:
:
HKEY key;
RegOpenKeyEx(HKEY_LOCAL_MACHINE,"Software\\Microsoft\\Windows\\CurrentVersion\\Run",0,KEY_QUERY_VALUE,&hKey );

After reading the key, put it into a variable to hold.

Report
Re: get registry value Posted by meghap on 24 Nov 2008 at 7:59 AM
Hi,
How can I call below function for remote machine?

HKEY key;
RegOpenKeyEx(HKEY_LOCAL_MACHINE,"Software\\Microsoft\\Windows\\CurrentVersion\\Run",0,KEY_QUERY_VALUE,&hKey );

Thanks,
Megha
: :
: : : how do I read it? I've tried searching the RegGetValue but couldn't
: : : get it to work/ understand how it works.
: :
: : Just copy MSDN samples and it works in 2 seconds
: : or see adv. win32 api forum,
: : news://194.177.96.26/comp.os.ms-windows.programmer.win32
: : where it has been given hundreds of times...
: :
: :
: :
: HKEY key;
: RegOpenKeyEx(HKEY_LOCAL_MACHINE,"Software\\Microsoft\\Windows\\Curren
: tVersion\\Run",0,KEY_QUERY_VALUE,&hKey );
:
: After reading the key, put it into a variable to hold.
:
:




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.