Wednesday, January 03, 2007

My Shares

I was back to my WIN32 programming days after a break. Reason being that I wanted to have an easy way of inserting a link to a local shared folder into the email message. For long I've been using a signature which contains only the NETBIOS machine name (these corporate machine names are long and difficult to remember) and would insert it and then complete the path by typing in the folder name. Wish I had a tray applet that would show the list of shared folders and allow me to copy the path to clipboard. Couldn't resist waiting more and after 2 hours of meddling around with MSDN help a tiny WTL app was up and running.
It was not very hard, but finding the right API's was a bit challenging. And then I was stuck at some conversion functions.
Here's are the main functions that I chose:
NetShareEnum - Gives the list of shared resources on a given machine
wcstombs - To convert wide str to mcbs (NetShareEnum returns wide str)
OpenClipboard, EmptyClipboard, SetClipboardData, CloseClipboard- For clipboard operations
GetAsyncKeyState - Status of shift key

Monday, January 01, 2007

Removing labels from VSS

If you had accidentally created a label for any items (file of directory), you can remove it by viewing the label from the item history, and deleting the label text. Close the dialog after confirmation and the label is removed. The changes would be affected globally irrespective of the item for which the label was modified.