Location:
Search - 键码
Search list
Description: 实时测试按键的键盘码和鼠标的位置-real-time testing the keyboard keys and mouse code position
Platform: |
Size: 646490 |
Author: 李和林 |
Hits:
Description: 软件限时使用与注册功能的实现
众所周知,一些共享软件往往提供给使用者的是一个功能不受限制的限时使用版,在试用期内使用者可以无限制的使用软件的全部功能(只是可能会出现提示使用者注册的窗口),试用期一过部分(或全部)功能失效,要想继续使用只能向作者索取注册码(或注册文件)完成对软件的合法注册,注册后的软件将解除一切使用限制。如果您也开发出一个有价值的作品,是否也希望为自己的软件增加一个这样的功能呢?这里笔者就提供一个实现软件限时的完整代码。
软件启动后会首先运行本代码并从注册表HKEY_LOCAL_MACHINE\Software\MyProgram子键下的三个键值MyProgram1-3中读取键值数据。其中MyProgram2的值是软件首次运行日期,MyProgram3的值是软件当前运行时的日期,MyProgram1的值是软件的使用标志:如果软件在试用期内则其值为字符串sign1;如果软件试用期满则其值为字符串sign2,如果软件已经注册则其值为字符串sign3。全局变量ZHUCE依据读取的MyProgram1键值而赋值:ZHUCE=-1说明试用期满,ZHUCE=-2说明软件已注册,ZHUCE=其它值为剩余天数,您的主程序代码要依据此全局变量ZHUCE的值设计相应的交互响应。
为方便您将代码嵌入现存的程序代码中,本示例将全部代码写入一个模块.bas中(模块名随意,也可添加到已有模块中)。注意,代码中的Private Sub Main()过程为整个程序的启动入口,您需要在“工程属性”对话框中将“启动对象”设置为“Sub Main()”。
'通用模块
Global ZHUCE As Integer
'说明:全局变量ZHUCE=-1试用期满,ZHUCE=-2已注册,ZHUCE=其它值为剩余天数
Declare Function RegOpenKeyEx Lib "advapi32" Alias "RegOpenKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal samDesired As Long, ByRef phkResult As Long) As Long
Declare Function RegQueryValueEx Lib "advapi32" Alias "RegQueryValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal lpReserved As Long, ByRef lpType As Long, ByVal lpData As String, ByRef lpcbData As Long) As Long
Declare Function RegCloseKey Lib "advapi32" (ByVal hKey As Long) As Long
Private Sub Main()'程序总入口
Dim a As Long, rc(3) As Long, hKey As Long, KeyValType As Long, KeyValSize(3) As Long
Dim c As String, h As String, tmpVal(3) As String
Dim datetime As Integer
datetime = 30'试用期天数
ZHUCE = -1
On Error GoTo cuowu
'以下从注册表HKEY_LOCAL_MACHINE\Software\MyProgram的三个值中取出相关数据字串tmpVal(3)
a = RegOpenKeyEx(&H80000002, "Software\MyProgram", 0, 131135, hKey) ' 打开注册表关键字
For a = 1 To 3: tmpVal(a) = String$(1024, 0): KeyValSize(a) = 1024: Next
rc(1) = RegQueryValueEx(hKey, "MyProgram3", 0, KeyValType, tmpVal(1), KeyValSize(1))
rc(2) = RegQueryValueEx(hKey, "MyProgram2", 0, KeyValType, tmpVal(2), KeyValSize(2))
rc(3) = RegQueryValueEx(hKey, "MyProgram1", 0, KeyValType, tmpVal(3), KeyValSize(3))
For a = 1 To 3
If (Asc(Mid(tmpVal(a), KeyValSize(a), 1)) = 0) Then
tmpVal(a) = Left(tmpVal(a), KeyValSize(a) - 1)
Else
tmpVal(a) = Left(tmpVal(a), KeyValSize(a))
End If
Next
a = RegCloseKey(hKey) '关闭注册表
'使用期限判断
If tmpVal(3) = "sign3" Then ZHUCE = -2: Exit Sub '查找到已注册标志sign3
If Len(tmpVal(1)) = 1023 And Len(tmpVal(2)) = 1023 And Len(tmpVal(3)) = 1023 Then
'首次使用,将当前日期分别写入tmpVal(1)和tmpVal(2)中,在tmpVal(3)中写入准许运行标志sign1
CreateObject("WScript.Shell").regWrite "HKEY_LOCAL_MACHINE\Software\MyProgram\MyProgram3", Date$, "REG_SZ"
CreateObject("WScript.Shell").regWrite "HKEY_LOCAL_MACHINE\Software\MyProgram\MyProgram2", Date$, "REG_SZ"
CreateObject("WScript.Shell").regWrite "HKEY_LOCAL_MACHINE\Software\MyProgram\MyProgram1", "sign1", "REG_SZ"
ZHUCE = datetime
MsgBox "试用期剩余" & Trim(datetime) & "天"
Else
If tmpVal(3) = "sign2" Then '查找到永久中止标志sign2中止使用
ZHUCE = -1
Exit Sub
MsgBox "试用期已满,请您注册!"
End If
If Date datetime Then '使用期超过datetime天中止使用
'写入tmpVal(3)中止使用字串sign2
CreateObject("WScript.Shell").regWrite "HKEY_LOCAL_MACHINE\Software\MyProgram\MyProgram1", "sign2", "REG_SZ"
ZHUCE = -1
MsgBox "试用期已满,请您注册!"
Else
'写入当前日期于tmpVal(2)中
CreateObject("WScript.Shell").regWrite "HKEY_LOCAL_MACHINE\Software\MyProgram\MyProgram2", Date$, "REG_SZ"
ZHUCE = datetime - (DateValue(Date) - DateValue(tmpVal(1)))
MsgBox "试用期剩余" & Trim(datetime) & "天"
End If
End If
End If
cuowu:
End Sub
从安全保密角度出发,当您应用上述代码时紫色部分应该根据您个人的保密设想进行必要的修改(当然您也可以不修改而直接应用):①示例中的代码把软件的注册与运行信息保存在HKEY_LOCAL_MACHINE\Software\MyProgram子键下的MyProgram1-3三个键值内,请根据您个人的保密原则修改为您所需要的子键名,以隐蔽为原则!②MyProgram1键值中的数据(字符串sign1或sign2或sign3分别对应着试用/期满/注册)应根据您个人的保密设想修改成需要的字符串,也以隐蔽为原则!
主程序中当用户输入正确的注册码(注册码当然是您随意愿而设)后,请执行语句:
CreateObject("WScript.Shell").regWrite "HKEY_LOCAL_MACHINE\Software\MyProgram\MyProgram1", "sign2", "REG_SZ"
完成软件注册。(该行代码中的Software\MyProgram\MyProgram1和sign2请与上述代码保持一致!)
Platform: |
Size: 18051 |
Author: dianfeng |
Hits:
Description: VB源码实现一键安装迅雷.搜狗拼音
Platform: |
Size: 91762 |
Author: fhgokcn@qq.com |
Hits:
Description: 利用有限键的键盘实现拼音输入,T9键盘输入法实现方案源码。
Platform: |
Size: 188246 |
Author: flywin |
Hits:
Description: T9输入法C源码 键盘输入法设计 利用有限键的键盘实现拼音输入 1键代表ABC 2键代表DEF 3键代表GHI 4键代表JKL 5键代表MNO 6键代表PQRS 7键代表TUV 8键代表WXYZ 9键代表" "(空格) 0键为确认键(该拼音输入结束) R键为拼音输入,字母输入(大写),字母输入(小写),数字输入,字符输入转切键,即每按一次该键将会切换倒下一状态. Q键为下翻页键,W为上翻页键 E键为退格键,消除错误的输入 Q键在拼音未结束,即未按0键时为错误消除键
Platform: |
Size: 188246 |
Author: flywincn |
Hits:
Description: PC101全功能键的漂亮软键盘源码,可直接编译运行的全套源代码,内带编译好的exe,可直接使用。特别适用于触摸屏幕,界面华丽,也可直接修改图库,定制自己喜欢的界面哦。
Platform: |
Size: 539859 |
Author: flywincn |
Hits:
Description: 实时测试按键的键盘码和鼠标的位置-real-time testing the keyboard keys and mouse code position
Platform: |
Size: 646144 |
Author: 李和林 |
Hits:
Description: 一个专门用于VOD视频点播系统基于PS/2遥控器或面板的键值测试程序-devoted to a VOD system based on the PS/2 remote control panel keys or test procedures
Platform: |
Size: 571392 |
Author: 孙贤 |
Hits:
Description: win 2000、XP和2003下屏蔽ctrl+alt+del的源码-win 2000, XP and 2003 ctrl alt del shielding the source
Platform: |
Size: 701440 |
Author: 王凡 |
Hits:
Description: 原理 1 截取屏幕,从而取得方块数据,然后搜索算法. 2 通过鼠标键盘钩子发送消息来消去. 3 腾讯反外挂作的很牛,连连看程序在接到鼠标点击消息的同时从驱动层判断有没有 点击消息,所以把0x00403291地址的内存锁定为0x00就可以让腾讯的凡外挂系统失效。 4 在消除过程中因为烟雾等特效的影响,中途按F9键分析结果很可能错误,谁有办法 解决这个问题一定要告诉我啊! 最好能取消动画特效,直接消去. 5 因为时间仓促,利用周末匆匆写完这个程序,所以代码极不规范,还请大家谅解.-screen, thereby obtaining the data block, then search algorithm. 2 hook through a mouse and keyboard to send messages eliminated. Tencent three anti- pylon for the very cattle, in the 1000 block of Terry Avenue procedures mouse clicks received information from the driver layer judgment has to click on, and hence to 0x00403291 the site of the 0x00 memory lock on the Tencent allow any external system failure. 4 in the elimination process because of the effects of smoke and other effects, halfway by F9 key results of the analysis may mistake, who has a solution to this problem must tell me ah! The best animation effects can be canceled, direct elimination. 5 because of the limited time, finished a weekend rush this process, substituting yards were highly irregular, please understanding.
Platform: |
Size: 218112 |
Author: 地地地 |
Hits:
Description: 很多时候感觉用www.google.com搜索网站挺麻烦的,查阅MSDN的知识库后用C#写了这个windows应用程序版的google搜索引擎,主要调用了google开放出来的web service,不过搜索时速度还不是很快,但至少省去了右键[在新窗口中打开]的麻烦,以下是程序的源码.
-often feel www.google.com search site with a very troublesome to access the knowledge base after MSDN C# to write this application windows version of the Google search engine, Google called the opening of web service, but a search speed is not fast, but at least saved the right [in the new window opens] trouble, the following procedure is the source.
Platform: |
Size: 4096 |
Author: 须 |
Hits:
Description: ASCII码查询器,可以显示或查询任意字符的ASCII码,可以显示或查询按键的虚拟键码,还带有一个10进制和16进制转换工具。-ASCII code query, you can display or query any of the ASCII character code, you can display or query keys virtual key code, also with a 10-band and 16 hexadecimal conversion tool.
Platform: |
Size: 219136 |
Author: budong |
Hits:
Description: KeyView2 原本是 Charles Petzold 在 Windows 编程书 Programming Windows 5th edition, 第 6 章提供的例子程序,它能够将 Windows 程序接收到的所有键盘消息都展示出来,让我们理解键盘、输入法、字符集、字体的内部工作机制。
这个程序对我们还有一个特别用处: 当我们需要调试以 USB 键盘方式(USB-KBW)工作的条码扫描枪时,KeyView2 能够明察秋毫地展示出扫描枪送上的击键消息(keystroke message)是否正确,只有击键消息正确,生成的字符消息(character message)才会正确,条码枪用户最终关心的是字符消息。如果得到的字符消息不正确, KeyView2 展示的消息可以帮助开发者诊断错误原因。
KeyView2 v1.1 相比原版做了如下改进:
左侧多加一栏,显示消息序号,有助于用户在文档和叙述中标识消息,以及区分不同动作的消息边界。
加入右键菜单,拷贝消息到剪贴板。默认缓存消息 1000 条。
加入右键菜单,清空当前窗口。
当生成的 WM_CHAR 消息是宽字符时(比如汉字),修正右侧各栏位的显示对齐问题。
在标题栏显示一些编程信息:当前输入语言的 charset ID 及名称,当前字体名称,当前 input-locale identifier 。
让 KeyView2 窗口背景色遵循 Windows 控制面板中设置的全局窗口背景色,让截图时能够有个性化的底色。
Platform: |
Size: 445130 |
Author: chjfth@gmail.com |
Hits:
Description: 支持mysql+php5.4以上,一键安装。(Support more than mysql+php5.4, a key installation.)
Platform: |
Size: 44496896 |
Author: hack888
|
Hits:
Description: 1.串口,TCP服务端/客户端,UDP服务端/客户端通讯调试
2.支持Hex,ASCII,UTF8,GB2312编码调试
3.接收数据可通过右键菜单一键计算Hex对应的数值
4.字节计算器/检验值计算器(CRC16,自定义多项式CRC16,XOR)
5.串口超级终端
6.Socket通信监视器
7:Ping调试(1. Serial port, TCP server / client, UDP server / client communication debugging
2. Support Hex, ASCII, UTF8, GB2312 encoding debugging
3. Receive data You can calculate the value of Hex by right-clicking menu
4. Byte calculator / check value calculator (CRC16, custom polynomial CRC16, XOR)
5. Serial terminal
6.Socket communication monitor
7: Ping debugging)
Platform: |
Size: 2095104 |
Author: Frank_1990
|
Hits:
Description: 本锁机源码默认密码为流动密码,是无法用反编绘软件破解密码的,用哈勃也无法破解,破坏力极强,禁用了许多快捷键,无开机自启,请不要用做非法途径,只用来研究(The default password lock machine source code flow, is unable to use anti compilation software to crack the password, Harbert can not crack, extremely destructive, disable many shortcuts, no boot from Kai, please do not use illegal means, only to study)
Platform: |
Size: 2023424 |
Author: ````白幽灵
|
Hits:
Description: 四轴最新资料,可实现一键起飞定高,无头模式,采用气压计定高。(Four axis latest information)
Platform: |
Size: 11759616 |
Author: 止痛片先生
|
Hits:
Description: 易语言全键代码和名称获取纯源码
获取易语言全键代码和名称获取(Easy language full key code and name acquisition
Easy language all key code and name access to pure source code)
Platform: |
Size: 4096 |
Author: ceo404
|
Hits:
Description: DD驱动级鼠键模块 易语言模块分享 带源码 欢迎下载(DD driver level mouse key module, easy language module to share the source code, welcome to download)
Platform: |
Size: 3193856 |
Author: 小熙哥哥
|
Hits:
Description: 能显示键码值 Delphi求键值的小程序,求键值,打开程序后,敲击键盘上的任意键,即可显示出该键的键值(Can display key code value Delphi seeking the key procedures, and key, open the program, hit any key on the keyboard, you can display the key of the key)
Platform: |
Size: 1024 |
Author: chuyun |
Hits:
« 12
3
4
5
6
7
8
9
10
...
50
»