Posted: Mon Sep 05, 2005 6:23 pm
which method were you using? i havent gotten that kind of error message at never...
http://www.purebasic.com
http://forums.purebasic.com/english/
yes, seems odd that with the debugger on that M$ successfully interupts it. my faith in M$ was almost converted lol. At least somebody (other than me) thought to check if the debugger was enabled LMAODoubleDutch wrote:Looks like microsoft aren't that clever after all...
here is one apicall used...ricardo wrote:Can anybody show something that the injected code can do without crashing?
I was only able to use delays and msgboxes, but not anymore. Any API call (per example) crashes for me.
Code: Select all
Procedure RemoteThread()
MessageRequester("Success","Injection worked.")
CreateProcess_(0, "calc.exe", 0, 0, 0, #CREATE_SUSPENDED, 0, 0, @sinfo.STARTUPINFO, @pinfo.PROCESS_INFORMATION)
EndProcedure
Ok so now is all right again . Debugger already had to be disabled with the code before.LuCiFeR[SD] wrote:EDIT: I lied Debugger was enabled (I find it so difficult to tell from the IDE gadgets these days if the debbuger is on or off!) Injects successfully if debugger disabled. My apologies for being a dumb ass lol
Code: Select all
DisableDebugger ;DISABLES DEBUGGER! This is needed.
Yes, or we use some Critical Sections, that should also work.thefool wrote:If debugger is on it attemps to inject a part of the debugging code too!
Okvasi:add that on top of the sources so no one mistakes this. Then the source will work!Code: Select all
DisableDebugger ;DISABLES DEBUGGER! This is needed.
Critical Sections are for using strings in Threads. Maybe you should use them then.okasvi wrote:Critical sections? sounds interesting, tell me more...
Yes, threads are not secure, so it could crash.okasvi wrote:found this and looked easy enought to implement viewtopic.php?t=16488&highlight=critical+sections
but do i really need that if i inject only one thread to same process?