I use two (or more) EXEs that exchange large data (array with colors). I use Memory Mapped file, since it is best speed.
In first EXE I have next code that is OK.
HANDLE hMapedFile = CreateFileMapping(INVALID_HANDLE_VALUE, 0, PAGE_READWRITE, 0, biSizeImage, NULL)
In second EXE I have to use CreateDIBSection and create DIB based on hMappedFile. In second EXE I has value (witch is acutely DWORD) of hMapedFile. Simple trying CreateDIBSection and hMappedFile fail.
If I create named Mapped File in first EXE, open this named mapped file in second EXE and then create DIB based at opened named mapped file it works.
But how to create DIB (in second EXE) using handle hMappedFile (from first EXE )? I want to escape naming, because I have to transfer it name between two EXEs and provide unique name.