void NextArgIsConstUnicodeString( <String sText> )
String sText
The string to assign to the function parameter. If you call this method without specifying sText, you are specifying the type of the function's parameter without specifying its value.
You can specify the value later by calling the method SetConstUnicodeStringArg.
This method declares the type of the function's next parameter to be a read-only null-terminated Unicode character string. The DLL function should use the C type "const wchar_t *" (or equivalent) for this parameter.
If you call this method with a String parameter, the method constructs a null-terminated Unicode character string from the String parameter. The DLL function must not modify the Unicode character string passed to it. If you want to receive a Unicode character string back from a DLL function, you must use the method NextArgPairIsUnicodeString.
declare DllFunction func = new DllFunction(); func.Init( "USER32", "MessageBoxW", 4 ); declare long lHandle = 0; func.NextArgIsWindowsHandle( lHandle ); func.NextArgIsConstUnicodeString( "Do you want to continue?" ); func.NextArgIsConstUnicodeString( "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";
DllFunction.SetConstUnicodeStringArg
DllFunction.NextArgPairIsUnicodeString