Named Shared Memory Objects

Related processes generally use a single named shared memory object for storing queue data. The server process allocates the memory object by calling DosAllocSharedMem. Care must be taken to ensure that the memory object is large enough to meet application requirements.

The name of the shared memory object is established by agreement among the server and the client processes. For simplicity, the name can be the same as the queue name, except that the prefix \SHAREMEM\ must be used instead of \QUEUES\.

A client process accesses the named shared memory object by calling DosGetNamedSharedMem. It must then call DosOpenQueue to gain access to the queue of the server.

Before the server process ends, it releases the memory object by calling DosFreeMem.


[Back: Allocating Memory for Queue Data]
[Next: Unnamed Shared Memory Objects]