flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
revolution
Code: call [ExitProcess] |
|||
![]() |
|
andrr
Quote:
that does't work |
|||
![]() |
|
revolution
Show your whole code please. We can't guess what you have done with only partial code.
|
|||
![]() |
|
andrr
i want to know how to terminate a program in general
is it any need to post a whole code? Quote:
|
|||
![]() |
|
ass0
In order to use ExitProcess you need its offset, whether imported static or dynamically from kernel32.dll
_________________ ![]() Nombre: Aquiles Castro. Location2: about:robots |
|||
![]() |
|
andrr
will you write a code pls
Quote:
|
|||
![]() |
|
ass0
Anyway a quick solution:
replace Code:
include 'win32a.inc'
by Code:
include 'win32ax.inc'
and Code:
push 0
call ExitProcess
by Code: invoke ExitProcess,0 _________________ ![]() Nombre: Aquiles Castro. Location2: about:robots |
|||
![]() |
|
revolution
andrr: See the examples in the "examples" folder in the zip file.
|
|||
![]() |
|
mindcooler
Code: ret _________________ This is a block of text that can be added to posts you make. |
|||
![]() |
|
adroit
You could try:
Code: format PE GUI 4.0 include 'win32a.inc' entry start section '.data' data readable writeable ; ........... section '.code' code readable executable start: ; ........... push 0 call [ExitProcess] section '.idata' import data readable writeable library kernel,'KERNEL32.DLL' import kernel, ExitProcess, 'ExitProcess' Or, You could do as ass0 recommended: use include "win32ax.inc", which makes things easier. Code: format PE GUI 4.0 include 'win32ax.inc' entry start .data ; ........... .code start: ; ........... invoke ExitProcess,0 .end start ;There are no needs to import DLLs when using "include 'Win32ax.inc'" |
|||
![]() |
|
FrozenKnight
i personally prefer the 'TerminateProcess' API for a fast dirty process kill.
|
|||
![]() |
|
baldr
FrozenKnight wrote: i personally prefer the 'TerminateProcess' API for a fast dirty process kill. ----8<---- MeshNix wrote: …which makes things easier. |
|||
![]() |
|
FrozenKnight
baldr wrote:
I fail to see how that applies, the only case where i could see something like that applying is if someone were to use the API to terminate a system process. But even then, i don't see any sources linking the race condition to this particular API. The only possible problem i have seen with this is that it doesn't give the process a chance to execute cleanup code. Which when i normally use it i want a hard shutdown of the intended process, not a proper cleanup, usually because the process has frozen or is one of those annoying programs that won't let you close it. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.