Jump to content
  • Advertisement

Truckhunter

Member
  • Content Count

    15
  • Joined

  • Last visited

Community Reputation

122 Neutral

About Truckhunter

  • Rank
    Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Truckhunter

    [.net] Different debugging methods

    VS2005 actually added some support for exactly what you're describing. However, it isn't in the Express edition for C# or VB. It is in C++ express, if that's what you're using, as well as (I believe) Standard Edition and higher. These are called tracepoints. To use them, you can right click on the red circle for a breakpoint you have set. If you are using the appropriate version of VS, you'll get a context menu with several options. These allow you to set things like hitcount (how many times the BP must be hit before breaking,) condition (some expression that must be true for the bp to be hit,) and an option called "When Hit..." It's this last one that you want - it allows you to set a breakpoint that doesn't break, but rather outputs some text. If you don't have that version of VS, or you want to do it from your code rather than the IDE, take a look at the System.Diagnostics.Debug class. System.Diagnostics.Debug.Write will output some text to the output window in Visual Studio (or whatever debug listener is registered.) Hope that helps.
  2. Truckhunter

    [.net] Search access in folders

    Yes, but Cybrosys made the good point that this is a crude solution. Exceptions should never be used to detect things that will occur in normal code execution - they have a significant performance hit. This is an interesting problem you're running into. In general, File.Exists or Directory.Exists will return false if you don't have permission to access a directory. Likewise, the directory or file shouldn't be returned by Directory.GetDirectories, etc. Basically, files you don't have permission to access should be invisible to you, so you shouldn't encounter this problem. For some reason, this isn't the case for the "System Volume Information" folder. I'm not an expert on ACL's, so I can't say for sure what's going wrong. For some reason, though, this directory is listed even though you don't have access to it. A possible workaround that may fit your situation would be to simply ignore all hidden folders, something like: System.IO.DirectoryInfo dinfo = new DirectoryInfo(path); if ((dinfo.Attributes & FileAttributes.Hidden) != FileAttributes.Hidden) { Directory.GetFiles(path); } That still isn't the best solution, but it's the best I can think of unless we can figure out how to identify these special directories like "System Volume Information."
  3. Yes; you will need to get VS 2005 to do so. 64 bit support wasn't added until that release. You could try using WinDbg, but a much friendlier option would be to download one of the Express editions of VS 2005. Or, if you just install the SDK, DBGCLR supports 64 bit. However, if I'm not mistaken, the versions in SysWOW64 should be the 32 bit versions, so technically it shouldn't be a problem. That being said, a minimal amount of work was done to make sure VS.NET 2003 still runs on 64 bit machines, so it wouldn't be too surprising if it's a product bug that was fixed in 2005. I would suggest installing one of the 2005 debuggers and seeing if you get the same problem.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!