Procedure ("Callback") called by fMemOpen
if the memory zone is modified by another WLanguage application. This procedure can be a local, global or internal procedure.
// Create/Open a memory zone shared between applications (1st application)
arrZoneID is associative array of int
Zone1ID is int
Zone1ID = fMemOpen("MySharedZone", 1024, shareGlobal, ...
arrZoneID["MySharedZone"] = Zone1ID
// Create/Open a memory zone shared
// between applications (2nd application) -
// no callback
Zone2ID is int
Zone2ID = fMemOpen("MySharedZone", 1024, shareGlobal)
// Write into the shared memory zone
fWrite(Zone2ID, "Hello, I am a WINDEV application!")
// The writing performed by the 2nd application triggers
// the call to the procedure in the 1st application
// Procedure called whenever the shared memory zone is modified
PROCEDURE ModificationProcedure(NameNotifZone is string)
ModifiedString is string
ModifiedString = fRead(arrZoneID[NameNotifZone], 1024)
Trace(StringBuild("The %1 string was written into the %2 zone", ModifiedString, NameNotifZone))
<Zone name>: Optional character string
This optional parameter must be used when a unique callback is used to receive the notifications of several shared memory zones
Depending on how the memory zone is created, this parameter can be prefixed:
- with the "Global\" string if the zone has been created with the shareGlobal constant.
- with the "Local\" string if the zone has been created with the shareUser constant.
Business / UI classification: Neutral code