Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
RELEASEing an EXE COM Server
Message
De
22/02/2012 15:47:01
 
 
À
31/01/2012 22:03:20
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Divers
Thread ID:
01534159
Message ID:
01536143
Vues:
48
I finally got around to testing this. Unfortunately, it doesn't seem to work, at least from the command window. The call to .Dispose( ) hangs, and requires manually killing the COM EXE in Windows Task Manager.

Am I missing something?

>Hi Al,
>
>I know I read somewhere that setting the variable to null is all you need to do but if you look at Rick's classes at West-wind, he uses a dispose() method that does release this. I found this to fix some strange problems I had releasing objects. I think I read post from Rick that this fixed some strange problems he had releasing com objects.
>
>
>loEXECOMServer = CREATEOBJECT( "MyEXECOMServerName.FLocker" )
>loEXECOMServer.dispose()
>
>DEFINE CLASS FLocker AS Session OLEPUBLIC
>	* DataSession = 2 (Private Data Session) is the default for the Session class
>	
>	FUNCTION Init
>		SET EXCLUSIVE OFF
>		SET TABLEVALIDATE TO 0
>	
>	ENDFUNC
>
>	FUNCTION dispose()
>              release this
>        ENDFUNC 
>
>	FUNCTION TableLock ( tcTable AS String, tcAlias AS String ) AS VOID
>		USE ( tcTable ) ALIAS ( tcAlias ) IN 0 SHARED NODATA NOUPDATE
>		=FLOCK( tcAlias )
>	
>	ENDFUNC
>	
>	FUNCTION TableUnlock ( tcAlias AS String ) AS VOID
>		UNLOCK IN ( tcAlias )
>		USE IN ( tcAlias )
>	
>	ENDFUNC
>	
>ENDDEFINE
>
>
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform