The QueryDosDevice function lets an application obtain information about MS-DOS device names. The function can obtain the current mapping for a particular MS-DOS device name. The function can also obtain a list of all existing MS-DOS device names.
MS-DOS device names are stored as symbolic links in the Windows NT object name space. The code that converts an MS-DOS path into a corresponding Windows NT path uses these symbolic links to map MS-DOS devices and drive letters. The QueryDosDevice function provides a mechanism whereby a Win32-based application can query the names of the symbolic links used to implement the MS-DOS device namespace as well as the value of each specific symbolic link.
DWORD QueryDosDevice(
LPCTSTR lpDeviceName, |
// address of MS-DOS device name string |
LPTSTR lpTargetPath, |
// address of buffer for storing query results |
DWORD ucchMax |
// maximum storage capacity of buffer |
); |
This parameter can be NULL. In that case, the QueryDosDevice function
will store a list of all existing MS-DOS device names into the buffer pointed
to by lpTargetPath.
If lpDeviceName is non-NULL, the function obtains information about the particular MS-DOS device specified by lpDeviceName. The first null-terminated string stored into the buffer is the current mapping for the device. The other null-terminated strings represent undeleted prior mappings for the device.
If lpDeviceName is NULL, the function obtains a list of all existing
MS-DOS device names. Each null-terminated string stored into the buffer is the
name of an existing MS-DOS device.
If the function succeeds, the return value is the number of characters stored into the buffer pointed to by lpTargetPath.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
The DefineDosDevice function provides a means whereby a Win32-based application can create and modify the symbolic links used to implement the MS-DOS device namespace.
MS-DOS device names are global. Once defined, an MS-DOS device name remains visible to all processes until either it is explicity removed or the system reboots.
file: /Techref/os/win/api/win32/func/src/f69_5.htm, 4KB, , updated: 2000/4/7 11:19, local time: 2024/11/23 11:01,
3.15.203.242:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://ecomorder.com/techref/os/win/api/win32/func/src/f69_5.htm"> QueryDosDevice</A> |
Did you find what you needed? |
Welcome to ecomorder.com! |
Welcome to ecomorder.com! |
.