Dynamic linker under Windows

Krasimir Angelov kr.angelov at gmail.com
Fri Jun 17 09:51:21 EDT 2005


Hello Guys,

GHC from HEAD crashes when I am using getHomeDirectory function from
GHCi. The problem is in __hscore_getFolderPath function. The function
body is:

int
__hscore_getFolderPath(HWND hwndOwner,
		       int nFolder,
		       HANDLE hToken,
		       DWORD dwFlags,
		       char*  pszPath)
{
    static int loaded_dll = 0;
    static HMODULE hMod = (HMODULE)NULL;
    static HSCORE_GETAPPFOLDERFUNTY funcPtr = NULL;
......

When the function is called from compiled binary then the inital value
of loaded_dll is 0 but when the function is executed from interpreted
code (i.e. when the function is in dynamically loaded .o file) then
the value is 196940. Any idea what is going wrong?

Cheers,
  Krasimir


More information about the Cvs-ghc mailing list