Click here to Skip to main content
15,914,013 members
Home / Discussions / C#
   

C#

 
GeneralEmbedding Win32 dll Pin
Yaakov Davis6-Dec-04 18:43
Yaakov Davis6-Dec-04 18:43 
GeneralRe: Embedding Win32 dll Pin
Daniel Turini6-Dec-04 20:11
Daniel Turini6-Dec-04 20:11 
GeneralRe: Embedding Win32 dll Pin
sreejith ss nair6-Dec-04 21:36
sreejith ss nair6-Dec-04 21:36 
GeneralRe: Embedding Win32 dll Pin
Yaakov Davis7-Dec-04 1:35
Yaakov Davis7-Dec-04 1:35 
GeneralRe: Embedding Win32 dll Pin
sreejith ss nair7-Dec-04 1:53
sreejith ss nair7-Dec-04 1:53 
GeneralRe: Embedding Win32 dll Pin
Yaakov Davis7-Dec-04 2:06
Yaakov Davis7-Dec-04 2:06 
GeneralAnybody please? Pin
Yaakov Davis7-Dec-04 3:46
Yaakov Davis7-Dec-04 3:46 
GeneralRe: Embedding Win32 dll Pin
Dave Kreskowiak7-Dec-04 4:32
mveDave Kreskowiak7-Dec-04 4:32 
There is no way to do this. Even if you packaged the .DLL into a resource in your .EXE, you'd still have to unpack it, save the .DLL file to the folder where your app is installed, and then call it.

But, someone that malicious could also just put a replacement .DLL into the folder where your app is installed, either tag it ReadOnly, or some other methdo to keep your app from putting the .DLL down successfully, whatever, and then your app would still call the bad .DLL.

The only method you can use to validate the .DLL is to run some kind of checksum, or some other file validation, on the .DLL file before you call it. But this is no way guarantees that the file your looking at is legitimate and it will also keep your application tied to a specific version of the .DLL file.

But this is a calculated risk that EVERY Windows application takes. There is just no reliable way to do this with a Win32 .DLL. Every Win32 .DLL can be impostered by a custom written replacement, using the same signatures and GUID's as your .DLL.


RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

GeneralRe: Embedding Win32 dll Pin
Yaakov Davis7-Dec-04 8:10
Yaakov Davis7-Dec-04 8:10 
GeneralRe: Embedding Win32 dll Pin
Dave Kreskowiak7-Dec-04 11:42
mveDave Kreskowiak7-Dec-04 11:42 
GeneralAnother question Pin
Yaakov Davis7-Dec-04 11:54
Yaakov Davis7-Dec-04 11:54 
GeneralRe: Another question Pin
Dave Kreskowiak8-Dec-04 1:53
mveDave Kreskowiak8-Dec-04 1:53 
GeneralCustom Web Component Problem Pin
Jacob Koppang6-Dec-04 16:33
Jacob Koppang6-Dec-04 16:33 
GeneralRegister dll files Pin
johnie836-Dec-04 14:24
johnie836-Dec-04 14:24 
GeneralRe: Register dll files Pin
sreejith ss nair6-Dec-04 21:32
sreejith ss nair6-Dec-04 21:32 
GeneralRe: Register dll files Pin
johnie837-Dec-04 0:22
johnie837-Dec-04 0:22 
QuestionHow to extract default page margin of a printer? Pin
sachinkalse6-Dec-04 14:23
sachinkalse6-Dec-04 14:23 
GeneralCalculating ticks per second Pin
Tristan Rhodes6-Dec-04 10:33
Tristan Rhodes6-Dec-04 10:33 
GeneralRe: Calculating ticks per second Pin
leppie6-Dec-04 10:48
leppie6-Dec-04 10:48 
GeneralRe: Calculating ticks per second Pin
Tristan Rhodes6-Dec-04 11:01
Tristan Rhodes6-Dec-04 11:01 
GeneralRe: Calculating ticks per second Pin
Dave Kreskowiak7-Dec-04 4:15
mveDave Kreskowiak7-Dec-04 4:15 
GeneralRe: Calculating ticks per second Pin
Daniel Turini6-Dec-04 20:09
Daniel Turini6-Dec-04 20:09 
Generalhelp->mirror printing in c# Pin
bigmega6-Dec-04 9:08
bigmega6-Dec-04 9:08 
GeneralRe: help->mirror printing in c# Pin
Anonymous6-Dec-04 14:29
Anonymous6-Dec-04 14:29 
GeneralRe: help->mirror printing in c# Pin
bigmega7-Dec-04 18:00
bigmega7-Dec-04 18:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.