Named versus Anonymous Shared Memory Objects

Shared memory objects may be named or anonymous. Named shared memory objects have names of the form:

\SHAREMEM\<objectname.ext>

A named shared memory object may be accessed by another process using the DosGetNamedSharedMem() function.

An anonymous shared memory object must be declared as "giveable" or "gettable" when it is allocated, in order that it may be made available to other processes using the DosGiveSharedMem() or DosGetSharedMem() functions. An example is given in Figure "Allocating Shared Memory".

The DosGiveSharedMem() function can be used at any time to provide another process with a specified level of access to a memory object, provided that the owner of the memory object knows the process ID of the process to which access is to be given.


[Back: Shared Memory Objects]
[Next: Committing Shared Memory Objects]