ããããåå¼·ãã
å¿ãã¦ãã¾ããããªã®ã§æ¸ãä¸ãã¦ãã
é°å²æ°çãªãã¨
- ã¦ã£ã³ãã¦
- ä¿ã«ããã¦ã£ã³ãã¦ã§ã¯ãªãã GUI ã®é¨åå ¨è¬ï¼ãã¿ã³ã¨ãããã¼ã«ãã¼ï¼ãå«ã
- ä¿ã«ããã¦ã£ã³ãã¦ã¯ããã¬ã¼ã ã¨ãè¨ã
- ãã³ãã«
- ãã¤ã³ã¿ã¿ãããªãã
- HWND
- ã¦ã£ã³ãã¦ã®ãã³ãã«
- DOM ã§ãã㨠Node ã¿ãããªãã
- LPXXX
- XXX ã®ãã¤ã³ã¿ã£ã¦æå³
- owner 㨠popup
- ããããã¢ãããããã¦ã£ã³ã㦠= ownerãã¨ããããã¢ããããã¦ã£ã³ã㦠= popupã
- DOM ã§ããã¨
- owner ã¯ã window.opener ã§
- popup ã¯ã window.frames ã£ã¦æã
- HINSTANCE
- DLL ã¨ã EXE ã¨ãã²ã¨ã¤ã¨å¯¾å¿ãã¦ããã³ãã«
- ã¢ããªã±ã¼ã·ã§ã³ã® HINSTANCE ã¨ããã¨å®è¡ããã¦ãã EXE ã®ãã³ãã«
- DLL ã EXE ã®ã¡ã¢ãªä¸ã®ä½ç½®
- HMODULE ã¨ã¯åããã®
ãã¾ãæ¬è³ªçã§ãªããã¨
- W ã§çµããé¢æ°ã¯ WCHAR
- WideCharToMultiByte ã使ãã°ã WCHAR -> char
int len = WideCharToMultiByte(CP_UTF8, 0, wbuf, wlen, buf, sizeof(buf) - 1, NULL, NULL);
ã¦ã£ã³ãã¦ã®åå¾
- HWND GetWindow(HWND, å®æ°)
- æ§ã ãªæ¹åã«ãè¦ç´ ãåå¾ãã«ãã
- GetWindow(HWND, GW_CHILD)
- DOM ã§ãã㨠node.firstChild
- GetWindow(HWND, GW_HWNDNEXT)
- DOM ã§ãã㨠node.nextSibling
- GetWindow(HWND, GW_HWNDPREV)
- DOM ã§ãã㨠node.previousSibling
- GetWindow(HWND, GW_HWNDFIRST)
- DOM ã§ãã㨠node.parentNode.firstChild
- GetWindow(HWND, GW_HWNDLAST)
- DOM ã§ãã㨠node.parentNode.lastChild
- GetWindow(HWND, GW_OWNER)
- DOM ã§ãã㨠window.opener
- GetWindow(HWND, GW_ENABLEDPOPUP)
- DOM ã§ãã㨠window.frames[0]
- HWND GetParent(HWND)
- DOM ã§ãã㨠node.parentNode
- AnyPopup
- ãããã¢ããã¦ã£ã³ãã¦ãæã£ã¦ãã
- DOM ã§ãã㨠(window.frame.length != 0)
- BOOL EnumChildWindows(HWND, WNDENUMPROC, LPARAM)
- DOM ã§ãã㨠node.getElementsByTagName('*').forEach(function() { }); ã¿ãããªãã
- 第ä¸å¼æ°ã¯ä½ã§ã OK ï¼ãã¤ã³ã¿ã¨ãå ¥ãã¨ãã° OKï¼
- ãã£ã¡ãã£ã¡ä½åããã©ãã¼ã¹ããã¨ãã¯ããã使ãã£ã¦ãã¨ããã
- HWND GetDesktopWindow()
- ãã¹ã¯ãããã®ã¦ã£ã³ããã³ãã«ãè¿ã
- DOM ã§ãã㨠document.documentElement ã¨ã document.body
WHND ããåå¾ã§ããæ å ±
- Class
- ClassName
- GetClassName(hwnd, buf, len)
- WNDCLAASSEX
- GetClassInfo(hinstance, name, &info) ã§åãã
- hinstance 㯠GetWindowLong ã§
- WNDCLAASSEX ã¯æ
å ±æºè¼
- http://homepage1.nifty.com/kan01/program/vc/win_info.htm
- lpfnWndProc ã§ãã¡ãã»ã¼ã¸å¦ç
- ClassName
- HINSTANCE
- GetWindowLong(hwnd, GWL_HINSTANCE)
- CreateWindow, CreateWindowEx ããã¨ãã«æ¸¡ãããã¤
- ã¹ã¿ã¤ã«
- GetWindowStyle(HWND) & flags, GetWindowExStyle(HWND) & flags
- LVS_ ã¨ã TBSTYLE_ ã¨ã CCS_ ã¨ã WS_ ã¨ã Class Name ã«ãã£ã¦ãããã
- ã¿ã¤ãã«çãªä½ã
- GetWindowText(hwnd, buf, sizeof(buf) - 1)
- ç©å½¢
- GetWindowRect(hWnd,&rect)
- ã¦ã£ã³ãã¦ãä½æããããã»ã¹ ID ã¨ã¹ã¬ãã ID
- threadid = GetWindowThreadProcessId(HWND, &processid)
- ããã»ã¹ ID ãã HINSTANCE ãå¾ã
- OpenProcess 使ã
- SendMessage
- ãªãã§ãããã奥義
- SendMessage ã§æ å ±ãåå¾ããå ´åã§ãå¤é¨ããã»ã¹ã®ã¦ã£ã³ãã¦ã®å ´å㯠VirtualAllocEx ã§
- VirtualAllocEx
- å¤é¨ããã»ã¹ã®ã¡ã¢ãªã確ä¿
- HWND â GetWindowThreadProcessId â OpenProcess â VirtualAllocEx ã®æé
- ReadProcessMemory ã§èªã
- VirtualFreeEx ã§éæ¾