I'm wondering if its possible to detect if a DLL is registered, or in a directory where it would be found (System, System32, Windows, etc.)
cjqp
Printable View
I'm wondering if its possible to detect if a DLL is registered, or in a directory where it would be found (System, System32, Windows, etc.)
cjqp
you could try to late bind an object to the DLL and catch the error likeQuote:
Originally posted by cjqp
I'm wondering if its possible to detect if a DLL is registered, or in a directory where it would be found (System, System32, Windows, etc.)
cjqp
VB Code:
Public Function IsDllRegistered() On Error Goto EH: Dim MyObject as Object Set MyObject = CreateObject("MyDll.MyClass") Set MyObject = Nothing IsDllRegistered = True Exit Function EH: IsDllRegistered = False End Function
of course depending on what exatcly you are looking to do, this may or may not suit your needs
What I'm trying to do is have microsoft's TTS engine in my program, but not require the user to install it. I want to have it automatically disabled if the engine isn't installed.
cjqp
how come? TTS is freely distributable, you can include it in your app
Yeah, but this is more of a school assignment, this is a quick-impress-the-teacher type thing. I don't want to force its install.
cjqp
well I am not sure what object you would create for TTS I dont have it installed here at work... but you could probably use my method that I posted above to checkQuote:
Originally posted by cjqp
Yeah, but this is more of a school assignment, this is a quick-impress-the-teacher type thing. I don't want to force its install.
cjqp
substitute
CreateObject("MyDll.MyClass")
for whatever the object and class are for TTS
CreateObject("MSTTS.Engine") 'whatever the TTS object really is