GetModuleFileName I think, or something similar (use GetModuleHandle(NULL) to get the current module).