如果是第一次运行要实现特殊的操作,如果不是就不进行操作。
谢谢!

解决方案 »

  1.   

    CreateFileMapping()
    若错误为:ERROR_ALREADY_EXISTS),则表示已经有该实例在运行
      

  2.   

    RegQueryValue
    你的程序一运行就可以调用这个函数检查特定键值是否存在.
    如果不存在
    调用RegCreateKey创建一个
      

  3.   

    Re: iceberg() 
    我明白了,谢谢!
    能不能再告诉我 RegQueryValue
    这个函数怎么用?:)
      

  4.   

    LONG RegQueryValue(
      HKEY hKey,        // handle to key to query
      LPCTSTR lpSubKey, // subkey name
      LPTSTR lpValue,   // string buffer
      PLONG lpcbValue   // size of returned string
    );
    具体解释看MSDN吧
      

  5.   

    LONG RegQueryValue(
      HKEY hKey,        // handle to key to query
      LPCTSTR lpSubKey, // subkey name
      LPTSTR lpValue,   // string buffer
      PLONG lpcbValue   // size of returned string
    );