I\'m trying to understand something about HGLOBAL
s, because I just found out that what I thought is simply wrong.
In app A I GlobalAlloc()
data
Don't be confused with GMEM_SHARE
flag. It does not work the way you possibly supposed. From MSDN:
The following values are obsolete, but are provided for compatibility with 16-bit Windows. They are ignored.
GMEM_SHARE
GMEM_SHARE flag explained by Raymond Chen:
In 16-bit Windows, the GMEM_SHARE flag controlled whether the memory should outlive the process that allocated it.
To share memory with another process/application you instead should take a look at File Mappings: Memory-mapped files and how they work.