id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	os	architecture	failure	difficulty	testcase	blockedby	blocking	related
3083	Win32 package should bind SHGetFolderPath	duncan		"Currently Cabal binds this function so that we can find the ""Program Files"" directory on Windows:

{{{
foreign import stdcall unsafe ""shlobj.h SHGetFolderPathA""
 c_SHGetFolderPath :: Ptr () -> CInt -> Ptr () -> CInt -> CString -> IO CInt
}}}

This is fine except that it does not work in ghci because we have no way to tell ghci that it would need to link to `shell32.dll`. As it happens we do not have to tell the static linker to use `shell32.dll` because it appears to link to it by default. This of course means that `runghc Setup` does not work on Windows for Cabal itself which trips up many users. The fact that the `README` tells people to use `ghc --make Setup` instead doesn't help a great deal. See [http://hackage.haskell.org/trac/hackage/ticket/325 Cabal ticket #325]

What would be nice is if the Win32 package would bind [http://msdn.microsoft.com/en-us/library/bb762181(VS.85).aspx SHGetFolderPath]. Then we just import it from the Win32 package and it'll work in ghci. Apparently, according to MSDN, this function is technically deprecated, however the replacement [http://msdn.microsoft.com/en-us/library/bb762188(VS.85).aspx SHGetKnownFolderPath] is only available in Vista and later so we probably need to bind it anyway. Note that `SHGetFolderPath` is in `shell32.dll` except on Windows 2000 which include it in `SHFolder.dll` which come with IE4 and later."	feature request	closed	normal	6.12.1	libraries (other)	6.10.1	fixed			Windows	x86		Unknown				
