File tree 4 files changed +11
-6
lines changed 4 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -62,12 +62,12 @@ getProcAddress hmod procname =
62
62
withCAString procname $ \ c_procname ->
63
63
failIfNull " GetProcAddress" $ c_GetProcAddress hmod c_procname
64
64
65
- loadLibrary :: String -> IO HINSTANCE
65
+ loadLibrary :: String -> IO HMODULE
66
66
loadLibrary name =
67
67
withTString name $ \ c_name ->
68
68
failIfNull " LoadLibrary" $ c_LoadLibrary c_name
69
69
70
- loadLibraryEx :: String -> HANDLE -> LoadLibraryFlags -> IO HINSTANCE
70
+ loadLibraryEx :: String -> HANDLE -> LoadLibraryFlags -> IO HMODULE
71
71
loadLibraryEx name h flags =
72
72
withTString name $ \ c_name ->
73
73
failIfNull " LoadLibraryEx" $ c_LoadLibraryEx c_name h flags
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ foreign import WINDOWS_CCONV unsafe "windows.h GetProcAddress"
41
41
c_GetProcAddress :: HMODULE -> LPCSTR -> IO Addr
42
42
43
43
foreign import WINDOWS_CCONV unsafe " windows.h LoadLibraryW"
44
- c_LoadLibrary :: LPCTSTR -> IO HINSTANCE
44
+ c_LoadLibrary :: LPCTSTR -> IO HMODULE
45
45
46
46
type LoadLibraryFlags = DWORD
47
47
@@ -51,7 +51,7 @@ type LoadLibraryFlags = DWORD
51
51
}
52
52
53
53
foreign import WINDOWS_CCONV unsafe " windows.h LoadLibraryExW"
54
- c_LoadLibraryEx :: LPCTSTR -> HANDLE -> LoadLibraryFlags -> IO HINSTANCE
54
+ c_LoadLibraryEx :: LPCTSTR -> HANDLE -> LoadLibraryFlags -> IO HMODULE
55
55
56
56
foreign import WINDOWS_CCONV unsafe " windows.h SetDllDirectoryW"
57
57
c_SetDllDirectory :: LPTSTR -> IO BOOL
Original file line number Diff line number Diff line change @@ -49,12 +49,12 @@ getModuleHandle mb_name =
49
49
maybeWith withTString mb_name $ \ c_name ->
50
50
failIfNull " GetModuleHandle" $ c_GetModuleHandle c_name
51
51
52
- loadLibrary :: WindowsString -> IO HINSTANCE
52
+ loadLibrary :: WindowsString -> IO HMODULE
53
53
loadLibrary name =
54
54
withTString name $ \ c_name ->
55
55
failIfNull " LoadLibrary" $ c_LoadLibrary c_name
56
56
57
- loadLibraryEx :: WindowsString -> HANDLE -> LoadLibraryFlags -> IO HINSTANCE
57
+ loadLibraryEx :: WindowsString -> HANDLE -> LoadLibraryFlags -> IO HMODULE
58
58
loadLibraryEx name h flags =
59
59
withTString name $ \ c_name ->
60
60
failIfNull " LoadLibraryEx" $ c_LoadLibraryEx c_name h flags
Original file line number Diff line number Diff line change 3
3
## 2.13.3.1
4
4
5
5
* Add function ` createFile_NoRetry ` (see #208 )
6
+ * The type signatures for ` loadLibrary ` and ` loadLibraryEx ` now refer to
7
+ ` HMODULE ` instead of ` HINSTANCE ` for consistency with the official Win32
8
+ API documentation. Note that ` HMODULE ` and ` HINSTANCE ` are both type synonyms
9
+ for the same thing, so this only changes the presentation of these functions'
10
+ type signatures, not their behavior.
6
11
7
12
## 2.13.3.0 July 2022
8
13
You can’t perform that action at this time.
0 commit comments