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