Koriolis:
How did you create your shared memory block?
Searching on google for Shared Memory, all I found was Filemapping using INVALID_HANDLE.
But this seems like a slow way to share memory as it uses the pagefile for this.
However one method I found seems fast enough.
Creating shared variables in a DLL using #pragma data_seg.
Then both applications loads the DLL and reads/writes to these shared variables.
Possibly using SetEvent/ResetEvent to prevent accessing the variable at the same time.(not mutexes as these has rumors of being "slow")
One CodeProject.com, one guy created his own mutex(using the method above) which was VERY fast compared to the standard mutex.
I think that his "mutex-version" locked and unlocked the mutex 100000 times in 250 milliseconds while the standard mutex took about 6800 milliseconds.
How did you create your shared memory block?
Searching on google for Shared Memory, all I found was Filemapping using INVALID_HANDLE.
But this seems like a slow way to share memory as it uses the pagefile for this.
However one method I found seems fast enough.
Creating shared variables in a DLL using #pragma data_seg.
Then both applications loads the DLL and reads/writes to these shared variables.
Possibly using SetEvent/ResetEvent to prevent accessing the variable at the same time.(not mutexes as these has rumors of being "slow")
One CodeProject.com, one guy created his own mutex(using the method above) which was VERY fast compared to the standard mutex.
I think that his "mutex-version" locked and unlocked the mutex 100000 times in 250 milliseconds while the standard mutex took about 6800 milliseconds.