PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
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
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.
The documentation about BinaryLoad available in WINDEV 5.5 is as follows.
 
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
  • The binary memos (sound, image, OLE, ...) are the new binary memos of WINDEV 4.1 (the binary memos of WINDEV 4.0 cannot be handled by BinaryLoad).
    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 <User Info> 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 required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment