[Toc][Index]

DosAllocShrSeg



#define INCL_DOSMEMMGR

USHORT  rc = DosAllocShrSeg(Size, Name, Selector);

USHORT           Size;          /* Number of bytes requested */
PSZ              Name;          /* Name string */
PSEL             Selector;      /* Selector allocated (returned) */

USHORT           rc;            /* return code */

Example 
This example requests a segment of memory with 27 bytes named "stock.dat". 

#define INCL_DOSMEMMGR

#define NUMBER_OF_BYTES 27
#define NAME_SEG "\\SHAREMEM\\stock.dat"

SEL    Selector;
USHORT rc;

   rc = DosAllocShrSeg(NUMBER_OF_BYTES,   /* # of bytes requested */
                       NAME_SEG,          /* Name string */
                       &Selector);        /* Selector allocated */


Created using Inf-PHP v.2 (c) 2003 Yuri Prokushev
Created using Inf-HTML v.0.9b (c) 1995 Peter Childs