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 


[request]{visual c++}using .dll

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
AznNoodles
Expert Cheater
Reputation: 0

Joined: 29 Dec 2008
Posts: 192

PostPosted: Tue Mar 17, 2009 6:04 pm    Post subject: [request]{visual c++}using .dll Reply with quote

how can i make a dll that sends a key delays a bit and them sends another and so on after pressing a button to the injected program

if press 0
sendkey a
sleep 200
sendkey b

or something like that

_________________
TUT for finding IDs
http://forum.cheatengine.org/viewtopic.php?t=373370
All IDs as of v65
http://forum.cheatengine.org/viewtopic.php?t=383300
lYui wrote:
Ralph wrote:
MapleTube will never be a succes. YouTube -> All other tubes.

Nah, not RedTube.
Back to top
View user's profile Send private message
AlbanainRetard
Master Cheater
Reputation: 0

Joined: 02 Nov 2008
Posts: 494
Location: Canada eh?

PostPosted: Tue Mar 17, 2009 6:32 pm    Post subject: Re: [request]{visual c++}using .dll Reply with quote

AznNoodles wrote:
how can i make a dll that sends a key delays a bit and them sends another and so on after pressing a button to the injected program

if press 0
sendkey a
sleep 200
sendkey b

or something like that


Sleep(200);

_________________
Back to top
View user's profile Send private message Send e-mail
Overload
Master Cheater
Reputation: 0

Joined: 08 Feb 2008
Posts: 293

PostPosted: Tue Mar 17, 2009 6:50 pm    Post subject: Re: [request]{visual c++}using .dll Reply with quote

AlbanainRetard wrote:
AznNoodles wrote:
how can i make a dll that sends a key delays a bit and them sends another and so on after pressing a button to the injected program

if press 0
sendkey a
sleep 200
sendkey b

or something like that


Sleep(200);


I'm pretty sure that doesn't answer his question, at all...

OP: There are tons of examples of PostMessage. Look at that API to send keys. There are also examples of a PostMessage bypass if you need it.

_________________
Blog

Quote:
Rhys says:
you can be my maid
Rhys says:
ill buy you a french maid outfit
Tyler says:
Sounds good
Rhys says:
ill hold you to that
Back to top
View user's profile Send private message MSN Messenger
AznNoodles
Expert Cheater
Reputation: 0

Joined: 29 Dec 2008
Posts: 192

PostPosted: Tue Mar 17, 2009 10:29 pm    Post subject: Re: [request]{visual c++}using .dll Reply with quote

Overload wrote:

OP: There are tons of examples of PostMessage. Look at that API to send keys. There are also examples of a PostMessage bypass if you need it.


any samples?

_________________
TUT for finding IDs
http://forum.cheatengine.org/viewtopic.php?t=373370
All IDs as of v65
http://forum.cheatengine.org/viewtopic.php?t=383300
lYui wrote:
Ralph wrote:
MapleTube will never be a succes. YouTube -> All other tubes.

Nah, not RedTube.
Back to top
View user's profile Send private message
Overload
Master Cheater
Reputation: 0

Joined: 08 Feb 2008
Posts: 293

PostPosted: Tue Mar 17, 2009 10:41 pm    Post subject: Re: [request]{visual c++}using .dll Reply with quote

AznNoodles wrote:
Overload wrote:

OP: There are tons of examples of PostMessage. Look at that API to send keys. There are also examples of a PostMessage bypass if you need it.


any samples?


Ya, right here: http://forum.cheatengine.org/search.php

_________________
Blog

Quote:
Rhys says:
you can be my maid
Rhys says:
ill buy you a french maid outfit
Tyler says:
Sounds good
Rhys says:
ill hold you to that
Back to top
View user's profile Send private message MSN Messenger
manc
Grandmaster Cheater
Reputation: 1

Joined: 16 Jun 2006
Posts: 551

PostPosted: Wed Mar 18, 2009 7:45 am    Post subject: Reply with quote

Code:
int main()
{

HWND mshWnd = FindWindow( "MapleStoryClass", 0);


for(;;Sleep(25)) {
      if ( GetAsyncKeyState( 0x30 ) ) {    

PostMessage_Trampoline( mshWnd, WM_KEYDOWN, 0x41, MapVirtualKey( 0x41, 0 ) << 16 );
Sleep(200);
PostMessage_Trampoline( mshWnd, WM_KEYDOWN, 0x42, MapVirtualKey( 0x42, 0 ) << 16 );
} return 0;

}


assuming that your trying to send it to MapleStory....
but yeah i've never made a .dll it looks simple though,
and i pretty much built your main function, although i dont think its called main in a dll, look it up. AlbanianRetard made a simple tut on how to make a .dll
just recently also...

_________________
Back to top
View user's profile Send private message
mStorm
Expert Cheater
Reputation: 0

Joined: 21 Feb 2009
Posts: 107

PostPosted: Wed Mar 18, 2009 8:13 am    Post subject: Reply with quote

MS VC++ has a template dll setup that is really easy to work with. (and I think Dev-Cpp has this as well)

When creating a project, tell MS VC++ you just start a new project, and change the type to dll.

There are tons of tutorial sites on how to figure out the last little pieces... ( like using WINAPI or _stdcall, etc. for function calls, and your export library)

As far as the "sendkeys": You can use the WinAPI GetAsyncKeyState() for a quick simple solution for reading if a key is pressed, and actually sending keys varies game to game. If it is a game that uses DirectInput, then you are going to have to use the SendInput function with the DI hex modifier for the game to read it. If the game takes the PostMessage (windows api function), then that is ideal.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    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