Chilkat HOME .NET Core C# Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi ActiveX Delphi DLL Go Java Lianja Mono C# Node.js Objective-C PHP ActiveX PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift 2 Swift 3,4,5... Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
(Unicode C) ZATCA Decode QR CodeSee more ZATCA ExamplesDecodes a base64 ZATCA QR code. Note: This example requires Chilkat v9.5.0.92 or greater.
#include <C_CkBinDataW.h> void ChilkatSample(void) { const wchar_t *qr; HCkBinDataW bd; BOOL success; int index; int expectedTag; int tag; int len; const wchar_t *tagValue; // Note: This example requires Chilkat v9.5.0.92 or greater. qr = L"ARdBaG1lZCBNb2hhbWVkIEFMIEFobWFkeQIPMzAwMDc1NTg4NzAwMDAzAxQyMDIyLTAzLTEzVDE0OjQwOjQwWgQHMTEwOC45MAUFMTQ0LjkGLCtiQTFtdWNWSTY3SDRXQ2JOL2U5SjJxVXBIVHQzVHdNZHhsa09XVGVvdjg9B2BNRVlDSVFDWWg1ZTNpcklxV2w1WXRhQ25LaXVqTUlUbW9rWFlPUE1wSURDSW9XVzc5d0loQU1YbWMrTUZIR3RhZUJzZU91RUdUbHdENmcwOWdOUVBSUHVZODlzNjVPV1MIWDBWMBAGByqGSM49AgEGBSuBBAAKA0IABNMAr2WtNWSj2uSrplhxz0cNFk/hv1LjMDgqbthcn6ydNWEuTNTQeyZJf1SfyMOFFM4cMpp+3wL+65Rj3fi+4w0JSDBGAiEAlcAzHKujzvjHJrAV1M/79RnYRqe66kmtgMUykr/N/CACIQDgTQwbfftw0pYo6FX8c63Q4edvFgt+7JhHaBlla0qRtQ=="; qr = L"AQxGaXJveiBBc2hyYWYCCjEyMzQ1Njc4OTEDEzIwMjEtMTEtMTcgMDg6MzA6MDAEBjEwMC4wMAUFMTUuMDAGLDlmc3JYVW8rU3BYQVlJTkw5aGFLU2dEOXgxaVJsZk53SVBDZnBlWXczYTA9B1hYMEM4VjFIL3hUMGdOaytWWXh2U2Z6UFJlUjZPM2t5VXA0TERITzJLMzlNSGJETXVvTGltQSt3RnovV2pVdEdMSHpaK0J5enNmWUdEQzliNUFGSU1FQT09CFgwVjAQBgcqhkjOPQIBBgUrgQQACgNCAARw3B+mu14x0h3pJFKqEWWT7DmD7jWYkZV7qHyikPlN4P/4/b7YD+A9wnFI92HTKm+/BGKXVf/pfLtsmdIIaPHnCUgwRgIhAMTjOkWwcNu5Aw5k1Yr3YgbPhdxKoJV1a3+5ShPtx1/IAiEAyrwsA/NuqV6XjybyrZpMp6eJAqslACLfCldti/PVOQs="; bd = CkBinDataW_Create(); success = CkBinDataW_AppendEncoded(bd,qr,L"base64"); index = 0; expectedTag = 1; while ((expectedTag <= 9)) { // Get the tag tag = CkBinDataW_GetByte(bd,index); if (tag != expectedTag) { wprintf(L"Expected tag %d\n",expectedTag); CkBinDataW_Dispose(bd); return; } index = index + 1; len = CkBinDataW_GetByte(bd,index); if (len == 0) { wprintf(L"Expected length > 0\n"); CkBinDataW_Dispose(bd); return; } index = index + 1; // Tags 8 and 9 contain binary data. if (expectedTag >= 8) { tagValue = CkBinDataW_getEncodedChunk(bd,index,len,L"base64"); } else { tagValue = CkBinDataW_getTextChunk(bd,index,len,L"utf-8"); } wprintf(L"tag %d: %s\n",tag,tagValue); index = index + len; expectedTag = expectedTag + 1; } CkBinDataW_Dispose(bd); } |
© 2000-2024 Chilkat Software, Inc. All Rights Reserved.