Showing posts with label Utilities. Show all posts
Showing posts with label Utilities. Show all posts

Friday, September 4, 2009

[Utility][WinDbg] !htrace for debugging handle leak

Windbg Debugger’s !htrace extension is very good at debugging handle leaks. See the below steps how you can do it.

1. Install Debugging Tool for windows from here.
2. Run WinDbg installed with Debugging Tools in Step 1.
3. Take File->Attach to a process... menu and select your application in the process list
4. Application will break and change in to debug mode
5. Take File->Symbol File path and add the path where your application's pdb file is available
6. In the debug prompt enter !htrace -enable and press enter.
7. Now take Debug->Go menu, then you can operate on your application
8. Now run your scenario where your application is assumed to have handle leak.
9. Now take Debug->Break menu, for changing the application to debug mode.
10. Now enter !htrace -diff in the debug prompt and press enter. Here it list the handle leak logs.

Below is an example of the log generated for 4 opened handle in my test app. From the log you can see where exactly the handle is leaked in the code.
0:001>
!htrace -diff
Handle tracing information snapshot successfully taken.
0x26 new stack traces since the previous snapshot.
Ignoring handles that were already closed...
Outstanding handles opened since the previous snapshot:
--------------------------------------
Handle = 0x0000070c - OPEN
Thread ID = 0x00001758, Process ID = 0x00001248

0x7c8308eb: kernel32!CreateEventA+0x00000068
*** WARNING: Unable to verify checksum for D:\TestFolder\MiscTest\Release\MiscTest.exe
0x0040172b: MiscTest!CMiscTestDlg::OnButtonHandle+0x0000001a
0x73dd24c0: MFC42!_AfxDispatchCmdMsg+0x00000082
0x73dd23bf: MFC42!CCmdTarget::OnCmdMsg+0x0000010a
0x73e3dead: MFC42!CPropertySheet::OnCmdMsg+0x0000001d
0x73dd3244: MFC42!CWnd::OnCommand+0x00000053
0x73dd1bf1: MFC42!CWnd::OnWndMsg+0x0000002f
0x73dd1b9b: MFC42!CWnd::WindowProc+0x00000024
0x73dd1b05: MFC42!AfxCallWndProc+0x00000091
0x73dd1a58: MFC42!AfxWndProc+0x00000036
0x73e6847d: MFC42!AfxWndProcBase+0x00000039
--------------------------------------
Handle = 0x00000710 - OPEN
Thread ID = 0x00001758, Process ID = 0x00001248

0x7c8308eb: kernel32!CreateEventA+0x00000068
0x0040172b: MiscTest!CMiscTestDlg::OnButtonHandle+0x0000001a
0x73dd24c0: MFC42!_AfxDispatchCmdMsg+0x00000082
0x73dd23bf: MFC42!CCmdTarget::OnCmdMsg+0x0000010a
0x73e3dead: MFC42!CPropertySheet::OnCmdMsg+0x0000001d
0x73dd3244: MFC42!CWnd::OnCommand+0x00000053
0x73dd1bf1: MFC42!CWnd::OnWndMsg+0x0000002f
0x73dd1b9b: MFC42!CWnd::WindowProc+0x00000024
0x73dd1b05: MFC42!AfxCallWndProc+0x00000091
0x73dd1a58: MFC42!AfxWndProc+0x00000036
0x73e6847d: MFC42!AfxWndProcBase+0x00000039
--------------------------------------
Handle = 0x00000714 - OPEN
Thread ID = 0x00001758, Process ID = 0x00001248

0x7c8308eb: kernel32!CreateEventA+0x00000068
0x0040172b: MiscTest!CMiscTestDlg::OnButtonHandle+0x0000001a
0x73dd24c0: MFC42!_AfxDispatchCmdMsg+0x00000082
0x73dd23bf: MFC42!CCmdTarget::OnCmdMsg+0x0000010a
0x73e3dead: MFC42!CPropertySheet::OnCmdMsg+0x0000001d
0x73dd3244: MFC42!CWnd::OnCommand+0x00000053
0x73dd1bf1: MFC42!CWnd::OnWndMsg+0x0000002f
0x73dd1b9b: MFC42!CWnd::WindowProc+0x00000024
0x73dd1b05: MFC42!AfxCallWndProc+0x00000091
0x73dd1a58: MFC42!AfxWndProc+0x00000036
0x73e6847d: MFC42!AfxWndProcBase+0x00000039
--------------------------------------
Handle = 0x00000718 - OPEN
Thread ID = 0x00001758, Process ID = 0x00001248

0x7c8308eb: kernel32!CreateEventA+0x00000068
0x0040172b: MiscTest!CMiscTestDlg::OnButtonHandle+0x0000001a
0x73dd24c0: MFC42!_AfxDispatchCmdMsg+0x00000082
0x73dd23bf: MFC42!CCmdTarget::OnCmdMsg+0x0000010a
0x73e3dead: MFC42!CPropertySheet::OnCmdMsg+0x0000001d
0x73dd3244: MFC42!CWnd::OnCommand+0x00000053
0x73dd1bf1: MFC42!CWnd::OnWndMsg+0x0000002f
0x73dd1b9b: MFC42!CWnd::WindowProc+0x00000024
0x73dd1b05: MFC42!AfxCallWndProc+0x00000091
0x73dd1a58: MFC42!AfxWndProc+0x00000036
0x73e6847d: MFC42!AfxWndProcBase+0x00000039
--------------------------------------
Displayed 0x4 stack traces for outstanding handles opened since the previous snapshot.

Thursday, September 3, 2009

Ghostzilla - The Invisible browser

Are you looking for an idea to browse the internet with out leaving any trace for your boss, colleagues or roomies? You may be having difficulty in hiding your browser window if some one is over your shoulders all of a sudden. Let me say you about a browser which will save you from such mess, Ghostzilla - The Invisible browser.
Ghostzilla browser for Windows is a tool that shields you from the looks of people around you, when they try to see if you are surfing the Web. With Ghostzilla, they see your normal work screen. You see the Web page, drawn to appear inside your work application and to look like that application to a bystander. If someone comes too close, move the mouse away from the Web page and it disappears, leaving the original application frame.

If you wanna try this follow the below steps,
1. Download it from here.
2. Extract the downloaded GhostzillaCD-1.0.1-free-v1.zip
3. Run the Start-Ghostzilla-CD.exe from the path \GhostzillaCD-1.0.1-free-v1\program\
4. Press No in the dialog shown.
5. You can see GhostZilla browser displayed and embeded in topmost window.
6. If it is disappeared, do the following to make it visible
- Click the left most edge of your screen
- Now click the right most edge of your screen
- Now click the left most edge of the screen again. Ahh it is displayed !
7. For hiding the Ghostzilla just move your mouse away from the Ghostzilla.
8. By default it will appear black&white(to have privacy), to have color view choose Setup->Hiding Level 1 menu.


Ghostzilla embeded in explorer window.
For getting a hand full of options and short keys read Instructions.html in the downloaded zip. Remember one thing if you brows with Ghostzilla history and usage details can be tracked as with other browsers, this browser is only meant for hiding what you doing in your screen (huh are you still browsing??)

Wednesday, June 17, 2009

Restore your Windows system

Have you ever caught up with a situation, that you have installed something or did some manual registry edits and result in an unrecoverable situation? This may be due to - registry got corrupted or some other registration errors. In such a situation, most of us may go for some trials to get rid of the issues facing and if found unsuccessful, end up in deciding reinstalling windows. But you have to understand about the System Restore tool (Start->Programs->Accessories->System Tools->System Restore) supplied with Windows Accessories from Windows XP and later versions.

System Restore
System Restore helps you restore your computer's system files to an earlier point in time. It's a way to undo system changes to your computer without affecting your personal files, such as e‑mail, documents, or photos.
If the installation of a program or a driver cause an unexpected change to your computer or cause Windows to behave unpredictably. Usually, uninstalling the program or driver corrects the problem. If uninstalling does not fix the problem, you can try restoring your computer's system to an earlier date when everything worked correctly.
System Restore uses a feature called System Protection to regularly create and save restore points on your computer. These restore points contain information about registery settings and other system information that Windows uses. You can also create restore points manually.
System Restore is not intended for backing up personal files, so it cannot help you recover a personal file that has been deleted or damaged. You should regularly back up your personal files and important data using a backup program.

See the below steps in Windows Vista showing Restoring to a previous point
.
.

Monday, April 27, 2009

[Utility] 'Over Disk' visualize your disk usage with a Radial map

In my previous post I introduced you a tool SpaceSniffer for visualizing your disk usage. Let me show you one more disk usage visualizer OverDisk, which display the disk usage as a radial map. You can select a drive or directory for analyzing with OverDisk and you will be provided with a radial map showing each items inside the selection. On mouse over the details of the folders will be shown. On further selection on the items displayed you will be traversed to the selected folder's radial map. This Windows tool can download from here.

Saturday, April 25, 2009

[Utility] Visualize drive space with 'SpaceSniffer'

SpaceSniffer is drive space visualizer utility for windows user. It is a utility that gives you an idea of how folders and files are structured on your disks. You will have immediate perception of where big folders and files are situated on your devices.
Start a scan process and see the overall situation. Bigger are the elements on the view, bigger are folders and files on your disk. You need more detail on a big folder? Just single click on it. The selected element will be detailed with its content. Start a scan process and see the overall situation. Bigger are the elements on the view, bigger are folders and files on your disk. You need more detail on a big folder? Just single click on it. The selected element will be detailed with its content. You can also filter on file size, file date and combine all filters.



Download SpaceSniffer and give a try.

Friday, April 24, 2009

[Utility] 'Jing' screen/video capture tool

Do you want to try a sophisticated Screen/Video capture tool ? I suggest Jing. I found myself comfortable with this free tool. I was taking snapshots and mark on the same in a traditional way, Prnt Screen -> Paste to mspaint -> Mark there -> Save and use. If everything available in a single easy to use tool then you will opt the same right ?


You can take snapshot, mark, highlight and quote on it. Jing also provides video capture. So go for below steps and make a trial run,
2. Install Jing.
3. Run Jing, you can see a round sun appearing at middle of your screen and set to the top middle screen.
4. Mouse over the yellow sun.
5. Select the capture option.
6. Select the area/window.
7. Press Save button displayed in the button panel shown.
You can run video capture in similar way. Just see a snapshot created/edited with Jing.

Share what you captured to Every one !!!
Just tell Jing where to send the screenshot and—BAM!—it's there and ready to share. When you send to a destination like Screencast.com or Flickr, Jing even places a hyperlink on your clipboard.
Remember, if you are a Windows user, you should have Windows XP or Vista and .NET Framework 3.0 for running Jing. Mac users need Mac OS X 10.4.11, or 10.5.5 or later and QuickTime 7.5.5 or later.

Thursday, April 23, 2009

[Utility] 'Circle Dock' a quick launcher for you!

Are you thinking of having a Circular & Spiral dock with cool looks, as a quick launcher for your Windows ? Then here is a cool open source Circle Dock for you.



As the name suggest its circular and spiral ! Its time for removing the messy desktop icons and bring Circular Dock, save the space/time and spice your desktop. I am sure your colleague will say wow !
For taking this to your desktop just follow the below steps,
1. Download Circle Dock from here.
2. Run Circle Dock.
3. Drag and drop the applications to the Circle Dock.
4. Click on the icon shown on Circle Dock of the application will launch it!

Remember you should have WindowsXP or Vista, .Net Framework 2.0 should be installed and a some what recent graphics card. So just try it and discover lot more (untold by me) features available !!!

Saturday, March 28, 2009

[Utility] Process Explorer for Software Developers

In my previous post I told you about the Microsoft TechNet site and in the features I have mentioned about Windows SystInternals free utilities for software developers. Let me introduce a tool Process Explorer to show you the relevance of SystInternals tools for a Software Developer. It is an extended TaskManager and can replace Task Manager.

What is Process Explorer ?

Process Explorer is a system monitoring utility which can be used to track down system problems. Process Explorer is an advanced process management utility that picks up where Task Manager leaves off.




Key Features
  • Detailed information about a process including its icon, command-line, full image path, memory statistics, user account, security attributes etc can be viewed.
  • A particular process can be selected and list the DLLs it has loaded or the operating system resource handles it has open.
  • Powerful search capability that will quickly show you which processes have particular handles opened or DLLs loaded.
  • System Information & Performance graph can be shown for whole system and for each process.

Download
It is a free ware, you can download Process Explorer from here. .

Note: If you have any memory or process related issue, just try process explorer, you will get additional information about the issue for sure !

Tuesday, March 24, 2009

[Utility] Team Viewer for remote desktop Sharing/Access support

Have you ever thought of accessing your friend's computer connected to internet & located in a different place (for example in a different country) and work on it as if you are accessing your local network PC as in remote desktop connection(mstsc) ? Here is an exclusive software utility just for the same and more !!! Let me introduce you Team Viewer (one of the best available tool in this arena).

Team Viewer
TeamViewer is a software package for remote control, desktop sharing and file transfer that works behind firewalls & NAT proxy. Just see the user interface of Team Viewer.


You can download it from here.

License
The personal-use or non-commercial use version is provided for free, while the business editions start at $249. The non-commercial use version of the software has limited features compared to the commercial version, and it is not licensed for use in a commercial environment. Extras which are provided additionally in the licensed version are the customization of the client module (QuickSupport) and the TV Manager, a database AddOn tool which allows the session logging for billing purposes. Below sections are based on the non-commercial use version.

Major Features
Following are the major features available in Team Viewer,
Remote Support
With this we can control our partner's computer. We can view the partner's machine, access his cursor and work on that machine.
Presentation
With this we can present our desktop to our partner.
File transfer
With this we can send/receive files to/from your partner
VPN
With this we can establish a Virtual Private Network connection with your partner's computer.

How to use?
Your and your partner's computer should have Team Viewer installed in their machine. For accessing your partner's remote computer,
1. Run the Team Viewer in both computers.
2. Enter the partner's ID in the ID box (Get the ID and Password that will be shown on starting Team Viewer from your partner).
3. Choose the option/feature you want to activate and press Connect to Partner button.
4. Now it will ask for the partner's Password, enter it and press Log On button.

After all with Team Viewer cross-platform work is possible between Windows and Macintosh systems !

Monday, January 19, 2009

[.NET] Understanding ildasm & Reflector

When I was a newbie to .NET world one of the most interesting thing I find is .NET's Common Intermediate Language (CIL)code. You may be wondering whats special with an intermediate language code ! Ok let me explain,
When .NET languages are compiled, the source code is translated into CIL code rather than platform specific object code. CIL is a CPU/Platform-independent instruction set that can be executed in any environment supporting the .NET framework. Since CIL is defined and is generic it is obvious that it can be read and interpreted and reverse engineered. So it is the time to call your attention to two disassembler utilities Ildasm and Reflector.



ildasm
Intermediate Language Disassembler utility (ildasm.exe), is shipped with .NET Framework 3.5 SDK. It allows you to load any .NET assembly and investigate its contents, including the associated manifest, CIL code, and type metadata. Take Ildasm from Microsoft Visual Studio 2008 Tools and if it is not available search ildasm.exe some where in the Visual studio install directories say C:\Program Files\Microsoft.NET\FrameworkSDK\bin. Follow the below stops,
1. Start ildasm and take File->Open menu.
2. Browse and select the assembly (.NET binary) for exploring.
3. Try exploring the details available (CIL code and assembly metadata)
Check out the below figure which shows exploring a Main() of an assembly using ildasm.




Reflector
Next most important and most popular object browser available is Reflector (originally written by Lutz Roeder). MSDN magazine named it as one of the Ten Must-Have utilities for developers ! So what's special with this ?
It allows to inspect, navigate, search, analyze, and browse the contents of a NET assembly and translates the intermediate language code to choosen .NET programming language, i.e Reflector allows you to decompile .NET assemblies into C#, Visual Basic, Delphi, MC++. It will show you the metadata, each call tree details, resources and XML documentation (what else you need ?). Follow the below steps and experience the wonder !
1. Download Reflector from here.
2. Take File->Open and browse for the .NET binary.
3. Select the class or function you want to explore.
4. For changing the Intermediate language code displayed to any other .NET language choose the same from the drop down. See the below snapshots of Reflector.




.NET Reflector's major use include tracking down performance problems and bugs, browsing classes, and familiarizing the code bases. It is also powerful in finding assembly dependencies, and even windows DLL dependencies, by using the Analyzer option. So try it and find what all you can do with Reflector !