> has anyone called a exported C function in a dll that receives a function
> pointer as a parameter.
> 
> For example the C typedef is:
> 
> typedef int (* lpfMyFunction)(int);
> 
> what should I do to pass that in as a parameter?

I'm not sure which calling convention is used (stdcall, etc) but the pascal equivelent
of the typedef is (assuming the C was compiled for 32bit ints)

type
    TMyFunction = function(i :Integer):Integer;

so if you had a function

function X(i :Integer):Integer;


you could pass

DllMethod(@X);

--
Aaron@home


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to