Well, I said the wrong words to explain me :/. Disabling the test in our code, will the function fail or not ?
It will crash in the AddRef code. Better to try to do something like that :
if (found == NULL) { TRACE("Did not find any valid surface\n"); *ppSurface = NULL; return DD_OK; }
To be 100 %, the best would be for one to do a test in real Windows and check what happens when asking for a non-existant attached surface and check what happens (ie DD_OK with ppSurface being NULL or DDERR_NOTFOUND).
The reason I write is that : in fact, I disabled the failing test and the game (Re-Volt Demo) begins to start.
Well, as said before, try to see if this call SHOULD fail or if it's a bug that we do not find this attached surface.
Even better would be to disassemble the code handling the return of this function to see what kind of stuff the game expects.
Lionel