Skip to content


comparing two systemtime variables using filetime in vc++

lets take a look at how to compare two systemtime variables but using Filetime to do so. We make use of the utility method CompareFiletime to do this.

1) store the systemtime in a variable
2) convert it into filetime. Use this method
SystemTimeToFileTime(&systemtime1, &filetime1)

SystemTimeToFileTime(&systemtime2, &filetime2)
3) Compare the filetimes using the method
CompareFileTime(&filetime1, &filetime2) > 0

4) finally convert the filetime to systemtime using the method
FileTimeToSystemTime(..)

Posted in c++, msdn, windows.


Firefox deleting a single site history you have visited

I came across this pretty cool feature on firefox 3.6. It helps to delete a single website you have visited. The difference here is that, in the previous versions, you couldn’t delete a particular website/domain you have visited. This used to be pretty annoying but with this feature you can do it. Here’s how you do it:

1) Goto History
2) Show all history
3) Click on a particular site you have visited
4) Right click and then select forget about this site.
5) This will delete all the history you have stored on that computer, for a single website or domain name only.

Posted in Uncategorized.

Tagged with .


Installed firefox 3.6 – check out its speed

firefox_speed

Posted in Uncategorized.

Tagged with .


Check out this site: www.downloadsquad.com

Posted in Uncategorized.


Reading a 64bit key from a 32bit application

The easiest way to do this would be to use the option KEY_ENUMERATE_SUB_KEYS when you open the registry key. This option would read both the 32bit and the 64bit registry keys.

Posted in c++, windows.


[VC compile error] uuid.lib : fatal error LNK1103: debugging information corrupt; recompile module

This happens usually because in your visual studio vc6 compiler options you would have set the library files path to “Microsoft platform SDKs” , which uses the newer library files. Goto the option again and then set to “Microsoft SDKs” which is set to older SDK. this will help to solve your problem.

Posted in c++, visual studio.


Google nexus phone video

Posted in Uncategorized.

Tagged with .


Starting chrome always in incognito mode.

Sometime you might be annoyed at the history of your web browsing being stored in chrome. I dont think there is a option in chrome not to store any history. You can either delete all hitory in chrome.

the best way would be to start chrome in incognito mode always. You can create a shortcut and out this command in the shortcut.
C:Documents and SettingsdarshanLocal SettingsApplication DataGoogleChromeApplicationchrome.exe –incognito
In this way you have the chrome starting in secret mode always.

Posted in Uncategorized.


GUI Handling: Right clicking and selecting an option for a icon on the windows taskbar

I almost gave up searching for this option when I was coding on something. I tried using spy++ and wininspector to do this. These were pretty helpful but not that I could get the end result.

Consider this scenario, you have a icon on the taskbar. You need to right click and select an element on the menu which pops up. Ok..you might think of using a spy++ to do this, but you will not able to get the correct command to click there. Dont try to hard on this. All the sequence of commands wont work.

A simple thing would be to search for this command —> WM_COMMAND in the logs that appear in spy++ or win inspector and note its control ID.

The control id is unique to each item on the pop up menu when you right click the icon.

Now search for the window, and get its handle. After you get its handle use the sendmessage to send a message to the icon.

SendMessage( h, WM_COMMAND, 0×8011(this is the control id in hexadecimal), (LPARAM)  0 );

This should solve your issue.

Posted in c++, windows.


how to run procmon as a guest/restricted user

The best way is to use runas command:
runas /user:test “C:\Users\test_restricted\Desktop\Procmon.exe”

Posted in Uncategorized.




Bad Behavior has blocked 17 access attempts in the last 7 days.