Skip to content

Latest commit

 

History

History
44 lines (28 loc) · 1.12 KB

AllocConsole.md

File metadata and controls

44 lines (28 loc) · 1.12 KB

Home

Function name : AllocConsole

Group: Console - Library: kernel32


The AllocConsole function allocates a new console for the calling process.


Code examples:

Saying "Hello World!" with VFP and WinAPI
Creating a console window for Visual FoxPro application

Declaration:

BOOL AllocConsole(void);  

FoxPro declaration:

DECLARE INTEGER AllocConsole IN kernel32  

Parameters:

This function has no parameters.


Return value:

If the function succeeds, the return value is nonzero.


Comments:

A process can be associated with only one console, so the AllocConsole function fails if the calling process already has a console. A process can use the FreeConsole function to detach itself from its current console, then it can call AllocConsole to create a new console or AttachConsole to attach to another console.