Use a class template to define the SharedMem manager class. This allows to re-use exactly the same SharedMemTemplate.h code for sharing data between different hooks. You just need to create specific struct definitions that you pass to the SharedMem Template to create a dedicated manager object.
Instead of storing just a pointer to the heap in shared memory, put the whole shared structure in the memory mapped file for simplicity.
To signal the availability of data from the hook, use a binary semaphore. This is optional, it's up to the producer and consumer to use the IsDataReady() function.
Use a class template to define the SharedMem manager class. This allows to re-use exactly the same SharedMemTemplate.h code for sharing data between different hooks. You just need to create specific struct definitions that you pass to the SharedMem Template to create a dedicated manager object.
Instead of storing just a pointer to the heap in shared memory, put the whole shared structure in the memory mapped file for simplicity.
To signal the availability of data from the hook, use a binary semaphore. This is optional, it's up to the producer and consumer to use the IsDataReady() function.
This PR depends on https://github.com/JeremyAnsel/xwa_hooks/pull/9 and https://github.com/Prof-Butts/Hook_XWACockpitLook/pull/20