Click to See Complete Forum and Search --> : App.PrevInstance


TonyShape
July 26th, 1999, 03:53 AM
In VB i'm using app.previnstance to check if my application is loaded or not.
Is somebody know the same thing in VC++ .
Thanks

///\\
/////\\)
/////(
////////\Tony Shape

Lothar Haensler
July 26th, 1999, 04:32 AM
from the docs:
"The m_hPrevInstance data member is always set to NULL in a Win32 application. To find previous instances of an application, use CWnd::FindWindow."

you can also search the C++ Forum for CreateFileMapping. Someone posted a solution that uses shared memory to find out if another instance of the app is running.

Gary Grant
July 26th, 1999, 07:24 AM
Go to PJ Naughter's Home Page at http://indigo.ie/~pjn/

Check his Misc Freeware section for CSingleInstance, it is great

While you are there check the rest of his site. Some very interesting stuff.