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

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

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

    项目描述:
    This is a very simple way to detect the running instance of an application. It can be achieved by declaring a data variable in the compiler's own data section called shared.

    #pragma data_seg("Shared")
    LONG g_Counter = -1;
    #pragma data_seg()

    After this, the Linker will be noticed to make the Shared section readable, writable, and shared.


    #pragma comment(linker, "/section:Shared, rws")


    这个简单的例子用于检测一个应用程序的运行实例。可以通过在编译器自己的共享数据段中声明一个数据变量来实现。
    #pragma data_seg("Shared")
    LONG g_Counter = -1;
    #pragma data_seg()
    之后,链接器可以对共享段进行读、写和共享操作。
    #pragma comment(linker, "/section:Shared, rws")
    来源: http://www.codeguru.com/system/multiple.html
    类别:
    发布者: cbd002

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

    原始下载连接(国外) http://www.codeguru.com/code/legacy/system/multiple.zip

      » 合 作 伙 伴