Article ID: 141146
Article Last Modified on 5/24/2004
Guides
Programmer's Guide to Windows 95
Using Windows 95 Features
Device I/O Control
Input and Output Control in Applications
Opening the VxD.
CreateFile checks for a file name extension to determine whether VxDName specifies a file. If a file name extension (such as .vxd) is present, the function looks for the file in the standard search path.
hCVxD = CreateFile("\\\\.\\C:\\MYDIR\\DRIVER.VXD", 0,0,0,
CREATE_NEW, FILE_FLAG_DELETE_ON_CLOSE, 0);
If VxDName has no file name extension, CreateFile checks the registry to
see if the name is also a value name under the KnownVxDs key in
HKLM\System\CurrentControlSet\Control\SessionManager. If it is a value
name, CreateFile uses the current value associated with the name as the
full path of the VxD file. This method is useful for specifying VxDs
that are not in the standard search path. In the following example,
CreateFile searches the registry for the MYVXDPATH value.
hDevice = CreateFile("\\\\.\\MYVXDPATH", 0, 0, NULL, 0,
FILE_FLAG_DELETE_ON_CLOSE, NULL);
Additional query words: 4.00 Windows 95 kbinf
Keywords: KB141146