只运行一份程序实例的方法研究  

Research of method to run single instance of application

在线阅读下载全文

作  者:高波[1] 丁士拥[1] 古丛[1] 

机构地区:[1]装甲兵工程学院科研部,北京100072

出  处:《计算机工程与设计》2010年第9期2151-2154,共4页Computer Engineering and Design

摘  要:目前在Windows操作系统下,实现只运行一份程序实例的常用方法都在可靠性方面存在着严重缺陷的问题,系统地介绍了"查找程序主窗口标题"、"使用线程互斥体"和"使用Windows全局原子"3种方法的实现原理,分析了3种方法各自的优缺点。在此基础上,提出了通过主窗口句柄与进程ID相互配合实现只运行一份程序实例的方法,运行结果表明了该方法的简易性和可靠性。Aiming at the problems that the methods to accomplish running a single instance of application on Windows OS have serious imperfection of reliability at present, three methods, including" Looking up the caption of the main window of the application ", "Using thread mutex"and"Using Windows global atom", are introduced systematically. The advantages and disadvantages of the methods are analyzed. Based on the introduction and analysis, a more simple and reliable method that to accomplish running a single instance of application through cooperation of main window handle and thread ID is put forward and demonstrated.

关 键 词:程序实例 软件系统 线程互斥体 全局原子 窗口句柄 进程ID 

分 类 号:TP311.52[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象