[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 DosFreeRealSeg()              Free selector previously allocated with DosAllocRealSeg()
------------------------------------------------------------------------------

 Function : Free a selector previously allocated with DosAllocRealSeg()

 Syntax   : USHORT BLXAPI DosFreeRealSeg(SEL selector);

 selector   Protected mode selector of a conventional memory block allocated
            through DosAllocRealSeg().

 Return   : None

 This function is used to free conventional memory blocks allocated through
 DosAllocRealSeg(), and should not be used to free any other type of
 selector.

 Example:

    #include <stdlib.h>
    #include <stdio.h>
    #include <string.h>
    #include <blx286.h>
    void main(void)
    {
    SEL         selector;
    USHORT      paragraph;
    /* Allocate a 4 Kb block */
    if (DosAllocRealSeg(4096, &paragraph, &selector) != 0)
       {
       printf("DosAllocRealSeg() failed\n");
       exit(255);
       }
    printf("4 Kb conventional block allocated\n");
    printf("Selector for block : %04X\n",selector);
    printf("Segment of block : %04X\n",paragraph);
    if (DosFreeRealSeg(selector) != 0)
       {
       printf("DosFreeRealSeg() failed - selector = %04X\n",
          selector);
       exit(254);
       }
    }

See Also: DosFreeSeg() DosFreeSelector()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson