Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Delphi Examples of Aztec Encoder SDK/DLL

Delphi Examples of Aztec Encoder SDK/DLL 4 years 2 months ago #3889

type
LPAZTECCONTEXT = ^TAztecContext;
TAztecContext = record
encodeMode : Integer;
correctionLevel : Integer;
configType : Integer;
rune : Integer;
pixelSize : Integer;
margin : Integer;
structuredAppendCounter : Integer;
structuredAppendIndex : Integer;
dataSize : Integer;
processTilde : boolean;
structuredAppend : boolean;
foreColor : TColor;
backColor : TColor;
fileID : PChar;
encodedData : array[1..3750] of char;
end;

procedure InitWorkSpace(pAztecCtx : LPAZTECCONTEXT ); stdcall; external 'AZTECENCODEDLL.DLL';
function AztecEncode2File(pAztecCtx : LPAZTECCONTEXT;lpImageFile :PChar) : boolean; stdcall;external 'AZTECENCODEDLL.DLL';
function AztecEncode2Bitmap(pAztecCtx : LPAZTECCONTEXT) : HBITMAP;stdcall; external 'AZTECENCODEDLL.DLL';
function FreeWorkSpace : boolean; stdcall external 'AZTECENCODEDLL.DLL';

procedure TForm1.Button1Click(Sender: TObject);
var
tAztecCtx : TAztecContext;
i : Integer;
bmp : HBITMAP;
img :TBitmap;
pCtx : LPAZTECCONTEXT;
begin
try
pCtx := @tAztecCtx;
InitWorkSpace(pCtx);

tAztecCtx.configType := ComboBox3.ItemIndex;
tAztecCtx.correctionLevel := ComboBox2.ItemIndex+1;
tAztecCtx.encodeMode := ComboBox1.ItemIndex;

tAztecCtx.structuredAppendIndex := StrToInt(Edit2.Text);
tAztecCtx.structuredAppendCounter := StrToInt(Edit4.Text);
tAztecCtx.structuredAppend := CheckBox2.Checked;
tAztecCtx.processTilde := CheckBox2.Checked;
tAztecCtx.dataSize := length(Edit6.Text);
tAztecCtx.margin := StrToInt(Edit5.Text);
tAztecCtx.pixelSize := StrToInt(Edit3.Text);
if (Edit6.Text <> '') then
StrMove(@tAztecCtx.encodedData,PChar(Edit6.Text),length(Edit6.Text));
bmp := AztecEncode2Bitmap(pCtx);
except
end;
end;
The administrator has disabled public write access.

  • Posts:59
  • developer's Avatar
  • developer
  • Moderator
  • OFFLINE
  • Karma: 1
  • Page:
  • 1
Time to create page: 0.186 seconds
Powered by Kunena Forum :: Wibi