Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating a VFP component with MTS
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Creating a VFP component with MTS
Divers
Thread ID:
00173501
Message ID:
00173501
Vues:
108
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
Fil
Voir

Click here to load this message in the networking platform