Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
AddObject in COM dll
Message
De
28/08/2004 06:29:47
Darren Woodford
Woodford Computer Systems Ltd
Rhyl, Royaume Uni
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
AddObject in COM dll
Divers
Thread ID:
00937278
Message ID:
00937278
Vues:
34
Why can't COM client applications access objects added to containers in my COM .DLL using AddObject() method?

Eg. compile the following prg add into a project and and build COM DLL
Define Class TopLevel As Custom OLEPublic

  Function TestMethod
    This.AddObject("Test","ChildClass")
  EndFunc

EndDefine

Define Class ChildClass As Custom OLEPublic

EndDefine
Attempting to access this child object gives an error.
Eg.
loCOMServer = CreateObject("ComServer.TopLevel")
loCOMServer.TestMethod()
loCOMServer.Test    && Gives error
From searching google groups this seems to be because there is not an interface defined for the child object. However I thought as the COM .DLL created by VFP uses IDispatch (is this the same as late-binding?) rather than the TLB this wouldn't matter.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform