PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP


  • Error cases
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
diffApply (Function)
In french: diffApplique
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 sought.
  • 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).
Component : wd250std.dll
Minimum version required
  • Version 15
This page is also available for…
Comments
Click [Add] to post a comment