this example
import ctypes ctypes.windll.kernel32.SetErrorMode(2);
Foreign_Function_Interface 文章提到 stdcall 国外进口报表的关键字。在你的情况下,这看起来像
stdcall
import System.Win32.Types (DWORD) foreign import stdcall unsafe "SetErrorMode" win32_setErrorMode :: DWORD -> IO DWORD