I have an ActiveX component which can be compiled as an EXE or a DLL. I would like the code to run slightly differently in the two cases. Is there a property somewhere I can check to determine the mode at run time? I know I can set compiler flags, but would like a neater solution.