📄 dllstdafx.cpp
字号:
// stdafx.cpp : source file that includes just the standard includes
// SuperPwdHook.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
/************************************
REVISION LOG ENTRY
Revision By: Zhang, Zhefu
Contact: codetiger@hotmail.com
Revised on 12/7/2002 10:44:33 AM
Comment: Following Source is Written To Contribute to WWW.CodeGuru.Com
Also check http://codeguru.earthweb.com/ieprogram/SPwdSpy.html
for latest patch
************************************/
#include "DLLstdafx.h"
// TODO: reference any additional headers you need in STDAFX.H
// and not in this file
BOOL IsBrowser(HWND hWnd)
{
TCHAR szClassName[64];
int nRet = GetClassName(hWnd, szClassName, 64);
if(nRet == 0) return FALSE;
szClassName[nRet] = 0;
if(::lstrcmp(szClassName,
_T("Internet Explorer_Server")
) != 0) return FALSE;
return TRUE;
}
BOOL IsPasswordEdit(HWND hWnd)
{
TCHAR szClassName[64];
int nRet = GetClassName(hWnd, szClassName, 64);
if(nRet == 0) return FALSE;
szClassName[nRet] = 0;
if(::lstrcmp(szClassName, _T("Edit")) != 0) return FALSE;
DWORD dw = ::GetWindowLong(hWnd,GWL_STYLE);
dw &= ES_PASSWORD;
if(dw == ES_PASSWORD)
return TRUE;
return FALSE;
}
void ReportErr(LPCTSTR str)
{
LPVOID lpMsgBuf;
FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS,
NULL,
::GetLastError(),
MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), // Default language
(LPTSTR) &lpMsgBuf,
0,
NULL
);
::MessageBox( NULL, (LPCTSTR)lpMsgBuf,
str, MB_OK | MB_ICONINFORMATION );
// Free the buffer.
LocalFree( lpMsgBuf );
}
void PopMsg(LPCTSTR pszFormat, ...)
{
va_list argList;
va_start(argList, pszFormat);
TCHAR sz[1024];
_vstprintf(sz, pszFormat, argList);
va_end(argList);
::MessageBox(NULL, sz, _T("Pop Msg"), MB_OK);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -