Hi guys,

I have a little problem:

I have created a dll file. There, I have put a function, which just moves a message to eax. Just like that:

.
.
.
.data msg db "Hello",0
.
.
.code
.
.
func proc
mov eax, offset msg
ret
func endp
.
.


But, the message isnt really put to eax. Just the Hex Values. But I want to have the string there. (For the stringlength function)

If i do the exactly same thing with a normal exe file everything works fine. Where is the problem?


Hope you got the point...

Kreatief
Posted on 2003-09-16 10:35:49 by Kreatief
mov eax, offset string is the same as moving the address of the string "string" to eax. So what's your exact problem? I do not understand your question.
Posted on 2003-09-16 11:39:17 by roticv
If i use the above code segment in a normal exe, the string (as real ascii) is loaded to eax.

Something like that: mov eax, prog.402000

The result is soemthing like that in a debugger: eax xxxxxxh ("Hello", Ascii)

But the same code in a dll, if i start the function, the result is just a dword of the first hex values.

Like that: mov eax, dword ptr ds:


I want to see an Ascii String like "Hello" and not 48656C6Ch. Because I want to test the length of the string with the strlength function.

Its not easy to explain. I hope you know what I mean...

Oh shit, just forgot what I said. Everything works fine. It was a little mistake, which was a big waste of time... Sorry for this Thread... Wish you a nice day...


Kreatief
Posted on 2003-09-16 11:59:43 by Kreatief