Solved

Read Registry With D1

Posted on 1997-10-14
2
189 Views
Last Modified: 2010-04-04
Reading the registry is simple with Delphi 3.  How do I do
this with Delphi 1?
0
Comment
Question by:jexd99
2 Comments
 

Accepted Solution

by:
AllenC earned 50 total points
ID: 1347592
You can find it in the Win 3.x API help file.

RegCreateKey      Creates a specified key
RegDeleteKey      Deletes a specified key
RegEnumKey      Enumerates the subkeys of a specified key
RegOpenKey      Opens a specified key
RegQueryValue      Retrieves the text string for a specified key
RegSetValue      Associates a text string with a specified key

function RegSetValue(Key: HKey; SubKey: PChar; ValType: Longint; Value: PChar; cb: Longint): Longint;
Remember to include the ShellAPI unit!

Here's an example:
uses ShellAPI;

begin
  if RegSetValue(HKEY_CLASSES_ROOT, '.wav\(Default)', REG_SZ, 'SoundRec', SizeOf('SoundRec')) <> ERROR_SUCCESS then Error;
end.

Good Luck

http://tcp.home.ml.org/
0
 

Author Comment

by:jexd99
ID: 1347593
Thanks Allen! :)

0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

762 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now