Re: Memory !!!



On Thu, 14 Jun 2001 16:09:17 +0530 (IST), Anil Kumar P - Roll No.98002 said:
I have a small problem
   I want to access a memory location assigned to a variable in program, in
 another program ( a different process)
      For instance if in 1.c  we have
      main()
      {
              int p = 5;
              printf("%p",&p);
              getchar();
      }
      This program will print the address of p.
      Now I want to access the value of p in another program. Can anyone
 tell me how to do this ?

why is this question asked on the GTK+ ml?

Anyway, quite simple, modify the other program to allow to send via pipes the
address of the var you want to print, connect a pipe from app 1 to app 2, send
the pointer to var via the pipe, use app 1 to display it.
-- 
bandai kaosu jikuu
EKS - Dave Poirier





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]