|
-
Aug 22nd, 2006, 05:12 PM
#1
Thread Starter
Hyperactive Member
[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:
Public Function Foo() As Boolean
On Error Goto EndofFoo
Dim lb as Boolean
Dim lo as Object
Set lo = CreateObject("Dll.Class")
lb = True
Foo = lb
Exit Function
EndofFoo:
lb = False
Foo = lb
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|