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 


last C++ question..
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
AwayTheWInd
Master Cheater
Reputation: 0

Joined: 11 Sep 2007
Posts: 450

PostPosted: Mon Apr 14, 2008 1:52 pm    Post subject: Reply with quote

sorry...i got pissed off since i was writing an essay at teh time. i handed it in today. k i built dll properly. can u help me call the function properly in another dll? i tried a way with typedef int(__stdcall* HHPtr) (the format...)
it just closed the process when i tried to inject it.
Back to top
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Mon Apr 14, 2008 2:10 pm    Post subject: Reply with quote

You don't need to call the function from any dll at all... Unless your making a dll to Export TextOutA.

You can just call it like a normal function

Code:
DWORD dwTextOut = (DWORD)GetProcAddress( LoadLibrary( _T("gdi32.dll") ), "TextOutA" ) + 5;
_declspec(naked) BOOL WINAPI myTextOutA(HDC hdc, int nXStart, int nYStart, LPCTSTR lpString, int cbString)
{
   _asm
   {
      mov edi,edi
      push ebp
      mov ebp,esp
      jmp dword ptr ds:[dwTextOut]
   }
}

Call it like any normal function.

myTextOutA( aDC, aInt, aInt, aString, aInt );

_________________


Last edited by lurc on Mon Apr 14, 2008 2:51 pm; edited 1 time in total
Back to top
View user's profile Send private message
AwayTheWInd
Master Cheater
Reputation: 0

Joined: 11 Sep 2007
Posts: 450

PostPosted: Mon Apr 14, 2008 2:39 pm    Post subject: Reply with quote

awesome thanks id +rep 1000 times but i cant.. T_T im going to try this on gunbound now. i tried it first on macromedia flash and it worked!

edit: sadly it doesnt work for gunbound. while im at it though.... mind asking how i can drag and drop(hold mouse button down) using postmessage or sth like that? tried everything(i could think of)
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Tue Apr 15, 2008 3:53 am    Post subject: Reply with quote

Cleaned up the spam crap. Such annoying children on the internet anymore..
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Goto page Previous  1, 2, 3
Page 3 of 3

 
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