M
Michael M
All,
I have a silly issue that I'd like to handle. I am certain there is a
way to do this, but I can't seem to figure it out...so please help.
I have to VB6 objects that I'm working with:
CController
IHandler
IHandler is a VB6 "inteface" that declares a method (sub) "DoProcess"
CController is your basic object that has a method (sub) "DoHandle".
This DoHandle method expects a parameter of (ByRef) IHandler like so:
public sub DoHandle(ByRef objHandler as IHandler)
Within the DoHandle method in CController, the "DoProcess" method if
the implemented IHandler is called.
My .NET application has 1 class and one form.
the Class, CHandler, successfully implements the IHandler and the
IHandler.DoProcess method.
The form creates an instance of the CControllerClass and an instance
of the new .NET CHandler class. However, I am getting an exception
when I try to do the following in my form:
public sub cmdProcess_Click(...)
dim objController as new CControllerClass()
dim objHandler as new CHandler()
objController.DoHandle(objHandler) <= throws an exception
end sub
When the new CController tries to process the DoHandle method, it
bombs out.
What do I need to do to be able to pass a .NET object that implements
a VB6 interface back to a VB6 Component?
Any assistance will be greatly appreciated.
- MM
I have a silly issue that I'd like to handle. I am certain there is a
way to do this, but I can't seem to figure it out...so please help.
I have to VB6 objects that I'm working with:
CController
IHandler
IHandler is a VB6 "inteface" that declares a method (sub) "DoProcess"
CController is your basic object that has a method (sub) "DoHandle".
This DoHandle method expects a parameter of (ByRef) IHandler like so:
public sub DoHandle(ByRef objHandler as IHandler)
Within the DoHandle method in CController, the "DoProcess" method if
the implemented IHandler is called.
My .NET application has 1 class and one form.
the Class, CHandler, successfully implements the IHandler and the
IHandler.DoProcess method.
The form creates an instance of the CControllerClass and an instance
of the new .NET CHandler class. However, I am getting an exception
when I try to do the following in my form:
public sub cmdProcess_Click(...)
dim objController as new CControllerClass()
dim objHandler as new CHandler()
objController.DoHandle(objHandler) <= throws an exception
end sub
When the new CController tries to process the DoHandle method, it
bombs out.
What do I need to do to be able to pass a .NET object that implements
a VB6 interface back to a VB6 Component?
Any assistance will be greatly appreciated.
- MM