Re: How to programmatically tell if a DLL is present?
- From: "Karl E. Peterson" <karl@xxxxxxxx>
- Date: Wed, 24 Jan 2007 12:46:51 -0800
briana <briana@xxxxxxx> wrote:
Somewhere, I remember seeing a program that would detect whether a DLL
was present through late binding and it would let the program continue
to run, but ignore the optional features.
This was in VB6, so it has dropped off the radar of most search
engines.
Anyone have some code that demonstrates this?
This is the routine I use:
Public Function CheckLibrary(ByVal ProgID As String) As Boolean
Dim obj As Object
' Used to insure we have a DLL (the engine).
On Error Resume Next
Set obj = CreateObject(ProgID)
CheckLibrary = Not (obj Is Nothing)
Err.Clear
End Function
Just pass it any creatable ProgID string ("library.object") from the library in
question.
--
..NET: It's About Trust!
http://vfred.mvps.org
.
- Follow-Ups:
- References:
- How to programmatically tell if a DLL is present?
- From: briana
- How to programmatically tell if a DLL is present?
- Prev by Date: Re: VB integration with vss 2005?
- Next by Date: Re: How to programmatically tell if a DLL is present?
- 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
|
Loading