Fault Handling Logic Changed for Windows 95Last reviewed: August 13, 1997Article ID: Q141203 |
The information in this article applies to:
SUMMARYWindows 95 has modified the way VxD fault handlers should handle passing the fault on to the previous handler. Using fault handler logic from a Windows 3.10 VxD may cause problems in Windows 95.
MORE INFORMATIONIn Windows 3.1x, the following code logic might have been used by a fault handler:
pPrevFaultHandler dd ? mov eax, fault_number mov esi, offset32 FaultHandler VMMCall Hook_V86_Fault mov pPrevFaultHandler, esi BeginProc FaultHandler ;;; ;;; handler code ;;; cmp pPrevFaultHandler, 0 jz @F jmp pPrevFaultHandler @@: ret EndProc FaultHandlerIn Windows 95, this logic should be modified as follows:
pPrevFaultHandler dd 0 mov eax, fault_number mov esi, offset32 FaultHandler VMMCall Hook_V86_Fault ; NOTE: No "mov pPrevFaultHandler, esi" instruction ; esi = 0 if this is the first fault handler ; pPrevFaultHandler will *always* be nonzero. ; if esi = 0, pPrevFaultHandler will be the address ; of the default handler. ... mov eax, fault_number mov esi, offset32 FaultHandler VMMCall UnHook_V86_Fault BeginProc FaultHandler, HOOK_PROC, pPrevFaultHandler ;;; ;;; handler code ;;; ; NOTE: No "cmp pPrevFaultHandler, 0" instruction jmp pPrevFaultHandler EndProc FaultHandler Keywords : kbcode kbhowto kbprg Version : 4.0 Platform : WINDOWS Issue type : kbhowto |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |