.NET Windows Explorer extension to browse a file like .zip? - c#

I made a browser program for a archive type with the .mpq extension, which is highly used in Blizzard games.
It is like an explorer but only explores files inside MPQ archives.
Now, we all know how Windows Explorer browses .zip archives and I'd love to make it open the .MPQ files with so many rich features.
Is this even possible? So it is possible...
If so, then how? Shell Folder...
Can someone please point me to an example? (C#) I can't just translate C++ to C#...

This is done via extending the shell classes. You'll need to implement the Basic Folder Object Interfaces to accomplish this.

Although it is a C++ framework, there is a framework that implements exactly what you want, and that I have adapted with success for a similar file format:
TarFolder (by the guy who developed GMail Drive).
You may also be interested in EZNamespaceExtension.Net, even if they do not support extension-based rooting (a workaround is to use URLs with specific protocols).
Finally, check out WindowsShell: it might be exactly what you are looking for !
Sorry for coming so late after the storm...

Related

Determine who has a file open using C# - is there a way now?

I need to be able to check who has a file open using C#. I found a few people asked this question before but they were all a long time ago with the latest being in 2012. I was wondering if, in the last 5 years, has Microsoft added this ability to .net or maybe someone came out with a nuget package that is capable.
Here is the latest answer I found
You can use windows internal function NTQuerySystemInformation with undocumented parameter SystemHandleInformation for it. I don't know about c# implementation, but I know delphy code for it, and vb6 code. Check this links, it will help you to make your c# implementation.
Delphi - get what files are opened by an application
https://forum.sysinternals.com/topic14546.html
As far as I know, the standard library still does not have suitable functions for this. There is a popular question about this: https://stackoverflow.com/a/937558/5665527.
Also, if you want to know who opened the file remotely - net file function may be useful (which is accessible via cmd). I believe that there are similar WinAPI functions on MSDN that could be implemented in a similar way.

Check file creator before loading to prevent tampering/corrupted data

Informative
I'm working on a project that loads a binary file from the disk. This file has a specific structure to store data and I need to protect this file from being loaded if the data was generated/tampered by third parties.
Resume
I have a file that I must check if the "creator" is me before loading.
Project Specification
The application that loads the file is written in C++.
The application that generates the file is written in C#.
Question
What are my options to accomplish this?
What libraries/algorithms to use?
Can you provide me some steps or guides?
Notes
I have Crypto++ linked to the C++ project if it helps.
What you are looking for is a signing/certifying system wirth asymetric keys. The functionality is built in .Net. A Quick google search shows this example which looks legit.
Keep in mind though, that if you don't have the full control of the certification process (if your application is on a client's computer), someone might decompile the code to bypass the check.
quickly like that i would take a look at LZMA SDK since the SDK support c++ and C# and just compress/encrypt the file
maybe there is a better solution, but this would be my first try

Autoupdating software using intranet

i searched for the topic but didn't find exactly that kind of problem.
I want to create a C# WinForms software which should run only in intranet. If i change the software afterwards i would like to have the application to look automatically in the network for a newer version. Is a newer version available it should replace the old one. Maybe there is some tool or library to achieve that?
Further Information: The software does not use a database and consists only out of one .exe file. No other stuff or files needed.
I don't want to setup a server or something like that for this task. I want it as simple and clean as possible.
Thanks in advance.
Joe
I think clickonce may help you. see http://msdn.microsoft.com/en-us/library/t71a733d(v=vs.80).aspx for more details
I really like the updateSystem.NET-lib, but which is only available in german. If you can understand the easy API, this is exactly what you are searching for.
Here, you can find a little tutorial, also in german.

Uploading a file from a C# desktop application to a PHP script?

I am looking to create a desktop application in C# which :
Allows the user to select a file / multiple files / folder containing files from his computer.
Upload the files selected to a PHP script (which is already equipped to handle file uploads using the $_FILES array.)
I'm a PHP developer and have never coded a single line of .NET before. So, you can assume I have no experience with .NET whatsoever.
I have looked this up online and all I seem to come up with are ASP.NET server side upload controls which i do not want. I'm looking for a client side solution. Also, will i have to make any changes in my PHP script ? The script already handles uploads from an HTML multipart form.
If anyone can help me point in the right direction of where to look, what C# controls are available which can help me create the application I need, I would really appreciate it.
The first, and simplest, way to go about this is to use any of the WebClient's UploadFile methods.
Here's some info an an example;
http://msdn.microsoft.com/en-us/library/36s52zhs.aspx
I have a feeling that this will not be enough for you, since you want to upload multiple files in a single request. The WebClient class can be used to manually build a http multipart request, which is probably your best bet.
It's a bit much to explain how to achieve this here on SO, but there are good guides out there.
Here are a couple of very to-the-point articles
http://www.codeproject.com/KB/cs/uploadfileex.aspx
http://www.codeproject.com/KB/IP/multipart_request_C_.aspx
And if you're interested in the details, or better OO design, here's an alternative (a bit harder to follow if you're not experienced with C#)
http://ferozedaud.blogspot.com/2010/03/multipart-form-upload-helper.html
I think both articles should give you enough info to get started.

Compact Framework - OpenNetCf.Net FTP Samples?

I am trying to get the OpenNetCF.Net FTP Components working with my PDA application. I am struggling to get it doing any more than connecting to the server and wondered if anyone knew of any sample code I could use to learn how to use it with?
I need to be able to download and upload files, as well as determining the download size of any files that I wish to download.
Thanks in advance.
I don't like the classes in the OpenNETCF.Net.FTP namespace (the ones in the Smart Device Framework). They're based on streams just like the full framework version (which is why we did them that way) but I find usage to be confusing (though any desktop FTP sample should work as a basis). I wrote a complete FTP set of classes from the RFC but with an object model that I find far more intuitive that is in the OpenNETCF Community Forums. Comes with full source.
This looks like the answer:
http://community.opennetcf.com/competition/folders/opennetcfnetftp/entry64583.aspx

Categories