Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Check for running instance
Message
De
31/07/1997 13:15:44
 
 
À
30/07/1997 17:47:33
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00018581
Message ID:
00042641
Vues:
47
this(and other VFP based solutions) are not as good as a C++ program that will do that , for a simple reason - speed, it takes more time to load all the VFP libraries and any VFP based solutin will only take effect then. while a compact C++ prgram will fire instantly Arnon >How about the following: >Use DDE/ >=DDESetOption('SAFETY',.F.) >lnChannel=DDEInitiate('YourApplicationControlName','SYSTEM') >if lnChannel<>-1 > =messagebox('Only One Copy Of YourApplicationControlName May Run On This >System At A Time',16,YourApplicationControlName') > quit >endif >=DDESetService('YourApplicationControlName','DEFINE') > > PUBLIC goApp > goApp = CREATEOBJECT(APPCLASS) > IF TYPE('goApp') = "O" > RELEASE gcOldTalk, gcOldDir, gcOldPath, gcOldClassLib, gcOldProcedure > goApp.Do() && there is our DO method mentioned in another thread > ENDIF > >*-- Free DDE Lock Name >=DDESetService('YourApplicationControlName','RELEASE') > >Got this idea from a FoxAdvisor note I believe. >You should also add teh RELEASE to any cleanup/destory/on shutdown etc. >since the service name will exist until you reboot. This should also work >in NT >HTH Gary > >
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform