DllFunction.SetConstAnsiStringArg

Prototypes

void SetConstAnsiStringArg( int nPos, String sText )

Parameters

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

String sText
The string to assign to the function parameter.

Remarks

This method assigns a read-only null-terminated ANSI character string to the specified parameter. The type of the parameter must have been previously declared with the method NextArgIsConstAnsiString.

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.NextArgIsConstAnsiString