Click here to Skip to main content
15,891,785 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionIdentifying a currently running application Pin
pix_programmer24-May-11 18:31
pix_programmer24-May-11 18:31 
AnswerRe: Identifying a currently running application Pin
pandit8424-May-11 18:43
pandit8424-May-11 18:43 
GeneralRe: Identifying a currently running application Pin
pix_programmer24-May-11 18:53
pix_programmer24-May-11 18:53 
GeneralRe: Identifying a currently running application Pin
ShilpiP24-May-11 19:09
ShilpiP24-May-11 19:09 
GeneralRe: Identifying a currently running application Pin
pix_programmer24-May-11 20:34
pix_programmer24-May-11 20:34 
GeneralRe: Identifying a currently running application Pin
ShilpiP24-May-11 20:42
ShilpiP24-May-11 20:42 
GeneralRe: Identifying a currently running application Pin
pix_programmer24-May-11 21:10
pix_programmer24-May-11 21:10 
GeneralRe: Identifying a currently running application Pin
ShilpiP24-May-11 21:29
ShilpiP24-May-11 21:29 
pix_programmer wrote:
If I close app1, app2 is also closed. What to do?

What do you mean app1 and app2?? Are you talking about instance of same application??

If CreateMutex is fail than it returns NULL and you are checking that if it is not null than you are checking GetLastError.

if(NULL == ::CreateMutex(NULL, TRUE,_T("{AFD2966D-9A83-4E3A-9C9E-CD81E96D819A}")))
	{
		long dwError = ::GetLastError();
		if(dwError == ERROR_ALREADY_EXISTS)
                {
			EndDialog(NULL,IDOK);
                        return FALSE;
                }
      }

"Every Little Smile can touch Somebody's Heart...
May we find Hundreds of Reasons to Smile Everyday... and
May WE be the Reason for someone else to smile always!" (ICAN)

"Your thoughts are the architects of your destiny."

GeneralRe: Identifying a currently running application Pin
Abhi Lahare26-May-11 8:38
Abhi Lahare26-May-11 8:38 
QuestionWM_NOTIFY to control itself Pin
includeh1024-May-11 10:22
includeh1024-May-11 10:22 
AnswerRe: WM_NOTIFY to control itself Pin
Mark Salsbery24-May-11 10:43
Mark Salsbery24-May-11 10:43 
GeneralRe: WM_NOTIFY to control itself Pin
includeh1024-May-11 11:39
includeh1024-May-11 11:39 
AnswerRe: WM_NOTIFY to control itself Pin
Code-o-mat24-May-11 11:41
Code-o-mat24-May-11 11:41 
GeneralRe: WM_NOTIFY to control itself Pin
includeh1024-May-11 12:33
includeh1024-May-11 12:33 
Questioninit message for control's subclass of a dialog Pin
includeh1024-May-11 10:16
includeh1024-May-11 10:16 
AnswerRe: init message for control's subclass of a dialog Pin
Mark Salsbery24-May-11 10:48
Mark Salsbery24-May-11 10:48 
Questioncannot output exe because computer lost boost_regex-vc90-mt-gd-1_46_1.dll [modified][solved] Pin
yu-jian24-May-11 6:57
yu-jian24-May-11 6:57 
AnswerRe: cannot output exe because computer lost boost_regex-vc90-mt-gd-1_46_1.dll Pin
Albert Holguin24-May-11 8:02
professionalAlbert Holguin24-May-11 8:02 
GeneralRe: cannot output exe because computer lost boost_regex-vc90-mt-gd-1_46_1.dll Pin
yu-jian24-May-11 15:22
yu-jian24-May-11 15:22 
GeneralRe: cannot output exe because computer lost boost_regex-vc90-mt-gd-1_46_1.dll Pin
Albert Holguin24-May-11 17:49
professionalAlbert Holguin24-May-11 17:49 
QuestionIssue about MSAA hook in Win7 64 bits Pin
ernst2002053024-May-11 4:01
ernst2002053024-May-11 4:01 
AnswerRe: Issue about MSAA hook in Win7 64 bits Pin
Luc Pattyn24-May-11 4:34
sitebuilderLuc Pattyn24-May-11 4:34 
GeneralRe: Issue about MSAA hook in Win7 64 bits Pin
ernst2002053024-May-11 4:46
ernst2002053024-May-11 4:46 
QuestionHow to read continous data from Serial Port Pin
pandit8424-May-11 1:16
pandit8424-May-11 1:16 
AnswerRe: How to read continous data from Serial Port Pin
David Crow24-May-11 3:31
David Crow24-May-11 3:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.