Results 1 to 5 of 5

Thread: How to read the registry before .NET

  1. #1
    Join Date
    Jul 2009
    Posts
    77

    How to read the registry before .NET

    It is quite common when developing in Windows to get together to make simple things that does not seems be possible. Read the frequency of the processor, read an item in the registry. But with the mechanism for recovering information on the Internet, the techniques of the past are often replaced, obscured by modern techniques.

    I think these and other simple solutions but necessity .NET 1 2 3 ... etc. Yes, the solution often takes a few lines, but where the lib that comes with it is 40 MB and even in static, that is nag.

    And I wonder how it was time for Windows 95-98 ...

    The question brings me post on the registry. I would like to make a simple code that will be intended as a bootstrap, so I designed the 50-200 KB but will read the registry. And so I just wonder how you would do with Windows 98 to play a key.

  2. #2
    Join Date
    Nov 2005
    Posts
    1,323

    Re: How to read the registry before .NET

    Before .NET was used functions of the Win32 API, written mostly in C, including all click of functions RegXXX

    So to play a key under Windows 98:
    RegOpenKeyEx - to open the key
    RegGetValue - to read
    RegCloseKey - to close the key

  3. #3
    Join Date
    Jul 2009
    Posts
    77

    Re: How to read the registry before .NET

    Thank you very much for your response, I do not know what to look for on MSDN. The MSDN doc: http://msdn.microsoft.com/en-us/libr...8VS.85%29.aspx. Windows XP shows minimum version, I wonder if they update their docs ignoring backward compatibility. You say it was compatible with Windows 98?

  4. #4
    Join Date
    May 2008
    Posts
    2,389

    Re: How to read the registry before .NET

    RegOpenKey, RegGetValue and RegCloseKey existed since Windows 95. RegOpenKeyEx came later. I do not know when exactly, but it works on Windows 98. RegOpenKeyEx function basically opens the specified key.

    Syntax:

    LONG RegOpenKeyEx(
    HKEY hKey,
    LPCWSTR lpSubKey,
    DWORD ulOptions,
    REGSAM samDesired,
    PHKEY phkResult
    );

  5. #5
    taiphanmem Guest

    Re: How to read the registry before .NET


Similar Threads

  1. Replies: 6
    Last Post: 19-04-2012, 07:37 PM
  2. Using vb/java scripts how to read registry
    By Vaibhav S in forum Software Development
    Replies: 3
    Last Post: 07-02-2009, 08:47 PM
  3. Replies: 2
    Last Post: 27-09-2008, 05:02 PM
  4. Replies: 3
    Last Post: 18-07-2008, 12:09 PM
  5. Replies: 3
    Last Post: 16-01-2008, 10:33 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,493,896.60874 seconds with 16 queries