Here is a problem about 2 VB activex exe sharing a collection
I got Program_A.exe (VC++ exe) that create a COM object that reside in Program_B.exe (VB ActiveX Exe). Wich in turn will create another COM object that reside in Program_C (VB ActiveX Exe)
Object B passes a reference to a collection to Object C.
Now when Object B add an item to collection, Object C will see it.
This work well in Win2k Server, NT4...
My problem is on some Windows 2003 Server (Clustered environment), The Items added in Object B are not reflected in Object C
I said some because in our labs it works, but I client site it does NOT!
Anyone would know why?
My suspision is that they may have a DCOM Configuration that would prevent sharing of objects (What config?).
We did have previous problem of not being able to set DCOM identity for other object before because MSTC was not configured!
More Information
All 3 Exe runs on same computer node at a time
Found out that the call to Initialize bellow generate
Error 48: Error in loading DLL!! (This only at client site)
I did a test by calling another function with an integer as parameter with no error!
Here is piece of code of 3 applications
(I will program mini objects reproducing problem):
'Program_A: (VC++ 6.0 EXE service)
HRESULT hResult = CoCreateInstance(CLSID_OBJECT_TYPE_B, NULL,
CLSCTX_ALL, IID_IOBJECTTYPEB, (void**)&GpIObjectTypeB);
GpIObjectTypeB will call Form_Activate
-------------------------------------------------------
'Program_B: (VB 6 ActiveX EXE)
Global gcolMyCollection As New Collection 'Collection that I want to share
Private Sub Form_Activate()
: : :
Set mobjObjC = CreateObject("MyCompany.ObjectTypeC")
mobjObjC.Initialize gcolMyCollection This generate error 48: Error in loading DLL
: : :
-------------------------------------------------------
'Program_C: (VB 6 ActiveX EXE)
Global gcollection As New Collection 'wich will be reference to the one in Program_B
Public Sub Initialize(pCol As Collection)
Set gcollection = pCol ' Now Object C point to Object B's collection
Hope it clear enough!
Any help will be appreciated
I got Program_A.exe (VC++ exe) that create a COM object that reside in Program_B.exe (VB ActiveX Exe). Wich in turn will create another COM object that reside in Program_C (VB ActiveX Exe)
Object B passes a reference to a collection to Object C.
Now when Object B add an item to collection, Object C will see it.
This work well in Win2k Server, NT4...
My problem is on some Windows 2003 Server (Clustered environment), The Items added in Object B are not reflected in Object C
I said some because in our labs it works, but I client site it does NOT!
Anyone would know why?
My suspision is that they may have a DCOM Configuration that would prevent sharing of objects (What config?).
We did have previous problem of not being able to set DCOM identity for other object before because MSTC was not configured!
More Information
All 3 Exe runs on same computer node at a time
Found out that the call to Initialize bellow generate
Error 48: Error in loading DLL!! (This only at client site)
I did a test by calling another function with an integer as parameter with no error!
Here is piece of code of 3 applications
(I will program mini objects reproducing problem):
'Program_A: (VC++ 6.0 EXE service)
HRESULT hResult = CoCreateInstance(CLSID_OBJECT_TYPE_B, NULL,
CLSCTX_ALL, IID_IOBJECTTYPEB, (void**)&GpIObjectTypeB);
GpIObjectTypeB will call Form_Activate
-------------------------------------------------------
'Program_B: (VB 6 ActiveX EXE)
Global gcolMyCollection As New Collection 'Collection that I want to share
Private Sub Form_Activate()
: : :
Set mobjObjC = CreateObject("MyCompany.ObjectTypeC")
mobjObjC.Initialize gcolMyCollection This generate error 48: Error in loading DLL
: : :
-------------------------------------------------------
'Program_C: (VB 6 ActiveX EXE)
Global gcollection As New Collection 'wich will be reference to the one in Program_B
Public Sub Initialize(pCol As Collection)
Set gcollection = pCol ' Now Object C point to Object B's collection
Hope it clear enough!
Any help will be appreciated