INFO: CreateFile() Using CONOUT$ or CONIN$ (90088)



The information in this article applies to:

  • Microsoft Win32 Application Programming Interface (API), when used with:
    • the operating system: Microsoft Windows 95
    • the operating system: Microsoft Windows 98
    • the operating system: Microsoft Windows Millennium Edition
    • the operating system: Microsoft Windows NT
    • the operating system: Microsoft Windows XP

This article was previously published under Q90088

SUMMARY

If you attempt to open a console input or output handle by calling the CreateFile() function with the special CONIN$ or CONOUT$ filenames, this call will return INVALID_HANDLE_VALUE if you do not use the proper sharing attributes for the fdwShareMode parameter in your CreateFile() call. Be sure to use FILE_SHARE_READ when opening "CONIN$" and FILE_SHARE_WRITE when opening "CONOUT$".

Modification Type:MinorLast Reviewed:9/27/2004
Keywords:kbAPI kbConsole kbinfo kbKernBase KB90088