Microsoft KB Archive/90088

{|
 * width="100%"|

INFO: CreateFile Using CONOUT$ or CONIN$

 * }

Q90088

-

The information in this article applies to:


 * Microsoft Win32 Application Programming Interface (API), used with:
 * the operating system: Microsoft Windows NT, versions 3.1, 3.5, 3.51, 4.0
 * Microsoft Windows 95
 * the operating system: Microsoft Windows 2000

-

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 &quot;CONIN$&quot; and FILE_SHARE_WRITE when opening &quot;CONOUT$&quot;.

Additional query words: 3.10 3.50

Keywords : kbAPI kbConsole kbKernBase kbOSWinNT310 kbOSWinNT350 kbOSWinNT351 kbOSWinNT400 kbOSWin2000 kbOSWin95 kbDSupport kbGrpDSKernBase

Issue type : kbinfo

Technology : kbAudDeveloper kbWin32sSearch kbWin32API