S
Sanat
I was working with loading .Net Assemblies through reflection to get
the list of all the classes along with their Methods and Properties
from any given module.
I am using native .Net method Assembly.LoadFrom(assemblyPathName) to
open msvcm80.dll (Managed VC runtime library file) and I am getting an
exception thrown that states A dynamic link library (DLL)
initialization routine failed. (Exception from HRESULT: 0x8007045A)
Here is the detailed exception information:
-----------------------------------------
Error : 10/31/2007 2:49:24 PM : FileReaderFactory.ExecuteReader(D:\Test
\File\msvcm80.dll)
Error Message : A dynamic link library (DLL) initialization routine
failed. (Exception from HRESULT: 0x8007045A)
System.IO.FileLoadException: A dynamic link library (DLL)
initialization routine failed. (Exception from HRESULT: 0x8007045A)
at System.Reflection.Assembly._nLoad(AssemblyName fileName, String
codeBase, Evidence assemblySecurity, Assembly locationHint,
StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean
forIntrospection)
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String
codeBase, Evidence assemblySecurity, Assembly locationHint,
StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean
forIntrospection)
at System.Reflection.Assembly.InternalLoad(AssemblyName
assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark,
Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoadFrom(String assemblyFile,
Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm
hashAlgorithm, Boolean forIntrospection, StackCrawlMark& stackMark)
at System.Reflection.Assembly.LoadFrom(String assemblyFile)
at
MS.BGIT.Policheck.BL.ObjectRead.DotNetAssemblyReader.WriteDataInXML()
in D:\VSTFProjects\Policheck\Development\MS.BGIT.Policheck
\MS.BGIT.Policheck.BL.ObjectRead\FileReader
\DotNetAssemblyReader.cs:line 116
at
MS.BGIT.Policheck.BL.ObjectRead.DotNetAssemblyReader..ctor(String
absoluteFilePath, String workingDir) in D:\VSTFProjects\Policheck
\Development\MS.BGIT.Policheck\MS.BGIT.Policheck.BL.ObjectRead
\FileReader\DotNetAssemblyReader.cs:line 29
at
MS.BGIT.Policheck.BL.ObjectRead.FileReaderFactory.ExecuteReader(String
absoluteFilePath, String workingDirectory, Boolean isSrcComment,
FileReaderStatus& fileReaderStatus) in D:\VSTFProjects\Policheck
\Development\MS.BGIT.Policheck\MS.BGIT.Policheck.BL.ObjectRead
\FileReader\FileReaderFactory.cs:line 268
------------------------------------------------------------
Can anybody tell how can we load msvcm80.dll file to extract its class
and method information using .NET reflection.
Thanks!
Sanat Tiwari
the list of all the classes along with their Methods and Properties
from any given module.
I am using native .Net method Assembly.LoadFrom(assemblyPathName) to
open msvcm80.dll (Managed VC runtime library file) and I am getting an
exception thrown that states A dynamic link library (DLL)
initialization routine failed. (Exception from HRESULT: 0x8007045A)
Here is the detailed exception information:
-----------------------------------------
Error : 10/31/2007 2:49:24 PM : FileReaderFactory.ExecuteReader(D:\Test
\File\msvcm80.dll)
Error Message : A dynamic link library (DLL) initialization routine
failed. (Exception from HRESULT: 0x8007045A)
System.IO.FileLoadException: A dynamic link library (DLL)
initialization routine failed. (Exception from HRESULT: 0x8007045A)
at System.Reflection.Assembly._nLoad(AssemblyName fileName, String
codeBase, Evidence assemblySecurity, Assembly locationHint,
StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean
forIntrospection)
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String
codeBase, Evidence assemblySecurity, Assembly locationHint,
StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean
forIntrospection)
at System.Reflection.Assembly.InternalLoad(AssemblyName
assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark,
Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoadFrom(String assemblyFile,
Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm
hashAlgorithm, Boolean forIntrospection, StackCrawlMark& stackMark)
at System.Reflection.Assembly.LoadFrom(String assemblyFile)
at
MS.BGIT.Policheck.BL.ObjectRead.DotNetAssemblyReader.WriteDataInXML()
in D:\VSTFProjects\Policheck\Development\MS.BGIT.Policheck
\MS.BGIT.Policheck.BL.ObjectRead\FileReader
\DotNetAssemblyReader.cs:line 116
at
MS.BGIT.Policheck.BL.ObjectRead.DotNetAssemblyReader..ctor(String
absoluteFilePath, String workingDir) in D:\VSTFProjects\Policheck
\Development\MS.BGIT.Policheck\MS.BGIT.Policheck.BL.ObjectRead
\FileReader\DotNetAssemblyReader.cs:line 29
at
MS.BGIT.Policheck.BL.ObjectRead.FileReaderFactory.ExecuteReader(String
absoluteFilePath, String workingDirectory, Boolean isSrcComment,
FileReaderStatus& fileReaderStatus) in D:\VSTFProjects\Policheck
\Development\MS.BGIT.Policheck\MS.BGIT.Policheck.BL.ObjectRead
\FileReader\FileReaderFactory.cs:line 268
------------------------------------------------------------
Can anybody tell how can we load msvcm80.dll file to extract its class
and method information using .NET reflection.
Thanks!
Sanat Tiwari