I have the following:
//Procedure called when processing
TProcessMessage = procedure(AMsg : PChar) of object;
TExportSessionSettings = record
LogToStdOut : boolean;
ProcessMessage : TProcessMessage;
EMailInfo : TEmailInfo;
ExportInfo : TExportInfo;
SQLServerInfo : TSQLServerInfo;
end;
library NCSQLToPDox;
{snip}
exports Perform_Export;
begin
end.
function DoExport(AExportSettings : TExportSessionSettings; AProcessMessage : TProcessMessage) : boolean;
The DLL can be called from both a command line application as well as a standard delphi windows application. Within the DLL should LogToStdOut be TRUE I have a WriteLn() call to write out logging messages. However as soon as I make the WriteLn call the DLL falls over in a heap. Similairly if LogToStdOut is FALSE and I use the supplied AProcessMessage the DLL also falls in a heap. So - How do I provide a mechanism of providing feedback to the caller of the DLL?
TIA
----------------------------------------------------------------------
Donovan J. Edye [www.edye.wattle.id.au]
Namadgi Systems [www.namsys.com.au]
Voice: +61 2 6285-3460
Fax: +61 2 6285-3459
TVisualBasic = Class(None);
Heard just before the 'Big Bang': "...Uh Oh...."
----------------------------------------------------------------------
GXExplorer [http://www.gxexplorer.org] Freeware Windows Explorer
replacement. Also includes freeware delphi windows explorer components.
----------------------------------------------------------------------