Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[Answered] ShowMessage from ASM, strange behaviour.

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
LolSalad
Grandmaster Cheater
Reputation: 1

Joined: 26 Aug 2007
Posts: 988
Location: Australia

PostPosted: Fri Sep 19, 2008 7:31 pm    Post subject: [Answered] ShowMessage from ASM, strange behaviour. Reply with quote

(wat is a PAnsiChar)
Code:
  wat := 'lolwat';
  asm
    mov eax,wat
    call ShowMessage
  end;

I took a look at how ShowMessage is called and realised that it takes the message parameter from eax, so I did the above. I just don't understand why it adds whitespace.

http://i33.tinypic.com/2qb6ec4.png

Top is what it does, bottom is what it's supposed to do. Can someone explain why?


Answered my own problem in second reply.

_________________


Last edited by LolSalad on Fri Sep 19, 2008 7:52 pm; edited 1 time in total
Back to top
View user's profile Send private message MSN Messenger
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Fri Sep 19, 2008 7:46 pm    Post subject: Reply with quote

I think it's because you're suppose to change the text of the messagebox first than the title.
Back to top
View user's profile Send private message
LolSalad
Grandmaster Cheater
Reputation: 1

Joined: 26 Aug 2007
Posts: 988
Location: Australia

PostPosted: Fri Sep 19, 2008 7:51 pm    Post subject: Reply with quote

_void_ wrote:
I think it's because you're suppose to change the text of the messagebox first than the title.

No, ShowMessage only has one parameter, Msg, which is a String.

And, that just happened to be my stupid mistake; I thought I had already tried using String instead of PAnsiChar but I mustn't have, and when I tried it for what I thought was the second time, it worked fine. Surprised

_________________
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites