Need help debugging ... Ddraw issue

Andreas Rosenberg sonix2003 at
Sat Jan 17 17:48:25 CST 2004

> Perhaps. I'd be willing to bet that virtually all (gui) win32 apps are
> tested by running it from explorer or the shell, which seems to use full
> paths though. 

I'd also bet 5 EUROs ;-)

> So the fact that we usually run without a full path seems to
> be problematic. I guess there's a slight chance it could break apps
> designed to be run from the command line in Windows which might make
> similarly bad assumptions. Perhaps a config option, override-able in
> appdefaults, which controls passing the full path to the app - on by
> default.

Sounds good. 

> This leaves the question of where it gets the command line from, of
> course. If not argv[0], not WinMain, then where? I find it hard to believe
> the game does a TEB->PEB to get this, given that those structures are
> undocumented.

Jason wrote:

>The one thing I couldnt answer is how the game 'gets' the command line. 
>It doesnt (didnt!) appear to use any API to do it, although I didnt 
>spend long looking into this. 

Could it be that the string containing the name of path and exe was not
retrieved from the command line, but using GetModuleFileName or 

At least I would use this function if would like to get path where my
exe is running. 

Another idea would be that the crash happens in the startup code or 
in the (C?) library part. There it could easily be that the PEB is being accessed,
because they prepare the arguments for main / WinMain.

If somebody could provide me the problematic exe of DK and the address
where the crash occurs I will put it through IDA pro. This might help lifting
the mystery. If IDA pro detects which compiler suite has been used to link the
EXE, it should be "easy" to detect where the string came from...


More information about the wine-devel mailing list