Domanda

My eax register has the following value

EAX DDCCBEE6

I want to put the value of eax to buffer so I can use it as it, I mean if I used SetDlgItemText it must set the text value of edit control to eax value which is DDCCBEE6

The value of eax is a result of math instructions

È stato utile?

Soluzione

You can use wsprintf for that purpose:

.data
format  db "%X",0

.data?
buffer  db 256 dup (?)

.code
invoke wsprintfA,ADDR buffer,ADDR format,eax

Note that there are safer alternatives to wsprintf, but I don't know if they can be found in the masm32 include files and import libraries.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top