|
Hey guys
I'm looking for open source code project in c# that will help me to understand how to recover deleted files in windows xp. I would be appreciative if anyone posts any hint related to my problem.
Many thanks
|
|
|
|
|
That depends on what you mean by "deleted". Are you talking about files that are in the Recycle Bin or are you talking about files taht have been really deleted and don't show up in the file system nor the Recycle Bin?
|
|
|
|
|
I'm talking about files that have been deleted from the entire system and they don't exist in the Recycle bin any more.
|
|
|
|
|
Then I hope you have a very good knowledge of NTFS and it's data structures on disk. You're going to need it. A simple Google for "ntfs recover deleted files c#[^]" comes up with a ton of hits. Also, "ntfs data structure[^]" reveals a bunch of useful information.
|
|
|
|
|
Dave Kreskowiak wrote: Then I hope you have a very good knowledge of NTFS and it's data structures on disk. You're going to need it
Isn't that the whole point of the original question? I.e. to get help on how to do it in C#...
|
|
|
|
|
Well, if you completed reading the post, you would have seen the links to Google results for examples. There is no way you can explain all of the ins and outs of NTFS, how to read and interpret MFTs, search for and recover the "lost" chains, and put them back into the tables as a coherent file, all in a couple of forum posts. I gave him exactly what he asked for - hints. If you want to try and explain all that without writing a small book, be my guest. All you have to do is reply to the OP.
|
|
|
|
|
my project have to work in a cumputer that is in a network.I don't know Installshield well and microsoft setup too.guide me please!
|
|
|
|
|
Google[^] is your friend.
Take a look at this Code Project[^] article which guides you throuh creating a setup project.
Tarakeshwar Reddy
There are two kinds of people, those who do the work and those who take the credit. Try to be in the first group; there is less competition there. - Indira Gandhi
|
|
|
|
|
I have a program developed in VB6, I want to run it on VB.Net but the conversion does not succeed ... Do you have an idea on converting VB6 to. Net
thanks.
|
|
|
|
|
As far as I know there is no automatic way to convert VB6 to C#, dur to underlying differences in the frameworks involved. I don't think there is even a reliable automatic conversion from VB6 to VB.Net for this reason.
Dalek Dave: There are many words that some find offensive, Homosexuality, Alcoholism, Religion, Visual Basic, Manchester United, Butter.
Pete o'Hanlon: If it wasn't insulting tools, I'd say you were dumber than a bag of spanners.
|
|
|
|
|
If you search on the internet, you will find some converter programs that are available.
None of them, however will be able to actually do a full convert - you will still need to write / change a lot of code.
|
|
|
|
|
Thank you for your reply, but after a rechreche on google, I found many solution, but I preferred to have the opinion of someone who already work in this direction, and thank you again
|
|
|
|
|
|
Rewrite it.
"Upgrading" a project from VB6 to VB.NET is a Bad Idea (tm). The languages are fundamentally different in so many ways that you'll have more bugs than working lines of code.
So just rewrite it, or leave it in VB6 until you have time to rewrite it.
|
|
|
|
|
You can use your VB6 code in .Net by making InterOP of it.
|
|
|
|
|
|
is it possible to develop applcations using VS 2008 and C# for BlackBerry devices?
|
|
|
|
|
No, for Blackberry you will need to use Java
DaveIf this helped, please vote & accept answer!
Binging is like googling, it just feels dirtier. (Pete O'Hanlon)
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
|
|
|
|
|
I have a number of static instances of classes that do not get instantiated by the time I need them. These classes are loaded from external dll's, and may never be directly used. Here is an extremely simplified example.
A base class has a dictionary of all the instances of itself:
using System.Collections.Generic;
namespace Translators
{
public class Translator
{
static public Dictionary<string, Translator> allTranslators = new Dictionary<string, Translator>();
string language;
public Translator(string language)
{
allTranslators.Add(language, this);
}
}
}
A derived class in another assembly has specific implementation of the base class
namespace Translators
{
public class FrenchTranslator : Translator
{
private static FrenchTranslator TheFrenchTranslator = new FrenchTranslator();
private FrenchTranslator()
: base("French")
{
}
public static void Initialize() { }
}
}
Finally in a third assembly, a program, indirectly uses the derived class:
using Translators;
namespace ConsoleApplication4
{
class Program
{
static void Main(string[] args)
{
Translator myTranslator = Translators.Translator.allTranslators["French"];
}
}
}
In the case above if you break in a and look at myTranslator you will find it null. Because even though the assembly containing FrenchTranslator has been loaded, the class has not been used yet.
However if you change Main to the following it will be properly assigned.
static void Main(string[] args)
{
FrenchTranslator.Initialize();
Translator myTranslator = Translators.Translator.allTranslators["French"];
}
Now, I know that the static members don't get initialized until the class is utilized, my question is ... is there a way to utilize the class when the assembly gets loaded so that the static instances will be available.
Please note that the example above is only an example and not the actual problem. Consider that in the real case there are many thousands of instances of the base type that have been created in over a dozen assemblies. And that these instances could be indirectly used from many clients in many assemblies / applications. Also it is a requirement that the instances remain static instances.
Any help or thoughts would be appreciated.
The Thug
modified on Friday, April 16, 2010 8:39 AM
|
|
|
|
|
First thought:
Update the Dictionary in a static constructor.
Add static constructors to the derived classes.
OK, I'll have to make coffee first...
|
|
|
|
|
Can you change the class structure in the assemblies or are they 3rd party?
Dalek Dave: There are many words that some find offensive, Homosexuality, Alcoholism, Religion, Visual Basic, Manchester United, Butter.
Pete o'Hanlon: If it wasn't insulting tools, I'd say you were dumber than a bag of spanners.
|
|
|
|
|
The class structure can be changed but there are some limitations on what I can do and still have the solution be practical. What did you have in mind?
|
|
|
|
|
Well a few things occurred to me:
1. I'd have an ITranslator interface and have a dictionary of that. Minor point.
2. Having the Translator base class maintain a list of translators smacks of bad OO abstraction/separation of concerns, a translator translates for a language, it doesn't keep a list translators. I also think it makes the symantics of accessing a translator a little wierd. You might have a good reasons for doing this, however.
3. Following on from 2, I'd have a Singleton (or possibly static) object responsible for maintaining a the Dictionary of translators. You can lazily load the dictionaries, and/or initialise some at startup. The will also help to separate the concerns and will make the loading code clearer as it isn't in with the translation stuff.
I often find that when I struggle with problems like this, it is because there is an underlying flaw in my OO design. Hope this helps!
Dalek Dave: There are many words that some find offensive, Homosexuality, Alcoholism, Religion, Visual Basic, Manchester United, Butter.
Pete o'Hanlon: If it wasn't insulting tools, I'd say you were dumber than a bag of spanners.
|
|
|
|
|
Yeah, there's that, but there are bigger obstacles to overcome first.
|
|
|
|
|
I have to say I disagree. First it's a good idea to sanity check what is going on.
Secondly, get the model right and you don't spend all your time p*ssing into the wind.
Thirdly, this looks like a strategy pattern might be a good fit.
Fourthly, something needs to initialise the translators some where. This can't happen internally to the class as descirbed, and would lie more naturally in a class managing the translator dictionary.
Dalek Dave: There are many words that some find offensive, Homosexuality, Alcoholism, Religion, Visual Basic, Manchester United, Butter.
Pete o'Hanlon: If it wasn't insulting tools, I'd say you were dumber than a bag of spanners.
|
|
|
|