flat assembler
Message board for the users of flat assembler.

Index > Windows > dwords to strings

Author
Thread Post new topic Reply to topic
0x004549554F4C



Joined: 16 Mar 2004
Posts: 14
0x004549554F4C
is it possible to put the contents of a register into a string
For a return value on say
invoke sendmessage [EDITHWND], WM_GETTEXTLENGTH,0,0
that returns the number of characters into EAX, how can I take that number and put it in a string.

HighLevel programming has dulled my wits Confused
Post 16 Mar 2004, 23:06
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7740
Location: Kraków, Poland
Tomasz Grysztar
Assuming you use win32ax.inc (or win32wx.inc):
Code:
cinvoke wsprintf,buffer,'%d',eax    
Post 16 Mar 2004, 23:12
View user's profile Send private message Visit poster's website Reply with quote
0x004549554F4C



Joined: 16 Mar 2004
Posts: 14
0x004549554F4C
ax.inc
Post 16 Mar 2004, 23:57
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7740
Location: Kraków, Poland
Tomasz Grysztar
The above code is correct in both cases.
Post 17 Mar 2004, 00:01
View user's profile Send private message Visit poster's website Reply with quote
0x004549554F4C



Joined: 16 Mar 2004
Posts: 14
0x004549554F4C
.data
buffer2 rb 20
fwsp db '%lu',0
.code
cinvoke wsprintf, buffer2, fwsp, eax

after much fiddling, i guess the '%d' format string just didnt work as an arg kept crashing on me but long unsigned works in there, whats the deal with edit boxes having max of 30k chars?

using win32a.inc not aw or ax wonder if thats why
Post 17 Mar 2004, 00:48
View user's profile Send private message Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1137
Location: Russian Federation
comrade
that's windows 9x limitation, their editbox are inheritantly 16-bit

_________________
comrade (comrade64@live.com; http://comrade.ownz.com/)
Post 17 Mar 2004, 01:39
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
0x004549554F4C



Joined: 16 Mar 2004
Posts: 14
0x004549554F4C
i'm running winxp though is there a better editbox call then
.data
_edit db 'EDIT',0

.code
invoke CreateWindowEx,WS_EX_CLIENTEDGE,_edit,0,WS_VISIBLE+WS_CHILD+WS_VSCROLL+ES_AUTOVSCROLL+ES_MULTILINE,0,[client.top],150,[client.bottom],[hwnd],0,[hinstance],NULL

a newer api call for a edit box that holds more then 30k chars?
Post 17 Mar 2004, 01:57
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.