DLL example

Please discuss general Delphi programming topics here.

DLL example

Postby saracoza » July 15th, 2008, 7:15 pm

Hello

The cipher

DLL example
Code: Select all
library cipher;
uses
  Windows,
  Messages,
  SysUtils,
  Variants,
  Classes,
  Graphics,
  Controls,
  Forms,
  Dialogs;

procedure About; stdcall;
  var
number:Integer;
cipher:AnsiString;
button:Boolean;
begin
number:=1;
button:=InputQuery('Please the cipher ','the cipher',cipher);
if button Then
begin
while(cipher<>'1234')do // the cipher
begin
if number>=3 Then
begin
ShowMessage('Three wrong. The programme will be closed ');
Halt;
end
else
begin
button:=InputQuery('Please the cipher','the cipher ',cipher);
inc(number);
end;
end;
end
else
begin
ShowMessage('The programme will be closed');
Halt;
end;
end;
exports
  About name 'About';
begin
end.


and
unit1 example

Code: Select all
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs;

type
  TForm1 = class(TForm)
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;
  procedure About; stdcall external 'cipher.dll' name 'About';
implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
begin
About;
end;

end.


download link;

http://rapidshare.com/files/129954683/DLL.rar.html

the cipher ;
1234
User avatar
saracoza
Active Member
Active Member
 
Posts: 6
Joined: May 12th, 2008, 12:12 pm
Location: Çanakkale/Turkiye

Return to Delphi Programming

Who is online

Users browsing this forum: No registered users and 3 guests

cron