Why don't you write an application instead of a DLL?