i compiled dynamically linked to mfc
and using multi character bytes

u dont have to remove TCHAR because it works with both unicode and multibyte charactersets

u should create an empty win32 dll

copy the code i gave u into the header
Window.h

create an empty Window.cpp
#include "Window.h"

then add a definition file
Window.def

and exports load, unload and window