关于THREADINFO结构的 有高手没啊

danielwmm 2008-11-19 01:22:58
线程为窗口维护一个threadinfo结构,
threadinfo数据结构:
------------------
|登记消息队列指针|
------------------
|虚拟输入队列指针|
------------------
|发送消息队列指针|
------------------
|应答消息队列指针|
------------------
| nExitCode |
------------------
| 唤醒标志 |
------------------
|局部输入状态变量|
------------------

请问上面4个指针分别的作用是什么??举实例更好!谢谢大家啊!
...全文
616 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
wonsea 2009-02-18
  • 打赏
  • 举报
回复
这个是未文档化的,当然在MSDN找补到
龙泉寺扫地僧 2009-02-17
  • 打赏
  • 举报
回复
有的,如下:
typedef struct tagTHREADINFO {
W32THREAD;

//***************************************** begin: USER specific fields

LIST_ENTRY PtiLink; // Link to other threads on desktop
PTL ptl; // Listhead for thread lock list
PTL ptlOb; // Listhead for kernel object thread lock list
PTL ptlPool; // Listhead for temp pool usage
int cEnterCount;

struct tagPROCESSINFO *ppi; // process info struct for this thread

struct tagQ *pq; // keyboard and mouse input queue

PKL spklActive; // active keyboard layout for this thread
MLIST mlPost; // posted message list.
USHORT fsChangeBitsRemoved;// Bits removed during PeekMessage
USHORT cDeskClient; // Ref count for CSRSS desktop

PCLIENTTHREADINFO pcti; // Info that must be visible from client
CLIENTTHREADINFO cti; // Use this when no desktop is available

HANDLE hEventQueueClient;
PKEVENT pEventQueueServer;

PKEVENT *apEvent; // Wait array for xxxPollAndWaitForSingleObject

PDESKTOP rpdesk;
HDESK hdesk; // Desktop handle
ACCESS_MASK amdesk; // Granted desktop access
PDESKTOPINFO pDeskInfo; // Desktop info visible to client
PCLIENTINFO pClientInfo; // Client info stored in TEB

DWORD TIF_flags; // TIF_ flags go here.

PUNICODE_STRING pstrAppName; // Application module name.

struct tagSMS *psmsSent; // Most recent SMS this thread has sent
struct tagSMS *psmsCurrent; // Received SMS this thread is currently processing
struct tagSMS *psmsReceiveList; // SMSs to be processed

LONG timeLast; // Time, position, and ID of last message
POINT ptLast;
DWORD idLast;

int cQuit;
int exitCode;

int cPaintsReady;
UINT cTimersReady;

PMENUSTATE pMenuState;

union {
PTDB ptdb; // Win16Task Schedule data for WOW thread
PWINDOWSTATION pwinsta; // Window station for SYSTEM thread
PDESKTOP pdeskClient; // Desktop for CSRSS thread
};

PSVR_INSTANCE_INFO psiiList; // thread DDEML instance list
DWORD dwExpWinVer;
DWORD dwCompatFlags; // The Win 3.1 Compat flags

UINT cWindows; // Number of windows owned by this thread
UINT cVisWindows; // Number of visible windows on this thread

struct tagQ *pqAttach; // calculation variabled used in
// AttachThreadInput()

int iCursorLevel; // keep track of each thread's level
DWORD fsReserveKeys; // Keys that must be sent to the active
// active console window.
struct tagTHREADINFO *ptiSibling; // pointer to sibling thread info

PMOVESIZEDATA pmsd;

DWORD fsHooks; // WHF_ Flags for which hooks are installed
PHOOK asphkStart[CWINHOOKS]; // Hooks registered for this thread
PHOOK sphkCurrent; // Hook this thread is currently processing

PSBTRACK pSBTrack;

#ifdef FE_IME
PWND spwndDefaultIme; // Default IME Window for this thread
PIMC spDefaultImc; // Default input context for this thread
HKL hklPrev; // Previous active keyboard layout
#endif
} THREADINFO;

zzz822163 2008-11-20
  • 打赏
  • 举报
回复
是自己定义的吧?
zzz822163 2008-11-19
  • 打赏
  • 举报
回复
threadinfo怎么MSDN里没找到他?
danielwmm 2008-11-19
  • 打赏
  • 举报
回复
我也找了的
没有,呵呵!

15,471

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 进程/线程/DLL
社区管理员
  • 进程/线程/DLL社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧