Acknex.dll X 3

Posted By: Pavle

Acknex.dll X 3 - 01/03/14 17:37

Hello,

It would be great if someone can help, I want to combine 3 separate exe files in one game and I tried to do it with 3 separate folders containing one acknex.dll file in each and this code at the beggining of each main.c script:

#define PRAGMA_PLUGIN "A_dll\\acknex.dll"; //(B_dll, C_dll)

..but it's not working. Any idea how to do this?
Posted By: Ch40zzC0d3r

Re: Acknex.dll X 3 - 01/03/14 17:45

After compiling you have to use a "Binder".
It will bind the exe files to 1 using a stub. This method was used by many viri and trojans to spread them over the net and over usb-sticks.
Thats the reason why it is often detected as virus!
If you have the code of all 3 why not copy them together instead of merging the compiled exe files??
Posted By: Pavle

Re: Acknex.dll X 3 - 01/03/14 17:55

Thanx for replying, I have 3 different games with different scripts that I need to combine.

I have no problem with starting the Game2 from within the Game1 menu with:
exec("Chapter2\\Main2.exe",NULL");
..but if i want to start Game1 again from the Game2 menu I am in trouble.
Posted By: Feindbild

Re: Acknex.dll X 3 - 01/03/14 19:14

how about exec("..\\Main1.exe",NULL)?
Posted By: Pavle

Re: Acknex.dll X 3 - 01/03/14 19:31

Yes but I have Main1.exe in the first folder and then Main2.exe and Main3.exe in the sub-folders: Chapter2 and Chapter3.

I can start Main2.exe from the root folder but I need to be able to also start Main1.exe from Chapter2 sub-folder.

..unless exec("..\\Main1.exe",NULL) can search upwards through folders?
Posted By: Feindbild

Re: Acknex.dll X 3 - 01/03/14 19:51

In theory it should work, the ".." direction is supposed to go upwards by one step.
Posted By: Pavle

Re: Acknex.dll X 3 - 01/03/14 20:14

The ".." seems to be working, this is great, thank you all for your advices:)
Posted By: Rackscha

Re: Acknex.dll X 3 - 01/04/14 02:19

To complete this thread for other users:

Each folder in Windows has these 2 virtual folder entries:
.
..

So if you ask for a folderlist through the winapi, you'll get these two at the beginning.
The single dot represents the current folder.

So:
".\MyFile.txt"

is a path to MyFile.txt in the current folder.

The double-dot represents the parentfolder. This one is used(as mentioned before) to step upwards by one level without knowing the name of the parent.

As each Folder contaisn these 2(except the root, like C:\) you can chain relative anonymous pathes.

Like:
"..\..\..\MyFile.txt"
goes 3 levels up and expects a MyFile.txt in this parentfolder.

"..\..\MyFolder\MyFile.txt"

This goes 2 levels up, and within this parent, it enters the folder MyFolder for the file MyFile.txt.

Greetings
Rackscha
© 2024 lite-C Forums