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 


opening .dll forms when a .dll is injected, Delphi?

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

Joined: 20 Apr 2007
Posts: 668

PostPosted: Fri Feb 01, 2008 5:30 pm    Post subject: opening .dll forms when a .dll is injected, Delphi? Reply with quote

hi all,

i have made a .dll containing a form, and i can open that form using another application that i made, but now i was wondering if it is possible to execute that form as soon as my .dll is injected to an .exe file? as the title says, i am using delphi, and i made a bot that i will use for maplestory, and what i want, is to make a .dll that i can rename to "pcomdebug.dll" and then place it in my maplestory folder, and when i execute maplestory, my bot will execute aswell Very Happy

is this possible?
Back to top
View user's profile Send private message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Fri Feb 01, 2008 5:43 pm    Post subject: Reply with quote

I'm confused as to what you want...
_________________
Wiccaan wrote:

Oh jeez, watchout I'm a bias person! Locked.


Auto Assembly Tuts:
In Depth Tutorial on AA
Extended
Back to top
View user's profile Send private message
Noz3001
I'm a spammer
Reputation: 26

Joined: 29 May 2006
Posts: 6220
Location: /dev/null

PostPosted: Fri Feb 01, 2008 5:45 pm    Post subject: Reply with quote

He wants his form to sho up when his DLL is loaded.
Back to top
View user's profile Send private message MSN Messenger
Anden100
Grandmaster Cheater
Reputation: 0

Joined: 20 Apr 2007
Posts: 668

PostPosted: Fri Feb 01, 2008 5:45 pm    Post subject: Reply with quote

you know iBot?

http://forum.microsoft.com/showthread.php?t=54014

thats something like that i want...

noz3001 wrote:
He wants his form to sho up when his DLL is loaded.


yea, something like that Very Happy
Back to top
View user's profile Send private message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Fri Feb 01, 2008 5:50 pm    Post subject: Reply with quote

The link isn't loading for me.

~~

Maybe you should just load the form after you inject it?

o_o

_________________
Wiccaan wrote:

Oh jeez, watchout I'm a bias person! Locked.


Auto Assembly Tuts:
In Depth Tutorial on AA
Extended
Back to top
View user's profile Send private message
Anden100
Grandmaster Cheater
Reputation: 0

Joined: 20 Apr 2007
Posts: 668

PostPosted: Fri Feb 01, 2008 5:55 pm    Post subject: Reply with quote

i was asking how to do it... like:
how do i run a form in my .dll, when the .dll is executed???
Back to top
View user's profile Send private message
XxOsirisxX
Grandmaster Cheater Supreme
Reputation: 0

Joined: 30 Oct 2006
Posts: 1597

PostPosted: Fri Feb 01, 2008 6:53 pm    Post subject: Reply with quote

He got a form saved at .dll, and he wants to know, if when he inject that .dll on any .exe, the form at the .dll will show up?

And also, he wants something like maplestoryacro, so, you put it on MapleStory folder with the name of "PCOMDebugger.dll" and it will auto-run.





As for the last thing, about it will run.. the answer is, yes. MapleStory runs the dll named "PCOMDebugger" when run. So, rename.

_________________

Back to top
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Fri Feb 01, 2008 6:54 pm    Post subject: Reply with quote

its LBot, meh, w/e

btw its "PCOMDebug.dll".. dont know if PCOMDebugger also works or if it was just ur typo

anyways. on DLL_PROCESS_ATTACH create a thread that loads up your form and msg loop.

ill make you an example. hold on Smile


Edit:

You Can try and convert it to delphi
Example (C++):

Code:
#include <windows.h>
#define WIN32_LEAN_AND_MEAN
#pragma comment(linker, "/ENTRY:DllMain")

HINSTANCE hInstance;
HWND hWnd;
LPWSTR szClassName = L"DllNameClass";

LRESULT CALLBACK WndProc( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam )
{
   switch( Msg )
   {
   case WM_DESTROY:
      PostQuitMessage(0);
      break;
   case WM_CLOSE:
      PostQuitMessage(0);
      break;
   default:
      DefWindowProc( hWnd, Msg, wParam, lParam );
   }
   return 0;
}

DWORD InitForm()
{
   hInstance = GetModuleHandle( NULL );
   MSG Msg;
   WNDCLASSEX wc;

   wc.cbClsExtra    = 0;
   wc.cbSize        = sizeof(WNDCLASSEX);
   wc.cbWndExtra    = 0;
   wc.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
   wc.hCursor       = LoadCursor( NULL, IDC_ARROW );
   wc.hIcon         = LoadIcon( NULL, IDI_APPLICATION );
   wc.hIconSm       = LoadIcon( NULL, IDI_APPLICATION );
   wc.hInstance     = hInstance;
   wc.lpfnWndProc   = WndProc;
   wc.lpszClassName = szClassName;
   wc.lpszMenuName  = 0;
   wc.style         = 0;

   if ( !RegisterClassEx( &wc ) )
   {
      MessageBox( NULL, L"Unable to Create Class", szError, MB_OK + MB_ICONERROR );
      HMODULE hDll = GetModuleHandle( L"DllNameHere.dll" );
      FreeLibraryAndExitThread( hDll, 0 );
      return 0;
   }
   
   hWnd = CreateWindowEx( 0, szClassName, L"FormName", WS_OVERLAPPEDWINDOW,
      CW_USEDEFAULT, CW_USEDEFAULT, 150, 150, HWND_DESKTOP, NULL, hInstance, NULL );

   ShowWindow( hWnd, SW_SHOW );
   UpdateWindow( hWnd );

   while( GetMessage( &Msg, NULL, 0, 0 ) > 0 )
   {
      TranslateMessage( &Msg );
      DispatchMessage( &Msg );
   }
   return Msg.wParam;
}

BOOL APIENTRY DllMain( HMODULE hModule, DWORD dwReason, LPVOID lpReserved )
{
   switch( dwReason )
   {
   case DLL_PROCESS_ATTACH:
      DisableThreadLibraryCalls( hModule );
      CreateThread( 0, 0, (LPTHREAD_START_ROUTINE)&InitForm, 0, 0, 0 );
      return TRUE;
   case DLL_PROCESS_DETACH:
      return TRUE;
   }
   return TRUE;
}

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

Joined: 20 Apr 2007
Posts: 668

PostPosted: Sat Feb 02, 2008 4:14 am    Post subject: Reply with quote

im gonna try converte that one, but i aint good at converting...
Back to top
View user's profile Send private message
HolyBlah
Master Cheater
Reputation: 2

Joined: 24 Aug 2007
Posts: 446

PostPosted: Sat Feb 02, 2008 6:22 am    Post subject: Reply with quote

Lunche the form from the DLLMain procedure.
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