Windows Console API Problem

Hestia 1 Reputation point
2021-08-29T15:25:11.203+00:00

127359-ewew.pngi m traying to learn about the WindowsConsole API .. so i was testing the "CreatePseudoConsole()" function in the code . and it said that the function is undefined . can u help me please.

Rm:
functions like "SetConsoleWindowInfo()" work properly .

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,476 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Sam of Simple Samples 5,516 Reputation points
    2021-08-31T05:32:46.137+00:00

    After posting my first response I found articles like Microsoft Developing a Pseudo-Console for Next Windows 10 Version. So Pseudo-Consoles are a major new development. There are instructions for working with them in:

    I think it will be difficult for beginners to follow those instructions but you can try.

    Off-topic comment: in the DevBlogs article (above) there is a picture of Admiral Grace Hopper. She is credited as having written the first computer compiler. The first. I actually met her once and I once was in her office but not while she was in it.

    1 person found this answer helpful.
    0 comments No comments

  2. Sam of Simple Samples 5,516 Reputation points
    2021-08-29T19:57:32.907+00:00

    See Windows Command-Line: Introducing the Windows Pseudo Console (ConPTY). It references microsoft/terminal: The new Windows Terminal and the original Windows console host, all in the same place!

    Unless you understand the need for a Pseudo Console, you do not need CreatePseudoConsole. You do not need it for traditional Windows consoles. Pseudo Consoles are complicated.

    0 comments No comments

  3. Castorix31 82,326 Reputation points
    2021-08-30T15:16:56.367+00:00

    Are you sure that you added at beginning

    #include <ConsoleApi.h>
    

    and that _WIN32_WINNT is sufficient ?

    like before the include :

    #define  _WIN32_WINNT   0x0A00