Re: Embedd DLL into executable

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



I don't see actually the reason to implement this technique.

If some product requires having DLL, let it be in product's directory,
copied by MSI installer. What is the reason to extract DLL from resources,
and put it into some temp folder? If this is going to be done each time the
application starts, then this is an overhead, because each time at product
startup there should be done a sequence of operations, which can be simply
avoided, if DLL is placed near executable by MSI.

From my experience, usually executables which extracts something from its
resources and put it into temp folder is a kind of a crap, because usually
these are adwares, or similar software. (I don't count Sysinternals
software, they are exception).

--
V
This posting is provided "AS IS" with no warranties, and confers no
rights.
"Dennis Jones" <nospam@xxxxxxxxxx> wrote in message
news:OGslaZJWIHA.1208@xxxxxxxxxxxxxxxxxxxxxxx

"Volodymyr Shcherbyna" <v_scherbina@xxxxxxxxxxxxxxx> wrote in message
news:O%23MeMFJWIHA.2268@xxxxxxxxxxxxxxxxxxxxxxx
I don't remember the details, but IIRC, it extracts the DLL from the
resource to disk, then does a load (or maybe delay load) to get the DLL
into memory. Then, when the program shuts down, the DLL is
automatically deleted from the disk.

What is the reason? This is exactly the way, OP tries to avoid.

It depends on his reason for avoiding it. If he wants to avoid it for
performance reasons, then I agree, my suggestion is not very helpful.
But, on the other hand, if he wants to avoid it just so he doesn't have to
figure out how to do it and write/debug a bunch of code, then an easy
solution is to use existing code, which is what the article provides.

So that's why I mentioned it...just in case he just didn't want to go to
all the trouble of figuring it out and writing/debugging the code.

- Dennis



.



Relevant Pages

  • Re: CVF DLL, problems reading binary file
    ... in Compaq Visual Fortran which I'm trying to convert to a DLL to be ... I don't see any reason why a .EXE program and a DLL, ... ones that check subscripts and subroutine argument matching. ...
    (comp.lang.fortran)
  • Re: D3 odbc and .Net, almost there!
    ... that he was passing values ByVal instead of ByRef in his VB.NET code, ... The DLL itself follows well known standards ... as the parameters are correct it will work because the standards for calling ... there is no reason that code shouldn't work properly. ...
    (comp.databases.pick)
  • Re: The DLLMain...
    ... When a process first loads a DLL, DllMain is called with this "dwReason" ... value...this gives the DLL a chance to globally initialise itself (e.g. ... globally initialise and uninitialise itself...so, if a DLL uses some global ... DllMain is called with this reason when the process starts up a new ...
    (alt.lang.asm)
  • Re: The DLLMain...
    ... DllMain (which may be named anything, in fact...it is the fact that it's ... When a process first loads a DLL, DllMain is called with this "dwReason" ... DllMain is called with this reason when the process starts up a new ... the procedure ends with a "RET" to return ...
    (alt.lang.asm)