Re: How to programmatically tell if a DLL is present?
- From: "Alfie [UK]" <alfie@xxxxxxxxxxxx>
- Date: Wed, 24 Jan 2007 20:57:04 +0000
On Wed, 24 Jan 2007 12:29:29 -0800, "Ken Halter"
<Ken_Halter@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
"Alfie [UK]" <alfie@xxxxxxxxxxxx> wrote in message
news:av5fr255uh9qotsbqm340s02edrg6m5vs7@xxxxxxxxxx
Not sure if it's the best method but you could just error trap the first
attempt at creating an object from the DLL and set a flag for the rest
of your program to react to.
Rough and ready code;
Public DllFlag as Boolean
On Error Resume Next
Dim MyObject as DllObject
If Err = 0 Then
Dim isn't enough to raise an error. You'll have to actually attempt to
create an instance of one of the classes the DLL exposes. Other than that,
error trapping is a perfect choice.
Cheers Ken, I originally had 'Set MyObject = New DllObject' in there as
well, but deleted it for some reason...my bad !
--
If anyone wants to "get fancy", my ComGuard add-in will create a class that
checks dependencies on everything your app requires to run (the first layer,
anyway)
http://www.vbsight.com/ComGuard.htm
Alfie [UK]
<http://www.delphia.co.uk/>
Hey man, that god complex is showing again.
.
- References:
- How to programmatically tell if a DLL is present?
- From: briana
- Re: How to programmatically tell if a DLL is present?
- From: Alfie [UK]
- Re: How to programmatically tell if a DLL is present?
- From: Ken Halter
- How to programmatically tell if a DLL is present?
- Prev by Date: Re: How to programmatically tell if a DLL is present?
- Next by Date: Deteting memory in subclassed controls
- Previous by thread: Re: How to programmatically tell if a DLL is present?
- Next by thread: Re: How to programmatically tell if a DLL is present?
- Index(es):
Relevant Pages
|