View Single Post
  #7  
Old September 21st 18, 05:10 PM posted to alt.msdos.batch,alt.windows7.general
Paul[_32_]
external usenet poster
 
Posts: 11,873
Default how to get the title into task manger 'window'?

pyotr filipivich wrote:
Herbert Kleebauer on Thu, 20 Sep 2018 21:58:37 +0200
typed in alt.windows7.general the following:
The source code:

winmain::

jsr.l (GetCommandLine)
; skip program name
eor.l r1,r1 ; not within "" flag
dec.l r0
_20: inc.l r0
cmp.b #0,(r0)
beq.b _10
cmp.b #'"',(r0)
bne.b _30
not.l r1
_30: or.l r1,r1
bne.b _20
cmp.b #' ',(r0)
bne.b _20
inc.l r0

_10: move.l r0,-(sp)
jsr.l (GetConsoleWindow)
move.l r0,-(sp)
jsr.l (SetWindowTextA)
moveq.l #0,-(sp)
jsr.l (ExitProcess) ; exit program


Hmmm - where/how do I put/use/invoke this?


That looks like asm country (assembler).

Herbert mentions "SetWindowTextA" and user32.dll,
so you'll at least need to link those in.

https://stackoverflow.com/questions/...n32-executable

HTH,
Paul
Ads