Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
c++ - pointers to global memory
How can I get adress of an varible (table, structure) that indicates not only the position in local space of a program (in win32) but position in memory, so an other aplication could enter it. By the definitions od Ansi C the "far*" would be it, but when I run a program twice (I run the second program without closeing the first) , I get the same adress, so it can not be an global adress. Lucas sorry for my engish - it's not my native Dec 13 2002
Each process gets it's own unique address space which cannot be shared with other processes. You need to make some Win32 API calls to create a 'shared memory' area for different processes. Try looking up CreateFileMapping(), MapViewOfFile() & OpenFilemapping(). Owerlord wrote:How can I get adress of an varible (table, structure) that indicates not only the position in local space of a program (in win32) but position in memory, so an other aplication could enter it. By the definitions od Ansi C the "far*" would be it, but when I run a program twice (I run the second program without closeing the first) , I get the same adress, so it can not be an global adress. Lucas sorry for my engish - it's not my native Dec 13 2002
|