Reg Methods

This is a discussion on Reg Methods within the Windows Programming forums, part of the Platform Specific Boards category; Hi, ive explored the MSDN and i don't quite seem to understand how it explains to write, read or delete ...

  1. #1
    Registered User
    Join Date
    May 2008
    Posts
    18

    Reg Methods

    Hi, ive explored the MSDN and i don't quite seem to understand how it explains to write, read or delete reg entries. Could someone provide a simple explanation if at all possible on how to effectively use these methods? I'm mainly interested in HKCU. Thank you.

  2. #2
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,556
    It's not that difficult.
    Step 1: Start with RegOpenKeyEx. Pass HKEY_CURRENT_USER as first argument. The second argument is a C-string to the key in the registry you want to open. Third argument should be 0. Fourth argument depends on what you want to do. Typically you want KEY_READ to read something from the registry or KEY_WRITE if you want to write something to the registry. Final argument is a pointer to a HKEY variable, which will contain the information about the opened key.
    Step 2: RegQueryValueEx (read) or RegSetValueEx (write) or RegDeleteKey, RegDeleteTree, RegDeleteValue (all delete).
    Step 3: Close key with RegCloseKey.

    Study the documentation a little more, and look up those functions and should get the hang of it.
    Last edited by Elysia; 05-29-2008 at 12:46 PM.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #3
    Registered User
    Join Date
    Apr 2008
    Posts
    890
    Check in the Windows forum...

  4. #4
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,662
    Oh... registry methods, not regular expression methods.

    *Moved to Windows programming forum*
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Generalising methods to handle multiple weapon types
    By Swarvy in forum Game Programming
    Replies: 2
    Last Post: 05-22-2009, 02:52 AM
  2. Turn Based Stradegy System Methods
    By TylerMoyer in forum Game Programming
    Replies: 2
    Last Post: 07-30-2007, 10:45 PM
  3. Lesson #5 - Methods
    By oval in forum C# Programming
    Replies: 1
    Last Post: 05-04-2006, 03:09 PM
  4. Constructive Feed Back (Java Program)
    By xddxogm3 in forum Tech Board
    Replies: 12
    Last Post: 10-10-2004, 03:41 AM
  5. Replies: 8
    Last Post: 07-27-2003, 01:52 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21