-
大小: 3KB文件類型: .zip金幣: 1下載: 0 次發(fā)布日期: 2021-01-02
- 語言: 其他
- 標(biāo)簽:
資源簡(jiǎn)介
在完成軟件交付時(shí),往往先要個(gè)客戶先試用一段時(shí)間,然后到時(shí)間需要提醒一下或者限制;我提供注冊(cè)表讀寫,文件讀寫兩種方式,通過時(shí)間,和打開的次數(shù)進(jìn)行限制
代碼片段和文件信息
//?MyRegistry.cpp:?implementation?of?the?CMyRegistry?class.
//
//////////////////////////////////////////////////////////////////////
?
#include?“stdafx.h“
#include?“MyRegistry.h“
?
#ifdef?_DEBUG
#undef?THIS_FILE
static?char?THIS_FILE[]=__FILE__;
#define?new?DEBUG_NEW
#endif
?
//////////////////////////////////////////////////////////////////////
//?Construction/Destruction
//////////////////////////////////////////////////////////////////////
?
CMyRegistry::CMyRegistry(HKEY?hRootKey)
{
????m_hRootKey?=?HKEY_CURRENT_USER;?
}
?
CMyRegistry::~CMyRegistry()//在析構(gòu)函數(shù)中關(guān)閉打開注冊(cè)表句柄
{
????Close();
}
?
?
?
/*================================================================?
*?函數(shù)名:????VerifyKey
*?參數(shù):??????(HKEY?hRootKey?LPCTSTR?pszPath)?
*?功能描述:???判斷給定的路徑是否存在?(兼有打開的功能)
?
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2016-11-08?16:20??軟件限制\
?????文件????????7740??2016-11-24?20:06??軟件限制\MyRegistry.cpp
?????文件????????1291??2016-11-08?15:30??軟件限制\MyRegistry.h
?????文件????????3276??2016-11-24?19:32??軟件限制\限制源碼.txt
評(píng)論
共有 條評(píng)論