📄 kmodeentries.cpp
字号:
// Need to map pointers before switching to target proc.
MapArgPtr(lpRect);
const CINFO* pci = SwitchToProc(&cstk,SH_WMGR);
__try
{
bRet = ((GweApiSet1_t*)(pci->ppfnMethods)) -> m_pGetClipCursor(lpRect);
// bRet = (*(BOOL (*)(LPRECT))(pci->ppfnMethods[MID_GetClipCursor]))(lpRect);
}
__except(EXCEPTION_EXECUTE_HANDLER)
{
(*(void (*)(void))pGwesHandler)();
bRet = 0;
}
SwitchBack();
return bRet;
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
extern "C"
HDC
SC_GetDC (
HWND hwnd
)
{
CALLSTACK cstk;
HDC hRet;
const CINFO* pci = SwitchToProc(&cstk,SH_WMGR);
__try
{
hRet = ((GweApiSet1_t*)(pci->ppfnMethods)) -> m_pGetDC(hwnd);
// hRet = (*(HDC (*)(HWND))(pci->ppfnMethods[MID_GetDC]))(hwnd);
}
__except(EXCEPTION_EXECUTE_HANDLER)
{
(*(void (*)(void))pGwesHandler)();
hRet = 0;
}
SwitchBack();
return hRet;
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
extern "C"
HWND
SC_GetFocus(
void
)
{
CALLSTACK cstk;
HWND hRet;
const CINFO* pci = SwitchToProc(&cstk,SH_WMGR);
__try
{
hRet = ((GweApiSet1_t*)(pci->ppfnMethods)) -> m_pGetFocus();
// hRet = (*(HWND (*)())(pci->ppfnMethods[MID_GetFocus]))();
}
__except(EXCEPTION_EXECUTE_HANDLER)
{
(*(void (*)(void))pGwesHandler)();
hRet = 0;
}
SwitchBack();
return hRet;
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
extern "C"
BOOL
SC_GetMessageW(
MSG* pMsgr,
HWND hwnd,
UINT wMsgFilterMin,
UINT wMsgFilterMax
)
{
CALLSTACK cstk;
BOOL bRet;
// Need to map pointers before switching to target proc.
MapArgPtr(pMsgr);
const CINFO* pci = SwitchToProc(&cstk,SH_WMGR);
__try
{
bRet = ((GweApiSet1_t*)(pci->ppfnMethods)) -> m_pGetMessageW(pMsgr,hwnd,wMsgFilterMin,wMsgFilterMax);
// bRet = (*(BOOL (*)(PMSG,HWND,UINT,UINT))(pci->ppfnMethods[MID_GetMessageW]))(pMsgr,hwnd,wMsgFilterMin,wMsgFilterMax);
}
__except(EXCEPTION_EXECUTE_HANDLER)
{
(*(void (*)(void))pGwesHandler)();
bRet = 0;
}
SwitchBack();
return bRet;
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
extern "C"
HWND
SC_GetWindow(
HWND hwnd,
UINT uCmd
)
{
CALLSTACK cstk;
HWND hRet;
const CINFO* pci = SwitchToProc(&cstk,SH_WMGR);
__try
{
hRet = ((GweApiSet1_t*)(pci->ppfnMethods)) -> m_pGetWindow(hwnd,uCmd);
// hRet = (*(HWND (*)(HWND,UINT))(pci->ppfnMethods[MID_GetWindow]))(hwnd,uCmd);
}
__except(EXCEPTION_EXECUTE_HANDLER)
{
(*(void (*)(void))pGwesHandler)();
hRet = 0;
}
SwitchBack();
return hRet;
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
extern "C"
BOOL
SC_PeekMessageW(
MSG* pMsg,
HWND hWnd,
UINT wMsgFilterMin,
UINT wMsgFilterMax,
UINT wRemoveMsg
)
{
CALLSTACK cstk;
BOOL bRet;
// Need to map pointers before switching to target proc.
MapArgPtr(pMsg);
const CINFO* pci = SwitchToProc(&cstk,SH_WMGR);
__try
{
bRet = ((GweApiSet1_t*)(pci->ppfnMethods)) -> m_pPeekMessageW(pMsg,hWnd,wMsgFilterMin,wMsgFilterMax,wRemoveMsg);
// bRet = (*(BOOL (*)(PMSG,HWND,UINT,UINT,UINT))(pci->ppfnMethods[MID_PeekMessageW]))(pMsg,hWnd,wMsgFilterMin,wMsgFilterMax,wRemoveMsg);
}
__except(EXCEPTION_EXECUTE_HANDLER)
{
(*(void (*)(void))pGwesHandler)();
bRet = 0;
}
SwitchBack();
return bRet;
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
extern "C"
BOOL
SC_ReleaseDC(
HWND hwnd,
HDC hdc
)
{
CALLSTACK cstk;
BOOL bRet;
const CINFO* pci = SwitchToProc(&cstk,SH_WMGR);
__try
{
bRet = ((GweApiSet1_t*)(pci->ppfnMethods)) -> m_pReleaseDC(hwnd,hdc);
// bRet = (*(BOOL (*)(HWND,HDC))(pci->ppfnMethods[MID_ReleaseDC]))(hwnd,hdc);
}
__except(EXCEPTION_EXECUTE_HANDLER)
{
(*(void (*)(void))pGwesHandler)();
bRet = 0;
}
SwitchBack();
return bRet;
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
extern "C"
LRESULT
SC_SendMessageW(
HWND hwnd,
UINT Msg,
WPARAM wParam,
LPARAM lParam
)
{
CALLSTACK cstk;
LRESULT lRet;
const CINFO* pci = SwitchToProc(&cstk,SH_WMGR);
__try
{
lRet = ((GweApiSet1_t*)(pci->ppfnMethods)) -> m_pSendMessageW(hwnd,Msg,wParam,lParam);
// lRet = (*(LRESULT (*)(HWND,UINT,WPARAM,LPARAM))(pci->ppfnMethods[MID_SendMessageW]))(hwnd,Msg,wParam,lParam);
}
__except(EXCEPTION_EXECUTE_HANDLER)
{
(*(void (*)(void))pGwesHandler)();
lRet = 0;
}
SwitchBack();
return lRet;
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
extern "C"
int
SC_SetScrollInfo(
HWND hwnd,
int fnBar,
const SCROLLINFO* lpsi,
BOOL fRedraw
)
{
CALLSTACK cstk;
int iRet;
// Need to map pointers before switching to target proc.
MapArgPtr(lpsi);
const CINFO* pci = SwitchToProc(&cstk,SH_WMGR);
__try
{
iRet = ((GweApiSet1_t*)(pci->ppfnMethods)) -> m_pSetScrollInfo(hwnd,fnBar,lpsi,fRedraw);
// iRet = (*(int (*)(HWND,int,LPCSCROLLINFO,BOOL))(pci->ppfnMethods[MID_SetScrollInfo]))(hwnd,fnBar,lpsi,fRedraw);
}
__except(EXCEPTION_EXECUTE_HANDLER)
{
(*(void (*)(void))pGwesHandler)();
iRet = 0;
}
SwitchBack();
return iRet;
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
extern "C"
LONG
SC_SetWindowLongW(
HWND hwnd,
int nIndex,
LONG lNewLong
)
{
CALLSTACK cstk;
LONG lRet;
const CINFO* pci = SwitchToProc(&cstk,SH_WMGR);
__try
{
lRet = ((GweApiSet1_t*)(pci->ppfnMethods)) -> m_pSetWindowLongW(hwnd,nIndex,lNewLong);
// lRet = (*(LONG (*)(HWND,int,LONG))(pci->ppfnMethods[MID_SetWindowLongW]))(hwnd,nIndex,lNewLong);
}
__except(EXCEPTION_EXECUTE_HANDLER)
{
(*(void (*)(void))pGwesHandler)();
lRet = 0;
}
SwitchBack();
return lRet;
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
extern "C"
BOOL
SC_SetWindowPos(
HWND hwnd,
HWND hwndInsertAfter,
int x,
int y,
int dx,
int dy,
UINT fuFlags
)
{
CALLSTACK cstk;
BOOL bRet;
const CINFO* pci = SwitchToProc(&cstk,SH_WMGR);
__try
{
bRet = ((GweApiSet1_t*)(pci->ppfnMethods)) -> m_pSetWindowPos(hwnd,hwndInsertAfter,x,y,dx,dy,fuFlags);
// bRet = (*(BOOL (*)(HWND,HWND,int,int,int,int,UINT))(pci->ppfnMethods[MID_SetWindowPos]))(hwnd,hwndInsertAfter,x,y,dx,dy,fuFlags);
}
__except(EXCEPTION_EXECUTE_HANDLER)
{
(*(void (*)(void))pGwesHandler)();
bRet = 0;
}
SwitchBack();
return bRet;
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
extern "C"
HBRUSH
SC_CreateSolidBrush(
COLORREF crColor
)
{
CALLSTACK cstk;
HBRUSH hRet;
const CINFO* pci = SwitchToProc(&cstk,SH_GDI);
__try
{
hRet = ((GweApiSet2_t*)(pci->ppfnMethods)) -> m_pCreateSolidBrush(crColor);
// hRet = (*(HBRUSH (*)(COLORREF))(pci->ppfnMethods[CREATESOLIDBRUSH]))(crColor);
}
__except(EXCEPTION_EXECUTE_HANDLER)
{
(*(void (*)(void))pGwesHandler)();
hRet = 0;
}
SwitchBack();
return hRet;
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
extern "C"
BOOL
SC_DeleteMenu(
HMENU hmenu,
UINT uPosition,
UINT uFlags
)
{
CALLSTACK cstk;
BOOL bRet;
const CINFO* pci = SwitchToProc(&cstk,SH_WMGR);
__try
{
bRet = ((GweApiSet1_t*)(pci->ppfnMethods)) -> m_pDeleteMenu(hmenu,uPosition,uFlags);
// bRet = (*(BOOL (*)(HMENU, UINT, UINT))(pci->ppfnMethods[MID_DeleteMenu]))(hmenu,uPosition,uFlags);
}
__except(EXCEPTION_EXECUTE_HANDLER)
{
(*(void (*)(void))pGwesHandler)();
bRet = 0;
}
SwitchBack();
return bRet;
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
extern "C"
BOOL
SC_DeleteObject(
HGDIOBJ hObject
)
{
CALLSTACK cstk;
BOOL bRet;
const CINFO* pci = SwitchToProc(&cstk,SH_GDI);
__try
{
bRet = ((GweApiSet2_t*)(pci->ppfnMethods)) -> m_pDeleteObject(hObject);
// bRet = (*(BOOL (*)(HGDIOBJ))(pci->ppfnMethods[DELETEOBJECT]))(hObject);
}
__except(EXCEPTION_EXECUTE_HANDLER)
{
(*(void (*)(void))pGwesHandler)();
bRet = 0;
}
SwitchBack();
return bRet;
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
extern "C"
int
SC_DrawTextW(
HDC hdc,
LPCWSTR lpszStr,
int cchStr,
RECT *lprc,
UINT wFormat
)
{
CALLSTACK cstk;
int iRet;
// Need to map pointers before switching to target proc.
MapArgPtr(lpszStr);
MapArgPtr(lprc);
const CINFO* pci = SwitchToProc(&cstk,SH_GDI);
__try
{
iRet = ((GweApiSet2_t*)(pci->ppfnMethods)) -> m_pDrawTextW(hdc,lpszStr,cchStr,lprc,wFormat);
// iRet = (*(int (*)(HDC,LPCWSTR,int,RECT *,UINT))(pci->ppfnMethods[DRAWTEXTW]))(hdc,lpszStr,cchStr,lprc,wFormat);
}
__except(EXCEPTION_EXECUTE_HANDLER)
{
(*(void (*)(void))pGwesHandler)();
iRet = 0;
}
SwitchBack();
return iRet;
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
extern "C"
BOOL
SC_ExtTextOutW(
HDC hdc,
int X,
int Y,
UINT fuOptions,
CONST RECT *lprc,
LPCWSTR lpszString,
UINT cbCount,
CONST INT *lpDx
)
{
CALLSTACK cstk;
BOOL bRet;
// Need to map pointers before switching to target proc.
MapArgPtr(lprc);
MapArgPtr(lpszString);
MapArgPtr(lpDx);
const CINFO* pci = SwitchToProc(&cstk,SH_GDI);
__try
{
bRet = ((GweApiSet2_t*)(pci->ppfnMethods)) -> m_pExtTextOutW(hdc,X,Y,fuOptions,lprc,lpszString,cbCount,lpDx);
// bRet = (*(BOOL (*)(HDC,int,int,UINT,CONST RECT *, LPCWSTR, UINT, CONST INT *))(pci->ppfnMethods[EXTTEXTOUTW]))(hdc,X,Y,fuOptions,lprc,lpszString,cbCount,lpDx);
}
__except(EXCEPTION_EXECUTE_HANDLER)
{
(*(void (*)(void))pGwesHandler)();
bRet = 0;
}
SwitchBack();
return bRet;
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
extern "C"
int
SC_FillRect(
HDC hdc,
CONST RECT *lprc,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -