To the main page...The list of my products...Some texts...Sample applications, tips, tricks...If you need support...
 

 
Secret Center Usage
Step 1. Creating of Secret Center application

With this step we shall create a small application to illustrate work of Windows NT secret storage and TsvSecretCenter component that encapsulates corresponding API and simplifies it`s usage. You can download this sample application from here (zip, 4Kb).

Create new Delphi application. Place the following components on the form: two edits, two buttons, two labels and TsvSecretCenter component. Set component names and captions as shown below.

Add OnClick handlers for both buttons. The ButtonRead.OnClick handler should look like this:



 
 
 
 
 

procedure TForm1.ButtonReadClick(Sender: TObject);
begin
     SecretCenter.SecretName:=EdName.Text;
     SecretCenter.Read;
     EdValue.Text:=SecretCenter.SecretValue;
end;

Well, now add the ButtonWrite.OnClick handler. It should look like shown below



 
 
 
 
 

procedure TForm1.ButtonReadClick(Sender: TObject);
begin
     SecretCenter.SecretName:=EdName.Text;
     SecretCenter.SecretValue:=EdValue.Text;
     SecretCenter.Write;
end;

Save changes and compile our application. Now it is ready for tests. As you see the SecretCenter usage is simple enough. Let's continue.

<< | Index | Step 1 | Step 2 | >>
Add your comment | Read comments


 
© 1998-2001 Alexey Dynnikov
My ICQ # is 18267212