| Rev | Line |  | 
|---|
| [2326] | 1 | /* $Id: wprocess.h,v 1.15 2000-01-05 19:35:52 sandervl Exp $ */ | 
|---|
| [124] | 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 |  | 
|---|
| [130] | 14 | #define WIN32_TIBSEL | 
|---|
| [125] | 15 |  | 
|---|
| [1067] | 16 | #ifndef OS2_INCLUDED | 
|---|
| [1887] | 17 | #include <winprocess.h> | 
|---|
|  | 18 | #else | 
|---|
| [2086] | 19 | #include <winconst.h> | 
|---|
| [1887] | 20 | typedef ULONG PDB; | 
|---|
| [1067] | 21 | #endif | 
|---|
| [127] | 22 | #include <thread.h> | 
|---|
|  | 23 |  | 
|---|
|  | 24 | TEB *InitializeTIB(BOOL fMainThread = FALSE); | 
|---|
| [124] | 25 | void DestroyTIB(); | 
|---|
|  | 26 |  | 
|---|
| [281] | 27 | void   WIN32API RestoreOS2TIB(); | 
|---|
|  | 28 | USHORT WIN32API SetWin32TIB(); | 
|---|
| [1891] | 29 | void   SetPDBInstance(HINSTANCE hInstance); | 
|---|
| [127] | 30 |  | 
|---|
|  | 31 | extern BOOL fExeStarted; | 
|---|
| [953] | 32 | extern BOOL fFreeLibrary; | 
|---|
| [1222] | 33 | extern BOOL fIsOS2Image; //TRUE  -> Odin32 OS/2 application (not converted!) | 
|---|
|  | 34 | //FALSE -> otherwise | 
|---|
| [127] | 35 |  | 
|---|
| [281] | 36 | //Flat pointer to thread TIB structure | 
|---|
|  | 37 | extern DWORD  *TIBFlatPtr; | 
|---|
|  | 38 |  | 
|---|
| [1885] | 39 | extern PDB ProcessPDB; | 
|---|
|  | 40 |  | 
|---|
|  | 41 | #define NtCurrentTeb GetThreadTEB | 
|---|
| [320] | 42 | TEB  *WIN32API GetThreadTEB(); | 
|---|
|  | 43 | THDB *WIN32API GetThreadTHDB(); | 
|---|
| [2081] | 44 | THDB *WIN32API GetTHDBFromThreadId(ULONG threadId); | 
|---|
| [2326] | 45 | THDB *WIN32API GetTHDBFromThreadHandle(HANDLE hThread); | 
|---|
| [320] | 46 |  | 
|---|
| [1887] | 47 | #ifndef OS2_INCLUDED | 
|---|
|  | 48 | inline PDB * PROCESS_Current(void) | 
|---|
| [1885] | 49 | { | 
|---|
|  | 50 | return NtCurrentTeb()->process; | 
|---|
|  | 51 | } | 
|---|
| [1887] | 52 | #endif | 
|---|
| [1885] | 53 |  | 
|---|
| [124] | 54 | #endif | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.