【vc++精品源码栏目提醒】:网学会员--在 vc++精品源码编辑为广大网友搜集整理了:vc实现各类软件试用期设置的源码 - 技术总结绩等信息,祝愿广大网友取得需要的信息,参考学习。
vc实现各类软件试用期设置的源码 / 功能:实现软件的试用次数限制 参数:需要设置的试用次数 返回值:已试用的次数 By WindRand 2006年3月10日 / int GetTrialTimeint TrialTime unsigned char buffer2550 unsigned long length unsigned long type try HKEY hKey RegOpenKeyHKEY_LOCAL_MACHINESOFTWAREMicrosoftaSofthKey RegQueryValueExhKeyaSoftNULLtypebufferlength RegCloseKeyhKey int Count char lpInput2550 char lpOutput2550 char lpKeypefine.com ifstrlenconst charbuffer16 BlowfishDeconst charbufferlpKeylpOutput CountatoilpOutput else Count atoiconst charbuffer //if first use save 1 registry ifCount0 memsetlpInput0sizeoflpInput memsetlpOutput0sizeoflpOutput strcpylpInput1 BlowfishEnlpInputlpKeylpOutput RegCreateKeyHKEY_LOCAL_MACHINESOFTWAREMicrosoftaSofthKey RegSetValueExhKeyaSoft0REG_SZconst unsigned char lpOutputstrlenlpOutput RegCloseKeyhKey return 1 else ifCount