Hi,
I have been trying for more than 3 days to load an assembly and
execute a method from a specific class. Loading the assembly from the
GAC using it's strong name works fine but when I try to create an
instance of the class, it does'nt work. The call to createInstance
leaves my instance to nothing. I also tried to load the types using
getTypes and the I get an ReflectionLoadTypeExcetion : Unable to load
one or more types in the assembly. (Translated from french). I have
checked the name of my class and exerything seems to be fine but...
Before throwing my computer through the window, I tried to remove the
assembly and and all of its dependencies from the GAC, recompile them
and then put them back in it but nothing have changed.
Here's my code :
friend function getDALController as iDALController
Dim objMyDLL as aReflection.Assembly
dim objDALController as iDALController
'This code works fine
objMyDLL = System.Reflection.Assembly.load(("SuiviRedaction.D ata.AccessDAL,PublicKeyToken=16da4ced9daa2383,Cult ure=Neutral,Version=1.0.0.1")
'This call returns nothing
objDALController =
ctype(objMyDLL.createInstance("SuiviRedaction.Data .AccessDAL.DALController"),true),iDALController)
return objDALController
end function
Does anyone have an idea?
Thanks