tags:

views:

56

answers:

2

How can I link the .dll file to an executable?

I do not have the source for the dll nor executable. The two files operate on a 64-bit system.

When the executable is ported from another system, I get "The application failed to initialize properly (0xc0150002). Click OK to Terminate the program.

Here's a list of the files

  • \l2server\L2Server.exe
  • \l2server\l2serverx64-dll.dll
  • \l2server\Sabotage64.dll

L2Server requires l2serverx64-dll.dll to execute. What i'm trying to do is to link Sabotage64.dll with L2Server.exe I used CFF Explorer as a rebuilder to no luck :(

A: 

You can't.

To link a .dll to an executable, you need to have a list of functions that .dll provides (that can be reverse-engineered, but is very difficult to do) and you need to have executable that will call those functions. You call them by making them external (you didn't specify language you use, so can't help you there). After that, you place the .dll in same directory as executable or somewhere where executable will look for it.

If you have some specific problem, tell us, there might be a way to help but at the moment we have too little information.

AndrejaKo
http://l2dev.co.cc/2010/04/interlude-dvampire-pack-23012010-extender/What i'm trying to do is link Sabotage64.dll with L2Server
OK. Now we're getting somewhere. You are trying to use the extender and make it work with L2 executable. Ugh.. Shouldn't the pack work just by unzipping it? I'm sorry but I'm out of ideas now. :( You could try asking at some forums that work all the time with reverse-engineering. Unfortunately, I don't know a right direction in which I could point you.
AndrejaKo
A: 

Not sure what you're trying to do, but the error code you're getting usually implies that the computer you're trying to run l2server on doesn't have the appropriate version of the Visual C++ runtime installed.

Google "Visual C++ xxxx redist x64", where xxxx is the version of Visual Studio that was used to compile the code, and install that on the machine you're trying to run l2server on.

Does that fix your problem?

Dave Kilian
Yes! That did run the executable! But what i'm trying to do is link Sabotage64.dll into the executable