PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | French EN
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
Extracts an integer from a binary buffer at a given position.
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 22 and later
Android Widget This function is now available in Android Widget mode.
Android This function is now available for Android applications.
Java This function is now available for Java applications.
PHP This function is now available for PHP sites.
New in version 22
Android Widget This function is now available in Android Widget mode.
Android This function is now available for Android applications.
Java This function is now available for Java applications.
PHP This function is now available for PHP sites.
Android Widget This function is now available in Android Widget mode.
Android This function is now available for Android applications.
Java This function is now available for Java applications.
PHP This function is now available for PHP sites.
Versions 26 and later
Apple Watch This function is now available for Apple Watch applications.
New in version 26
Apple Watch This function is now available for Apple Watch applications.
Apple Watch This function is now available for Apple Watch applications.
Example
// Extract integer at byte 52 from the test.raw file
 
// Load buffer that corresponds to the test.raw file
bMyBuffer is Buffer = fLoadBuffer("C:\Test\test.raw")
// Check loading
IF bMyBuffer = "" THEN
Error("Error reading buffer")
RETURN
END
// Extract integer at byte 52
nMyInteger is int = BufferToInteger(bMyBuffer, 52)
Syntax
<Result> = BufferToInteger(<Buffer to use> [, <Position> [, <Number of bytes to read>]])
<Result>: Integer
Integer extracted from the buffer.
<Buffer to use>: Buffer
Name of the buffer variable loaded in memory containing the integer. This parameter can also correspond to an Ansi or Unicode string.
<Position>: Optional integer
Position at which the integer will be searched. The first position of the buffer corresponds to 0.
By default, <Position> is set to 0.
<Number of bytes to read>: Optional integer
Number of bytes on which the integer is encoded. The value of this parameter can be set to 1, 2, 4 or 8.
By default, <Number of bytes to read> is set to 4.
Remarks
  • By default, the integer is read at the beginning of the buffer as an unsigned 4-byte integer (32 bits).
  • The bytes are read in Little-Endian mode (the low byte is read first).
Business / UI classification : Neutral code
Component : wd260std.dll
Minimum version required
  • Version 18
This page is also available for…
Comments
Click [Add] to post a comment