function pointer from DLL

2012-01-13 Thread DNewbie
I've been trying to translate the following from http://www.scintilla.org/Steps.html int (*fn)(void*,int,int,int); void * ptr; int canundo; fn = (int (__cdecl *)(void *,int,int,int))SendMessage( hwndScintilla,SCI_GETDIRECTFUNCTION,0,0); ptr = (void

Re: function pointer from DLL

2012-01-13 Thread Andrej Mitrovic
You can clone this: g...@github.com:AndrejMitrovic/DSciteWin.git Then just run build.bat.

Re: function pointer from DLL

2012-01-13 Thread Andrej Mitrovic
On 1/14/12, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: You can clone this: g...@github.com:AndrejMitrovic/DSciteWin.git Then just run build.bat. Sorry, I've assumed you run git, the http link is: https://github.com/AndrejMitrovic/DSciteWin

Re: function pointer from DLL

2012-01-13 Thread DNewbie
On Sat, Jan 14, 2012, at 06:04 AM, Andrej Mitrovic wrote: On 1/14/12, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: You can clone this: g...@github.com:AndrejMitrovic/DSciteWin.git Then just run build.bat. Sorry, I've assumed you run git, the http link is:

Re: function pointer from DLL

2012-01-13 Thread Andrej Mitrovic
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 workaround: alias extern (C) int function(void*,int,int,int) SciFnDirect; fn =