联盟首页 协同开发 共创软件 开放源码 软件工程 共创论坛 关于联盟
  您的位置 » 开放源码库【成熟 - 项目摘要 首页 | 分类源码 | 提交源码 | 下载统计 | 原创源码 | 成熟源码 | 代码片断
 
 Class to get a thread safe count of prev - 项目摘要
摘要 | 管理 | 论坛
文档 | 软件包

源码库中源码数量为19278
有贡献人员名单:

-= 更多 =-
  • ffdshow
  • jasperreports
  • PoolMan
  • virtualdub-win
  • Air Traffic Controller
  • CppUnit
  • FCK editor
  • Async Professional
  • JFreeChart
  • Apache-SSL-Jserv
  • -= 更多 =-

    项目描述:
    There have been many examples,posted on CodeGuru, of how to check for a previously running instance of an application. Some used DDE, others mutexs but what struck me as the easiest suggestion was to use a 'shared section' to store a flag - accessable by every instance.

    The following class uses that technique, along with a couple of the 'interlocked' functions to make it threadsafe. Instead of a simple flag, a count of running instances is kept.

    在CodeGuru上有很多文章讲述了如何检查一个应用程序的以前运行的实例。一些使用DDE,一些使用互斥量。令我感觉最容易的方法是使用一个“共享段”来保存一个标记-可以由每个实例访问。
    项目的类使用了这种技术,提供了一对 'interlocked'函数生成安全线程。不是使用一个标记,而是保存了运行的实例的数量。
    来源: http://www.codeguru.com/win32/previnst.shtml
    类别:
    发布者: cbd002

    最新发布源码包
    软件包 版本号 日期 本地下载
    EvtManager  1.0  2004-03-22 下载

    原始下载连接(国外) http://www.codeguru.com/code/legacy/win32/EvtManager-demo.zip

      » 合 作 伙 伴