this code is in a .cpp file //funcs.lib //windows includes... HWND hwnd; int setHWND(HWND extHwnd){ hwnd = extHwnd; return 0; } So im trying to import from D like this. I dont think I can implement this line in C++ extern (C++) {}