⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 thread.h

📁 该项目主要是将wingdows程序直接运行在linux上
💻 H
字号:
/* * thread.h * * Copyright (C) 2006  Insigme Co., Ltd * * Authors:  * - Chenzhan Hu, Lixing Chu, Limin Jin, Liwei Zhou, Zhiqiang Jiao * * This software has been developed while working on the Linux Unified Kernel * project (http://linux.insigma.com.cn) in the Insigma Reaserch Institute,   * which is a subdivision of Insigma Co., Ltd (http://www.insigma.com.cn). *  * The project is sponsored by Insigma Co., Ltd. * * The authors can be reached at linux@insigma.com.cn. * * This program is free software; you can redistribute it and/or modify it * under the terms of  the GNU General  Public License as published by the * Free Software Foundation; either version 2 of the  License, or (at your * option) any later version. * * Revision History: *   Jan 2006 - Created. *//* * thread.h: * Reference to Kernel-win32 code */#ifndef _THREAD_H#define _THREAD_H#include <linux/module.h>#include <linux/sched.h>#include <linux/win32_object.h>#include <linux/win32_thread.h>#include "win32.h"#include "process.h"#ifdef CONFIG_UNIFIED_KERNEL#define	TEB_BASE	0x7FFDE000#define	TEB_SELECTOR	0x3btypedef struct _NT_TIB {	struct _EXCEPTION_REGISTRATION_RECORD *ExceptionList;	PVOID StackBase;	PVOID StackLimit;	PVOID SubSystemTib;	union {		PVOID FiberData;		DWORD Version;	} DUMMYUNIONNAME;	PVOID ArbitraryUserPointer;	struct _NT_TIB *Self;} NT_TIB,*PNT_TIB;typedef struct _GDI_TEB_BATCH{    ULONG Offset;    ULONG HDC;    ULONG Buffer[0x136];} GDI_TEB_BATCH, *PGDI_TEB_BATCH;typedef struct w32thread W32THREAD;typedef struct _TEB{	NT_TIB 			Tib;                         	/* 00h */	PVOID 			EnvironmentPointer;           	/* 1Ch */	CLIENT_ID 		Cid;                      	/* 20h */	PVOID 			ActiveRpcInfo;                	/* 28h */	PVOID 			ThreadLocalStoragePointer;    	/* 2Ch */	PEB*			Peb;                   		/* 30h */	ULONG 			LastErrorValue;               	/* 34h */	ULONG 			CountOfOwnedCriticalSections; 	/* 38h */	PVOID 			CsrClientThread;              	/* 3Ch */	W32THREAD*		Win32ThreadInfo;		/* 40h */	ULONG 			Win32ClientInfo[0x1F];        	/* 44h */	PVOID 			WOW32Reserved;                	/* C0h */	LCID 			CurrentLocale;                 	/* C4h */	ULONG 			FpSoftwareStatusRegister;     	/* C8h */	PVOID 			SystemReserved1[0x36];        	/* CCh */	PVOID 			Spare1;                       	/* 1A4h */	LONG 			ExceptionCode;                 	/* 1A8h */	UCHAR 			SpareBytes1[0x28];            	/* 1ACh */	PVOID 			SystemReserved2[0xA];         	/* 1D4h */	GDI_TEB_BATCH 		GdiTebBatch;          		/* 1FCh */	ULONG 			gdiRgn;                       	/* 6DCh */	ULONG 			gdiPen;                       	/* 6E0h */	ULONG 			gdiBrush;                     	/* 6E4h */	CLIENT_ID 		RealClientId;             	/* 6E8h */	PVOID 			GdiCachedProcessHandle;       	/* 6F0h */	ULONG 			GdiClientPID;                 	/* 6F4h */	ULONG 			GdiClientTID;                 	/* 6F8h */	PVOID 			GdiThreadLocaleInfo;          	/* 6FCh */	PVOID 			UserReserved[5];              	/* 700h */	PVOID 			glDispatchTable[0x118];       	/* 714h */	ULONG 			glReserved1[0x1A];            	/* B74h */	PVOID 			glReserved2;                  	/* BDCh */	PVOID  			glSectionInfo;                	/* BE0h */	PVOID  			glSection;                    	/* BE4h */	PVOID  			glTable;                      	/* BE8h */	PVOID  			glCurrentRC;                  	/* BECh */	PVOID  			glContext;                    	/* BF0h */	NTSTATUS  		LastStatusValue;           	/* BF4h */	UNICODE_STRING 		StaticUnicodeString; 		/* BF8h */	WCHAR  			StaticUnicodeBuffer[0x105];   	/* C00h */	PVOID  			DeallocationStack;            	/* E0Ch */	PVOID  			TlsSlots[0x40];               	/* E10h */	LIST_ENTRY  		TlsLinks;                	/* F10h */	PVOID  			Vdm;                          	/* F18h */	PVOID  			ReservedForNtRpc;             	/* F1Ch */	PVOID  			DbgSsReserved[0x2];           	/* F20h */	ULONG  			HardErrorDisabled;            	/* F28h */	PVOID  			Instrumentation[0x10];        	/* F2Ch */	PVOID  			WinSockData;                  	/* F6Ch */	ULONG  			GdiBatchCount;                	/* F70h */	USHORT  		_Spare2;                     	/* F74h */	BOOLEAN 		IsFiber;                    	/* F76h */	UCHAR  			Spare3;                       	/* F77h */	ULONG  			_Spare4;                      	/* F78h */	ULONG  			_Spare5;                      	/* F7Ch */	PVOID  			ReservedForOle;               	/* F80h */	ULONG  			WaitingOnLoaderLock;          	/* F84h */	ULONG  			_Unknown[11];                 	/* F88h */	PVOID  			FlsSlots;                     	/* FB4h */}TEB, *PTEB;struct ethread_cons_data{	struct task_struct 	*etcd_task;	/* Linux task */	win32_object		*etcd_process; 	/* containing Win32 process */	unsigned long		etcd_stack_top;	/* stack top */};extern void ThreadClassInit(void);int set_teb_selector(long teb);extern struct ethread *thread_find(void);extern PTEB create_teb(struct eprocess *process, PCLIENT_ID client_id, unsigned long stack_top);void KThreadInit(struct kthread *thread, struct eprocess *process);void EThreadInit(struct ethread *thread, struct eprocess *process);#endif /* CONFIG_UNIFIED_KERNEL */#endif /* _THREAD_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -