1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
v/vlib/dl/dl_windows.c.v
2020-04-28 11:53:55 +02:00

19 lines
368 B
V

module dl
pub const (
RTLD_NOW = 0
DL_EXT = '.dll'
)
fn C.LoadLibraryA(libfilename byteptr) voidptr
fn C.GetProcAddress(handle voidptr, procname byteptr) voidptr
pub fn open(filename string, flags int) voidptr {
res := C.LoadLibraryA(filename.str)
return res
}
pub fn sym(handle voidptr, symbol string) voidptr {
return C.GetProcAddress(handle, symbol.str)
}