Mail Archives: djgpp/1996/11/06/15:10:09
Eric Christopherson wrote:
>
> There is a program, called A.
> Program A has a variable V.
> Program A shells out and runs Program B, passing a pointer to V (in
> hex).
> Is it at all possible for B to read V (if A and B are compiled with
> DJGPP)?
> I don't know much about MSDOS memory management, and this is something
> that has bugged me for awhile.
> --
> +-- - - . .x
> | Eric Christopherson |
> x. . - - --+
If your not running under dpmi 1.0 (very rare) this can be done easily.
What ou want to do is also pass the selector of the variable (_my_ds()
in go32.h I beleive)
and use the _far* functions in sys/farptr.h to access it.
dpmi 1.0 is supposed to give each program it's own address space (as I
understand it)
and so B could not access anything in A unless you used shared memory
(see the dpmi 1.0 spec)
Bill
--
Leave others their otherness.
- Raw text -