代码之家  ›  专栏  ›  技术社区  ›  Carbon

Haskell中的Win32 API调用?

  •  0
  • Carbon  · 技术社区  · 7 年前

    this example

    import ctypes
    ctypes.windll.kernel32.SetErrorMode(2);
    
    1 回复  |  直到 7 年前
        1
  •  4
  •   arrowd    7 年前

    Foreign_Function_Interface 文章提到 stdcall 国外进口报表的关键字。在你的情况下,这看起来像

    import System.Win32.Types (DWORD)
    
    foreign import stdcall unsafe "SetErrorMode"
        win32_setErrorMode :: DWORD -> IO DWORD