RosettaCodeData/Task/Call-a-function-in-a-shared-library/OxygenBasic/call-a-function-in-a-shared-library.basic
2023-07-01 13:44:08 -04:00

13 lines
313 B
Text

'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