I need a native dll (writen in C or C++) that can be injected into a DirectX9 process. The dll should then hook the directx module, read every frame and write it to some memory allocated in the same process. Writing the image should be done using a global mutex so another process can read the images.
The dll must provide a way for other processes to get some data about everything:
- the address and size of the memory region where the images will be written.
- the mutex name used for locking when writing to the image
Maybe by creating a temporary file with process id and all data... How exactly the information can be grabbed from the dll/process is up to you.
The target application is BlueStacks, and the dll must run on windows XP(las SP), 7 (all SPs), 8/8.1 (all SPs) and if possible also on windows 10.
The idea behind all this is to have an easy way to capture the frames of a game (only bluestacks in this case) and being able to read it with ReadProcessMemory from another process.
The dll must be standalone, no other dlls should be needed.
The dll must be injectable with any standart dll injector, no static imports, no "WindowsHookEx". Just the plain old simple CreateRemoteThread + LoadLibrary.
Obviously the process must not become corrupted / unstable when injected, even when ts3, fraps, xfire are running or when an usb controller is plugged in or removed (especially important!).