pb (PVOID) - input

      The base virtual address of the giveable shared memory object as assigned by DosAllocSharedMem.

    pid (PID) - input

      The identifier of the target process that is to receive access to the shared memory object.

    flag (ULONG) - input

      Access protection flags.

      A set of attribute flags that specify the desired access protection for the shared memory object.

      Desired Access Protection

      The following access protections are available:

    • PAG_READ Read access.

    • PAG_WRITE
      Write access.

    • PAG_EXECUTE
      Execute access to the committed pages in the shared memory object.

    • PAG_GUARD
      Access to the committed pages in the shared memory object causes a "guard page entered" condition to be raised in the subject process.

      At least one of the bits, PAG_READ, PAG_WRITE, or PAG_EXECUTE must be specified.

    ulrc (APIRET) - returns

      Return Code.

      DosGiveSharedMem returns one of the following values:

    • NO_ERROR 5
        ERROR_ACCESS_DENIED
      8
        ERROR_NOT_ENOUGH_MEMORY
      87
        ERROR_INVALID_PARAMETER
      95
        ERROR_INTERRUPT
      212
        ERROR_LOCKED
      303
        ERROR_INVALID_PROCID
      487
        ERROR_INVALID_ADDRESS
      For a full list of error codes, see Errors.


    [Back] [Next]