TheMoog
asked on
access memory from another process c plus plus
Hi chaps, can anyone explain to me how the following could be achieved?
I create a console ap which reads data into memory, there is an overall pointer that accesses the collection. The collection is arrays that are on the heap and the collection is just pointers to the arrays thats basically it.
What I want to know and if it can be done how to do it is this:
I want to read the data into memory at the start of the day and just leave it open until I close the application. I want to run a new console application ie another separate process and access the data thats already in memory. Can this be done? and How? Cheers
PS Im in native C++ not managed.
I create a console ap which reads data into memory, there is an overall pointer that accesses the collection. The collection is arrays that are on the heap and the collection is just pointers to the arrays thats basically it.
What I want to know and if it can be done how to do it is this:
I want to read the data into memory at the start of the day and just leave it open until I close the application. I want to run a new console application ie another separate process and access the data thats already in memory. Can this be done? and How? Cheers
PS Im in native C++ not managed.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Can you help me, I cant compile:
--------------------Config uration: memory - Win32 Debug--------------------
Compiling...
memory.cpp
C:\Documents and Settings\XPL.XPL-7B13B0B69 55\memory. cpp(9) : error C2664: '_wtoi' : cannot convert parameter 1 from 'char *' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\XPL.XPL-7B13B0B69 55\memory. cpp(13) : error C2664: '_wtoi' : cannot convert parameter 1 from 'char *' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\XPL.XPL-7B13B0B69 55\memory. cpp(16) : error C2065: 'wprintf' : undeclared identifier
C:\Documents and Settings\XPL.XPL-7B13B0B69 55\memory. cpp(23) : error C2664: '_wtoi' : cannot convert parameter 1 from 'char *' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\XPL.XPL-7B13B0B69 55\memory. cpp(32) : error C2664: 'wsprintfA' : cannot convert parameter 1 from 'unsigned short [32767]' to 'char *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Error executing cl.exe.
--------------------Config
Compiling...
memory.cpp
C:\Documents and Settings\XPL.XPL-7B13B0B69
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\XPL.XPL-7B13B0B69
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\XPL.XPL-7B13B0B69
C:\Documents and Settings\XPL.XPL-7B13B0B69
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\XPL.XPL-7B13B0B69
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Error executing cl.exe.
try to change "w" function to their ansi analogs, _wtoi => atoi, wprintf => printf, etc.
Try it...
project->property->configu ration property->charecter set-> use unicode charecter set.
project->property->configu
ASKER