Information générale
Titre:
Creating a VFP component with MTS
I have created an Active-X DLL in VFP and I want to use CreateInstance in the object context. I can create the MTS Context object just fine, but calling GetObjectContext() returns .NULL.
I created a MTS package with my DLL and indicated that it "Support Transactions". In the VFP object's Init event, I have the following code.
Thanks for your help!
*** MTS object
This.oMTS = CREATEOBJECT("MTXAS.APPSERVER.1")
IF NOT TYPE("This.oMTS") == "O" OR ISNULL(This.oMTS)
ERROR "Cannot create object"
ENDIF
*** MTS Context
This.oMTSContext = This.oMTS.GetObjectContext()
IF NOT TYPE("This.oMTSContext") == "O"
This.oMTSContext = .NULL.
ENDIF
*** Error object
IF NOT ISNULL(This.oMTSContext)
This.oError = This.oMTSContext.CreateInstance("wwwShared.Error")
ELSE
***** It always does this! Why?
This.oError = CREATEOBJECT("wwwShared.Error")
ENDIF
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement