RosettaCodeData/Task/Call-a-function-in-a-shared.../OxygenBasic/call-a-function-in-a-shared...

14 lines
313 B
Plaintext

'Loading a shared library at run time and calling a function.
declare MessageBox(sys hWnd, String text,caption, sys utype)
sys user32 = LoadLibrary "user32.dll"
if user32 then @Messagebox = getProcAddress user32,"MessageBoxA"
if @MessageBox then MessageBox 0,"Hello","OxygenBasic",0
'...
FreeLibrary user32