Jayson's profileJayson GoPhotosBlogListsMore ![]() | Help |
Jayson GoChallenging height since 1978 |
|||||||||||||
A list of different noteable milestones in my pathetic running career :)
|
This user currently is not registered with Windows Live QnA account. Click here to learn more and get started.
|
||||||||||||
|
December 11 Need to know the size of your .NET object?I was doing some research on a question posted on an MSDN Forum [1] about how to determine the size of an object and I was able to find out how to do it. This method will allow you to determine the size of your object while debugging your application with Visual Studio.
Enter the SOS Debugging Extension [2]. This library will allow you to determine the size of your managed object (among many other things).
So how do you do it? Here are a few steps on how to do it:
1. Load your project into Visual Studio and ensure that 'Enabled unmanaged code debugging' is checked (see Project Settings, Debug tab). This is unchecked by default and my guess is, there's a reason for it, so I would suggest turning it back off when you're finished.
2. Load the SOS Debugging Extension by opening your Immediate Window and typing .load sos.dll. I did not have any problems doing this but if for some reason or another you don't have the sos.dll on your machine, you may need to download and install the Debugging Tools [3].
3. Place appropriate breakpoint(s) in your application and debug it. Once you hit a breakpoint, determine the memory location of your object. To do this, open a Memory window by going to Debug->Windows->Memory->Memory 1. Highlight the variable for your object and drag it into the memory window. When you do so, the Address should be available. Copy it to your clipboard (unless you like to typing).
4. In your immediate window, type !ObjSize <address>, where <address> is the address of your object you got from step 3. The command should output something like:
!ObjSize 0x013689e0
sizeof(013689e0) = 16 ( 0x10) bytes (System.Object[]) And that should give you the information you wanted. Credits: Hope this helps! [1] http://social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/7444d58d-a0c1-45f3-a979-b9092f5d2b7e/
December 09 ExceptionsHere's a very interesting read on how to approach exception handling for an application:
I especially love the section about Vexing Exceptions:
August 12 Command Prompt from Windows ExplorerHave you ever wanted to launch the Command Prompt from a specific folder in Windows Explorer? Working with more command-line type of tools with my current company has prompted more of this behavior in my day to day tasks.
There may be a number of ways to do this, for example, PowerToys DosHere (do a search for it).
However, if you want to do it manually, you can perform these few steps.
1. Launch Windows Explorer.
2. On the main menu, go to 'Tools->Folder Options' and then navigate to the 'File Types' tab.
3. The list of file types you see have two columns: 'Extensions' and 'File Types'. Look for an extension of "(NONE)" and a File Type of "Folder" and select that entry.
4. Click the 'Advanced' button. An 'Edit File Type' dialog will pop up.
5. Click 'New...' and a 'New Action' dialog will pop up.
6. Under 'Action', call it what you want. For example, "Command Prompt" (w/o the quotes).
7. Under 'Application used to perform action', enter in "C:\Windows\System32\Cmd.exe /k cd" (w/o the quotes).
8. Click OK to get out of all the dialogs.
9. Done. Now, when you right click any folder, you should see your new action. In these steps, I used "Command Prompt". Clicking the new action will open Cmd.exe with a default directory of the folder you clicked from Windows Explorer.
Final Note:
If you ever need to remove this or modify the settings, you will have to delete the appropriate key from the Registry. Typical "Registry Disclaimer" applies here so don't try this if you're not comfortable messing with the Registry.
The registry location is:
HKCR/Folder/shell/<action name>
where <action name> is the Action Name you gave it from step #6.
To remove, delete the <action name> key.
To rename, rename the <action name> key.
To modify the command, go to <action name>/command and modify the (Default) String value. July 24 Am I Back?Well, I've been away from Spaces for a while, but I think I will start getting on here a bit more. Why? I have no clue. Call it build up and a need to release. Call it a life with things happening and this being a the medium of choice. Call it what you may but I think I'm back. October 31 Windows Media Player 11 ReleasedWow, I'm getting tired blogging about all these newly released apps from Microsoft... should I even keep doing this? Well, I only blog about apps that I like ;)
Anyways, I've been using MP11 Beta1 and 2 and they have been okay. I definitely saw some quirkiness with Beta2 but I think it was an isolated case and haven't seen it occur since. Well, without further ado, Microsoft has released Media Player 11. Go get your copy!
|
|||||||||||||
|
|