Re: [BLACKBOX] Packing a dll file into an exe file

From: [at]} <CFB>
Date: Tue, 22 Apr 2008 11:42:19 +0930

----boundary-LibPST-iamunique-1832352975_-_-
Content-type: text/plain

>-----Original Message-----
>From: BlackBox [mailto:BLACKBOX{([at]})nowhere.xy
>Douglas G. Danforth
>Sent: Tuesday, 22 April 2008 10:57 AM
>To: BLACKBOX{([at]})nowhere.xy
>Subject: [BLACKBOX] Packing a dll file into an exe file
>
>Folks,
>
>The problem is in the packing of a dll (in this case FreeImage.dll).
>If I put the dll into C:\WINDOWS\system the loader finds it.
>But if I leave the dll in the BlackBox root directory it
>doesn't (when the exe is running from the desktop).
>What is the syntax for packing a dll such that the file is
>really in the .exe and is self contained so that on any system
>it will execute directly whether or not FreeImage.dll is on
>that system (but in the .exe file)?
>
>-Doug Danforth
>

Hi Doug,

A quick look indicates that BB calls the Windows function LoadLibraryA to
open the dll. One place where this is documented is at:

http://msdn2.microsoft.com/en-us/library/ms684175(VS.85).aspx

Hopefully there is sufficient information there related to the strategy
Windows uses to search for DLLs to help solve your problem.

Regards,
Chris Burrows
CFB Software
http://www.cfbsoftware.com/cp


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-1832352975_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZ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zIG9uIFxwYXINCj50aGF0
IHN5c3RlbSAoYnV0IGluIHRoZSAuZXhlIGZpbGUpP1xwYXINCj5ccGFyDQo+LURvdWcgRGFuZm9y
dGhccGFyDQo+XHBhcg0KXHBhcg0KSGkgRG91ZyxccGFyDQpccGFyDQpBIHF1aWNrIGxvb2sgaW5k
aWNhdGVzIHRoYXQgQkIgY2FsbHMgdGhlIFdpbmRvd3MgZnVuY3Rpb24gTG9hZExpYnJhcnlBIHRv
XHBhcg0Kb3BlbiB0aGUgZGxsLiBPbmUgcGxhY2Ugd2hlcmUgdGhpcyBpcyBkb2N1bWVudGVkIGlz
IGF0OlxwYXINClxwYXINCmh0dHA6Ly9tc2RuMi5taWNyb3NvZnQuY29tL2VuLXVzL2xpYnJhcnkv
bXM2ODQxNzUoVlMuODUpLmFzcHhccGFyDQpccGFyDQpIb3BlZnVsbHkgdGhlcmUgaXMgc3VmZmlj
aWVudCBpbmZvcm1hdGlvbiB0aGVyZSByZWxhdGVkIHRvIHRoZSBzdHJhdGVneVxwYXINCldpbmRv
d3MgdXNlcyB0byBzZWFyY2ggZm9yIERMTHMgdG8gaGVscCBzb2x2ZSB5b3VyIHByb2JsZW0uXHBh
cg0KXHBhcg0KUmVnYXJkcyxccGFyDQpDaHJpcyBCdXJyb3dzXHBhcg0KQ0ZCIFNvZnR3YXJlXHBh
cg0KaHR0cDovL3d3dy5jZmJzb2Z0d2FyZS5jb20vY3BccGFyDQpccGFyDQpccGFyDQotLS0tXHBh
cg0KVG8gdW5zdWJzY3JpYmUsIHNlbmQgYSBtZXNzYWdlIHdpdGggYm9keSAiU0lHTk9GRiBCTEFD
S0JPWCIgdG8gTElTVFNFUlZATElTVFMuT0JFUk9OLkNIXH19AAAAGg==
----boundary-LibPST-iamunique-1832352975_-_---
Received on Tue Apr 22 2008 - 04:12:19 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:30:57 UTC