Mail Archives: djgpp/1997/01/12/08:52:02
On Thu, 9 Jan 1997, Peter Berdeklis wrote:
> I'm trying to lock some DOS memory for a real mode interrupt handler and a
> bunch of DMA buffers, but every call to __dpmi_lock_linear_region returns
> a -1. Why?
AFAIK, DOS memory is always locked anyway. So why do you want to lock
it?
> vector_mem.handle = 0; // should be don't care for this call, right?
> vector_mem.size = handler_size;
> vector_mem.address = real_mode_int_segment << 4; // dos memory always in
> // paragraphs so offset=0,
> // right?
>
> if( __dpmi_lock_linear_region( &vector_mem ) == -1 )
> exit(-1); // region not locked, exit
> }
`real_mode_int_segment' isn't a valid protected-mode address (else you
could just dereference it as a pointer, instead of the farptr, dosmemget
and such, right?), that's why the call fails (I think).
- Raw text -