Quote Originally Posted by Delfi
use plain objects or records.
Appers to be same as C++ libs -> delphi,

i was writing irrlang headers to pascal using ""Flattening" the object" model, but i stoped, there are many better libs around already converted to pascal,

i have some doubts,

how can i generate a .lib of a delphi dll ?

i will use type def to define a own type of void type, and pass it on a argument to the exported plain functions of the class?

Thill will work?

Code:
typedef void Psomeclass; 
// i will need more coding to import the functions here, but this is just an example
Psomeclass Psomeclass_create(void)
void Psomeclass_dosomething(void handle)
Code:
type
Psomeclass = ^TsomeClass;
TsomeClass = class
public
procedure dosomething;
constructor create;
end;

constructor Tsomeclass.create;
begin
// CONSTRUCTOR
end;

procedure Tsomeclass.dosomething;
begin
// DO SOMETHING
end;
Code:
function Psomeclass_create: Psomeclass; stdcall;
begin
result := @TSomeclass.create;
end;

procedure Psomeclass_dosomething(handle : Psomeclass); stdcall;
begin
handle.dosomething;
end;

exports
 Psomeclass_dosomething, Psomeclass_create;
~chronozphere:
Yeah im very interested in OO, but i don't know what is interfaces ;p
can you give me more details?


sorry my english :?