BUG: DeleteFile Returns Wrong Value If VxD Removed from Memory (139999)
The information in this article applies to:
- Microsoft Win32 Device Driver Kit (DDK) Windows 95
This article was previously published under Q139999 SYMPTOMS
If an application uses DeleteFile to remove a VxD from memory, DeleteFile
will return 0 (false) if the function succeeds, and will return nonzero
(true) if the function fails.
You may have used DeleteFile to remove a VxD from memory because of the
following information from the Win32 SDK section titled "Closing a VxD" on
the MSDN compact disc under Guides, Programmer's Guide to Windows 95, Using
Windows 95 Features, Device I/O Control, Input and Output Control in
Applications:
In rare cases, you may need to use the DeleteFile function to remove a
dynamically loadable VxD from memory. For example, you use DeleteFile if
another application has loaded the VxD and you just want to unload it.
You also use DeleteFile if you have successfully loaded a VxD by using
CreateFile, but the VxD does not support the device IOCTL interface. In
such cases, CreateFile loads the VxD but provides no handle to close and
remove the VxD. The following example removes the VxD named SAMPLE from
memory.
DeleteFile("\\\\.\\SAMPLE");
WORKAROUND
In this example, SAMPLE is the module name of the VxD. (Do not specify the
file name.) Be aware that the module name of a VxD is not necessarily the
same as the VxD's file name without a filename extension. In general, avoid
using DeleteFile to remove a VxD from memory.
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. We are researching this problem and will
post new information here in the Microsoft Knowledge Base as it becomes
available.
Modification Type: | Minor | Last Reviewed: | 5/24/2004 |
---|
Keywords: | KB139999 |
---|
|