Einzelnen Beitrag anzeigen

Susanne

Registriert seit: 21. Mai 2004
Ort: Lage
232 Beiträge
 
Delphi 2005 Professional
 
#3

Re: Variablenübergabe C-Programm an Delphi dll - Probleme

  Alt 23. Jan 2007, 15:17
folgend ist die delphi-dll, die letztendlich erst mal nur die ihr übergebenen Werte anzeigen soll.

Delphi-Quellcode:
library notiz;

uses
  SysUtils,
  Classes,
  ComObj,
  ActiveX,
  StdVcl,
  Windows,
  Messages,
  Variants,
  Graphics,
  Controls,
  Forms,
  Dialogs,
  StdCtrls,
  ExtCtrls,
  uLogFile;

{$R *.res}

function anhaengen(docID, dbID, text: PChar): Integer; cdecl;
var
  LogFile : TLogFile;
  LogName : String;
begin
  Result:= 0;
  CoInitialize(nil);
  Result:= 100;
  LogFile:= TLogFile.Create;
  LogName:= ExtractFilePath(Application.ExeName)+'NotizAnhaengen.log';
  LogFile.LogInfo('---NotizAnhaengen gestartet ---------------', LogName, 0, 0);
  LogFile.LogInfo('docid, dbid, notiz: '+ trim(docid)+','+ trim(dbid) +','+trim(text), LogName, 0, 0);
  LogFile.LogInfo('Result: '+ inttostr(Result), LogName, 0, 0);
  exit;
end;


exports
  anhaengen;

begin
end.
Susanne
  Mit Zitat antworten Zitat