Thema: C++ -> Delphi

Einzelnen Beitrag anzeigen

NicoDE
(Gast)

n/a Beiträge
 
#3

Re: C++ -> Delphi

  Alt 22. Jun 2005, 12:28
Zitat von Pseudemys Nelsoni:
da es sich wohl doch nicht um einen Pointer aufd eine Funktion handelt(?) ist das exportierte bereits die Funktion und daher keine(?) Variable.
Exportierte Funktions-Variable:
Delphi-Quellcode:
library Foo;

uses
  Windows;

type
  PLoadInfo = ^TLoadInfo;
  TLoadInfo = record
    mVersion: DWORD;
    mHwnd : HWND;
    mKeep : BOOL;
  end;

procedure _LoadDll(var LoadInfo: TLoadInfo); stdcall;
begin
  LoadInfo.mKeep = True;
end;

type
  TFNLoadDll = procedure(var LoadInfo: TLoadInfo); stdcall;

var
  LoadDll: TFNLoadDll = TFNLoadDll(_LoadDll);

exports
  LoadDll;

begin
  LoadDll := _LoadDll;
end.
Exportierte Funktion:
Delphi-Quellcode:
library Foo;

uses
  Windows;

type
  PLoadInfo = ^TLoadInfo;
  TLoadInfo = record
    mVersion: DWORD;
    mHwnd : HWND;
    mKeep : BOOL;
  end;

procedure LoadDll(var LoadInfo: TLoadInfo); stdcall;
begin
  LoadInfo.mKeep = True;
end;

exports
  LoadDll;

begin
end.
Ich gehe davon aus, dass mIRC letzteres erwartet.
  Mit Zitat antworten Zitat