MCodeH

Creates a DynaCall object for machine code function.

OutputVar := MCodeH(Hex , Definition, Parameter1, Parameter2, ...)
Function Example: BSwap16 := MCodeH("8AE18AC5C3", "h==h")

Parameters

OutputVar

The name of the variable in which to store the function object.

Definition

Same definition syntax as used in DynaCall.

Parameter1, Parameter2, ... (optional)

Default Parameters to use when calling the function, same as for DynaCall.

Related

#DllImport, DynaCall, WinApi

Examples

RGB_TO_BGR:=MCodeH(A_PtrSize=4?"8B4C24040FB6C18BD1C1E01081E200FF00000BC2C1E9100BC1C3":"0FB6C18BD1C1E910C1E01081E200FF00000BC20BC1C3","ui==ui")
MsgBox format("0x{1:X}",RGB_TO_BGR[0xAABBCC])