Click here to Skip to main content
15,307,206 members

Comments by Darki699 (Top 5 by date)

Darki699 25-Jan-11 19:12pm View
Check out my solution for that in 'Alternate 1' I added. This way you can embed the COM directly from the downloaded memory, which will make it only a bit harder to sniff the packets downloaded (you can even encrypt it, etc..), since nothing is saved on the end-user side :)
This will ofcourse require to download the com each time the end-user starts the app.. But it's a great way to make a crackers life interesting
Darki699 25-Jan-11 13:48pm View
Or download the compatible dll (after you figure out the system 32/64) directly into the memory and link in dynamically during runtime like I suggested in 'Alternate 1' :)
Darki699 24-Jan-11 16:48pm View
Notice above that the object 'myCOM' can also be deleted and replaced during runtime in the same manner. So you can swap DLL files and attach a different DLL even after the 'original' DLL was loaded.
Darki699 24-Jan-11 16:09pm View
It is expensive, and it's does make the executable a tad larger, but sometimes you rather have a larger executable than exposed dlls
Darki699 24-Jan-11 15:59pm View
The main reason for this example is to explain how to embed binaries and interact with them under managed C# coding. It's not supposed to be effective, it's supposed to be a demonstration of how to run a dll (or any byte data for that instance, could be an executable, an image etc...) from inside a class object. In my opinion grading or downgrading an example like this is meaningless ;P

Why not use COM ref. you ask?

1. Maybe it's not a COM at all.. or maybe it's a purchased COM that you have the license to use but don't want others to be able to access it.

2. Maybe it's a unique version of the DLL, that will not be found on the end users computer

3. Maybe you want to download the binary dynamically from a website and then run them from the memory, instead of hard coding refs [Read the alternate I just added to understand how to do that]?

In a short version: COM refs are good, but knowing how to use the binaries dynamically is great :)