*snip*
>Alex (and Larry too),
>
>There's a number of ways to check to see if the user has blown away the application. For example, you could check the registry for the application, get the CLSID and then use that to find the LocalServer. Additionally, you could use FindExectutable() in Shell32 and then check for the presence of the file returned. This is just a personaly prefence. I hate having to rely on the error handler to check the validity of these things.
It is a matter of personal preference. To go through the process of finding the registry entry by ProgID, get the CLSID, locate the appropriate registry key for that, retrieving the InProcServer and checking its existence seems "above and beyond" to me. Of course, if you already have a function (or class method) that does this, it's no big deal. ;-) I haven't invested the time to create one, so using an ON ERROR wrapper for createobject() is much easier.
I still think you need to trap for an error because the same "eager beaver" we were discussing earlier could have deleted or moved the support/dependency files (e.g. VFP runtime files). This would also cause the COM server to fail but the registry check would pass.
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao