Embed DLLs in EXE? by Yoshinkeru at 10:46 PM EDT on March 29, 2008
Perhaps not exactly related to video game musics, but you guys are among the most experienced programmers I know, so I figured this would be my best bet to get the answer I need.

You see, I've been working for some time now on a little project, utilizing a tool called Blade Engine, which helps in the creation of visual novels.

The thing is, the main EXE Blade Engine uses requires DirectX 9--or at least, just one of its DLLs, d3dx9_30.dll. For some time, it seemed I would have to copy this file into the system32 folder of each computer I wanted to show this on, which would become tedious, not to mention the fact that some computers I've encountered (here on campus) do not grant administrative privileges.

Recently I've found that it IS possible to somehow build the DLL into the EXE, but every program I've run across that actually DOES this (don't get me started on the dead ends) are all shareware, and once the trial version's done, that's it. And these programs are pretty pricey. I've already tried PEBundle, and Molebox, again, is just too much.

Now, don't get me wrong: I'll pay for a program if I think it's worth paying for. I even shelled out the $9.95 for the full version of Audiosurf. But I wonder, is it too much to ask for a freeware program, that just embeds (or whatever) DLLs into EXEs? PEBundle is the closest I've gotten, but again, it turned out to be a timed trial--and a short trial at that.

Hope some of you have some answers.
by jurassicPieter at 2:55 AM EDT on March 30, 2008
I highly advice you NOT to embed a direct x dll in your exe file. The idea of dll's is that more than one program can use the functionality while only loading the functionality once, instead of every program loading the same. You're hogging memory for the programmer's ease.

Just add the dll in the same directory as your executable and you should be fine.

Still I think anyone should always install the entire direct X library version to make it function properly instead of just copying dll's, but i could be wrong on that one.

And I think you find more programmers somewhere else then here.
by DrO at 8:30 AM EDT on March 30, 2008
in this instance, you really should be just installing directx rather than the rebundling of the dll since it's not a safe way to do it and is why MS have a directx installer to deal with registering all of the files correctly, etc which by just copying a dll will often cause issues.

now, as for the question, depending on how you're using the blade engine (and i'm not advocating this method), you can embed the dll as a custom resource in the exe. when your exe is run you then just need to load the dll resource from you exe and save that to wherever you want it to go. but this also depends on how you're (or the blade engine) is using the dll since if it's hard-loaded then it'll fail though if it's on a delay load mechanism then you can do it just as your app is starting which should work.

alas that's the best i can think off and have no certainty that it'll definitely work as wanted but it's something to work against though as i first mention, safest bet is to just update directx and do it that way (safer and better for the end user's machine anyway :) )

-daz
by Yoshinkeru at 12:05 PM EDT on March 30, 2008
I have had the DLL in the same directory; that doesn't work.

I do understand what you're saying, jurassicPieter, and you'd be absolutely correct in most other circumstances. But what I'm saying is, without administrative privileges, I can't install DirectX either.

Dangit, I just want to showcase this on other computers from my thumb drive! I mentioned before this is most imperative on the computers here on campus that deny administrator privileges. It's just one DLL that the program needs. (Odd, as I realize it might be, but that's the case.)

'Course, I have wondered why they don't install some of the software that seems to be the norm nowadays, such as Shockwave and Flash...

And about finding other programmers: this was just the most available spot I believed I could turn to. :)
by nensondubois at 8:34 PM EDT on March 30, 2008
I had some level editors that don't work while the Dll was there so it being in the program is better so you can ensure it works.
by wolupgm6 at 10:43 PM EDT on March 30, 2008
just distribute DirectX with your program.
by unknownfile at 11:01 PM EDT on March 30, 2008
thread over
NOT TILL IT\'S OVER by Yoshinkeru at 2:26 PM EDT on April 23, 2008
"THREAD OVER"?!? This thread's over when I say it's over! You know, seeing as how I started it and all!*

...Yeah. Seems I spoke to soon. This seems to happen a lot: I say I've tried some option, when I really haven't. (Usually, I am thinking of something similar I've tried) I have carried the DLL on the thumb drive, but it was in the root directory, not in the executable's directory. I just tried that recently, and that seemed to work.

You were right all along, jurassicPieter. Thanks.

* I know it sounds condescending; I was just being (partly) facetious. It just seems like not everyone's listening here.

END OF LINE
Was it over when the Germans bombed Pearl Harbor? by hcs at 5:53 PM EDT on April 23, 2008
So now it's over?


Go to Page 0

Search this thread

Show all threads

Reply to this thread:

User Name Tags:

bold: [b]bold[/b]
italics: [i]italics[/i]
emphasis: [em]emphasis[/em]
underline: [u]underline[/u]
small: [small]small[/small]
Link: [url=http://www.google.com]Link[/url]

[img=https://www.hcs64.com/images/mm1.png]
Password
Subject
Message

HCS Forum Index
Halley's Comet Software
forum source
Generated in 0.0027s;