Bug in MapAndLoad function

2006-11-17 Thread Adam Connell
Greetings,

While investigating why a game (Kasparov's Chessmate) didn't work,
I think I found a bug in the implementation of imagehlp.dll in the
the MapAndLoad function located in dlls/imagehlp/access.c lines
165-167. The function looks like it tries to open an uninitialized
string szFileName instead of the passed file name "pszImageName".

I think there has been a bug filed already (Bug 6099 Alien Shooter
needs imagehlp.dll override) and I think this explains it.

Wine version 0.9.25

/***
 *  MapAndLoad (IMAGEHLP.@)
 */
BOOL WINAPI MapAndLoad(
  LPSTR pszImageName, LPSTR pszDllPath, PLOADED_IMAGE pLoadedImage,
  BOOL bDotDll, BOOL bReadOnly)
{
  CHAR szFileName[MAX_PATH];
  HANDLE hFile = NULL;
  HANDLE hFileMapping = NULL;
  HMODULE hModule = NULL;
  PIMAGE_NT_HEADERS pNtHeader = NULL;

  TRACE("(%s, %s, %p, %d, %d)\n", pszImageName, pszDllPath, 
pLoadedImage,
bDotDll, bReadOnly);
  
  /* PathCombine(&szFileName, pszDllPath, pszImageName); */
  /* PathRenameExtension(&szFileName, bDotDll?:"dll":"exe"); */

  /* FIXME: Check if the file already loaded (use 
IMAGEHLP_pFirstLoadedImage) */
  if(!(hFile = CreateFileA(
szFileName, GENERIC_READ, 1, /* FIXME: FILE_SHARE_READ not defined 
*/
NULL, OPEN_EXISTING, 0, NULL)))
{
  SetLastError(ERROR_FILE_NOT_FOUND);
  goto Error;
}

Cheers,
Adam




How do native win32 apps end up calling into x11drv?

2005-02-25 Thread Adam Connell
Greetings,
I'm trying to understand how windows drawing gets translated into X in wine
and so I was looking at the {im,ex}ports of x11drv and gdi32. x11drv depends
on gdi32 and just seems to export a good chunk of the api that gdi32 exports
(BitBlt etc). gdi32 doesn't depend on x11drv or even Xlib. How do native 
win32
apps end up calling into x11drv?

Cheers,
Adam


Compiling MFC

2003-10-03 Thread Adam Connell
I am yet another programmer trying to compile the MFC with winelib.
I believe that I have the project configured correctly. I am currently
working on getting it to compile. I am having trouble with Microsoft's
extensions to C++ specifically:
throw(...)
__try
__except

Is there any kind of work around for these things?

MFC v7.0
g++ v3.2.2
wine-cvs