"AntonSotov" wrote in message news:qyxvsktbxokfhwebgwdk at forum.dlang.org... > extern (Windows) int EnumWindows(WNDENUMPROC, long); The second argument is LPARAM, which maps to C's long, but D's long maps to C's long long. To be safe, use these aliases whenever possible by using: import core.sys.windows.windows;