Ezi
Ezi

Reputation: 2210

Import C++ Callback function to delphi

This is the C++ header for this function. I imported everything already except for that calllback I don't know how to do it.

struct abs_operation;

typedef struct abs_operation ABS_OPERATION;  /* forward declaration */

typedef void (BSAPI  *ABS_CALLBACK) ( const ABS_OPERATION*, ABS_DWORD, void*);

struct abs_operation {
        ABS_CALLBACK Callback;  ///< Pointer to application-defined function, implementing operation callback.
} ;

Upvotes: 0

Views: 445

Answers (1)

David Heffernan
David Heffernan

Reputation: 613562

Based on knowledge of your previous questions, it's like this, I think:

type
  PABSOperation = ^TABSOperation;
  TABSCallback = procedure(const Operation: PABSOperation;
     Flags: DWORD; Ptr: Pointer); stdcall;
  TABSOperation = record
     Callback: TABSCallback;
  end;

Upvotes: 1

Related Questions