So irgendwie ghets immer noch nicht... irgendwie bin ich zu doof für die gnaze aktion oder es ist wirlioch noch irgendwo nen fehler drin. So muss es doch gehen aber warum sagt er mir bei GetProcAdress das es ein undefinierter Bezeichner ist? also mir fällt da jetzt garnichts mehr ein..habe davon die anse bald voll
das muss doch irgendwie gehen.
Delphi-Quellcode:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 =
class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
type TPortOut =
procedure(Port:Word;Data:Byte);
stdcall;
var PortOut: TPortOut =
nil;
AHandle: THandle = 0;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
begin
AHandle := LoadLibrary('
io.dll');
if AHandle <> 0
then begin
PortOut := GetProcAdress(AHandle, '
PortOut');
if PortOut <>
nil then
PortOut($378,255);
end;
FreeLibrary(AHandle);
end;
end;
end.
Alles ist relativ..