原函数<br>procedure down(); <br>var<br> Address
ointer;<br>begin<br>Address:=pointer($121ddf); //目的就是要加个变量,使变量=$121ddf<br> asm<br> pushad<br> call Address<br> popad<br>end;<br>end;<br>调用函数<br>procedure CallFunc(MyCall
ointer);stdcall; //调用的远程声请<br>var<br> ProcAddress
ointer; //申请的内存地址<br> NumberOfByte
word; //辅助返回值<br> TempHandle:Thandle; //远程句柄<br>begin<br> ProcessH:=OpenProcess(PROCESS_ALL_ACCESS, false, processid);<br> //申请内存<br> ProcAddress:=VirtualAllocEx(ProcessH,nil,4096,MEM_COMMIT,PAGE_EXECUTE_READWRITE);<br> //写内存<br> WriteProcessMemory(ProcessH,ProcAddress,mycall,4096,NumberOfByte);<br> //远程运行<br> TempHandle:=CreateRemoteThread(ProcessH,nil,0,ProcAddress,nil,0,NumberOfByte);<br> //等待结束<br> WaitForSingleObject(TempHandle,INFINITE);<br> //释放远程句柄<br> CloseHandle(TempHandle);<br> //释放申请有内存<br> VirtualFreeEx(ProcessH,ProcAddress,4096,MEM_RELEASE);<br> closehandle(ProcessH);<br>end;<br>实现:<br>callfunc(@down);<br>这里没法带上原函数变量.求个解决办法.让$121ddf用变量代替而不是内存地址常量.