sl@0: // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // e32\common\win32\seh.h sl@0: // sl@0: // sl@0: sl@0: #ifndef __SEH_H__ sl@0: #define __SEH_H__ sl@0: sl@0: #define WIN32_LEAN_AND_MEAN sl@0: #include sl@0: #include sl@0: sl@0: // Extracted from exsup.inc sl@0: sl@0: /** An exception unwind is in progress */ sl@0: #define EXCEPTION_UNWINDING 2 sl@0: sl@0: // Special Win32 SEH code for C++ exceptions sl@0: static const DWORD EXCEPTION_MSCPP = 0xe06d7363; sl@0: sl@0: /** Helper function to get current TIB record as a simple 32bit pointer */ sl@0: __declspec(naked) NT_TIB* Tib() sl@0: { sl@0: // _FOFF(NT_TIB, Self) = 0x18 sl@0: _asm mov eax, dword ptr fs:[0x18] sl@0: _asm ret sl@0: } sl@0: sl@0: #include sl@0: __ASSERT_COMPILE(_FOFF(NT_TIB, Self) == 0x18); sl@0: sl@0: #endif // __SEH_H__