Results 1 to 6 of 6

Thread: Check if .dll exists (non-path specific)

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2002
    Location
    Someplace 'ore the rainbow
    Posts
    392

    Check if .dll exists (non-path specific)

    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
    When your answer is the Arc Sin of 1.015, you should check your Pythagorean triple.

  2. #2
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Check if .dll exists (non-path specific)

    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
    you could try to late bind an object to the DLL and catch the error like
    VB Code:
    1. Public Function IsDllRegistered()
    2. On Error Goto EH:
    3.     Dim MyObject as Object
    4.     Set MyObject = CreateObject("MyDll.MyClass")
    5.     Set MyObject = Nothing
    6.     IsDllRegistered = True
    7.     Exit Function
    8. EH:
    9.     IsDllRegistered = False
    10. End Function

    of course depending on what exatcly you are looking to do, this may or may not suit your needs

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2002
    Location
    Someplace 'ore the rainbow
    Posts
    392
    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
    When your answer is the Arc Sin of 1.015, you should check your Pythagorean triple.

  4. #4
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373
    how come? TTS is freely distributable, you can include it in your app

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2002
    Location
    Someplace 'ore the rainbow
    Posts
    392
    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
    When your answer is the Arc Sin of 1.015, you should check your Pythagorean triple.

  6. #6
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373
    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
    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 check

    substitute
    CreateObject("MyDll.MyClass")
    for whatever the object and class are for TTS
    CreateObject("MSTTS.Engine") 'whatever the TTS object really is

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width