Windows Scripting
  Home arrow Windows Scripting arrow Page 4 - Working with the Windows Registry in C++
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
WINDOWS SCRIPTING

Working with the Windows Registry in C++
By: Barzan "Tony" Antal
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 14
    2008-04-02

    Table of Contents:
  • Working with the Windows Registry in C++
  • Basic Registry Functions
  • More Registry Stuff
  • Final Words

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Working with the Windows Registry in C++ - Final Words


    (Page 4 of 4 )

    That’s all – we’ve arrived at the end of this tutorial. We have explored the ways we can manage and work with the Windows Registry without additional libraries, relying totally on the built-in functions. We have included examples and code snippets to describe their correct usage.

    Then as we became more and more familiar with working with the registry in C++, we also created a recursive enumeration method and a dumping function. You can use the latter to export hives or parts of your registry to a file. Later on, you can also import them, of course. However, this required us to look into and endeavor into the somewhat dark world of special privileges and find a means of implementation.

    On the previous page you could also download the source of the project we coded during this tutorial if you experienced some difficulty in following along. Check out the screenshot below to see its output in a command prompt – that’s what it did for me (under a non-Vista platform).

    Please do understand that this tutorial mainly targets the beginner or intermediate programmer-- generally C++ coders that are familiar with the syntax of language but haven’t had the chance to work with the registry yet. Therefore, I started almost from the beginning but leaped ahead assuming that the reader is able to follow along. It doesn’t target the pros.

    The registry is, as I said, a very critical part of Windows. It acts like a huge database storing configuration data about applications and lots of additional information such as group policies, associates, and such. Whether you are designing a stand-alone application that works on Windows or just writing a simple script for administrative purposes, you can bet that working with the registry could make your job easier.

    If you still have unanswered questions or are facing some programming issues then don’t hesitate to join our community at “DevHardware Forums” or any other forums in the Shed network that specialize in coding such as the “DevShed Forums.” Our communities are friendly and we’re doing our best to help. See you there.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

       · Thanks for reading this article tutorial. I hope you've found it...
       · This article has a serious bug!Before calling RegEnumKeyEx, dwSize must be...
     

    WINDOWS SCRIPTING ARTICLES

    - More Windows Scripting Workarounds from Nilpo
    - Overloading Methods and More in VBScript
    - Improving MFC for Windows Vista
    - Regular Expressions in VBScript
    - Working with Dates in WMI
    - Completing Calendars with VBScript Date Func...
    - Building Calendars with VBScript Date Functi...
    - Working With Dates and Times in VBScript
    - Designing WCF DataContract Classes Using the...
    - Understanding Dates and Times in VBScript
    - Working With Arrays in VBScript
    - Compressed Folders in WSH
    - Using .NET Interops in VBScript
    - Nilpo`s Scripting Secrets, Vol I
    - Database operations using Silverlight 2.0 WC...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
    Stay green...Green IT