function pointer from DLL

Andrej Mitrovic andrej.mitrovich at
Fri Jan 13 21:17:20 PST 2012

Your problem was that you didn't cast the function pointer to an
extern(C) function. Unfortunately you can't do this inline (I can't
tell if this will be fixed or not), so you have to use an alias as a

alias extern (C) int function(void*,int,int,int) SciFnDirect;
fn = cast(SciFnDirect)SendMessage(
       hwndScintilla, SCI_GETDIRECTFUNCTION, 0, 0);

More information about the Digitalmars-d-learn mailing list