Is my dll as .NET assembly?
- From: Ben Reese <BenReese@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 11 May 2005 02:38:04 -0700
Hello friends
I wish to determine at runtime whether a dll file is a .Net asembly or COM.
Sure, I could try and load it into an assembly object and trap the exception
that results
------------------------------------------------------
Dim _Assembly As System.Reflection.Assembly
Try
_Assembly =
System.Reflection.Assembly.LoadFile(MyFileInfo.FullName)
Catch ex As Exception When ex.Message = "An attempt was
made to load a program with an incorrect format."
'not a .NET assembly
End Try
-----------------------------------------------------
But I think there must be a more inteligent way..
Thank you
Ben
.
- Follow-Ups:
- Re: Is my dll as .NET assembly?
- From: Mattias Sjögren
- Re: Is my dll as .NET assembly?
- Prev by Date: RE: managed app using unmanaged dll to access LPT
- Next by Date: Re: Is my dll as .NET assembly?
- Previous by thread: Using Excel through COM interop in ASP.Net--need a little more hel
- Next by thread: Re: Is my dll as .NET assembly?
- Index(es):
Relevant Pages
|