source: trunk/include/wprocess.h@ 4232

Last change on this file since 4232 was 4232, checked in by sandervl, 25 years ago

header update

File size: 1.2 KB
Line 
1/* $Id: wprocess.h,v 1.16 2000-09-10 21:55:04 sandervl Exp $ */
2/*
3 * Process help functions
4 *
5 * Copyright (C) 1999 Sander van Leeuwen
6 *
7 * Project Odin Software License can be found in LICENSE.TXT
8 *
9 */
10
11#ifndef _WPROCESS_H__
12#define _WPROCESS_H__
13
14#define WIN32_TIBSEL
15
16#ifndef OS2_INCLUDED
17#include <winprocess.h>
18#else
19#include <winconst.h>
20typedef ULONG PDB;
21#endif
22#include <thread.h>
23
24TEB *InitializeTIB(BOOL fMainThread = FALSE);
25void DestroyTIB();
26
27void WIN32API RestoreOS2TIB();
28USHORT WIN32API SetWin32TIB();
29void SetPDBInstance(HINSTANCE hInstance);
30
31extern BOOL fExeStarted;
32extern BOOL fFreeLibrary;
33extern BOOL fIsOS2Image; //TRUE -> Odin32 OS/2 application (not converted!)
34 //FALSE -> otherwise
35extern BOOL fExitProcess;
36
37//Flat pointer to thread TIB structure
38extern DWORD *TIBFlatPtr;
39
40extern PDB ProcessPDB;
41
42#define NtCurrentTeb GetThreadTEB
43TEB *WIN32API GetThreadTEB();
44THDB *WIN32API GetThreadTHDB();
45THDB *WIN32API GetTHDBFromThreadId(ULONG threadId);
46THDB *WIN32API GetTHDBFromThreadHandle(HANDLE hThread);
47
48#ifndef OS2_INCLUDED
49inline PDB * PROCESS_Current(void)
50{
51 return NtCurrentTeb()->process;
52}
53#endif
54
55#endif
Note: See TracBrowser for help on using the repository browser.