> originally supplied by the Windoze god (and suspected automated bot) Shawn
F.
I don't know - I don't think that's mine. I always get real verbose on
Hungarian
It works good though. Course, there are other ways too. One is to import a
single-instance dll. The dll holds a global static HINSTANCE called ghInst
that's initialized to NULL. In DllMain, in case DLL_PROCESS_ATTACH, check
ghInst to make sure it's NULL. If not, return FALSE. If it is NULL, set
ghInst to the passed hInstance and viola. If any other process tries to
import from that dll the dll will fail to load. Detect this condition with
an error pin on the Import Compiled Function and you know there's already an
instance running.
Another way is to create a named mutex when your application starts. The
call will succeed, but immediately call GetLastError. If it returns
ERROR_ALREADY_EXISTS then another instance has already created the mutex. Of
course, don't forget to destroy the mutex when your application closes, or
you won't be able to start it again until you reboot.
-SHAWN-
---
You are currently subscribed to vrf as: rsb@soco.agilent.com
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list, email "vrf@it.lists.it.agilent.com".
If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".
F.
I don't know - I don't think that's mine. I always get real verbose on
Hungarian
It works good though. Course, there are other ways too. One is to import a
single-instance dll. The dll holds a global static HINSTANCE called ghInst
that's initialized to NULL. In DllMain, in case DLL_PROCESS_ATTACH, check
ghInst to make sure it's NULL. If not, return FALSE. If it is NULL, set
ghInst to the passed hInstance and viola. If any other process tries to
import from that dll the dll will fail to load. Detect this condition with
an error pin on the Import Compiled Function and you know there's already an
instance running.
Another way is to create a named mutex when your application starts. The
call will succeed, but immediately call GetLastError. If it returns
ERROR_ALREADY_EXISTS then another instance has already created the mutex. Of
course, don't forget to destroy the mutex when your application closes, or
you won't be able to start it again until you reboot.
-SHAWN-
---
You are currently subscribed to vrf as: rsb@soco.agilent.com
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list, email "vrf@it.lists.it.agilent.com".
If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".
<font size=2 face="sans-serif">Hi Vrf,</font>
<font size=2 face="sans-serif"> Thanks for the reply on the messageLog problem.</font>
<font size=2 face="sans-serif">Taken the easy option, Black Text in a Alphanumeric Log box.</font>
<font size=2 face="sans-serif">I have one more problem, that hopefully the vrf can help me with.</font>
<font size=2 face="sans-serif">Is there a method of stopping a operator loading a vxe program twice.</font>
<font size=2 face="sans-serif">I.e accidentally double clicking a Desktop icon more than once.</font>
<font size=2 face="sans-serif"> Thanks for help in advance</font>
<font size=2 face="sans-serif">Regards</font>
<font size=2 face="Arial">Gavin Candy.
Quality Engineer.
BHC Components Ltd
20-21 Cumberland Drive
Granby Industrial Estate
Weymouth
DT4 9TE
England
Tel: ++44 1305 830734
Fax: ++44 1305 760670
Email: gavin.candy@bhc.co.uk
website: http://www.bhc.co.uk</font>
---You are currently subscribed to vrf as: rsb@soco.agilent.comTo subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".To send messages to this mailing list, email "vrf@it.lists.it.agilent.com". If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".