Problem with DCom object sharing in Windows 2003 Server (clustered)

By ma.charron
Feb 15, 2005
  1. 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
  2. ma.charron

    ma.charron TS Rookie Topic Starter

    Finaly found out what was going on!

    Nothing to do with security!

    One of our many setup ended up copying Microsoft DLL in its own directory on a cluster drive (MSVBVM60.DLL).

    MSVBVM60.DLL is the DLL that support the VB collection

    My app when running did not have access to that cluster drive (it on the other node).

    I simply reregistered the one in Windows\system32 directory.

    All is well now!

    Now if I can only find the person responsible....
Topic Status:
Not open for further replies.

Similar Topics

Add your comment to this article

You need to be a member to leave a comment. Join thousands of tech enthusiasts and participate.
TechSpot Account You may also...