ICustomFactory -
11-14-2005
, 05:09 AM
hi,
I developed a .NET class and provided all the necessary attributes to build
my own COM Callable Wrapper. I can now successfully instantiate this (.NET)
class from vb6 and even VBScript.
Reading further in the .NET-framework-specs, I see an interface
'ICustomFactory', (System.Runtime.InteropServices) with which I can even get
more control over the instance-creation/activation-scenario's.
'Enables users to write activation code for managed objects that extend
MarshalByRefObject.
You can enable custom activation by providing a proxy class that implements
ICustomFactory and attributing the MarshalByRefObject class with the
ProxyAttribute. When the class is activated, the proxy's CreateInstance
method is called by the common language runtime to activate the class.'
Until now I have had no success... I enabled tracing on classes (and
methods), but no sign of being called by the framework, when I instantiate my
CCW from VB6.
Is there somewhere a working example?
tanx |