检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
出 处:《计算机工程与设计》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[自动化与计算机技术—计算机软件与理论]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:216.73.216.13