AzSDK HardwareID Dll 5.00 with Full Source
AzSDK HardwareID Dll 5.00 with Full Source
AzSDK HardwareID DLL is a standard Windows dynamic link library (32-Bit) and allows you to get unique machine fingerprint collected from CPU, HDD, BIOS, NIC components in your windows programs. HardwareID DLL can work with Windows 9x to Vista and Win7, doesn't require to have administrator rights and can work in restricted areas. The fingerprint ID is obtained directly from the hardware, not from registry. Our solution allows you to select hardware to make ID as you wish.
AzSDK HardwareID is reliable API to generate unique simplified ID to identify each computer. You can use this ID to lock each license just by machine with your existing license copy protection. Now you can prevent unauthorized installation or coping and increase your sales.
Key Features
Support .NET and Win32 application.
Support generate unique simplified ID to identify each computer and your each programs.
Support detect whether running in a virtual machine environment.
Support many development languages, such as Delphi, C++Builder, VC, VB, C#, VB.NET, PowerBuilder, PowerBasic, Visual Foxpro, Clarion ect.
Support calling DLL from Microsoft VBA, such as Word, Excel, Access, PowerPoint 2000 / 2003 /2007 etc.
Support rename HardwareID.DLL to other file name or placed to other folder.
100% Safe DLL file, can not to be Some firewalls (like Zone alarm) block.
Hardware ID is affordable and reliable API than dongle price and easy to use.
Hardware ID is a simplified ID so that anyone can communicate by phone, fax or email.
No delay time to delivery your software, no need to send anything by post.
Windows 2000, Windows XP, Windows 2003, Windows VISTA, Windows 7, Windows 8, Windows 2008 R2.
Support Windows 32-bit and Windows 64-bit.
» 1. Delphi Sample Code: Generate unique HardwareID by App name in Delphi
const
DLLFile = '.\HardwareID.DLL';
var
Form1: TForm1;
procedure SetLicenseKey(Regcode: PAnsiChar); stdcall; external DLLFile;
procedure SetAppName(AppName: PAnsiChar); stdcall; external DLLFile;
function GetHardwareId(HDD, NIC, CPU, BIOS: LongBool; lpHWID: PAnsiChar; nMaxCount: Integer): Integer; stdcall; external DLLFile;
function GetDllVer(lpVersion: PAnsiChar; nMaxCount: Integer): Integer; stdcall; external DLLFile;
function IsInsideVMWare(): Integer; stdcall; external DLLFile;
function IsInsideVirtualPC(): Integer; stdcall; external DLLFile;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
var
sVer: array[0..254] of AnsiChar;
begin
GetDllVer(sVer, SizeOf(sVer));
Self.Caption:= Format('AzSDK HardwareId DLL [%s] DEMO', [sVer]);
SetLicenseKey('Your-License-Key');
if IsInsideVMWare = 1 then
labIsVMware.Caption:= 'Yes';
if IsInsideVirtualPC = 1 then
labIsVirtualPC.Caption:= 'Yes';
end;
procedure TForm1.btnGetClick(Sender: TObject);
var
sHWID: array[0..254] of AnsiChar;
iRtn: Integer;
begin
SetAppName('');
iRtn:= GetHardwareId(cbHDD.Checked, cbNIC.Checked, cbCPU.Checked, cbBIOS.Checked, sHWID, SizeOf(sHWID));
if iRtn > 0 then
Edit0.Text := sHWID;
end;
procedure TForm1.btnGetWithAppClick(Sender: TObject);
var
sHWID: array[0..254] of AnsiChar;
iRtn: Integer;
sAppName: String;
begin
//Set your application name
sAppName:= Edit1.Text;
SetAppName(PAnsiChar(sAppName));
iRtn:= GetHardwareId(cbHDD.Checked, cbNIC.Checked, cbCPU.Checked, cbBIOS.Checked, sHWID, SizeOf(sHWID));
if iRtn > 0 then
Edit2.Text := sHWID;
end;
» 2. C++ Builder Sample Code: Generate unique HardwareID in C++ Builder
//---------------------------------------------------------------------------
#pragma hdrstop
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
void (__stdcall *SetLicenseKey)(char*);
void (__stdcall *SetAppName)(char*);
int (__stdcall *GetHardwareId)(BOOL, BOOL, BOOL, BOOL, char*, int);
HINSTANCE DllInst = NULL;
//---------------------------------------------------------------------------
void __fastcall TForm1::Button2Click(TObject *Sender)
{
char lpHWID[255];
int iRtn;
SetAppName("");
iRtn = GetHardwareId(cbHDD->Checked, cbNIC->Checked, cbCPU->Checked, cbBIOS->Checked, lpHWID, 255);
if (iRtn > 0)
{
Edit1->Text = lpHWID;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::btnGetWithAppClick(TObject *Sender)
{
char lpHWID[255];
int iRtn;
SetAppName(Edit2->Text.c_str());
iRtn = GetHardwareId(cbHDD->Checked, cbNIC->Checked, cbCPU->Checked, cbBIOS->Checked, lpHWID, 255);
if (iRtn > 0)
{
Edit3->Text = lpHWID;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::FormCreate(TObject *Sender)
{
if (DllInst == NULL) DllInst = LoadLibrary("HardwareID.dll");
if (DllInst)
{
SetLicenseKey = (void (__stdcall*)(char*))GetProcAddress(DllInst,"SetLicenseKey");
SetAppName = (void (__stdcall*)(char*))GetProcAddress(DllInst,"SetAppName");
GetHardwareId = (int (__stdcall*)(BOOL, BOOL, BOOL, BOOL, char*, int))GetProcAddress(DllInst,"GetHardwareId");
SetLicenseKey("Your-License-Key");
}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::FormDestroy(TObject *Sender)
{
if ( DllInst ) FreeLibrary (DllInst);
}
//---------------------------------------------------------------------------
#pragma hdrstop
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
void (__stdcall *SetLicenseKey)(char*);
void (__stdcall *SetAppName)(char*);
int (__stdcall *GetHardwareId)(BOOL, BOOL, BOOL, BOOL, char*, int);
HINSTANCE DllInst = NULL;
//---------------------------------------------------------------------------
void __fastcall TForm1::Button2Click(TObject *Sender)
{
char lpHWID[255];
int iRtn;
SetAppName("");
iRtn = GetHardwareId(cbHDD->Checked, cbNIC->Checked, cbCPU->Checked, cbBIOS->Checked, lpHWID, 255);
if (iRtn > 0)
{
Edit1->Text = lpHWID;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::btnGetWithAppClick(TObject *Sender)
{
char lpHWID[255];
int iRtn;
SetAppName(Edit2->Text.c_str());
iRtn = GetHardwareId(cbHDD->Checked, cbNIC->Checked, cbCPU->Checked, cbBIOS->Checked, lpHWID, 255);
if (iRtn > 0)
{
Edit3->Text = lpHWID;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::FormCreate(TObject *Sender)
{
if (DllInst == NULL) DllInst = LoadLibrary("HardwareID.dll");
if (DllInst)
{
SetLicenseKey = (void (__stdcall*)(char*))GetProcAddress(DllInst,"SetLicenseKey");
SetAppName = (void (__stdcall*)(char*))GetProcAddress(DllInst,"SetAppName");
GetHardwareId = (int (__stdcall*)(BOOL, BOOL, BOOL, BOOL, char*, int))GetProcAddress(DllInst,"GetHardwareId");
SetLicenseKey("Your-License-Key");
}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::FormDestroy(TObject *Sender)
{
if ( DllInst ) FreeLibrary (DllInst);
}
//---------------------------------------------------------------------------
» 3. C# Sample Code: Generate unique HardwareID with C# (C-Sharp)
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices; //DllImport namespace
namespace Project
{
public partial class Form1 : Form
{
// Declare Statement, Import HardwareID.dll
[DllImport("HardwareID.dll")]
public static extern void SetLicenseKey(string LicenseKey);
[DllImport("HardwareID.dll")]
public static extern void SetAppName(string AppName);
[DllImport("HardwareID.dll", EntryPoint = "GetHardwareId", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall, SetLastError = true)]
public static extern int GetHardwareId(bool HDD, bool NIC, bool CPU, bool BIOS, StringBuilder lpHWID, int nMaxCount);
[DllImport("HardwareID.dll", EntryPoint = "IsInsideVMWare", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall, SetLastError = true)]
public static extern bool IsInsideVMWare();
[DllImport("HardwareID.dll", EntryPoint = "IsInsideVirtualPC", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall, SetLastError = true)]
public static extern bool IsInsideVirtualPC();
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
SetAppName("");
//Marshal.PtrToStringAnsi();
StringBuilder lpHWID = new StringBuilder(255);
GetHardwareId(cb_HDD.Checked, cb_NIC.Checked, cb_CPU.Checked, cb_BIOS.Checked, lpHWID, 255);
textBox1.Text = lpHWID.ToString();
}
private void button2_Click(object sender, EventArgs e)
{
SetAppName(textBox2.Text);
StringBuilder lpHWID = new StringBuilder(255);
GetHardwareId(cb_HDD.Checked, cb_NIC.Checked, cb_CPU.Checked, cb_BIOS.Checked, lpHWID, 255);
textBox3.Text = lpHWID.ToString();
}
private void Form1_Load(object sender, EventArgs e)
{
SetLicenseKey("Your-License-Key");
if (IsInsideVMWare())
{
labVMWare.Text = "Yes";
}
}
}
}
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices; //DllImport namespace
namespace Project
{
public partial class Form1 : Form
{
// Declare Statement, Import HardwareID.dll
[DllImport("HardwareID.dll")]
public static extern void SetLicenseKey(string LicenseKey);
[DllImport("HardwareID.dll")]
public static extern void SetAppName(string AppName);
[DllImport("HardwareID.dll", EntryPoint = "GetHardwareId", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall, SetLastError = true)]
public static extern int GetHardwareId(bool HDD, bool NIC, bool CPU, bool BIOS, StringBuilder lpHWID, int nMaxCount);
[DllImport("HardwareID.dll", EntryPoint = "IsInsideVMWare", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall, SetLastError = true)]
public static extern bool IsInsideVMWare();
[DllImport("HardwareID.dll", EntryPoint = "IsInsideVirtualPC", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall, SetLastError = true)]
public static extern bool IsInsideVirtualPC();
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
SetAppName("");
//Marshal.PtrToStringAnsi();
StringBuilder lpHWID = new StringBuilder(255);
GetHardwareId(cb_HDD.Checked, cb_NIC.Checked, cb_CPU.Checked, cb_BIOS.Checked, lpHWID, 255);
textBox1.Text = lpHWID.ToString();
}
private void button2_Click(object sender, EventArgs e)
{
SetAppName(textBox2.Text);
StringBuilder lpHWID = new StringBuilder(255);
GetHardwareId(cb_HDD.Checked, cb_NIC.Checked, cb_CPU.Checked, cb_BIOS.Checked, lpHWID, 255);
textBox3.Text = lpHWID.ToString();
}
private void Form1_Load(object sender, EventArgs e)
{
SetLicenseKey("Your-License-Key");
if (IsInsideVMWare())
{
labVMWare.Text = "Yes";
}
}
}
}
» 4. VB.NET Sample Code: Generate unique HardwareID with vb.net
Public Class Form1
Public Declare Sub SetLicenseKey Lib "HardwareID.dll" (ByVal LicenseKey As String)
Public Declare Sub SetAppName Lib "HardwareID.dll" (ByVal AppName As String)
Public Declare Function GetHardwareId Lib "HardwareID.dll" (ByVal HDD As Boolean, ByVal NIC As Boolean, ByVal CPU As Boolean, ByVal BIOS As Boolean, ByVal lpHWID As String, ByVal nMaxCount As Integer) As Integer
Public Declare Function IsInsideVMWare Lib "HardwareID.dll" () As Boolean
Public Declare Function IsInsideVirtualPC Lib "HardwareID.dll" () As Boolean
Public Sub New()
InitializeComponent()
End Sub
Protected Overrides Sub Finalize()
MyBase.Finalize()
End Sub
Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click
Dim iRetVal As Long
Dim lpHWID As String
If (Not cb_HDD.Checked) And (Not cb_NIC.Checked) And (Not cb_CPU.Checked) And (Not cb_BIOS.Checked) Then
textBox1.Text = ""
Exit Sub
End If
SetAppName("")
lpHWID = Space(255)
iRetVal = GetHardwareId(cb_HDD.Checked, cb_NIC.Checked, cb_CPU.Checked, cb_BIOS.Checked, lpHWID, 255)
textBox1.Text = lpHWID
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim iRetVal As Long
Dim lpHWID As String
If (Not cb_HDD.Checked) And (Not cb_NIC.Checked) And (Not cb_CPU.Checked) And (Not cb_BIOS.Checked) Then
textBox1.Text = ""
Exit Sub
End If
SetAppName(TextBox2.Text)
lpHWID = Space(255)
iRetVal = GetHardwareId(cb_HDD.Checked, cb_NIC.Checked, cb_CPU.Checked, cb_BIOS.Checked, lpHWID, 255)
TextBox3.Text = lpHWID
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
SetLicenseKey("Your-License-Key")
If IsInsideVMWare() Then
LabVmware.Text = "Yes"
End If
If IsInsideVirtualPC() Then
LabVirtualPC.Text = "Yes"
End If
End Sub
End Class
Public Declare Sub SetLicenseKey Lib "HardwareID.dll" (ByVal LicenseKey As String)
Public Declare Sub SetAppName Lib "HardwareID.dll" (ByVal AppName As String)
Public Declare Function GetHardwareId Lib "HardwareID.dll" (ByVal HDD As Boolean, ByVal NIC As Boolean, ByVal CPU As Boolean, ByVal BIOS As Boolean, ByVal lpHWID As String, ByVal nMaxCount As Integer) As Integer
Public Declare Function IsInsideVMWare Lib "HardwareID.dll" () As Boolean
Public Declare Function IsInsideVirtualPC Lib "HardwareID.dll" () As Boolean
Public Sub New()
InitializeComponent()
End Sub
Protected Overrides Sub Finalize()
MyBase.Finalize()
End Sub
Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click
Dim iRetVal As Long
Dim lpHWID As String
If (Not cb_HDD.Checked) And (Not cb_NIC.Checked) And (Not cb_CPU.Checked) And (Not cb_BIOS.Checked) Then
textBox1.Text = ""
Exit Sub
End If
SetAppName("")
lpHWID = Space(255)
iRetVal = GetHardwareId(cb_HDD.Checked, cb_NIC.Checked, cb_CPU.Checked, cb_BIOS.Checked, lpHWID, 255)
textBox1.Text = lpHWID
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim iRetVal As Long
Dim lpHWID As String
If (Not cb_HDD.Checked) And (Not cb_NIC.Checked) And (Not cb_CPU.Checked) And (Not cb_BIOS.Checked) Then
textBox1.Text = ""
Exit Sub
End If
SetAppName(TextBox2.Text)
lpHWID = Space(255)
iRetVal = GetHardwareId(cb_HDD.Checked, cb_NIC.Checked, cb_CPU.Checked, cb_BIOS.Checked, lpHWID, 255)
TextBox3.Text = lpHWID
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
SetLicenseKey("Your-License-Key")
If IsInsideVMWare() Then
LabVmware.Text = "Yes"
End If
If IsInsideVirtualPC() Then
LabVirtualPC.Text = "Yes"
End If
End Sub
End Class
Only for V.I.P
Warning! You are not allowed to view this text.