16,019,983 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Visual Basic questions
View Javascript questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Darki699 (Top 5 by date)
Darki699
25-Jan-11 19:12pm
View
Deleted
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
Deleted
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
Deleted
P.S.
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
Deleted
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
Deleted
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 :)
NJoy