📄 dogsetup.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "Driver Setup Sample of RCMicroDogSetup.dll"
ClientHeight = 3765
ClientLeft = 45
ClientTop = 345
ClientWidth = 5070
LinkTopic = "Form1"
ScaleHeight = 3765
ScaleWidth = 5070
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton CloseButton
Caption = "&Close"
Height = 375
Left = 3960
TabIndex = 6
Top = 3000
Width = 855
End
Begin VB.CommandButton DisplayDialog
Caption = "&Display Interface"
Height = 375
Left = 1920
TabIndex = 5
Top = 2400
Width = 1695
End
Begin VB.CommandButton GetDrvInfo
Caption = "&GetDriverInfo"
Height = 375
Left = 120
TabIndex = 4
Top = 2400
Width = 1455
End
Begin VB.CommandButton Uninstall
Caption = "&UninstallDriver"
Height = 375
Left = 1920
TabIndex = 1
Top = 3000
Width = 1695
End
Begin VB.CommandButton Install
Caption = "&InstallDriver"
Height = 372
Left = 120
TabIndex = 0
Top = 3000
Width = 1452
End
Begin VB.Label Resultbox
BorderStyle = 1 'Fixed Single
Height = 1215
Left = 120
TabIndex = 3
Top = 960
Width = 4695
WordWrap = -1 'True
End
Begin VB.Label copyright
Height = 495
Left = 120
TabIndex = 2
Top = 240
Width = 4935
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim RetCode As Integer
Private Sub CloseButton_Click()
Unload Me
End Sub
Private Sub DisplayDialog_Click()
DriverDialog
End Sub
Private Sub Form_Load()
copyright = "Driver setup sample of RCMicroDogSetupdll" + vbCrLf + "Copyright (C) 2007 SafeNet China Ltd. All Rights Reserved."
Resultbox = "Click GetDriverInfo to get the information of dog driver"
Resultbox = Resultbox + vbCrLf + "Click Display Interface to display install interface"
Resultbox = Resultbox + vbCrLf + "Click InstallDriver to Install the Dog driver "
Resultbox = Resultbox + vbCrLf + "Click UninstallDriver to Uninstall the Dog driver."
End Sub
Private Sub GetDrvInfo_Click()
Dim RetCode1 As Long
RetCode1 = GetDogDriverInfo()
If RetCode1 = 0 Then
Resultbox = "Not find Dog driver"
ElseIf RetCode1 = 1 Then
Resultbox = "Find the same version USBDog and ParallelDog driver."
ElseIf RetCode1 = 2 Then
Resultbox = "Find the same version USBDog driver only."
ElseIf RetCode1 = 3 Then
Resultbox = "Find the same version ParallelDog driver only."
ElseIf RetCode1 = 4 Then
Resultbox = "Find the older version USBDog and ParallelDog driver."
ElseIf RetCode1 = 5 Then
Resultbox = "Find the older version USBDog driver only."
ElseIf RetCode1 = 6 Then
Resultbox = "Find the older version ParallelDog driver only."
ElseIf RetCode1 = 7 Then
Resultbox = "Find the newer version USBDog and ParallelDog driver."
ElseIf RetCode1 = 8 Then
Resultbox = "Find the newer version USBDog driver only."
ElseIf RetCode1 = 9 Then
Resultbox = "Find the newer version ParallelDog driver only."
ElseIf RetCode1 = 3008 Then
Resultbox = "Please log on with administrator identity!."
Else
Resultbox = "Not find Dog driver"
End If
End Sub
Private Sub Install_Click()
Install.Enabled = False
Uninstall.Enabled = False
DisplayDialog.Enabled = False
GetDrvInfo.Enabled = False
CloseButton.Enabled = False
'If you want to display the information "If you have plugged in the USB Hardware,
'please pull out it and plug in it again!" in Windows 98/ME,you should use 1,else
'use 0 or don't call NotifyPullOutAndPlugInUsbDog
NotifyPullOutAndPlugInUsbDog (1)
RetCode = InstDrv(3) '1 install USB dog driver
'2 install Parallel dog driver
'3 install both USB dog driver and Parallel dog driver
If RetCode = 0 Then
Resultbox = "The driver has been installed successfully."
Install.Enabled = False
Else
Install.Enabled = True
If RetCode = 3008 Then
Resultbox = "Please log on with administrator identity."
Else
Resultbox = "The driver's installation failed. Error code: " + Str(RetCode)
End If
End If
Uninstall.Enabled = True
DisplayDialog.Enabled = True
GetDrvInfo.Enabled = True
CloseButton.Enabled = True
End Sub
Private Sub Uninstall_Click()
Install.Enabled = False
Uninstall.Enabled = False
DisplayDialog.Enabled = False
GetDrvInfo.Enabled = False
CloseButton.Enabled = False
Resultbox = "Uninstall the driver ,Please wait......"
RetCode = UninstDrv(3) '1 uninstall USB dog driver
'2 uninstall Parallel dog driver
'3 uninstall both USB dog driver and Parallel dog driver
If RetCode = 0 Then
Resultbox = "The driver has been uninstalled successfully."
Uninstall.Enabled = False
Else
If RetCode = 3008 Then
Resultbox = "Please log on with administrator identity."
Else
Resultbox = "The driver's uninstallation failed. Error code: " + Str(RetCode)
End If
Uninstall.Enabled = True
End If
Install.Enabled = True
DisplayDialog.Enabled = True
GetDrvInfo.Enabled = True
CloseButton.Enabled = True
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -