Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is It possible to creat a DLL file in c#

Status
Not open for further replies.

ananthrr

Technical User
Feb 28, 2006
17
GB
Hello guys,

I want to know, is it possible to read a file folder and compress the files found in them into a DLL file in C#.

If possible, someone please give the article or weblink link related to this topic.
 
A DLL is an executable file, and is not a compressed archive (aka "Zip") file, so storing files in a file with the extension ".dll" wouldn't make sense.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Sorry chipH, I am still a beginner. I should have used the word embed rather than compress.

I think you answered to my previous question. If you can help on this topic....please.

i need to embed the files in a dll file during runtime, using c#.net.

I found to do this in C# command line compiler. I hope you remember....the previous question.

So do you have any ideas or articles that you can recommand for my study.?

Thank you.
 
You can do it at compile-time, but at run-time it's probably not a good idea.

1. It would change the date/time on the file, so tracking down problems becomes more difficult.

2. Any anti-virus program will see the dll file change, and flag it as being infected.

What business problem are you trying to solve? Maybe there's a better way.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Thanks for the advice chiph, but i think thats too technical for me, i guess i have to learn alot of stuff.
i am not trying to solve any business problem, i am still learning c#.net and i tried to create an automatic update service program, similar to the windows update service, that can download files from a server, when an update is available.

I used the BITS features in windows and am almost there. but the problem is i need to scan or search a virtual folder for updates.

I was reading an article and it said "All of the .NET Framework language compilers let you embed arbitrary files into an assembly file." this article used the command line compiler to acheive the "embed into an assemble file"....

so i was just thinking is there any way to do this in my program.........

I read your previous answer to my question and i couldnt understand that quite well.

So any more advice.......
 
Try the reverse.

When you have an update you want to push down to a client PC, create a zip file that contains the DLL assemblies you want them to get, and have a process on the client PC to receive the file, uncompress it, and install it.

This can happen at runtime because there is built-in support for .zip files in the 2.0 framework.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Thank you chiph. I ve done the "receive the file" stuff. Now i have to work on the creation of zip file and uncompress part.

Thank you once again for the help.

And one last thing, do you advice any article on how to create a zip file......
 
Hello Chiph,

I figured out how to zip a file, but i ve got problem again.

I used the Gzipstream class to creat a zip file but, the problem is i cannot zip more than one file.

Stuck again!

Can you suggest any idea please.

Hope am not bothering you.
 
Take a look at the sharpzip library:

The library is covered under the GPL, but they have an exception that allows you to distribute it with commercial products.

Chip H.



____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top