Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating a VFP component with MTS
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Creating a VFP component with MTS
Miscellaneous
Thread ID:
00173501
Message ID:
00173501
Views:
106
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
Next
Reply
Map
View

Click here to load this message in the networking platform