
Click above to get retro games delivered to your door ever month!
X-Hacker.org- libc - <b>__djgpp_set_page_attributes</b>
[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
__djgpp_set_page_attributes
===========================
Syntax
------
#include <dpmi.h>
int __djgpp_set_page_attributes(void *our_addr, unsigned long num_bytes,
unsigned short attributes);
Description
-----------
This function sets the DPMI page attributes for the pages in a range of
memory. OUR_ADDR and NUM_BYTES must be page-aligned. If they are not
page-aligned, ERRNO will be set to `EINVAL' and the routine will fail.
Consult DPMI documentation on function 0507H for the meaning of the
ATTRIBUTES argument. Note: since 0507H is a DPMI service new with DPMI
1.0, this call will fail on most DPMI 0.9 servers. For your program to
work on a wide range of systems, you should not assume this call will
succeed.
Even on failure, this routine may affect a subset of the pages
specified.
Return Value
------------
0 on success, -1 on failure. On failure, ERRNO will be set to `EINVAL'
for illegal input parameters, or `EACCES' if the DPMI server rejected
the attribute setting.
Example
-------
if (__djgpp_set_page_attributes (my_page_aligned_memory, 16384, 0))
printf ("Failed to make pages uncommitted!\n");
Online resources provided by: http://www.ousob.com --- NG 2 HTML conversion by Dave Pearson