ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Windows functions / Miscellaneous WINDEV functions
  • Error cases
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Applies a difference buffer to a specific buffer. The difference buffer was created by diffCreate.

This function can be useful when updating a file by Internet: all you have to do is send the difference file and apply it when it is received.
Example
MySourceString is string = "abcde"
MyEndString is string = "abcdef"
MyDifferenceBuffer is Buffer
MyDifferenceBuffer = diffCreate(MySourceString, MyEndString, diffText)
MyDecodeBuffer is Buffer
MyDecodeBuffer = diffApply(MySourceString, MyDifferenceBuffer)
// MyDecodeBuffer = MyEndString
SourceBuffer is Buffer
EndBuffer is Buffer
// Load the buffers
// ..
MyDifferenceBuffer is Buffer
MyDifferenceBuffer = diffCreate(SourceBuffer, EndBuffer, diffBinary)
MyDecodeBuffer is Buffer
MyDecodeBuffer = diffApply(SourceBuffer, MyDifferenceBuffer)
Syntax
<Result> = diffApply(<Buffer to process> , <Difference buffer>)
<Result>: Buffer variable
Result once the difference buffer has been applied. This result can correspond to:
  • the new buffer searched.
  • an empty buffer if an error occurred. In this case, the ErrorOccurred variable is set to True.
<Buffer to process>: Buffer variable
Name of buffer to process.
<Difference buffer>: Buffer variable
Name of the difference buffer that must be applied to <Buffer to process>. This buffer was created by diffCreate.
Remarks

Error cases

Applying the difference buffer may fail in the following cases:
  • The difference buffer does not use a recognized format.
  • <Buffer to process> is not the buffer from which the difference buffer was created.
  • The result does not correspond to the buffer that must be found (internal check).
Business / UI classification: Business Logic
Component: wd290std.dll
Minimum version required
  • Version 15
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help