������������未���摹�fputws((LPCTSTR)pMsg->lParam��fp�����������啊��pMsg-
>lParam�恰�A pointer to a null-terminated string that is the window text".���械�
时�����"Debug Assertion failed"说"xx"�诖�占���只���摹�������位��牛要咋�陌��� 
�屑������� 
  
LRESULT WINAPI CallWndProc(int nCode,WPARAM wparam,LPARAM lparam)  
{ 
if(nCode<0) 
{ 
     return CallNextHookEx(CurrentHook,nCode,wparam,lparam); 
} 
FILE *fp;  
PCWPSTRUCT pMsg=(PCWPSTRUCT)lparam; 
fp=fopen("D:\\My Documents\\Visual Studio 
2008\\Projects\\TestHook_exe\\TestHook_exe\\MsgHook.txt","a"); 
if(fp!=NULL&&pMsg->message==WM_SETTEXT) 
{ 
     fprintf(fp,"\nWindow:%08x Message ID:%08x\n",pMsg->hwnd,pMsg->message); 
     fprintf(fp,"Window Text:"); 
     fputws((LPCTSTR)pMsg->lParam,fp); 
} 
fclose(fp); 
return(CallNextHookEx(CurrentHook,nCode,wparam,lparam)); 
} 
--
	������一���薹����艿�前��

�� ��源:��BBS 水木�华站 http://smth.edu.cn��[FROM: 118.229.129.*]