Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Edit the Registry Editor with C

Posted on 2003-12-08
14
274 Views
Last Modified: 2010-04-15
Is there any way to modify the Registry Editor with C?  If so, how?  
0
Comment
Question by:People_Code
14 Comments
 
LVL 45

Expert Comment

by:Kent Olsen
ID: 9900344

If you mean can you modify the released version of RegEdit, you probably can't do anything meaningful.

If you mean can you replace regedit with your version, yes.

If you mean can you insert new entries in the registry and modify the data values of existing entries, yes.  There are a number of free libraries that you can use.  Most C++ libraries have the functionality built into them.  Libraries intended for C are harder to find.


Kent
0
 

Author Comment

by:People_Code
ID: 9900411
Well, I just want to edit the data in a Key.  I would also like to know how to add, and delete regedit keys.

Thanks

Tyler
0
 
LVL 45

Expert Comment

by:Kent Olsen
ID: 9900548

Hi People_Code,

Is your C compiler 'just' a C compiler or does it also support C++?

Kent
0
ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

 

Author Comment

by:People_Code
ID: 9900590
Yes, it does support C++.
0
 
LVL 45

Expert Comment

by:Kent Olsen
ID: 9901024

If your using MFC, Visual C++, Borland C++, Borland C++ Builder, or any of several others, there are built-in classes for editing the registry.

If you want to build your own, you can get a good start with source code at:

http://www.codearchive.com/list.php?go=0218


Good Luck,
Kent
0
 
LVL 5

Expert Comment

by:migoEX
ID: 9902289
You can also use Win API:
   RegCreateKeyEx
   RegQueryValueEx
   etc.
   (see the list in the MSDN)

Those functions don't require C++, you can use them from any pure C program.
0
 
LVL 45

Expert Comment

by:Kent Olsen
ID: 9903549

Hi migo,

I didn't know that MS provided registry maintenance APIs in their base C libraries.  Cool.

Kent
0
 
LVL 2

Expert Comment

by:timbauer
ID: 9948122
migoEX is right,
The Win API is a pure C interface.

This is the set of Registry functions they offer.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/registry_functions.asp

This is a broader list of all the other operating system calls.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winprog/winprog/functions_by_category.asp
0
 

Author Comment

by:People_Code
ID: 10871455
Sorry, but I found that none of the answers posted worked.

Tyler
0
 

Author Comment

by:People_Code
ID: 10873752
Look man, chill out.  I didn't know that we had to "clean up" our questions ourselves.  And I tried to use the API code, and the program wouldn't compile when I put the code in.  Yes, I did sit here in silence letting the question fester, but I assumed that I could wait till I found an answer that worked.  Guess not.  Sorry I'm not an "expert" like you.

Tyler
0
 
LVL 1

Accepted Solution

by:
GhostMod earned 0 total points
ID: 11021896
PAQed - no points refunded (of 50)

GhostMod
Community Support Moderator
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Detect CR LF to each line 12 169
Can case within switch statement specify range of values ? 3 87
Super Scope, DHCP 5 91
How to learn Linux? 10 66
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

791 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question