On 20.09.2009 20:11, A Bothe wrote:
Hello guys,
I got a problem with the following code. I can compile it successfully but when I want to 
start it, there is just this "object.AccessVialotion"!
Even GetLastError() returns 0.... so the problem cannot be found in  
wrong-written names...

Thanks in advance!

import std.loader, std.c.windows.windows;

int function(HWND hwnd,char* text,char* title, uint style) tfunc=null;


Try adding "extern (Windows)" before the function pointer declaration. That'll select the stdcall calling convention, which most of the Windows API uses.

Reply via email to