Add Original SDK
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
Imports System.Reflection
|
||||
Imports System.Runtime.InteropServices
|
||||
|
||||
' General Information about an assembly is controlled through the following
|
||||
' set of attributes. Change these attribute values to modify the information
|
||||
' associated with an assembly.
|
||||
|
||||
' Review the values of the assembly attributes
|
||||
|
||||
<Assembly: AssemblyTitle("")>
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("")>
|
||||
<Assembly: AssemblyProduct("")>
|
||||
<Assembly: AssemblyCopyright("")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
<Assembly: CLSCompliant(True)>
|
||||
|
||||
'The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
<Assembly: Guid("28D149B1-ABE4-47E0-80D4-DAE95B6F9862")>
|
||||
|
||||
' Version information for an assembly consists of the following four values:
|
||||
'
|
||||
' Major Version
|
||||
' Minor Version
|
||||
' Build Number
|
||||
' Revision
|
||||
'
|
||||
' You can specify all the values or you can default the Build and Revision Numbers
|
||||
' by using the '*' as shown below:
|
||||
|
||||
<Assembly: AssemblyVersion("1.0.*")>
|
||||
@@ -0,0 +1,21 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 8.00
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ChangeTest", "ChangeTest.vbproj", "{5F1FF5B9-0F39-4DF7-B37A-CD1A84027EDB}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfiguration) = preSolution
|
||||
Debug = Debug
|
||||
Release = Release
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfiguration) = postSolution
|
||||
{5F1FF5B9-0F39-4DF7-B37A-CD1A84027EDB}.Debug.ActiveCfg = Debug|.NET
|
||||
{5F1FF5B9-0F39-4DF7-B37A-CD1A84027EDB}.Debug.Build.0 = Debug|.NET
|
||||
{5F1FF5B9-0F39-4DF7-B37A-CD1A84027EDB}.Release.ActiveCfg = Release|.NET
|
||||
{5F1FF5B9-0F39-4DF7-B37A-CD1A84027EDB}.Release.Build.0 = Release|.NET
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityAddIns) = postSolution
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,121 @@
|
||||
<VisualStudioProject>
|
||||
<VisualBasic
|
||||
ProjectType = "Local"
|
||||
ProductVersion = "7.10.3077"
|
||||
SchemaVersion = "2.0"
|
||||
ProjectGuid = "{5F1FF5B9-0F39-4DF7-B37A-CD1A84027EDB}"
|
||||
>
|
||||
<Build>
|
||||
<Settings
|
||||
ApplicationIcon = ""
|
||||
AssemblyKeyContainerName = ""
|
||||
AssemblyName = "ChangeTest"
|
||||
AssemblyOriginatorKeyFile = ""
|
||||
AssemblyOriginatorKeyMode = "None"
|
||||
DefaultClientScript = "JScript"
|
||||
DefaultHTMLPageLayout = "Grid"
|
||||
DefaultTargetSchema = "IE50"
|
||||
DelaySign = "false"
|
||||
OutputType = "WinExe"
|
||||
OptionCompare = "Binary"
|
||||
OptionExplicit = "On"
|
||||
OptionStrict = "Off"
|
||||
RootNamespace = "ChangeTest"
|
||||
StartupObject = "ChangeTest.Form1"
|
||||
>
|
||||
<Config
|
||||
Name = "Debug"
|
||||
BaseAddress = "285212672"
|
||||
ConfigurationOverrideFile = ""
|
||||
DefineConstants = ""
|
||||
DefineDebug = "true"
|
||||
DefineTrace = "true"
|
||||
DebugSymbols = "true"
|
||||
IncrementalBuild = "true"
|
||||
Optimize = "false"
|
||||
OutputPath = "bin\"
|
||||
RegisterForComInterop = "false"
|
||||
RemoveIntegerChecks = "false"
|
||||
TreatWarningsAsErrors = "false"
|
||||
WarningLevel = "1"
|
||||
/>
|
||||
<Config
|
||||
Name = "Release"
|
||||
BaseAddress = "285212672"
|
||||
ConfigurationOverrideFile = ""
|
||||
DefineConstants = ""
|
||||
DefineDebug = "false"
|
||||
DefineTrace = "true"
|
||||
DebugSymbols = "false"
|
||||
IncrementalBuild = "false"
|
||||
Optimize = "true"
|
||||
OutputPath = "bin\"
|
||||
RegisterForComInterop = "false"
|
||||
RemoveIntegerChecks = "false"
|
||||
TreatWarningsAsErrors = "false"
|
||||
WarningLevel = "1"
|
||||
/>
|
||||
</Settings>
|
||||
<References>
|
||||
<Reference
|
||||
Name = "System"
|
||||
AssemblyName = "System"
|
||||
/>
|
||||
<Reference
|
||||
Name = "System.Data"
|
||||
AssemblyName = "System.Data"
|
||||
/>
|
||||
<Reference
|
||||
Name = "System.Drawing"
|
||||
AssemblyName = "System.Drawing"
|
||||
/>
|
||||
<Reference
|
||||
Name = "System.Windows.Forms"
|
||||
AssemblyName = "System.Windows.Forms"
|
||||
/>
|
||||
<Reference
|
||||
Name = "System.XML"
|
||||
AssemblyName = "System.Xml"
|
||||
/>
|
||||
</References>
|
||||
<Imports>
|
||||
<Import Namespace = "Microsoft.VisualBasic" />
|
||||
<Import Namespace = "System" />
|
||||
<Import Namespace = "System.Collections" />
|
||||
<Import Namespace = "System.Data" />
|
||||
<Import Namespace = "System.Drawing" />
|
||||
<Import Namespace = "System.Diagnostics" />
|
||||
<Import Namespace = "System.Windows.Forms" />
|
||||
</Imports>
|
||||
</Build>
|
||||
<Files>
|
||||
<Include>
|
||||
<File
|
||||
RelPath = "AssemblyInfo.vb"
|
||||
SubType = "Code"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
<File
|
||||
RelPath = "DinkeyChange.vb"
|
||||
SubType = "Code"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
<File
|
||||
RelPath = "Form1.vb"
|
||||
SubType = "Form"
|
||||
BuildAction = "Compile"
|
||||
/>
|
||||
<File
|
||||
RelPath = "Form1.resx"
|
||||
DependentUpon = "Form1.vb"
|
||||
BuildAction = "EmbeddedResource"
|
||||
/>
|
||||
<File
|
||||
RelPath = "readme.txt"
|
||||
BuildAction = "Content"
|
||||
/>
|
||||
</Include>
|
||||
</Files>
|
||||
</VisualBasic>
|
||||
</VisualStudioProject>
|
||||
|
||||
@@ -0,0 +1,144 @@
|
||||
' !! this file should not be modified
|
||||
|
||||
Imports System.Runtime.InteropServices
|
||||
Imports System.Text
|
||||
|
||||
Module DinkeyChange_code
|
||||
|
||||
' declarations for functions exported by DinkeyChange.dll
|
||||
Declare Ansi Function DCGetInfo32 Lib "DinkeyChange.dll" Alias "DCGetInfo" (ByVal type_mask As Integer, ByVal model_mask As Integer, ByVal prodcode_mask As String, ByVal array_length As Integer, _
|
||||
ByRef num_found As Integer, ByVal type_array() As Integer, ByVal model_array() As Integer, ByVal prodcode_array() As Byte, ByVal dongle_number() As UInt32, ByVal update_number() As Integer) As Integer
|
||||
Declare Ansi Function DCGetDiagnosticInfo32 Lib "DinkeyChange.dll" Alias "DCGetDiagnosticInfo" (ByVal filename As String) As Integer
|
||||
Declare Ansi Function DCDoUpdateCodeString32 Lib "DinkeyChange.dll" Alias "DCDoUpdateCodeString" (ByVal update_code_string As String, ByRef confirmation_code As Integer, ByRef extended_error As Integer) As Integer
|
||||
Declare Ansi Function DCDoUpdateCodeFromFile32 Lib "DinkeyChange.dll" Alias "DCDoUpdateCodeFromFile" (ByVal filename As String, ByRef confirmation_code As Integer, ByRef extended_error As Integer) As Integer
|
||||
Declare Ansi Function DCRestoreDinkeyFDLite32 Lib "DinkeyChange.dll" Alias "DCRestoreDinkeyFDLite" () As Integer
|
||||
Declare Ansi Function DCGetMachineID32 Lib "DinkeyChange.dll" Alias "DCGetMachineID" (ByRef machineID As UInt32, ByRef extended_error As Integer) As Integer
|
||||
Declare Ansi Function DCDownloadTempSoftwareKey32 Lib "DinkeyChange.dll" Alias "DCDownloadTempSoftwareKey" (ByVal machineID As UInt32, ByRef extended_error As Integer) As Integer
|
||||
Declare Ansi Function DCDownloadDemoSoftwareKey32 Lib "DinkeyChange.dll" Alias "DCDownloadDemoSoftwareKey" (ByVal machineID As UInt32, ByVal prodcode As String, ByVal model As Integer, ByRef extended_error As Integer) As Integer
|
||||
|
||||
' declarations for functions exported by DinkeyChange64.dll
|
||||
Declare Ansi Function DCGetInfo64 Lib "DinkeyChange64.dll" Alias "DCGetInfo" (ByVal type_mask As Integer, ByVal model_mask As Integer, ByVal prodcode_mask As String, ByVal array_length As Integer, _
|
||||
ByRef num_found As Integer, ByVal type_array() As Integer, ByVal model_array() As Integer, ByVal prodcode_array() As Byte, ByVal dongle_number() As UInt32, ByVal update_number() As Integer) As Integer
|
||||
Declare Ansi Function DCGetDiagnosticInfo64 Lib "DinkeyChange64.dll" Alias "DCGetDiagnosticInfo" (ByVal filename As String) As Integer
|
||||
Declare Ansi Function DCDoUpdateCodeString64 Lib "DinkeyChange64.dll" Alias "DCDoUpdateCodeString" (ByVal update_code_string As String, ByRef confirmation_code As Integer, ByRef extended_error As Integer) As Integer
|
||||
Declare Ansi Function DCDoUpdateCodeFromFile64 Lib "DinkeyChange64.dll" Alias "DCDoUpdateCodeFromFile" (ByVal filename As String, ByRef confirmation_code As Integer, ByRef extended_error As Integer) As Integer
|
||||
Declare Ansi Function DCRestoreDinkeyFDLite64 Lib "DinkeyChange64.dll" Alias "DCRestoreDinkeyFDLite" () As Integer
|
||||
Declare Ansi Function DCGetMachineID64 Lib "DinkeyChange64.dll" Alias "DCGetMachineID" (ByRef machineID As UInt32, ByRef extended_error As Integer) As Integer
|
||||
Declare Ansi Function DCDownloadTempSoftwareKey64 Lib "DinkeyChange64.dll" Alias "DCDownloadTempSoftwareKey" (ByVal machineID As UInt32, ByRef extended_error As Integer) As Integer
|
||||
Declare Ansi Function DCDownloadDemoSoftwareKey64 Lib "DinkeyChange64.dll" Alias "DCDownloadDemoSoftwareKey" (ByVal machineID As UInt32, ByVal prodcode As String, ByVal model As Integer, ByRef extended_error As Integer) As Integer
|
||||
|
||||
'routines that ensure the relevant dll is called depending on whether we are running on 32-bit or 64-bit Windows
|
||||
Function DCGetInfo(ByVal type_mask As Integer, ByVal model_mask As Integer, ByVal prodcode_mask As String, ByVal array_length As Integer, _
|
||||
ByRef num_found As Integer, ByVal type_array() As Integer, ByVal model_array() As Integer, ByVal prodcode_array() As Byte, ByVal dongle_number() As UInt32, ByVal update_number() As Integer) As Integer
|
||||
If (IntPtr.Size = 4) Then
|
||||
DCGetInfo = DCGetInfo32(type_mask, model_mask, prodcode_mask, array_length, num_found, type_array, model_array, prodcode_array, dongle_number, update_number)
|
||||
Else
|
||||
DCGetInfo = DCGetInfo64(type_mask, model_mask, prodcode_mask, array_length, num_found, type_array, model_array, prodcode_array, dongle_number, update_number)
|
||||
End If
|
||||
End Function
|
||||
|
||||
Function DCGetDiagnosticInfo(ByVal filename As String) As Integer
|
||||
If (IntPtr.Size = 4) Then
|
||||
DCGetDiagnosticInfo = DCGetDiagnosticInfo32(filename)
|
||||
Else
|
||||
DCGetDiagnosticInfo = DCGetDiagnosticInfo64(filename)
|
||||
End If
|
||||
End Function
|
||||
|
||||
Function DCDoUpdateCodeString(ByVal update_code_string As String, ByRef confirmation_code As Integer, ByRef extended_error As Integer) As Integer
|
||||
If (IntPtr.Size = 4) Then
|
||||
DCDoUpdateCodeString = DCDoUpdateCodeString32(update_code_string, confirmation_code, extended_error)
|
||||
Else
|
||||
DCDoUpdateCodeString = DCDoUpdateCodeString64(update_code_string, confirmation_code, extended_error)
|
||||
End If
|
||||
End Function
|
||||
|
||||
Function DCDoUpdateCodeFromFile(ByVal filename As String, ByRef confirmation_code As Integer, ByRef extended_error As Integer) As Integer
|
||||
If (IntPtr.Size = 4) Then
|
||||
DCDoUpdateCodeFromFile = DCDoUpdateCodeFromFile32(filename, confirmation_code, extended_error)
|
||||
Else
|
||||
DCDoUpdateCodeFromFile = DCDoUpdateCodeFromFile64(filename, confirmation_code, extended_error)
|
||||
End If
|
||||
End Function
|
||||
|
||||
Function DCRestoreDinkeyFDLite() As Integer
|
||||
If (IntPtr.Size = 4) Then
|
||||
DCRestoreDinkeyFDLite = DCRestoreDinkeyFDLite32()
|
||||
Else
|
||||
DCRestoreDinkeyFDLite = DCRestoreDinkeyFDLite64()
|
||||
End If
|
||||
End Function
|
||||
|
||||
Function DCGetMachineID(ByRef machineID As UInt32, ByRef extended_error As Integer) As Integer
|
||||
If (IntPtr.Size = 4) Then
|
||||
DCGetMachineID = DCGetMachineID32(machineID, extended_error)
|
||||
Else
|
||||
DCGetMachineID = DCGetMachineID64(machineID, extended_error)
|
||||
End If
|
||||
End Function
|
||||
|
||||
Function DCDownloadTempSoftwareKey(ByVal machineID As UInt32, ByRef extended_error As Integer) As Integer
|
||||
If (IntPtr.Size = 4) Then
|
||||
DCDownloadTempSoftwareKey = DCDownloadTempSoftwareKey32(machineID, extended_error)
|
||||
Else
|
||||
DCDownloadTempSoftwareKey = DCDownloadTempSoftwareKey64(machineID, extended_error)
|
||||
End If
|
||||
End Function
|
||||
|
||||
Function DCDownloadDemoSoftwareKey(ByVal machineID As UInt32, ByVal prodcode As String, ByVal model As Integer, ByRef extended_error As Integer) As Integer
|
||||
If (IntPtr.Size = 4) Then
|
||||
DCDownloadDemoSoftwareKey = DCDownloadDemoSoftwareKey32(machineID, prodcode, model, extended_error)
|
||||
Else
|
||||
DCDownloadDemoSoftwareKey = DCDownloadDemoSoftwareKey64(machineID, prodcode, model, extended_error)
|
||||
End If
|
||||
End Function
|
||||
|
||||
' routine to extract product code string from array of product codes
|
||||
Function GetProductCode(ByRef prodcode() As Byte, ByVal index As Integer) As String
|
||||
Dim i As Integer
|
||||
Dim ascii As New ASCIIEncoding()
|
||||
|
||||
For i = 0 To 8
|
||||
If prodcode((index * 9) + i) = 0 Then
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Return ascii.GetString(prodcode, index * 9, i)
|
||||
End Function
|
||||
|
||||
' maximum number of USB devices that can be attached to a machine at any time
|
||||
Public Const MAX_USB_DEVICES As Integer = 128
|
||||
Public Const MAX_PRODCODE_LEN As Integer = 9
|
||||
|
||||
' mask values
|
||||
Public Const TYPE_MASK_PRO As Integer = 1
|
||||
Public Const TYPE_MASK_FD As Integer = 2
|
||||
Public Const TYPE_MASK_ALL As Integer = TYPE_MASK_PRO Or TYPE_MASK_FD
|
||||
|
||||
Public Const MODEL_MASK_LITE As Integer = 1
|
||||
Public Const MODEL_MASK_PLUS As Integer = 2
|
||||
Public Const MODEL_MASK_NET As Integer = 4
|
||||
Public Const MODEL_MASK_ALL As Integer = MODEL_MASK_LITE Or MODEL_MASK_PLUS Or MODEL_MASK_NET
|
||||
Public Const MODEL_MASK_DEFAULT As Integer = MODEL_MASK_PLUS Or MODEL_MASK_NET
|
||||
|
||||
' type values for DCGetInfo (returned in the array)
|
||||
Public Const TYPE_PRO As Integer = 1
|
||||
Public Const TYPE_FD As Integer = 2
|
||||
|
||||
' model values for DCGetInfo (returned in the array)
|
||||
Public Const MODEL_LITE As Integer = 1
|
||||
Public Const MODEL_PLUS As Integer = 2
|
||||
Public Const MODEL_NET5 As Integer = 4
|
||||
Public Const MODEL_NETU As Integer = 7
|
||||
|
||||
' model values for DCDownloadDemoSoftwareKey
|
||||
Public Const SWKEY_MODEL_DEFAULT As Integer = &HFFFFFFFF ' NB this assumes that the Demo Software Key Template was created with only one valid dongle model
|
||||
Public Const SWKEY_MODEL_PRO_LITE As Integer = 0
|
||||
Public Const SWKEY_MODEL_PRO_PLUS As Integer = 1
|
||||
Public Const SWKEY_MODEL_PRO_NET As Integer = 2
|
||||
Public Const SWKEY_MODEL_FD_LITE As Integer = 3
|
||||
Public Const SWKEY_MODEL_FD_PLUS As Integer = 4
|
||||
Public Const SWKEY_MODEL_FD_NET As Integer = 5
|
||||
|
||||
End Module
|
||||
|
||||
@@ -0,0 +1,256 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 1.3
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used forserialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="GetDongleInfo.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="GetDongleInfo.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="GetDongleInfo.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="label1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="label1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="label1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="DiagFilename.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="DiagFilename.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="DiagFilename.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="WriteDiags.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="WriteDiags.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="WriteDiags.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="DoUpdateCodeString.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="DoUpdateCodeString.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="DoUpdateCodeString.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="UpdateCodeString.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="UpdateCodeString.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="UpdateCodeString.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="Label2.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="Label2.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="Label2.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="DoUpdateCodeFile.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="DoUpdateCodeFile.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="DoUpdateCodeFile.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="UpdateCodeFile.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="UpdateCodeFile.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="UpdateCodeFile.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="Label3.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="Label3.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="Label3.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="RestoreFDLite.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="RestoreFDLite.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="RestoreFDLite.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="GetMachineID.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="GetMachineID.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="GetMachineID.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="DownloadSoftwareKey.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="DownloadSoftwareKey.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="DownloadSoftwareKey.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="ShowMachineID.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="ShowMachineID.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="ShowMachineID.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="$this.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="$this.Language" type="System.Globalization.CultureInfo, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>(Default)</value>
|
||||
</data>
|
||||
<data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="$this.Name">
|
||||
<value>Form1</value>
|
||||
</data>
|
||||
<data name="$this.Localizable" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="$this.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>8, 8</value>
|
||||
</data>
|
||||
<data name="$this.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="$this.TrayHeight" type="System.Int32, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>80</value>
|
||||
</data>
|
||||
<data name="$this.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="$this.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
</root>
|
||||
458
Dinkey Pro 7.6.1/Samples/Visual Basic .NET/DinkeyChange/Form1.vb
Normal file
458
Dinkey Pro 7.6.1/Samples/Visual Basic .NET/DinkeyChange/Form1.vb
Normal file
@@ -0,0 +1,458 @@
|
||||
' !! We strongly recommend that you read the "readme.txt" file in the sample code folder.
|
||||
' !! It contains important instructions on how to use the sample code
|
||||
|
||||
Imports System.Text
|
||||
|
||||
Public Class Form1
|
||||
Inherits System.Windows.Forms.Form
|
||||
|
||||
#Region " Windows Form Designer generated code "
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
'This call is required by the Windows Form Designer.
|
||||
InitializeComponent()
|
||||
|
||||
'Add any initialization after the InitializeComponent() call
|
||||
|
||||
End Sub
|
||||
|
||||
'Form overrides dispose to clean up the component list.
|
||||
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
If disposing Then
|
||||
If Not (components Is Nothing) Then
|
||||
components.Dispose()
|
||||
End If
|
||||
End If
|
||||
MyBase.Dispose(disposing)
|
||||
End Sub
|
||||
|
||||
'Required by the Windows Form Designer
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'NOTE: The following procedure is required by the Windows Form Designer
|
||||
'It can be modified using the Windows Form Designer.
|
||||
'Do not modify it using the code editor.
|
||||
Friend WithEvents GetDongleInfo As System.Windows.Forms.Button
|
||||
Friend WithEvents label1 As System.Windows.Forms.Label
|
||||
Friend WithEvents DiagFilename As System.Windows.Forms.TextBox
|
||||
Friend WithEvents WriteDiags As System.Windows.Forms.Button
|
||||
Friend WithEvents DoUpdateCodeString As System.Windows.Forms.Button
|
||||
Friend WithEvents UpdateCodeString As System.Windows.Forms.TextBox
|
||||
Friend WithEvents Label2 As System.Windows.Forms.Label
|
||||
Friend WithEvents DoUpdateCodeFile As System.Windows.Forms.Button
|
||||
Friend WithEvents Label3 As System.Windows.Forms.Label
|
||||
Friend WithEvents UpdateCodeFile As System.Windows.Forms.TextBox
|
||||
Friend WithEvents RestoreFDLite As System.Windows.Forms.Button
|
||||
Friend WithEvents GetMachineID As System.Windows.Forms.Button
|
||||
Friend WithEvents DownloadTempSoftwareKey As System.Windows.Forms.Button
|
||||
Friend WithEvents ShowMachineID As System.Windows.Forms.TextBox
|
||||
Friend WithEvents label4 As System.Windows.Forms.Label
|
||||
Friend WithEvents ProdCode As System.Windows.Forms.TextBox
|
||||
Friend WithEvents DownloadDemoSoftwareKey As System.Windows.Forms.Button
|
||||
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
|
||||
Me.GetDongleInfo = New System.Windows.Forms.Button
|
||||
Me.label1 = New System.Windows.Forms.Label
|
||||
Me.DiagFilename = New System.Windows.Forms.TextBox
|
||||
Me.WriteDiags = New System.Windows.Forms.Button
|
||||
Me.DoUpdateCodeString = New System.Windows.Forms.Button
|
||||
Me.UpdateCodeString = New System.Windows.Forms.TextBox
|
||||
Me.Label2 = New System.Windows.Forms.Label
|
||||
Me.DoUpdateCodeFile = New System.Windows.Forms.Button
|
||||
Me.UpdateCodeFile = New System.Windows.Forms.TextBox
|
||||
Me.Label3 = New System.Windows.Forms.Label
|
||||
Me.RestoreFDLite = New System.Windows.Forms.Button
|
||||
Me.GetMachineID = New System.Windows.Forms.Button
|
||||
Me.DownloadTempSoftwareKey = New System.Windows.Forms.Button
|
||||
Me.ShowMachineID = New System.Windows.Forms.TextBox
|
||||
Me.label4 = New System.Windows.Forms.Label
|
||||
Me.ProdCode = New System.Windows.Forms.TextBox
|
||||
Me.DownloadDemoSoftwareKey = New System.Windows.Forms.Button
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'GetDongleInfo
|
||||
'
|
||||
Me.GetDongleInfo.Location = New System.Drawing.Point(48, 24)
|
||||
Me.GetDongleInfo.Name = "GetDongleInfo"
|
||||
Me.GetDongleInfo.Size = New System.Drawing.Size(216, 24)
|
||||
Me.GetDongleInfo.TabIndex = 0
|
||||
Me.GetDongleInfo.Text = "Get Dongle Information"
|
||||
'
|
||||
'label1
|
||||
'
|
||||
Me.label1.Location = New System.Drawing.Point(16, 72)
|
||||
Me.label1.Name = "label1"
|
||||
Me.label1.Size = New System.Drawing.Size(296, 16)
|
||||
Me.label1.TabIndex = 1
|
||||
Me.label1.Text = "Enter diagnostic filename:"
|
||||
'
|
||||
'DiagFilename
|
||||
'
|
||||
Me.DiagFilename.Location = New System.Drawing.Point(16, 88)
|
||||
Me.DiagFilename.Name = "DiagFilename"
|
||||
Me.DiagFilename.Size = New System.Drawing.Size(288, 20)
|
||||
Me.DiagFilename.TabIndex = 2
|
||||
Me.DiagFilename.Text = ""
|
||||
'
|
||||
'WriteDiags
|
||||
'
|
||||
Me.WriteDiags.Location = New System.Drawing.Point(56, 120)
|
||||
Me.WriteDiags.Name = "WriteDiags"
|
||||
Me.WriteDiags.Size = New System.Drawing.Size(192, 23)
|
||||
Me.WriteDiags.TabIndex = 3
|
||||
Me.WriteDiags.Text = "Write Diagnostics to File"
|
||||
'
|
||||
'Label2
|
||||
'
|
||||
Me.Label2.Location = New System.Drawing.Point(16, 171)
|
||||
Me.Label2.Name = "Label2"
|
||||
Me.Label2.Size = New System.Drawing.Size(296, 16)
|
||||
Me.Label2.TabIndex = 4
|
||||
Me.Label2.Text = "Enter short Update Code here:"
|
||||
'
|
||||
'UpdateCodeString
|
||||
'
|
||||
Me.UpdateCodeString.Location = New System.Drawing.Point(16, 187)
|
||||
Me.UpdateCodeString.Name = "UpdateCodeString"
|
||||
Me.UpdateCodeString.Size = New System.Drawing.Size(288, 20)
|
||||
Me.UpdateCodeString.TabIndex = 5
|
||||
Me.UpdateCodeString.Text = ""
|
||||
'
|
||||
'DoUpdateCodeString
|
||||
'
|
||||
Me.DoUpdateCodeString.Location = New System.Drawing.Point(56, 219)
|
||||
Me.DoUpdateCodeString.Name = "DoUpdateCodeString"
|
||||
Me.DoUpdateCodeString.Size = New System.Drawing.Size(192, 23)
|
||||
Me.DoUpdateCodeString.TabIndex = 6
|
||||
Me.DoUpdateCodeString.Text = "Make Changes"
|
||||
'
|
||||
'Label3
|
||||
'
|
||||
Me.Label3.Location = New System.Drawing.Point(16, 272)
|
||||
Me.Label3.Name = "Label3"
|
||||
Me.Label3.Size = New System.Drawing.Size(296, 16)
|
||||
Me.Label3.TabIndex = 7
|
||||
Me.Label3.Text = "Enter path to Update Code file:"
|
||||
'
|
||||
'UpdateCodeFile
|
||||
'
|
||||
Me.UpdateCodeFile.Location = New System.Drawing.Point(16, 288)
|
||||
Me.UpdateCodeFile.Name = "UpdateCodeFile"
|
||||
Me.UpdateCodeFile.Size = New System.Drawing.Size(288, 20)
|
||||
Me.UpdateCodeFile.TabIndex = 8
|
||||
Me.UpdateCodeFile.Text = ""
|
||||
'
|
||||
'DoUpdateCodeFile
|
||||
'
|
||||
Me.DoUpdateCodeFile.Location = New System.Drawing.Point(56, 320)
|
||||
Me.DoUpdateCodeFile.Name = "DoUpdateCodeFile"
|
||||
Me.DoUpdateCodeFile.Size = New System.Drawing.Size(192, 23)
|
||||
Me.DoUpdateCodeFile.TabIndex = 9
|
||||
Me.DoUpdateCodeFile.Text = "Make Changes"
|
||||
'
|
||||
'RestoreFDLite
|
||||
'
|
||||
Me.RestoreFDLite.Location = New System.Drawing.Point(56, 376)
|
||||
Me.RestoreFDLite.Name = "RestoreFDLite"
|
||||
Me.RestoreFDLite.Size = New System.Drawing.Size(192, 23)
|
||||
Me.RestoreFDLite.TabIndex = 10
|
||||
Me.RestoreFDLite.Text = "Restore FD Lite"
|
||||
'
|
||||
'GetMachineID
|
||||
'
|
||||
Me.GetMachineID.Location = New System.Drawing.Point(24, 432)
|
||||
Me.GetMachineID.Name = "GetMachineID"
|
||||
Me.GetMachineID.Size = New System.Drawing.Size(128, 23)
|
||||
Me.GetMachineID.TabIndex = 11
|
||||
Me.GetMachineID.Text = "Get Machine ID"
|
||||
'
|
||||
'ShowMachineID
|
||||
'
|
||||
Me.ShowMachineID.Location = New System.Drawing.Point(168, 432)
|
||||
Me.ShowMachineID.Name = "ShowMachineID"
|
||||
Me.ShowMachineID.Size = New System.Drawing.Size(136, 20)
|
||||
Me.ShowMachineID.TabIndex = 12
|
||||
Me.ShowMachineID.Text = ""
|
||||
'
|
||||
'DownloadTempSoftwareKey
|
||||
'
|
||||
Me.DownloadTempSoftwareKey.Location = New System.Drawing.Point(56, 488)
|
||||
Me.DownloadTempSoftwareKey.Name = "DownloadTempSoftwareKey"
|
||||
Me.DownloadTempSoftwareKey.Size = New System.Drawing.Size(192, 23)
|
||||
Me.DownloadTempSoftwareKey.TabIndex = 13
|
||||
Me.DownloadTempSoftwareKey.Text = "Download Temporary Software Key"
|
||||
'
|
||||
'label4
|
||||
'
|
||||
Me.label4.Location = New System.Drawing.Point(16, 541)
|
||||
Me.label4.Name = "label4"
|
||||
Me.label4.Size = New System.Drawing.Size(296, 16)
|
||||
Me.label4.TabIndex = 14
|
||||
Me.label4.Text = "Demo Software Key Product Code:"
|
||||
'
|
||||
'ProdCode
|
||||
'
|
||||
Me.ProdCode.Location = New System.Drawing.Point(16, 557)
|
||||
Me.ProdCode.Name = "ProdCode"
|
||||
Me.ProdCode.Size = New System.Drawing.Size(288, 20)
|
||||
Me.ProdCode.TabIndex = 15
|
||||
Me.ProdCode.Text = ""
|
||||
'
|
||||
'DownloadTempSoftwareKey
|
||||
'
|
||||
Me.DownloadDemoSoftwareKey.Location = New System.Drawing.Point(56, 590)
|
||||
Me.DownloadDemoSoftwareKey.Name = "DownloadDemoSoftwareKey"
|
||||
Me.DownloadDemoSoftwareKey.Size = New System.Drawing.Size(192, 23)
|
||||
Me.DownloadDemoSoftwareKey.TabIndex = 16
|
||||
Me.DownloadDemoSoftwareKey.Text = "Download Demo Software Key"
|
||||
'
|
||||
'Form1
|
||||
'
|
||||
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
|
||||
Me.ClientSize = New System.Drawing.Size(320, 636)
|
||||
Me.Controls.Add(Me.DownloadDemoSoftwareKey)
|
||||
Me.Controls.Add(Me.ProdCode)
|
||||
Me.Controls.Add(Me.label4)
|
||||
Me.Controls.Add(Me.ShowMachineID)
|
||||
Me.Controls.Add(Me.DownloadTempSoftwareKey)
|
||||
Me.Controls.Add(Me.GetMachineID)
|
||||
Me.Controls.Add(Me.RestoreFDLite)
|
||||
Me.Controls.Add(Me.DoUpdateCodeFile)
|
||||
Me.Controls.Add(Me.UpdateCodeFile)
|
||||
Me.Controls.Add(Me.Label3)
|
||||
Me.Controls.Add(Me.DoUpdateCodeString)
|
||||
Me.Controls.Add(Me.UpdateCodeString)
|
||||
Me.Controls.Add(Me.Label2)
|
||||
Me.Controls.Add(Me.WriteDiags)
|
||||
Me.Controls.Add(Me.DiagFilename)
|
||||
Me.Controls.Add(Me.label1)
|
||||
Me.Controls.Add(Me.GetDongleInfo)
|
||||
Me.Name = "Form1"
|
||||
Me.Text = "ChangeTest"
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
' Get Dongle Information
|
||||
Private Sub GetDongleInfo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GetDongleInfo.Click
|
||||
Dim sType, sModel, sProdCode, sDisplay As String
|
||||
Dim ret_code, i, num_found As Integer
|
||||
' our arrays
|
||||
Dim type(MAX_USB_DEVICES), model(MAX_USB_DEVICES), update_number(MAX_USB_DEVICES) As Integer
|
||||
Dim prodcode(MAX_USB_DEVICES * MAX_PRODCODE_LEN) As Byte
|
||||
Dim dongle_number(MAX_USB_DEVICES) As UInt32
|
||||
|
||||
' find dongle information for all dongle types, Plus & Net models, for all product codes
|
||||
' NB In practice you will probably want to set the prodcode_mask to the value of your product code
|
||||
ret_code = DCGetInfo(TYPE_MASK_ALL, MODEL_MASK_DEFAULT, Nothing, MAX_USB_DEVICES, num_found, type, model, prodcode, dongle_number, update_number)
|
||||
|
||||
' check error code and display error if an error occurs
|
||||
If ret_code = 401 Then
|
||||
MsgBox("No dongles detected matching the search criteria specified", MsgBoxStyle.OkOnly, "Error")
|
||||
Exit Sub
|
||||
ElseIf ret_code <> 0 Then
|
||||
MsgBox("Error " + Str(ret_code) + " getting dongle information", MsgBoxStyle.OkOnly, "Error")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
' display info from the dongles detected
|
||||
sDisplay = ""
|
||||
For i = 0 To num_found - 1
|
||||
' get type of dongle
|
||||
If type(i) = TYPE_PRO Then
|
||||
sType = "Pro"
|
||||
Else
|
||||
sType = "FD"
|
||||
End If
|
||||
' get model of dongle
|
||||
If model(i) = MODEL_LITE Then
|
||||
sModel = "Lite"
|
||||
ElseIf model(i) = MODEL_PLUS Then
|
||||
sModel = "Plus"
|
||||
Else
|
||||
sModel = "Net"
|
||||
End If
|
||||
' get product code
|
||||
sProdCode = GetProductCode(prodcode, i)
|
||||
sDisplay = sDisplay + Str(i + 1) + ". Dinkey " + sType + " " + sModel + " with dongle number: " + dongle_number(i).ToString + ", product code: " + sProdCode + ", update number: " + Str(update_number(i)) + vbNewLine
|
||||
Next
|
||||
MsgBox(sDisplay, MsgBoxStyle.OkOnly, "Dongle Information")
|
||||
End Sub
|
||||
|
||||
|
||||
' Write Dongle Diagnostics to file
|
||||
Private Sub WriteDiags_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles WriteDiags.Click
|
||||
Dim ret_code As Integer
|
||||
|
||||
ret_code = DCGetDiagnosticInfo(DiagFilename.Text)
|
||||
|
||||
' check error code and display error if an error occurs
|
||||
If ret_code = 754 Then
|
||||
MsgBox("Could not create the diagnostic file. Please check that the path exists: " + DiagFilename.Text, MsgBoxStyle.OkOnly, "Error")
|
||||
Exit Sub
|
||||
ElseIf ret_code <> 0 Then
|
||||
MsgBox("Error " + Str(ret_code) + " writing diagnostic information", MsgBoxStyle.OkOnly, "Error")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
' display success
|
||||
MsgBox("Diagnostic file written successfully.", MsgBoxStyle.OkOnly, "Dongle Information")
|
||||
End Sub
|
||||
|
||||
|
||||
' Apply short update code entered manually
|
||||
Private Sub DoUpdateCodeString_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DoUpdateCodeString.Click
|
||||
Dim ret_code, confirmation_code, extended_error As Integer
|
||||
|
||||
ret_code = DCDoUpdateCodeString(UpdateCodeString.Text, confirmation_code, extended_error)
|
||||
|
||||
' check error code and display error if an error occurs
|
||||
If ret_code <> 0 Then
|
||||
DisplayError(ret_code, extended_error)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
' display success
|
||||
MsgBox("Dongle updated successfully!" + vbNewLine + "Confirmation code is : " + Hex(confirmation_code), MsgBoxStyle.OkOnly, "Dongle Information")
|
||||
End Sub
|
||||
|
||||
Private Sub DoUpdateCodeFile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DoUpdateCodeFile.Click
|
||||
Dim ret_code, confirmation_code, extended_error As Integer
|
||||
|
||||
ret_code = DCDoUpdateCodeFromFile(UpdateCodeFile.Text, confirmation_code, extended_error)
|
||||
|
||||
' check error code and display error if an error occurs
|
||||
If ret_code <> 0 Then
|
||||
DisplayError(ret_code, extended_error)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
' display success
|
||||
MsgBox("Dongle updated successfully!" + vbNewLine + "Confirmation code is : " + Hex(confirmation_code), MsgBoxStyle.OkOnly, "Dongle Information")
|
||||
End Sub
|
||||
|
||||
Private Sub RestoreFDLite_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RestoreFDLite.Click
|
||||
Dim ret_code As Integer
|
||||
|
||||
ret_code = DCRestoreDinkeyFDLite()
|
||||
|
||||
' check error code and display error if an error occurs
|
||||
If ret_code <> 0 Then
|
||||
DisplayError(ret_code, 0)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
' display success
|
||||
MsgBox("Dinkey FD Lite updated successfully!", MsgBoxStyle.OKOnly, "Dongle Information")
|
||||
End Sub
|
||||
|
||||
Private Sub GetMachineID_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GetMachineID.Click
|
||||
Dim ret_code, extended_error As Integer
|
||||
Dim machineID As UInt32
|
||||
|
||||
ret_code = DCGetMachineID(machineID, extended_error)
|
||||
|
||||
' check error code and display error if an error occurs
|
||||
If ret_code <> 0 Then
|
||||
DisplayError(ret_code, extended_error)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
' success - display the machineID
|
||||
ShowMachineID.Text = String.Format("{0:X8}", machineID)
|
||||
End Sub
|
||||
|
||||
Private Sub DownloadTempSoftwareKey_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DownloadTempSoftwareKey.Click
|
||||
Dim ret_code, extended_error As Integer
|
||||
Dim machineID As UInt32
|
||||
|
||||
' first get the machine ID
|
||||
ret_code = DCGetMachineID(machineID, extended_error)
|
||||
|
||||
' check error code and display error if an error occurs
|
||||
If ret_code <> 0 Then
|
||||
DisplayError(ret_code, extended_error)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
' ...then try to download the temporary software key
|
||||
ret_code = DCDownloadTempSoftwareKey(machineID, extended_error)
|
||||
|
||||
' check error code and display error if an error occurs
|
||||
If ret_code <> 0 Then
|
||||
DisplayError(ret_code, extended_error)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
MsgBox("The Temporary Software Key has been downloaded successfully!", MsgBoxStyle.OKOnly, "Dongle Information")
|
||||
End Sub
|
||||
|
||||
Private Sub DownloadDemoSoftwareKey_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DownloadDemoSoftwareKey.Click
|
||||
Dim ret_code, extended_error As Integer
|
||||
Dim machineID As UInt32
|
||||
|
||||
' first get the machine ID
|
||||
ret_code = DCGetMachineID(machineID, extended_error)
|
||||
|
||||
' check error code and display error if an error occurs
|
||||
If ret_code <> 0 Then
|
||||
DisplayError(ret_code, extended_error)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
' ...then try to download the demo software key
|
||||
' (NB we are assuming only one dongle model is set in the Demo Software Template.
|
||||
' If multiple models are set you will also need to specify the exact model)
|
||||
ret_code = DCDownloadDemoSoftwareKey(machineID, ProdCode.Text, SWKEY_MODEL_DEFAULT, extended_error)
|
||||
|
||||
' check error code and display error if an error occurs
|
||||
If ret_code <> 0 Then
|
||||
DisplayError(ret_code, extended_error)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
MsgBox("The Demo Software Key has been downloaded successfully!", MsgBoxStyle.OKOnly, "Dongle Information")
|
||||
End Sub
|
||||
|
||||
' look at the error code and try to display an appropriate message
|
||||
Private Sub DisplayError(ByVal ret_code As Integer, ByVal extended_error As Integer)
|
||||
Select Case ret_code
|
||||
Case 401
|
||||
MsgBox("Error! No dongles detected that meet the search criteria", MsgBoxStyle.OkOnly, "Error")
|
||||
Case 409
|
||||
MsgBox("Error! The dongle detected has not been programmed by DinkeyAdd.", MsgBoxStyle.OkOnly, "Error")
|
||||
Case 758
|
||||
MsgBox("Error! Cannot open the Update Code file specified.", MsgBoxStyle.OkOnly, "Error")
|
||||
Case 759
|
||||
MsgBox("Error! The file specified is not a valid Update Code file.", MsgBoxStyle.OkOnly, "Error")
|
||||
Case 762, 763, 764
|
||||
MsgBox("Error! Update Code is not in a correct format / update code file is corrupt.", MsgBoxStyle.OkOnly, "Error")
|
||||
Case 765
|
||||
MsgBox("Error! The Update Code does not match any dongle attached to your machine.", MsgBoxStyle.OkOnly, "Error")
|
||||
Case 766
|
||||
MsgBox("Error! The update number for this Update Code is too high. You need to first enter an update code that was previously sent to you.", MsgBoxStyle.OkOnly, "Error")
|
||||
Case 767
|
||||
MsgBox("Error! You have already entered this Update Code.", MsgBoxStyle.OkOnly, "Error")
|
||||
Case 1905
|
||||
MsgBox("Error! There is no Software Key available for download.", MsgBoxStyle.OkOnly, "Error")
|
||||
Case 1907
|
||||
MsgBox("Error! The Temporary Software Key has expired. Cannot download it.", MsgBoxStyle.OkOnly, "Error")
|
||||
Case 1910
|
||||
MsgBox("Error! The Software Key has already been downloaded.", MsgBoxStyle.OkOnly, "Error")
|
||||
Case 1921
|
||||
MsgBox("Error! You specified the 'default model' but there is more than one model available. You need to specify a specific dongle model.", MsgBoxStyle.OkOnly, "Error")
|
||||
Case 1922:
|
||||
MsgBox("Error! The model you requested is not available.", MsgBoxStyle.OkOnly, "Error")
|
||||
Case 1923:
|
||||
MsgBox("Error! The Demo Software Key Template has been disabled.", MsgBoxStyle.OkOnly, "Error")
|
||||
Case 1924:
|
||||
MsgBox("Error! You have run out of Demo Software Key activations. You need to order some more.", MsgBoxStyle.OkOnly, "Error")
|
||||
Case Else
|
||||
MsgBox("An error occurred checking the dongle. Error: " + Str(ret_code) + ". Extended Error: " + Str(extended_error) + ".", MsgBoxStyle.OkOnly, "Error")
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,61 @@
|
||||
ChangeTest - sample code to call DinkeyChange.dll (DinkeyChange64.dll) in VB.NET
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
This project is written in Visual Studio 2003 but will work in more recent versions of
|
||||
Visual Studio (they will upgrade the Project to the latest version. If prompted you
|
||||
should also upgrade the .NET framework the project requires).
|
||||
|
||||
For users of Visual Studio 2005 or higher, the default setting to projects is to compile
|
||||
for the Target Platform "Any". This means that on 32-bit Windows, your code will run as
|
||||
32-bit code (and needs to call DinkeyChange.dll) and under 64-bit Windows your code will
|
||||
run as 64-bit code (and needs to call DinkeyChange64.dll). The sample code works this out
|
||||
automatically. If you select the target platform as "x86" then it will always be 32-bit
|
||||
and so you only need to use DinkeyChange.dll. If you select "x64" then your code will be
|
||||
64-bit and you only need to use DinkeyChange64.dll.
|
||||
|
||||
The main source files in the project are:
|
||||
|
||||
DinkeyChange.vb - the source file contains declarations of our API. We automatically
|
||||
work out whether your code is running in 32-bit or 64-bit and load the
|
||||
appropriate DinkeyChange module.
|
||||
|
||||
Form1.vb - this is the sample code giving an example on how you can call our API.
|
||||
It contains 7 functions. Just use which ever functions are most appropriate
|
||||
and customise in your own way.
|
||||
|
||||
The best approach is to compile the sample code and see how it works and then to take the
|
||||
appropriate code and apply it to your own project. You should include the DinkeyChange.vb
|
||||
file in your project and use/modify which ever functions from Form1.vb you feel are
|
||||
appropriate. The DinkeyChange.vb file should not be modified.
|
||||
|
||||
The sample code is just a guide. As none of the parameters are security sensitive then
|
||||
there is no need to implement strong security in calling DinkeyChange.
|
||||
|
||||
Make sure you remember to do the following when creating your own project:
|
||||
|
||||
1) Insert the DinkeyChange.vb file in your project.
|
||||
|
||||
2) You need to put DinkeyChange.dll and/or DinkeyChange64.dll into the folder that
|
||||
contains your EXE file. Otherwise the message "Unable to open DLL (DinkeyChange.dll)" or
|
||||
the System.DllNotFoundException error will appear when you run ChangeTest.
|
||||
|
||||
You can rename DinkeyChange.dll (DinkeyChange64.dll) to a name of your choice. In this
|
||||
case you will need to modify the dll name in the DinkeyChange.vb file.
|
||||
|
||||
Notes on Debugging 64-bit Code
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
When you use the 64-bit module (DinkeyChange64.dll) the anti-debug code is so strong that
|
||||
if you are debugging your code, after calling our API then it will crash with an SEH
|
||||
exception. If you want to be able to debug your code then you can setup your project so
|
||||
that your code calls the debug module (DinkeyChange64Debug.dll) in your "debug" build and
|
||||
the standard module (DinkeyChange64.dll) in your release build. In this case you will
|
||||
need to modify the declarations of our API in DinkeyChange.vb. This is an example for
|
||||
DCDoUpdateCodeFromFile64:
|
||||
|
||||
#if DEBUG ' debug module
|
||||
Declare Ansi Function DCDoUpdateCodeFromFile64 Lib "DinkeyChange64Debug.dll" Alias "DCDoUpdateCodeFromFile" _
|
||||
(ByVal filename As String, ByRef confirmation_code As Integer, ByRef extended_error As Integer) As Integer
|
||||
#else ' standard module
|
||||
Declare Ansi Function DCDoUpdateCodeFromFile64 Lib "DinkeyChange64.dll" Alias "DCDoUpdateCodeFromFile" _
|
||||
(ByVal filename As String, ByRef confirmation_code As Integer, ByRef extended_error As Integer) As Integer
|
||||
#endif
|
||||
Reference in New Issue
Block a user