⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sinstance.h

📁 决战帝王1.5武神降临对喜爱决战的玩家共享研究用
💻 H
字号:
/*
Module : SINSTANCE.H
Purpose: Defines the interface for an MFC wrapper class to do instance checking
Created: PJN / 29-07-1998

Copyright (c) 1998 - 2000 by PJ Naughter.  

All rights reserved.

Copyright / Usage Details:

You are allowed to include the source code in any product (commercial, shareware, freeware or otherwise) 
when your product is released in binary form. You are allowed to modify the source code in any way you want 
except you cannot modify the copyright details at the top of each module. If you want to distribute source 
code with your application, then you are only allowed to distribute versions released by the author. This is 
to maintain a single distribution point for the source code. 

*/


#ifndef __SINSTANCE_H__
#define __SINSTANCE_H__

#ifndef __AFXMT_H__
#include "afxmt.h"
#endif

class CInstanceChecker : public CObject
{
public:
	//Constructors / Destructors
	CInstanceChecker(const CString& sMutexName);
	virtual ~CInstanceChecker();
	
	//General functions
	void ActivateChecker();
	BOOL TrackFirstInstanceRunning();
	BOOL PreviousInstanceRunning();
	HWND ActivatePreviousInstance(); 
	
protected:
	//Virtual methods
	virtual CString GetMMFFilename();
	virtual HWND GetWindowToTrack();
	
	//Standard non-virtual methods
	void ReleaseLock();
	
	//Data
	CMutex m_instanceDataMutex;
	CMutex m_executeMutex;
	CSingleLock* m_pExecuteLock;
};


#endif //__SINSTANCE_H__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -