Results 1 to 11 of 11

Thread: [RESOLVED] Detecting OCX Files

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member Fedhax's Avatar
    Join Date
    Aug 2006
    Posts
    293

    Resolved [RESOLVED] Detecting OCX Files

    I'm rather weary about posting this question, but I have spent upwards of a day searching through the forums here and through Google's results. When someone asks "How can I detect what OCX files have been installed on an end user's system?", the answers usually end up along the lines of "Why care? Make an installer, register it, and forget about it." End of discussion.

    Now, this answer is fine for the initial installation, but I want to be able to check for these things every time the application is started. Instead of throwing out an error message--even if it is through my error handling routines--"429: Unable to create object", I'd like to then go through a check list and see which files are causing this 429 error. Maybe a software reinstall will fix it, but for the sake of testing--and for the sake of my testers--I'd like to give something more tangible to bite on especially since my testers are also computer programmers. Heck, if I knew exactly how the error was occuring, maybe I could do some fixes behind the scenes without the end user noticing--unless they look in the log file.

    I've seen code where you try to verify if a DLL is registered:
    VB Code:
    1. Public Function Foo() As Boolean
    2.    On Error Goto EndofFoo
    3.  
    4.    Dim lb  as Boolean
    5.    Dim lo  as Object
    6.  
    7.    Set lo = CreateObject("Dll.Class")
    8.  
    9.    lb = True
    10.    Foo = lb
    11.    Exit Function
    12.  
    13. EndofFoo:
    14.    lb = False
    15.    Foo = lb
    16.  
    17. End Function

    However, if I want to see if they have/need MSFlxGrd.OCX, what would I do to check for it, or is it even possible?
    Last edited by Fedhax; Aug 22nd, 2006 at 05:14 PM. Reason: Minor Corrections

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