This repository was archived by the owner on Oct 12, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ else version (WatchOS)
21
21
22
22
// / C interface for Runtime.loadLibrary
23
23
extern (C ) void * rt_loadLibrary(const char * name);
24
+ // / ditto
25
+ version (Windows ) extern (C ) void * rt_loadLibraryW(const wchar * name);
24
26
25
27
// / C interface for Runtime.unloadLibrary, returns 1/0 instead of bool
26
28
extern (C ) int rt_unloadLibrary(void * ptr);
Original file line number Diff line number Diff line change
1
+ // https://issues.dlang.org/show_bug.cgi?id=19498
2
+ void main ()
3
+ {
4
+ import core.runtime ;
5
+ auto kernel32 = Runtime .loadLibrary(" kernel32.dll" );
6
+ assert (kernel32);
7
+ Runtime .unloadLibrary(kernel32);
8
+ }
Original file line number Diff line number Diff line change @@ -105,7 +105,10 @@ test_hash:
105
105
test_stdcpp :
106
106
$(MAKE ) -f test\s tdcpp\w in64.mak " DMD=$( DMD) " MODEL=$(MODEL ) " VCDIR=$( VCDIR) " DRUNTIMELIB=$(DRUNTIME ) " CC=$( CC) " test
107
107
108
- test_all : test_uuid test_aa test_hash test_stdcpp
108
+ test_loadlib :
109
+ $(DMD ) -m$(MODEL ) -conf= -Isrc -defaultlib=$(DRUNTIME ) -run test\s hared\s rc\l oadlibwin.d
110
+
111
+ test_all : test_uuid test_aa test_hash test_stdcpp test_loadlib
109
112
110
113
# ################## zip/install/clean ##########################
111
114
You can’t perform that action at this time.
0 commit comments