|
Memory problem in C
Hi:
I'm trying to do this:
-A C program write the memory pointer to one of its structures in a file (ex: 00278F92). And after that, he waits in execution.
-Another C Program begins its execution, open the file, catch 00278F92, and use it to point the structure (which is defined too in this second program of course). Then it begin to search in this structure, but it fails. At one moment i see that he's pointing to FFFFFFFF.
If I write exactly the same code in the first program, something like this
newstruct=0x00278F92;
search(newstruct);
It works fine! So I think this is a problem with shared memory or similar, the first program don't let the second to see "its" memory.
Anybody knows how to work like this? What to doing?
Thanks. A lot of thanks!
|