Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / Dll for creating .exe from .exe?

Author
Message
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 18th Apr 2005 00:08
This isn't a double post, my old post in newcommer's corner was about theory, Im posting here about actual dlls.

Ok, Im making a game creator and I need these capabilities to accomplish what Im after...

- Saving/Loading files and Looking at files on your computer through the .exe
- Creating shortcuts for the persons game they created on the desktop and creating a folder in the program files with their game and the game maker
- Creating a seperate .exe from the game maker .exe, the second exe will be their game when they test/run their game.

Im thinking of using BLUEGui for the first two, but the last one Im not sure if BLUE can handle it or if it's even possible. Basically the user clicks "RUN" and it creates an exe with their game specs in it so they can play their creation.

On to the question, are there any dlls out there or ways to make another .exe from the original .exe with certain information in it (IE The game specs).

IanG
20
Years of Service
User Offline
Joined: 25th Sep 2004
Location: Cyberspace
Posted: 18th Apr 2005 04:23
the last is possible - but would be difficult, very difficult

Used to be Phoenix_insane registered in september 2003 despite what the date says to the left <--
PC - amd athlon 2.0ghz, 512mb, GeForce FX 5200 128mb, 200gb, xp pro sp2
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 18th Apr 2005 06:25 Edited at: 18th Aug 2006 22:03
It is not too difficult and will not require any dlls.
Dbpro exes consist of a normal windows exe with a load of files appended on the end. When the exe is run the files are extracted to the users temp dir for use by the program. The dbpro commands that use files will all look in the temp dir before the current dir so you can use them to read the files.
You would have to bundle your game specs into a file then stick that file with the others in the exe. Then when the exe is run your file is extracted with all the others and you can open it from the program and use the data as you want.

The most difficult part in enjecting your file into the exe.
Dbpro exe format - document that describes the dbpro exe format.

By way of demonstration, he emitted a batlike squeak that was indeed bothersome.

Attachments

Login to view attachments
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 19th Apr 2005 02:05
Thanks Il look into it when I get back home from school.

dj chainz
20
Years of Service
User Offline
Joined: 25th Sep 2004
Location: England
Posted: 21st Apr 2005 07:16
another untested method i thought of was making one exe that had a string declared at the start, with a max amount of characters. This defines what level file it opens. Then, you can hex-edit your exe to change this string, as strings are unprotected in DBP ( i assume - they can be edited in DBC exes v. easily )

The only problem is making the string the same length. This can be done using a non-filename character. Heres some sample DBP code (untested):

leveltoopen$="levelname%%%%%%" : `=15 characters
actual$=""
`find out name of level
for i = 1 to 15
if mid$(leveltoopen$,i)<>"%" then actual$=actual$+mid$(leveltoopen$,i)
next i
openlevel(actual$) : `function call that will load level file and all files needed for it

okay. now once compiled, you should be able to open it in a hex editor to find the right byte where the string levelname%%%%%% starts. Then, write your other DBP program that compiles it to simply duplicate the other exe, open it as a file and edit the correct bytes to change this string!!! then twill be dandy.

more advanced people can make their level file format include all media using the "write fileblock" command, then you have an exectuable that can be distributed with the one other level file!!!

it seems DBPro can compile to exe after all

I am the lead programmer at red spark studios
http://www.brazilianhotties.tk
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 21st Apr 2005 08:05
Thanks for that hard work chainz but me and Aura came up with something. However that idea does sound more advanced and pribably much better in the long run, I think Im going to stick with what we came up with for now. Its simple and does the job.

The idea, if you wanted to know:

The very first time the game maker is run, it creates
- <Game Maker Name> file in -program files
---Projects File
---Temporary File

Then when the test button is pressed, the game maker deletes all of the uneeded game making files ( The menu and screen objects and whatnot) and then saves that to a data file. Then it copies the current .exe over to the Temporary file, remakes all the just-deleted objects, and opens the new .exe made in the Temporary File.

Everytime the user goes to test the game the temporary bin is emptied out to make room for the next .exe.

Then when the user clicks publish the .exe is just put in the projects file, never to be deleted, with it's saved .data file along with it.



the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 22nd Apr 2005 04:42 Edited at: 22nd Apr 2005 04:44
Attached is a working example of my solution.
It consists of two projects.
One is the game. It just opens a file (gamedata.dat) and prints a line of text from it.
The other project is the builder. It uses input to get some text from the user.
Then it builds a new game (output.exe) with the user text added in a attached file named gamedata.dat. When output is run it reads the string from gamedata.dat that the builder attached to it and prints the text in it.

Quote: "this is not a quote"

Attachments

Login to view attachments
dj chainz
20
Years of Service
User Offline
Joined: 25th Sep 2004
Location: England
Posted: 23rd Apr 2005 07:09
You are a genius cracker - that is, if no one told you how to do it....

I am the lead programmer at red spark studios
http://www.brazilianhotties.tk
dj chainz
20
Years of Service
User Offline
Joined: 25th Sep 2004
Location: England
Posted: 24th Apr 2005 06:41
and i turned that into functions!

- do not have files 1,2,3 open when using the functions
- you must declare size and pos as globals in your code
- all functions use strings as their arguements
- first open exe with start_exe(source,destination)
- then inject all your files using inject_exe(source,name_in_executable)
- when all files are added, close with end_exe()

I am the lead programmer at red spark studios
http://www.brazilianhotties.tk

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-11-21 15:41:19
Your offset time is: 2024-11-21 15:41:19