unit CustomWinlicenseSDK;

{$ALIGN ON}
{$MINENUMSIZE 4}

interface

uses
  Windows;

type  
sLicenseFeatures = record 

     cb: LongWord; 
     NumDays: LongWord; 
     NumExec: LongWord; 
     ExpDate: SYSTEMTIME; 
     CountryId: LongWord;
     Runtime: LongWord; 
     GlobalMinutes: LongWord; 
     InstallDate: SYSTEMTIME; 
     NetInstances: LongWord; 
     EmbedLicenseInfoInKey: LongWord; 
     EmbedCreationDate: LongWord 

end; 


function WLCustomGenLicenseFileKey(UserName:PAnsiChar; Organization:PAnsiChar; CustomData:PAnsiChar; MachineID:PAnsiChar; NumDays:Integer; NumExec:Integer; var ExpDate:SYSTEMTIME; CountryId:Integer; Runtime:Integer; GlobalMinutes:Integer; BufferOut:PAnsiChar):Integer; stdcall;
function WLCustomGenLicenseFileKeyW(UserName:PWideChar; Organization:PWideChar; CustomData:PWideChar; MachineID:PWideChar; NumDays:Integer; NumExec:Integer; var ExpDate:SYSTEMTIME; CountryId:Integer; Runtime:Integer; GlobalMinutes:Integer; BufferOut:PAnsiChar):Integer; stdcall;
function WLCustomGenLicenseFileKeyEx(UserName:PAnsiChar; Organization:PAnsiChar; CustomData:PAnsiChar; MachineID:PAnsiChar; var LicenseFeatures: sLicenseFeatures; BufferOut:PAnsiChar):Integer; stdcall;
function WLCustomGenLicenseFileKeyExW(UserName:PWideChar; Organization:PWideChar; CustomData:PWideChar; MachineID:PWideChar; var LicenseFeatures: sLicenseFeatures; BufferOut:PAnsiChar):Integer; stdcall;
function WLCustomGenLicenseRegistryKey(UserName:PAnsiChar; Organization:PAnsiChar; CustomData:PAnsiChar; MachineID:PAnsiChar; NumDays:Integer; NumExec:Integer; var ExpDate:SYSTEMTIME; CountryId:Integer; Runtime:Integer; GlobalMinutes:Integer; KeyName:PAnsiChar; KeyValueName:PAnsiChar; BufferOut:PAnsiChar):Integer; stdcall;
function WLCustomGenLicenseRegistryKeyW(UserName:PWideChar; Organization:PWideChar; CustomData:PWideChar; MachineID:PWideChar; NumDays:Integer; NumExec:Integer; var ExpDate:SYSTEMTIME; CountryId:Integer; Runtime:Integer; GlobalMinutes:Integer; KeyName:PWideChar; KeyValueName:PWideChar; BufferOut:PAnsiChar):Integer; stdcall;
function WLCustomGenLicenseRegistryKeyEx(UserName:PAnsiChar; Organization:PAnsiChar; CustomData:PAnsiChar; MachineID:PAnsiChar; var LicenseFeatures: sLicenseFeatures; KeyName:PAnsiChar; KeyValueName:PAnsiChar; BufferOut:PAnsiChar):Integer; stdcall;
function WLCustomGenLicenseRegistryKeyExW(UserName:PWideChar; Organization:PWideChar; CustomData:PWideChar; MachineID:PWideChar; var LicenseFeatures: sLicenseFeatures; KeyName:PWideChar; KeyValueName:PWideChar; BufferOut:PWideChar):Integer; stdcall;
function WLCustomGenLicenseTextKeyW(UserName:PWideChar; Organization:PWideChar; CustomData:PWideChar; MachineID:PWideChar; NumDays:Integer; NumExec:Integer; var ExpDate:SYSTEMTIME; CountryId:Integer; Runtime:Integer; GlobalMinutes:Integer; BufferOut:PWideChar):Integer; stdcall;
function WLCustomGenLicenseTextKey(UserName:PAnsiChar; Organization:PAnsiChar; CustomData:PAnsiChar; MachineID:PAnsiChar; NumDays:Integer; NumExec:Integer; var ExpDate:SYSTEMTIME; CountryId:Integer; Runtime:Integer; GlobalMinutes:Integer; BufferOut:PAnsiChar):Integer; stdcall;
function WLCustomGenLicenseTextKeyEx(UserName:PAnsiChar; Organization:PAnsiChar; CustomData:PAnsiChar; MachineID:PAnsiChar; var LicenseFeatures: sLicenseFeatures; BufferOut:PAnsiChar):Integer; stdcall;
function WLCustomGenLicenseTextKeyExW(UserName:PWideChar; Organization:PWideChar; CustomData:PWideChar; MachineID:PWideChar; var LicenseFeatures: sLicenseFeatures; BufferOut:PWideChar):Integer; stdcall;
function WLCustomGenLicenseSmartKey(UserName:PAnsiChar; Organization:PAnsiChar; CustomData:PAnsiChar; MachineID:PAnsiChar; NumDays:Integer; NumExec:Integer; var ExpDate:SYSTEMTIME; BufferOut:PAnsiChar):Integer; stdcall;
function WLCustomGenLicenseSmartKeyW(UserName:PWideChar; Organization:PWideChar; CustomData:PWideChar; MachineID:PWideChar; NumDays:Integer; NumExec:Integer; var ExpDate:SYSTEMTIME; BufferOut:PWideChar):Integer; stdcall;
function WLCustomGenLicenseDynSmartKey(UserName:PAnsiChar; Organization:PAnsiChar; CustomData:PAnsiChar; MachineID:PAnsiChar; var LicenseFeatures: sLicenseFeatures; BufferOut:PAnsiChar):Integer; stdcall;
function WLCustomGenLicenseDynSmartKeyW(UserName:PWideChar; Organization:PWideChar; CustomData:PWideChar; MachineID:PWideChar; var LicenseFeatures: sLicenseFeatures; BufferOut:PWideChar):Integer; stdcall;


implementation

const

CustomWinlicenseDLL = 'CustomWinlicenseSDK.dll';

function WLCustomGenLicenseFileKey; external CustomWinlicenseDLL name 'WLCustomGenLicenseFileKey';
function WLCustomGenLicenseFileKeyW; external CustomWinlicenseDLL name 'WLCustomGenLicenseFileKeyW';
function WLCustomGenLicenseFileKeyEx; external CustomWinlicenseDLL name 'WLCustomGenLicenseFileKeyEx';
function WLCustomGenLicenseFileKeyExW; external CustomWinlicenseDLL name 'WLCustomGenLicenseFileKeyExW';
function WLCustomGenLicenseRegistryKeyEx; external CustomWinlicenseDLL name 'WLCustomGenLicenseRegistryKeyEx';
function WLCustomGenLicenseRegistryKeyExW; external CustomWinlicenseDLL name 'WLCustomGenLicenseRegistryKeyEx';
function WLCustomGenLicenseTextKeyEx; external CustomWinlicenseDLL name 'WLCustomGenLicenseTextKeyEx';
function WLCustomGenLicenseTextKeyExW; external CustomWinlicenseDLL name 'WLCustomGenLicenseTextKeyExW';
function WLCustomGenLicenseRegistryKey; external CustomWinlicenseDLL name 'WLCustomGenLicenseRegistryKey';
function WLCustomGenLicenseRegistryKeyW; external CustomWinlicenseDLL name 'WLCustomGenLicenseRegistryKeyW';
function WLCustomGenLicenseTextKey; external CustomWinlicenseDLL name 'WLCustomGenLicenseTextKey';
function WLCustomGenLicenseTextKeyW; external CustomWinlicenseDLL name 'WLCustomGenLicenseTextKeyW';
function WLCustomGenLicenseSmartKey; external CustomWinlicenseDLL name 'WLCustomGenLicenseSmartKey';
function WLCustomGenLicenseSmartKeyW; external CustomWinlicenseDLL name 'WLCustomGenLicenseSmartKeyW';
function WLCustomGenLicenseDynSmartKey; external CustomWinlicenseDLL name 'WLCustomGenLicenseDynSmartKey';
function WLCustomGenLicenseDynSmartKeyW; external CustomWinlicenseDLL name 'WLCustomGenLicenseDynSmartKeyW';

end.

