Microsoft KB Archive/259131

{|
 * width="100%"|

INFO: Accesssing a Device on Windows 2000 Terminal Server Through CreateFile

 * }

Q259131

-

The information in this article applies to:


 * Microsoft Win32 Application Programming Interface (API), included with:
 * the operating system: Microsoft Windows NT 4.0
 * the operating system: Microsoft Windows 2000

-

SUMMARY
The CreateFile function allows an application to obtain a handle to a device by specifying the device in the lpFileName parameter by using the following format:

"\\.\DEVICEX" When an application obtains a handle to a device in a remote Terminal Server session, the CreateFile function may fail with error code 2 (ERROR_FILE_NOT_FOUND) because the system is searching the local session namespace instead of the global namespace.

To ensure that the system searches for the device in the global namespace, the following format may be used for the device name:

"\\.\Global\DEVICEX" Note that the Global keyword is case sensitive.

Additional query words:

Keywords :

Issue type : kbinfo

Technology : kbAudDeveloper kbWin32sSearch kbWin32API