Using Win32 functions in Visual FoxPro Image Gallery
Console
..msdn
AllocConsole
FillConsoleOutputAttribute
FillConsoleOutputCharacter
FreeConsole
GetConsoleScreenBufferInfo
GetConsoleWindow
GetStdHandle
ReadConsole
SetConsoleCursorPosition
SetConsoleTextAttribute
SetConsoleTitle
WriteConsole
Code examples:
Creating a console window for Visual FoxPro application
Saying "Hello World!" with VFP and WinAPI
WriteConsole
..msdn    Add comment     W32 Constants      Translate this page
The WriteConsole function writes a character string to a console screen buffer beginning at the current cursor location.
Code examples:
Creating a console window for Visual FoxPro application
Saying "Hello World!" with VFP and WinAPI
Declaration:
BOOL WriteConsole(
  HANDLE hConsoleOutput,
  const VOID* lpBuffer,
  DWORD nNumberOfCharsToWrite,
  LPDWORD lpNumberOfCharsWritten,
  LPVOID lpReserved
);
FoxPro declaration:
DECLARE INTEGER WriteConsole IN kernel32;
    INTEGER   hConsoleOutput,;
    STRING  @ lpBuffer,;
    INTEGER   nNumberOfCharsToWrite,;
    INTEGER @ lpNumberOfCharsWritten,;
    INTEGER   lpReserved

Parameters:
hConsoleOutput
[in] Handle to the console screen buffer.

lpBuffer
[in] Pointer to a buffer that contains characters to be written to the console screen buffer.

nNumberOfCharsToWrite
[in] Number of TCHARs to write.

lpNumberOfCharsWritten
[out] Pointer to a variable that receives the number of TCHARs actually written.

lpReserved
Reserved; must be NULL.
Return value:
If the function succeeds, the return value is nonzero.
My comment:
The total size of the buffer must be less than 64K.

Use GetStdHandle with STD_OUTPUT_HANDLE to obtain the handle to the console screen buffer. Also you may create a screen buffer and attach it to the console.

See also: GetConsoleScreenBufferInfo, ReadConsole, SetConsoleCP, SetConsoleCursorPosition, SetConsoleTextAttribute, WriteFile.
Word Index links for the WriteConsole :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2004-11-10 07:48:53
Modified: 2004-11-10 07:58:12
Visited in last 7 days: 28
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.38), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Google
Advertise here!