|
|
|
[原创]仍个上半年写的某游戏XXX玩意
真的好神秘呀 |
|
[已解决][求助]VC6 debug运行正常,release有问题?
// 预先设置结构大小 还是刘国华的编程风格好,无论点变都行,自愧不如 |
|
[已解决][求助]VC6 debug运行正常,release有问题?
谢谢大家帮忙,只能怪我粗心,晕,经过大家的提醒,看到这个,就正如上面的朋友所说 Members dwSize Specifies the length, in bytes, of the structure. Before calling the Process32First function, set this member to sizeof(PROCESSENTRY32). If you do not initialize dwSize, Process32First will fail. 经修改初始化dwsize已经OK,谢谢大家 |
|
[已解决][求助]VC6 debug运行正常,release有问题?
谢谢你的热心,继续等待ing |
|
[求助]关于HOOK游戏并在游戏中创建新进程显示窗口???(VC)
无名指,你好,hinstDll是什么?是不是我定义的hinst?我改成hinst不行,请指教 |
|
[求助]关于HOOK游戏并在游戏中创建新进程显示窗口???(VC)
不用搞什么线程里建立窗口,直接Dll中建立非模态窗口就行啦我开始也是跟你这样想的,但我试过也不行,到百度查了很多资料,都说用UI线程,但线程应该在MFC才分UI的吧?那WIN32呢?我看过一编资料,用MFC来HOOK的,在就HOOK后按下一个键就创建窗口,他是成功的,但在WIN32里又怎么实现呢? |
|
[求助]关于HOOK游戏并在游戏中创建新进程显示窗口???(VC)
以下是DLL文件DLL.cpp #define HOOKGAME extern "C" _declspec(dllexport) #include "dll.h" #include "resource.h" #pragma data_seg("YXJH") HHOOK hhook=NULL; #pragma data_seg() #pragma comment(linker, "/SECTION:YXJH,rws") HINSTANCE hinst; HANDLE handle=NULL; HWND m_hwnd; HWND hwnd; BOOL CALLBACK DialogProc( HWND hwndDlg, // handle to dialog box UINT uMsg, // message WPARAM wParam, // first message parameter LPARAM lParam // second message parameter ) { switch(uMsg) { case WM_DESTROY: PostQuitMessage(0); case WM_COMMAND: switch(LOWORD(wParam)) { case IDOK: PostQuitMessage(0); break; } default: return false; } return true; } DWORD WINAPI ThreadProc( LPVOID lpParameter // thread data ) { MSG msg; //HWND hwnd=FindWindow(NULL,"计算器"); m_hwnd=CreateDialogParam(hinst,MAKEINTRESOURCE(IDD_DIALOG1),hwnd,(DLGPROC)DialogProc,NULL); while(GetMessage(&msg,NULL,0,0)); { if(m_hwnd==0 || !IsDialogMessage(m_hwnd,&msg)) { TranslateMessage(&msg); DispatchMessage(&msg); } } return 0; } BOOL WINAPI DllMain( HINSTANCE hinstDLL, // handle to DLL module DWORD fdwReason, // reason for calling function LPVOID lpvReserved // reserved ) { switch(fdwReason) { case DLL_PROCESS_ATTACH: break; } hinst=hinstDLL; return true; } LRESULT CALLBACK KeyboardProc( int code, // hook code WPARAM wParam, // virtual-key code LPARAM lParam // keystroke-message information ) { if(VK_NUMPAD6==wParam) { DWORD ThreadId; handle= CreateThread(NULL,0,ThreadProc,NULL,0,&ThreadId); return 1; } return CallNextHookEx(hhook,code,wParam,lParam); } void InstallHook() { DWORD ProcessId; hwnd=FindWindow(NULL,"计算器"); if(hwnd) hhook=SetWindowsHookEx(WH_KEYBOARD,KeyboardProc,hinst,GetWindowThreadProcessId(FindWindow(NULL,"计算器"),&ProcessId)); } void UnstallHook() { UnhookWindowsHookEx(hhook); } 以下是DLL.h #include <windows.h> #ifndef HOOKGAME #define HOOKGAME extern "C" _declspec(dllimport) #endif HOOKGAME void InstallHook(); HOOKGAME void UnstallHook(); 然后随便做了个EXE来启动HOOK,这是我用来HOOK游戏并在游戏内部创建一个新线,并新建一个对话框,但对话框没是建立了,但不能响应消息,请大大们不吝指教!!谢谢!!! |
|
[求助]关于插入其它进程的DLL编程问题?
经过不停的调试,问题已经解决,上面的代码有两个问题,第一处问题是我在CreateDialogParam时没加强制转换,解决这里窗口就出来了,但又发现了一个新问题,就是点击窗口的OK时,对话框弹出了一个MessageBox,但里面的MB_OK我点击不了,然后又发现计算器的所有点击也没响应,很明显这里我写的对话框给没收了,那怎么解决呢???想~~~ ,其实,明白windows消息机制后是很容易解决的,因为很多消息我们不感兴趣,我们只关注我们自己写的消息,那么我们不处理的消息去那了?对,可能你已经想到了,就是DefWindowProc这个API,处理的消息我们返回TRUE,不处理的返回一个FALSE,这样不处理的消息就交回“计算器来处理了”, |
|
[求助]关于插入其它进程的DLL编程问题?
DLL确实已经注入了,我用冰刃查过了,就是DLL有问题,请熟悉VC的朋友帮帮忙~,谢谢~~ |
|
[求助]关于DLL插入指定进程??
因为我把汇编扔下了,呵呵 |
|
[求助]关于DLL插入指定进程??
llEntry proc _hInstance,_dwReason,_dwReserved local @dwThreadID .if _dwReason == DLL_PROCESS_ATTACH push _hInstance pop hInstance invoke CreateThread,NULL,0,offset _WinMain,NULL,\ NULL,addr @dwThreadID invoke CloseHandle,eax .endif mov eax,TRUE ret DllEntry Endp End DllEntry 突然之间想到一个问题?为什么在DLL进程创建时要创建一个新的线程来建立对话框??? 不能直接建立吗??? |
|
[求助]关于DLL插入指定进程??
多谢你们的帮忙,注入其实已经成功了,但DLL里面还是一头雾水,原因很简单,我用MFC是因为想用他的类,用WIN32有点怕,但是在DLL里MFC使用方法又不太懂,像bithaha一样,直接用win32的方法写,我也基本明白,原来是在DLL里面也创建一个新线程来操作,但是MFC来创建我却不会,所以,MFC既带来方便,但也同时会令人模不着头脑,真晕,再慢慢研究下,在这里多谢你们的帮忙,多谢了。 |
|
[求助]关于DLL插入指定进程??
我这里不行呀,不知为什么?那个DLL是你用汇编写的吧,我用MFC的不行呀,能否把源码发上来我看一下 |
|
[求助]关于DLL插入指定进程??
我的意思是在DLL中如何创建一个非模态对话框??? |
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值