M
Mike H
I can't seem to figure out the right thing to search on, so I thought
I'd just provide an example and see if someone can point me to some
tips.
What I have is an Automation Server that has a method that will start
another automation server. These Activex automation servers that it
talks to require a specific interface that the calling server uses to
manage the child active x automation servers. This is all part of an
application architecture that is unchangable, thus I need to work
within the constraints.
Here is an pseudo example with VB6 (the apps native language)
The object manager requires an interface on each called object that
looks like:
Option Explicit
Public obObjMgr as Object
Public Function InitializeObject(byval ObjMgr as Object)
set obObjMgr = ObjMgr
end function
Then this allows our app to do something like:
procedure cmdPopCustomer(custid as string)
dim CustForm as Object
set CustForm = obObjMgr.LaunchChild(custProj.clsCustMaint)
CustForm.LoadCust(custid)
end sub
I can get a C# app to expose the interface so the Object Manager can
launch it. But I am not sure how to go about consuming the reference
to the object manager, or for that part, any object that might be
returned by calling a ActiveX objects methods.
Any help is appreciated.
In VB 6, this is how it works:
The EXE is loaded into memory and is the main "object manager". It
launches any other ActiveX server keeping track of a reference to each
activex object it launches. As part of the interface, it also passes
a reference to itself to the launched app, so that the launched app
has access to some system services. One of these system services is
requesting another Active X object to be launched.
So say I am an invoice screen and I right click on the Customer name,
options come up including customer maintenance. I can click on that
and the customer maintenance form will open and populate with the
customer id matching the invoice I was looking at.
This is done by the Invoice screen having an object that contains a
reference to the object manager. To pop the cust maintenance form we
dim oChildForm as object
set oChildForm = objMgr.GetChild(MaintCustProj.clsMaintCust)
oChildForm.NavigateTo(this.CustID)
I'd just provide an example and see if someone can point me to some
tips.
What I have is an Automation Server that has a method that will start
another automation server. These Activex automation servers that it
talks to require a specific interface that the calling server uses to
manage the child active x automation servers. This is all part of an
application architecture that is unchangable, thus I need to work
within the constraints.
Here is an pseudo example with VB6 (the apps native language)
The object manager requires an interface on each called object that
looks like:
Option Explicit
Public obObjMgr as Object
Public Function InitializeObject(byval ObjMgr as Object)
set obObjMgr = ObjMgr
end function
Then this allows our app to do something like:
procedure cmdPopCustomer(custid as string)
dim CustForm as Object
set CustForm = obObjMgr.LaunchChild(custProj.clsCustMaint)
CustForm.LoadCust(custid)
end sub
I can get a C# app to expose the interface so the Object Manager can
launch it. But I am not sure how to go about consuming the reference
to the object manager, or for that part, any object that might be
returned by calling a ActiveX objects methods.
Any help is appreciated.
In VB 6, this is how it works:
The EXE is loaded into memory and is the main "object manager". It
launches any other ActiveX server keeping track of a reference to each
activex object it launches. As part of the interface, it also passes
a reference to itself to the launched app, so that the launched app
has access to some system services. One of these system services is
requesting another Active X object to be launched.
So say I am an invoice screen and I right click on the Customer name,
options come up including customer maintenance. I can click on that
and the customer maintenance form will open and populate with the
customer id matching the invoice I was looking at.
This is done by the Invoice screen having an object that contains a
reference to the object manager. To pop the cust maintenance form we
dim oChildForm as object
set oChildForm = objMgr.GetChild(MaintCustProj.clsMaintCust)
oChildForm.NavigateTo(this.CustID)