{-# OPTIONS_GHC -optc-D_WIN32_IE=0x500 #-}{-# LINE 1 "System\\Win32\\WindowsString\\Shell.hsc" #-}{-# LANGUAGE Trustworthy #-}----------------------------------------------------------------------------- -- | -- Module : System.Win32.WindowsString.Shell -- Copyright : (c) The University of Glasgow 2009 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : Esa Ilari Vuokko <ei@vuokko.info> -- Stability : provisional -- Portability : portable -- -- Win32 stuff from shell32.dll -- ----------------------------------------------------------------------------- moduleSystem.Win32.WindowsString.Shell(sHGetFolderPath,CSIDL,cSIDL_PROFILE,cSIDL_APPDATA,cSIDL_WINDOWS,cSIDL_PERSONAL,cSIDL_LOCAL_APPDATA,cSIDL_DESKTOPDIRECTORY,cSIDL_PROGRAM_FILES,SHGetFolderPathFlags,sHGFP_TYPE_CURRENT,sHGFP_TYPE_DEFAULT)whereimportSystem.OsString.Windows(WindowsString)importSystem.Win32.Shell.InternalimportSystem.Win32.Shellhiding(sHGetFolderPath)importSystem.Win32.WindowsString.TypesimportGraphics.Win32.GDI.Types(HWND)importForeignimportControl.Monad #include "windows_cconv.h" -- for SHGetFolderPath stuff ---------------------------------------------------------------- -- SHGetFolderPath -- -- XXX: this is deprecated in Vista and later ---------------------------------------------------------------- sHGetFolderPath::HWND->CSIDL->HANDLE->SHGetFolderPathFlags->IOWindowsStringsHGetFolderPathhwndcsidlhdlflags=allocaBytes((260)*((1)))$\pstr->do{-# LINE 57 "System\\Win32\\WindowsString\\Shell.hsc" #-}r<-c_SHGetFolderPathhwndcsidlhdlflagspstrwhen(r<0)$raiseUnsupported"sHGetFolderPath"peekTStringpstr