DllFunction.SetWindowsHandleArg

Prototypes

void SetWindowsHandleArg( int nPos, long value )

Parameters

int nPos
The number (1-based) of the parameter whose value you want to set.

long value
The value to assign to the function parameter. On Win32 systems, only the lower 32 bits of the value are used.

Remarks

This method assigns a value to the specified parameter. The type of the parameter must have been previously declared with the method NextArgIsWindowsHandle.

Example
declare DllFunction func = new DllFunction();
func.Init( "USER32", "MessageBoxA", 4 );
func.NextArgIsWindowsHandle();
func.NextArgIsConstAnsiString();
func.NextArgIsConstAnsiString();
func.NextArgIsInt32();
declare long lHandle = 0;
func.SetWindowsHandleArg( 1, lHandle );
func.SetConstAnsiStringArg( 2, "Do you want to continue?" );
func.SetConstAnsiStringArg( 3, "MessageBox Test" );
/* MB_TOPMOST = 262144, MB_ICONQUESTION = 32, MB_YESNO = 4 */
func.SetInt32Arg( 4, 262144 + 32 + 4 );
declare int nResponse;
nResponse = func.Call_Int32();
if nResponse = 6 then /* IDYES = 6 */
    print "YES";
else
    print "NO";
See Also

DllFunction.NextArgIsWindowsHandle