Step to reproduce:
1. Create on New VFP Project and call it TestC5
2. Paste The following code in a new program in the new project
Define Class TestC5 As Session OLEPUBLIC
Function Test1()
This.EndTransaction()
Return "Test1"
EndFunc
Function Test2
Return "Test2"
EndFunc
Protected Function EndTransaction()
Local loCom, loContext, loContextState
loCom = CREATEOBJECT( "MTXAS.APPSERVER.1" )
loContext = loCom.GetObjectContext()
loContext.SetComplete()
Store NULL TO loCom, loContext
EndFunc
EndDefine
3. Build as a Multi-Threaded Com server (dll)
4. Open The Component services from the Administrative tools
5. Drill down to: Component Services->Computers->My Computer->COM+ Application
6. Click and then Right-click on COM+ Application And choose New->Application
7. Click Next And Choose "Create An empty application"
8. Enter "Test" As the application name and leave everything else as default.
9. Open the COM+ Application->Test and click on Components.
10. Right-click on components and Coose New->Component
11. Click Next and choose "Install New component"
12. Select the Testc5.dll created in step 3
13. Click on Next and finish.
14. Go back to the VFP IDE and run the following lines in the command window:
ox=CreateObject("TestC5.TestC5")
?ox.Test1
?ox.Test2
ox=Null
I reproduced it on many machines with :
- VFP7, VFP7 SP1, VFP8
- Windows 2000 WS SP3, 2000 Server SP3, XP SP1
I also created the same functionnality with c# and it works fine.
Can anybody confirm it's a bug?