OutputString method
Prototype
OutputString Proto lpszString:LPSTR, bClear:BOOL
Syntax
Invoke OutputString, lpszString, bClear
Function
Prints a null terminated text string in the output window of the Easy Code instance that launched the application calling the method.
Parameters
lpszString
Pointer to the effective address of the string to be printed.
bClear
Specifies whether the output window has to be cleared before printing the new string. It can be one of the following values:
FALSE The output window will not be cleared.
TRUE The output window will be cleared before printing the new text string.
Return value
None.
If
lpszString is NULL,
or it is an empty string, the method does nothing. On the
other hand, this method checks if the string pointed by
lpszString ends with the end of line characters,
<CR> (Carriage Return)
and
<LF> (Line Feed).
If not,
the method sends both characters to the output window
immediately after of printing the string pointed by
lpszString.
REMARKS:
The OutputString
method expects lpszString to be a Unicode string
if the application is running as Unicode,
or an ANSI string if not (see the IsAppUnicode method).
You can call
OutputStringA
to print ANSI
strings in Unicode applications, or OutputStringW
to print Unicode strings in ANSI applications. The length
of lpszString must not exceed 255 characters,
otherwise it will be truncated.
IMPORTANT: For this method to
work,
the calling application (that is, your project) must be launched from
the Easy Code IDE with
the "Project => Run" menu option (or its tool
bar's play
button) so that the text strings are sent to the output window (Debug
tab) of the Easy Code instance which launched it, otherwise it will have no
effect.
Also take into account that the application using this method must have
Administrator rights, so if your user has the
mentioned rights
just run Easy Code as an Administrator, or add a Manifest to the project
calling this method (the default Manifest created by Easy Code will be
enough). If your user does not have Administrator rights you will have
to
run Easy Code as an Administrator, but then you will be asked for the
Administrator password.