ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Attention : This is version 26 of this documentation page. This feature may have been changed or removed in a higher version.
This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / Managing databases / HFSQL functions / Compatible Hyper File functions
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
BinaryLoad (Function)
In french: BinaireCharge
HFSQLHFSQL Client/ServerAvailable only with these kinds of connection
Warning
BinaryLoad is kept for backward compatibility (this function will still be supported in the forthcoming version).
Since version 8, the operating mode of memo items was improved: there is no need to load in memory the file associated with the memo item. To benefit from these new features, use HLinkMemo.
Below is the documentation of BinaryLoad, available in WINDEV 5.5.
 
Purpose
Loading a binary file in a 4.1 binary memo item (initialize a binary memo with the content of a file)
Syntax
<Item> = BinaryLoad(<File Name> [, <Type> [, <User Info>]])
  • <Item> is a character string containing the name of the "binary memo" item
  • <File Name> is a character string containing the binary file to load
  • <Type> is a three-character string identifying the type of the file. It can take the following value:
    • "IMG" to indicate that the file is an image file
    • "WAV" to indicate that the file is a sound file
    • "OLE" to indicate that the file is an OLE file
    • "BIN" to indicate that the file is an ordinary binary file (default value)
  • <User Info> is a character string containing an information message (up to 32 characters)
Details
BinaryLoad initializes the <Item> variable with the content of the binary file.
<Type> is used to give information about the type of the file independently of the item type (but BinaryLoad does not check that the file is a <Type> file).
If <Type> takes a different value from "IMG", "WAV", "OLE" or "BIN", the default "any binary file" type will apply.
The <UserInfo> message is stored with the file in the binary memo.
It can be retrieved by BinaryInfo.
Notes
  • Binary memos (sound, Image , OLE and other) are the new binary memos of WINDEV 4.1 (binary memos of WINDEV 4.0 cannot be handled by BinaireLoad).
    The type of the Sound binary memos is "WAV".
    The type of the Image binary memos is "IMG".
    The type of the OLE binary memos is "OLE".
    The type of the binary memos is "BIN".
  • The <Type> information allows you to classify files according to their types for later use with operations that can be performed on these files.
  • The <UserInfo> information can be retrieved by BinaryInfo.
  • The content of a binary memo can be retrieved by BinarySave.
  • To "empty" a binary memo, use the following syntax: <Item Name>=NULL
    CUSTOMER.PHOTO = Null
  • ScreenToFile does not manage the binary memos so don't forget to assign the variable of the binary memo item with BinaryLoad before adding the record with HAdd or before modifying the record with HModify (if the value of the memo is not modified, there is not need to reassign the variable of the memo item)
  • If the type of the binary memo is "IMG", you have the ability to use BitmapInfo to get information about the image; similarly, the image can be printed by iPrintImage:
    CUSTOMER.PHOTO = BinaryLoad(FileName, "IMG")
    BitmapInfo(CUSTOMER.PHOTO)
  • If the type of the binary memo is WAV, you have the ability to use Sound to play the sound:
    ANIMAL.SOUND = BinaryLoad(File Name, "WAV")
    Sound(ANIMAL.SOUND)
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 01/01/2021

Send a report | Local help