BUG: DeleteFile Returns Wrong Value If VxD Removed from MemoryLast reviewed: November 28, 1995Article ID: Q139999 |
The information in this article applies to:
SYMPTOMSIf 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"); WORKAROUNDIn 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.
STATUSMicrosoft 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.
MORE INFORMATIONThe Win32 SDK reference for DeleteFile gives the following return values:
|
Additional reference words: 4.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |