DllFunction.NextArgIsWindowsHandle

Prototypes

void NextArgIsWindowsHandle( <long value> )

Parameters

long value
The value to assign to this function parameter. On Win32 systems, only the lower 32 bits of the value are used. If you call this method without specifying value, you are specifying the type of the function's parameter without specifying its value. You can specify the value later by calling the method SetWindowsHandleArg.

Remarks

This method declares the type of the function's next parameter to be a Windows handle. The term Windows handle refers to any Windows handle type that is 32-bits wide on Win32 systems and 64-bits wide on Win64 systems. These types include, but are not limited to, the following: HWND, HDC, HANDLE. Although the method NextArgIsIntPtr provides the same functionality as this method, it is recommended you use this method when appropriate because it makes your code clearer and more self-documenting.

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

DllFunction.SetWindowsHandleArg