Программирование на языке MFC

Мой второй блог в серии программирования

Файл tib.h


Ниже приведен файл tib.h:

//==============================================

// File: TIB.H

// Author: Matt Pietrek

// From: Microsoft Systems Journal "Under the Hood", // May 1996

//===============================================

#pragma pack(l)

typedef struct _EXCEРТION_REGISTRATION_RECORD {

struct _EXCEРТION_REGISTRATION_RECORD * pNext; FARPROC pfnHandler; } EXCEPTION_REGISTRATION_RECORD,

*РЕХСЕ РТION_REGISTRATION_RECORD; typedef struct _TIB {

PEXCEPTION_REGISTRATION_RECORD pvExcept; // OOh Head of

// exception record list

PVOID pvStackUserTop; // 04h Top of user stack

PVOID pvStackUserBase; // 08h Base of user stack

union // OCh (NT/Win95 differences)

{

struct // Win95 fields {

WORD pvTDB; // OCh TDB

WORD pvThunkSS; // OEh SS selector used

// for thunking to 16 bits
DWORD unknownl;
// lOh

} WIN95;

struct // WinNT fields {

PVOID SubSystemTib; // OCh

ULONG FiberData; // lOh

} WINNT; } TIBJJNION1;

PVOID pvArbitrary; // 14h Available for application use struct _tib *ptibSelf; // 18h Linear address of TIB structure

union {

// ICh (NT/Win95 differences)

struct // Win95 fields {

WORD WORD DWORD DWORD DWORD } WIN95;

ICh lEh 20h 24h

// // // //

TIBFlags; Winl6MutexCount; DebugContext; pCurrentPriority;

// 28h Message Queue selector

struct // WinNT fields {

DWORD unknownl;

// IChDWORD processID; // 20h

DWORD threadID; // 24h

DWORD unknown2; // 28h

} WINNT; } TIB_UNION2;

PVOID* pvTLSArray; // 2Ch Thread Local Storage array

union // 30h (NT/WinJ5 differences)

{

struct // Win95 fields {

PVOID* pProcess; // 30h Pointer to owning // process" database

} WIN95; } TIB_UNI0N3;

} TIB, *PTIB; #pragma pack()

И наконец, результат работы программы:

Pointer to the TIB = 815f75cc

Pointer to _EXCEРТION_REGISTRATION_RECORD = 0064fe28

Pointer to the next record = 0064ЈЈ68

Pointer to the exception handler = 00401c38

Pointer to _EXCEРТION_REGISTRATION_RECORD = 0064ff68

Pointer to the next record = ffffffff

Pointer to the exception handler = bffc05b4

Warning: m_pMainWnd is NULL in CWinApp: :Run – quitting

application.

Похожие статьи: