Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Red Alert 2 Windows 8 DirectDraw compatibility
#1
I'm stuck on this one.. Any hints?

The game Red Alert 2 runs on Windows 8, but as soon as I inject a DLL (via ddraw.dll or an extra DLL) it stops drawing buttons on the main menu. With the DLL it still work fine in windowed mode and it still works fine on Windows 7. The DLL is basically just

Code:
typedef HRESULT(WINAPI* LPDIRECTDRAWCREATE)(GUID*, LPDIRECTDRAW*, IUnknown*);
HMODULE dd_dll = LoadLibrary("system32/ddraw.dll");
LPDIRECTDRAWCREATE dd_create = reinterpret_cast<LPDIRECTDRAWCREATE>(GetProcAddress(dd_dll, "DirectDrawCreate"));
return dd_create(lpGUID, lplpDD, pUnkOuter);
I'm guessing some kind of automatic compatibility mode is activated for the original game that gets disabled by the DLL, but how do I find out what's causing this? It's important as the DLL provides improvements for gamers that should also be available on Windows 8 (and beyond).

http://reverseengineering.stackexchange....patibility

Edit by Renegade: Fixed the code block to wrap only the code.
Reply
#2
Sorry, I have no ideas other than the ones I posted at StackExchange previously. I just created a bounty over there to draw some more attention and maybe a good answer.

Worth playing: 1 | 2 | 3
Reply
#3
A DirectDraw compatibility mode gets activated for game.exe when ra2.exe is present and some other conditions are met. The updated executable now runs on Windows 8, though performance appears to be sub-optimal at least in windowed mode.
Alt-tab still doesn't work, the original exe suffers from the same problem.

How much is known about the game's use of DD? Does the game use real Windows control for it's interface and if so, how do these get drawn?

I'm assuming YR suffers from the same problems.
Reply




Users browsing this thread: 1 Guest(s)