VOGONS

Common searches


Reply 21 of 32, by Joey_sw

User metadata
Rank Oldbie
Rank
Oldbie
huckleberrypie wrote:

Which reminds me... Are there any other DDraw/GDI/whatever wrappers I could try besides the ones mentioned above?

for game before directx7, i usually have good luck wiht Aqrit's ddwraper http://bitpatch.com/ddwrapper.html

-fffuuu

Reply 22 of 32, by huckleberrypie

User metadata
Rank Newbie
Rank
Newbie
Joey_sw wrote:
huckleberrypie wrote:

Which reminds me... Are there any other DDraw/GDI/whatever wrappers I could try besides the ones mentioned above?

for game before directx7, i usually have good luck wiht Aqrit's ddwraper http://bitpatch.com/ddwrapper.html

The wrapper works, as I am able to get an FPS count on one corner of the screen, but the dreaded window error still shows up. It basically appears to be more like a Windows API issue of some sort involving a certain DLL - I'm thinking about user32 or GDI, but it could be some other library.

Reply 25 of 32, by Joey_sw

User metadata
Rank Oldbie
Rank
Oldbie
huckleberrypie wrote:

but the dreaded window error still shows up. It basically appears to be more like a Windows API issue of some sort involving a certain DLL - I'm thinking about user32 or GDI, but it could be some other library.

you may want to run/profiling the game within Dependancy Walker http://dependencywalker.com/ to determine which API it need, and where its failed.
The reports its generate aren't user friendly tho.

-fffuuu

Reply 26 of 32, by huckleberrypie

User metadata
Rank Newbie
Rank
Newbie
Joey_sw wrote:
huckleberrypie wrote:

but the dreaded window error still shows up. It basically appears to be more like a Windows API issue of some sort involving a certain DLL - I'm thinking about user32 or GDI, but it could be some other library.

you may want to run/profiling the game within Dependancy Walker http://dependencywalker.com/ to determine which API it need, and where its failed.
The reports its generate aren't user friendly tho.

Yeah, just tried it, though it seems to hang up after loading a couple or so DLLs whenever I try to profile the exe.

Reply 27 of 32, by huckleberrypie

User metadata
Rank Newbie
Rank
Newbie

Also, running it through OllyDbg turns up an "ERROR_INVALID_WINDOW_HANDLE" exception upon clicking on the problematic button, which, along with a run through WinAPIOverride, seems to confirm the error message I got through Wine. It seems like it tries to call a window, menu or w/e but couldn't due to changes in the API.

There's this Ultimate ASI Loader which we could use since it can hook to ddraw.dll and execute random .ASIs to it GTA-style. I'm thinking maybe that should do the trick by trapping the problematic function and fix it somehow by replacing it with the appropriate equivalent.

Got these upon running the game through WinAPIOverride: http://imgur.com/a/A8FNH
API logs: http://pastebin.com/uNKVygkT
And this is how it's supposed to work on 98: http://imgur.com/a/THViN

I am not well-versed with the Win32 API, but I hope someone who does can pitch in and help me out. 😁

Reply 28 of 32, by huckleberrypie

User metadata
Rank Newbie
Rank
Newbie

There, just solved the problem by patching the exe itself. In a hex editor, go to offset 008BAA0, then look for ff 75 d8, and change it to ff 75 d0. Save the new EXE, then see if you can get the damn game to work again. 😁

Reply 29 of 32, by Jorpho

User metadata
Rank l33t++
Rank
l33t++

Interesting. I had not heard of those tools before.

So what exactly does the fix do? I guess it's some sparsely-documented API feature that was depreciated in later versions of Windows, since it was never supposed to be used in the first place?

Reply 30 of 32, by huckleberrypie

User metadata
Rank Newbie
Rank
Newbie
Jorpho wrote:

Interesting. I had not heard of those tools before.

So what exactly does the fix do? I guess it's some sparsely-documented API feature that was depreciated in later versions of Windows, since it was never supposed to be used in the first place?

Nothing much, other than changing the hMenu parameter in CreateWindowEx from 1 to 0 or NULL. My hunch is that the crash could be due to security reasons on part of Microsoft, as on previous OSes such invalid values are seemingly given a free pass. But it could be also due to the game's exception handler going bonkers or something when you run it on 2000 onwards.

Reply 32 of 32, by huckleberrypie

User metadata
Rank Newbie
Rank
Newbie

Not really, I just used it to see what's going on in a less cryptic manner. Other than that I tried their SDK but the most that I could get from it is the game freezing whenever I try to reproduce the error.

Trust me, I'm vouching for that tool. 😉