Re: How to programmatically tell if a DLL is present?
- From: "Ken Halter" <Ken_Halter@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 24 Jan 2007 12:29:29 -0800
"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.
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
--
Ken Halter - MS-MVP-VB - Please keep all discussions in the groups..
In Loving Memory - http://www.vbsight.com/Remembrance.htm
.
- Follow-Ups:
- Re: How to programmatically tell if a DLL is present?
- From: Alfie [UK]
- Re: How to programmatically tell if a DLL is present?
- 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]
- How to programmatically tell if a DLL is present?
- Prev by Date: VB integration with vss 2005?
- Next by Date: Re: VB integration with vss 2005?
- 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
|