0
|
1 |
// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
2 |
// All rights reserved.
|
|
3 |
// This component and the accompanying materials are made available
|
|
4 |
// under the terms of the License "Eclipse Public License v1.0"
|
|
5 |
// which accompanies this distribution, and is available
|
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
14 |
// e32\common\win32\seh.h
|
|
15 |
//
|
|
16 |
//
|
|
17 |
|
|
18 |
#ifndef __SEH_H__
|
|
19 |
#define __SEH_H__
|
|
20 |
|
|
21 |
#define WIN32_LEAN_AND_MEAN
|
|
22 |
#include <windows.h>
|
|
23 |
#include <excpt.h>
|
|
24 |
|
|
25 |
// Extracted from exsup.inc
|
|
26 |
|
|
27 |
/** An exception unwind is in progress */
|
|
28 |
#define EXCEPTION_UNWINDING 2
|
|
29 |
|
|
30 |
// Special Win32 SEH code for C++ exceptions
|
|
31 |
static const DWORD EXCEPTION_MSCPP = 0xe06d7363;
|
|
32 |
|
|
33 |
/** Helper function to get current TIB record as a simple 32bit pointer */
|
|
34 |
__declspec(naked) NT_TIB* Tib()
|
|
35 |
{
|
|
36 |
// _FOFF(NT_TIB, Self) = 0x18
|
|
37 |
_asm mov eax, dword ptr fs:[0x18]
|
|
38 |
_asm ret
|
|
39 |
}
|
|
40 |
|
|
41 |
#include <e32def.h>
|
|
42 |
__ASSERT_COMPILE(_FOFF(NT_TIB, Self) == 0x18);
|
|
43 |
|
|
44 |
#endif // __SEH_H__
|