Line | |
---|
1 | /* $Id: wprocess.h,v 1.19 2001-03-19 19:30:15 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>
|
---|
20 | typedef ULONG PDB;
|
---|
21 | #endif
|
---|
22 | #include <thread.h>
|
---|
23 |
|
---|
24 | TEB * WIN32API InitializeTIB(BOOL fMainThread = FALSE);
|
---|
25 | void WIN32API DestroyTIB();
|
---|
26 | ULONG WIN32API GetProcessTIBSel();
|
---|
27 |
|
---|
28 | void WIN32API RestoreOS2TIB();
|
---|
29 | USHORT WIN32API SetWin32TIB();
|
---|
30 | void SetPDBInstance(HINSTANCE hInstance);
|
---|
31 |
|
---|
32 | extern BOOL fExeStarted;
|
---|
33 | extern BOOL fFreeLibrary;
|
---|
34 | extern BOOL fIsOS2Image; //TRUE -> Odin32 OS/2 application (not converted!)
|
---|
35 | //FALSE -> otherwise
|
---|
36 | extern BOOL fExitProcess;
|
---|
37 |
|
---|
38 | //Flat pointer to thread TIB structure
|
---|
39 | extern DWORD *TIBFlatPtr;
|
---|
40 |
|
---|
41 | extern PDB ProcessPDB;
|
---|
42 |
|
---|
43 | #define NtCurrentTeb GetThreadTEB
|
---|
44 | TEB *WIN32API GetThreadTEB();
|
---|
45 | TEB *WIN32API GetTEBFromThreadId(ULONG threadId);
|
---|
46 | TEB *WIN32API GetTEBFromThreadHandle(HANDLE hThread);
|
---|
47 |
|
---|
48 | #ifndef OS2_INCLUDED
|
---|
49 | inline PDB * PROCESS_Current(void)
|
---|
50 | {
|
---|
51 | return NtCurrentTeb()->process;
|
---|
52 | }
|
---|
53 | #endif
|
---|
54 |
|
---|
55 | ULONG InitCommandLine(const char *pszPeExe);
|
---|
56 |
|
---|
57 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.