PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Managing errors
  • Decoding QRCode
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Decodes the information stored in a QR Code bar code. This bar code is contained in an image (image displayed in an Image control, file of an image or image in memory).
Caution: The QR Code must cover a sufficient section of source image and it must be sufficiently contrasted and clear in order for the decoding to be performed.
Versions 17 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
WEBDEV - Server codeWindows This function is now available for the WEBDEV sites in Windows.
Linux This function is now available for the Linux applications and sites.
New in version 17
iPhone/iPad This function is now available for the iPhone/iPad applications.
WEBDEV - Server codeWindows This function is now available for the WEBDEV sites in Windows.
Linux This function is now available for the Linux applications and sites.
iPhone/iPad This function is now available for the iPhone/iPad applications.
WEBDEV - Server codeWindows This function is now available for the WEBDEV sites in Windows.
Linux This function is now available for the Linux applications and sites.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Versions 23 and later
Android Widget This function is now available in Android Widget mode.
Android This function is now available for the Android applications.
New in version 23
Android Widget This function is now available in Android Widget mode.
Android This function is now available for the Android applications.
Android Widget This function is now available in Android Widget mode.
Android This function is now available for the Android applications.
Example
WINDEVWindows Mobile
// Decode a QR Code from a Camera control
s is Buffer
s = dSaveImageBMP(CAM_NoName1, inMemory)
bc is BarCodes
bc = BCDecode(s)
IF ErrorOccurred = False _AND_ bc..TypeBarCode = BC_QRCODE _AND_ bc..TypeContent =  ...
bcTypeEmail THEN
    Info("Email address: " + bc..Content)
END
Syntax
<Result> = BCDecode(<Image>)
<Result>: BarCodes variable
Name of BarCodes variable initialized with the information read in the bar code.
<Image>: Character string (with or without quotes)
Image of bar code to decode. This parameter can correspond to:
Remarks

Managing errors

To find out whether the retrieval failed, use:
  • the ErrorOccurred variable,
  • the ..TypeBarCode property of BarCodes variable. If this property differs from BC_QRCODE, the bar code was not detected or decoded.

Decoding QRCode

The table below presents the correspondence between the ..TypeContent and ..Content properties of BarCodes variable:
Type of contentType of value (..Content)Note
bcTypeTextCharacter stringExample: "WINDEV is great!"
bcTypePhoneCharacter stringExample: "0612345678"
bcTypeSMSCharacter string
The members of the SMS structure (SMS.Message and SMS.Number) will be automatically filled with the values read in the bar code. The content will correspond to a string in the following format: <Number> + CR + <Message>
Example: "0612345678<CR>Text to send"
bcTypeURLCharacter stringExample: "http://www.google.com"
bcTypeMarketCharacter stringExample: "market://search?q=pname:com.company.application"
bcTypeWiFiCharacter stringCharacter string in the following format:
<SSID> + TAB + <Security Protocol>+ TAB + <Key>
Example: "MyNetwork<TAB>WPA<TAB>pwd"
bcTypeEmailCharacter stringExample: "name@email.com"
bcTypeContactEmpty.
The members of the mContact structure will be automatically filled with the values read in the bar code.
bcTypeLocationgeoPosition variable.
The ..Latitude and ..Longitude properties of the variable will be automatically filled with the values read in the bar code.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230barc.dll
Windows Mobile wp230barc.dll
Linux wd230barc.so
Android wd230android.jar
Minimum required version
  • Version 16
This page is also available for…
Comments
Click [Add] to post a comment