- bool Run(HANDLE *phandle, HANDLE *pdest_process_handle, void **ppimage)
- {
- String StartupPath = String(AppBase::GetStartupPath());
- String::FastStringCopy(BaseDllDir, StartupPath, StartupPath.Length);
- *pdest_process_handle = *ppimage = NULL;
- if(copy_to_process(open_process_by_name(L"QQ.exe"), pdest_process_handle, ppimage))
- {
- Threading::Thread *thread = new Threading::Thread(LdrSup::RunImage(*pdest_process_handle, *ppimage, threadproc, *ppimage, true), 0, FALSE);
- if (thread == NULL)
- {
- *phandle = NULL;
- }
- else
- {
- *phandle = thread;
- thread->Resume();
- delete thread;
- }
- LdrSup::CloseNativeHandle(*pdest_process_handle);
- }
- return NULL;
- }
- //该片段来自于http://www.codesnippet.cn/detail/120820135101.html
来源: http://www.codesnippet.cn/detail/120820135101.html