I am a Flight Simulator add-on developer. I work with FS2004 and FSX, the latest version of the sim.
In my code, I want to read the content of a file, so I use ReadFile in synchronous mode, like this:
HANDLE hFile = CreateFile(fullModuleName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
BOOL readResult = ReadFile(hFile, buffer, MaxSize, &nbBytesRead, NULL);
It works perfect in FS2004, and it used to work well in FSX before the SP1. You're not supposed to know FSX, so I tell you the main new feature of the SP1 is that it supports multi-threading to make the simulation work faster on dual-core machines. Since SP1, my code crashes FSX when it reaches the "ReadFile" statement. There is no way to get any error code, it just crashes.
Do you have any clue? I'm helpless...
Thanks for any help.
Eric
