Allocates a shared memory object within the virtual-address space.
#define INCL_DOSMEMMGR
#include <os2.h>
PPVOID ppb; /* A pointer to a variable that will receive the base address of the allocated range of pages. */
PSZ pszName; /* An optional address of the name string associated with the shared memory object to be allocated. */
ULONG cb; /* Size, in bytes, of the shared memory object to allocate. */
ULONG flag; /* Allocation attribute and desired access protection flags. */
APIRET ulrc; /* Return Code. */
ulrc = DosAllocSharedMem(ppb, pszName, cb,
flag);