This section describes how you can use DosAllocSharedMem,
DosGiveSharedMem, DosGetSharedMem,
and DosGetNamedSharedMem to use
shared memory.
There are three types of shared memory:
- Named, where a process allocates and names shared
memory. A second process can use the shared memory by using DosGetNamedSharedMem,
specifying the name of the shared memory.
- Unnamed giveable, where a process gives another process
access to shared memory with DosGiveSharedMem,
using the PID of the second process.
- Unnamed gettable, where a process knows the address
of shared memory they want to use (allocated by another process), gets permission
to use that memory with DosGetSharedMem,
and then uses the shared memory.
The difference among these different types of shared memory is not in how
the memory is allocated by the original process, but in how the second process
gets permission to use and access to the shared memory. All three types
of shared memory are allocated with the same call: DosAllocSharedMem,
using various parameters.
[Back]
[Next]