it would be useful to combine this in one step
for example:
Code: Select all
Prototype.i ProtoMessageBoxW(Window.i, Body.p-unicode, Title.p-unicode, Flags.i = 0)
If OpenLibrary(0, "User32.dll")
; 'MsgBox' is a variable with a 'ProtoMessageBoxW' type
MsgBox.ProtoMessageBoxW = GetFunction(0, "MessageBoxW")
MsgBox(0, "Hello", "World") ; We don't specify the flags
EndIf
Code: Select all
If OpenLibrary(0, "User32.dll")
; 'MsgBox' is a variable with a 'ProtoMessageBoxW' type
DefFunction.i MsgBox(Window.i, Body.p-unicode, Title.p-unicode, Flags.i = 0) = GetFunction(0, "MessageBoxW")
MsgBox(0, "Hello", "World") ; We don't specify the flags
EndIf
Code: Select all
Prototype.i ProtoMessageBoxW(Window.i, Body.p-unicode, Title.p-unicode, Flags.i = 0)
Structure API
MsgBox.ProtoMessageBoxw
EndStructure
Code: Select all
Structure API
DefFunction.i MsgBox(Window.i, Body.p-unicode, Title.p-unicode, Flags.i = 0)
EndStructure
Don't forget a DefFunctionC and the Global command.