6748222 Posted April 12, 2009 Posted April 12, 2009 (edited) Hello! i use D2009 and would like to know how can i launch *.exe from a DLLexample i have 1.exe with buttonon click its read from dll name of file to launch2.exeis this posible? Edited April 12, 2009 by 6748222
6748222 Posted April 13, 2009 Author Posted April 13, 2009 (edited) so... does it possible to do in D2009 Edited April 13, 2009 by 6748222
KOrUPt Posted April 13, 2009 Posted April 13, 2009 Am the only one who isn't quite sure what D2009 is?Please be more specific and please don't bump posts, someone will answer in due time.Your question is confusing... First you ask if it's possible to launch an executable from within a DLL(yes, of course it is), you then create an example that asks if it's possible for an executable to read a file path from a DLL and execute that file(yes, this is also possible)... Care to clarify?I'm not going to waste my breathe by providing information that will likely be erroneous due to lack of information. Awaiting clarifications.KOrUPt.
6748222 Posted April 13, 2009 Author Posted April 13, 2009 (edited) sory D2009 is Delphi 2009 i have a game launcher with small game protection(beter then nothing) but its pointless since players can launch game without my launcher.. huh so idea is to create DLL (atach it to game.exe(i got good tut )) and on game.exe click it will launch my launcher.. thats all Edited April 13, 2009 by 6748222
6748222 Posted April 13, 2009 Author Posted April 13, 2009 (edited) ok i figured it outhere is code if some1 need itprocedure test(); stdcall;begin //Sleep(5);WinExec('rundll32 shell32.dll, NOTEPAD.EXE', SW_SHOW);FreeLibrary(GetModuleHandle(nil));end;was it so hurd ?? huh Edited April 13, 2009 by 6748222
Departure Posted April 13, 2009 Posted April 13, 2009 Not it was'nt "hurd" If you explained your self more clearly im sure some one or even myself would have advised you to use WinExec or another method(there are lots of ways to achive what you have there).
6748222 Posted April 13, 2009 Author Posted April 13, 2009 (edited) well its hurd to explain my idea in English since i dont know it very good =( i explained it how good i can eniway.. my second question well now i know how to launch *.exe from DLL also i know how to hook it in my *.exe but i dont know how to launch *.exe from DLL (see 4 post on this tread) when its hooked in Game.exe i try explain what i wana do i got Game.exe (i hooked my dll in it) and on click game.exe i wana that Game.exe dont start a game but a launch Notepad.exe (see my DLL code =)) brr.. i hope i explained this time it bit beter DLL code: procedure test(); stdcall;begin //Sleep(5); WinExec('rundll32 shell32.dll, NOTEPAD.EXE', SW_SHOW); FreeLibrary(GetModuleHandle(nil)); end; at this moment when i launche the game i got : nwm i done it all without your help thanks 4 nothing Edited April 14, 2009 by 6748222
6748222 Posted April 14, 2009 Author Posted April 14, 2009 (edited) actualy this was very bad idea!i gona try another method using createprocess()Thank you! Edited April 14, 2009 by 6748222
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now