Recent

Author Topic: Delphi EXE & FreePascal DLL  (Read 5916 times)

christian1987

  • New Member
  • *
  • Posts: 30
Delphi EXE & FreePascal DLL
« on: October 24, 2015, 08:09:23 am »
For those with old Delphi version, but want new FreePascal 3 code...

Why not mix in a DLL?

I do this for commercial project, it works nice!

Anyhow, I write a program which create headers for you!

Compile with -Sd switch. Code is public domain.

Usage:
header.exe test.ini

Output:
testHeader.pas
unit testHeader;
{$ifDef fpc}{$mode delphiUnicode}{$endIf}
interface
type TEnum=procedure(_1:integer);
procedure Enum(_1:PWideChar;_2:TEnum);
implementation
{$ifDef fpc}
{$i test.inc}
exports Enum;
{$else}
procedure Enum;external 'test.dll';
{$endIf}
end.

christian1987

  • New Member
  • *
  • Posts: 30
Re: Delphi EXE & FreePascal DLL
« Reply #1 on: October 24, 2015, 08:15:47 am »
Note: to get this working on stable FPC 2, remove the UTF8 BOM from test.ini

This will put you back in ANSI mode....

 

TinyPortal © 2005-2018