unit LPT_PORT_NEU;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, Menus;
type
TForm1 =
class(TForm)
GroupBox2: TGroupBox;
Button2: TButton;
Button3: TButton;
Button4: TButton;
Button5: TButton;
Button6: TButton;
MainMenu1: TMainMenu;
Extras1: TMenuItem;
Datenanzeigen1: TMenuItem;
Direckteingabe1: TMenuItem;
Aus1: TMenuItem;
N2MRechts1: TMenuItem;
Aus01: TMenuItem;
Navigatioon1: TMenuItem;
procedure Button2Click(Sender: TObject);
procedure Button6Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure Button5Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Alle1Click(Sender: TObject);
procedure Keine1Click(Sender: TObject);
procedure Datenanzeigen1Click(Sender: TObject);
procedure Direckteingabe1Click(Sender: TObject);
procedure Aus1Click(Sender: TObject);
procedure N2MRechts1Click(Sender: TObject);
procedure Aus01Click(Sender: TObject);
procedure Navigatioon1Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
BasAdr: Integer = $378;
// ComHandle: THandle;
gelesen: Integer;
implementation
uses LPT_PORT_NEU_3, LPT_PORT_NEU_P, TEST;
// Test ist die Unit die herforgerufen werden soll
{$R *.dfm}
procedure Out32 ( Addresse: Integer; Wert: byte );
stdcall;
export;
external '
INPOUT32.DLL';
function Inp32 ( Addresse: Integer ): Byte;
stdcall;
export;
external '
INPOUT32.DLL';
procedure TForm1.Button2Click(Sender: TObject);
begin
Out32 ( BasAdr, 1 + 4);
end;
procedure TForm1.Button6Click(Sender: TObject);
begin
Out32 ( BasAdr, 2 + 8);
end;
procedure TForm1.Button4Click(Sender: TObject);
begin
Out32 ( BasAdr, 1);
end;
procedure TForm1.Button5Click(Sender: TObject);
begin
Out32 ( BasAdr, 4);
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
Out32 ( BasAdr, 0);
end;
procedure TForm1.Alle1Click(Sender: TObject);
begin
Out32 ( BasAdr, 255);
end;
procedure TForm1.Keine1Click(Sender: TObject);
begin
Out32 ( BasAdr, 0);
end;
procedure TForm1.Datenanzeigen1Click(Sender: TObject);
begin
Form2.ShowModal;
end;
procedure TForm1.Direckteingabe1Click(Sender: TObject);
begin
Form3.ShowModal;
end;
procedure TForm1.Aus1Click(Sender: TObject);
begin
Out32 ( BasAdr, 1 + 8);
end;
procedure TForm1.N2MRechts1Click(Sender: TObject);
begin
Out32 ( BasAdr, 2 + 4);
end;
procedure TForm1.Aus01Click(Sender: TObject);
begin
Out32 (BasAdr, 0);
end;
procedure TForm1.Navigatioon1Click(Sender: TObject);
begin
Form4.ShowModal;
// Hier ist der Befehl der die Unit hervorrufen soll
end;
end.