KnownFolders, Vista and managed code

Still need to polish it but this should be in the Windwos SDK SAmples VistaBridge in the future. Comments are welcomed! namespace VistaBridge.Shell { using System; using System.Diagnostics; using System.Runtime.InteropServices;   public enum KnownFolderFindMode : int {    ExactMatch = 0,    NearestParentMatch = ExactMatch + 1 };   public class KnownFolders {    [Guid(“8BE2D872-86AA-4d47-B776-32CCA40C7018”),…

0

Call me crazy but one of the first thing I run after installing Vista on a box is…

mklink /J %SystemDrive%\Contacts “%USERPROFILE%\Contacts”mklink /J %SystemDrive%\Desktop “%USERPROFILE%\Desktop”mklink /J %SystemDrive%\Documents “%USERPROFILE%\Documents”mklink /J %SystemDrive%\Downloads “%USERPROFILE%\Downloads”mklink /J %SystemDrive%\Tools “%USERPROFILE%\Downloads\Tools”mklink /J %SystemDrive%\Favorites “%USERPROFILE%\Favorites”mklink /J %SystemDrive%\Music “%USERPROFILE%\Music”mklink /J %SystemDrive%\Pictures “%USERPROFILE%\Pictures”mklink /J “%SystemDrive%\Saved Games” “%USERPROFILE%\Saved Games”mklink /J %SystemDrive%\Searches “%USERPROFILE%\Searches”mklink /J %SystemDrive%\Videos “%USERPROFILE%\Videos”mklink /J %SystemDrive%\Projects “%USERPROFILE%\Documents\Visual Studio 2005\Projects”mklink /J %SystemDrive%\SDK “%ProgramFiles%\Microsoft SDKs\Windows\v6.0\” I wish PowerShell would have such a command and not…

3

GOOD BYE LENIN!

Just spent two wonderful hours watching that movie. I’m sure I missed a lot of the culture specific humour and having some of the same tunes as Le fabuleux destin d’Amélie Poulain movie was a small mistake but still, it was very nice.

2

DJ Dolores: que legal!

I don’t listen enough to KEXP! Today around 1:30, I listened to a very nice tune while driving but I don’t manage to get the title nor the interpreter at the end of it. Back home, I jump on the KEXP site , go to their amazing playlist section and find it: Azougue by DJ Dolores (aka Helder Aragao). That…

0

My PowerShell host prompt

Looking at others code is the best way to learn. I looked at some and modified it, adding the environment variables for the Windows SDK 6.0 (for my needs). Here it is: $env:MSSdk = “C:\Program Files\Microsoft SDKs\Windows\v6.0” $env:SdkTools =  “$env:MSSdk\Bin” $env:OSLibraries =  “$env:MSSdk\Lib” $env:OSIncludes = “$env:MSSdk\Include;$env:MSSdk\Include\gl” $env:VCTools =  “$env:MSSdk\VC\Bin” $env:VCLibraries = “$env:MSSdk\VC\Lib” $env:VCIncludes = “$env:MSSdk\VC\Include;$env:MSSdk\VC\Include\Sys”…

0

Throw If Fails

I like to use this when writting sample code: inline void Tif(HRESULT hResult) {    if FAILED(hResult) {       throw _com_error(hResult);    } }   inline void Tif(bool succeeded) {    if (!succeeded) {       DWORD lastError = GetLastError();       throw win32_exception(lastError);    } }   inline void Tif(BOOL succeeded) {    Tif(succeeded != FALSE);…

1