Linux people who have to work in Windows are often talking about the basic tools it has which are absent from Microsoft’s product. While recent developments of Windows are slowly catching up with variously featured versions of whoami, ln, cat, grep, ps and chmod, one app that’s so far evaded the conversion is chroot. Whatever the reason may be for its absence, it is definitely not because there’s is no support mechanism for it.
January 17, 2012
Chroot-ing in Windows – As Easy as A:, B:, C:…
January 3, 2012
Bagging Some Property – Getting A User’s Picture Tile
It doesn’t sound like it should be so hard. I mean, the shell has managed to produce it every time you’ve logged on since Windows XP. MSDN even has a page dedicated to user profiles that includes a section on where it is and how its treated. It details that the users picture lives in their temp directory, except for most times when it doesn’t. The picture will turn up if you open the User Account control panel, but if you’re trying to grab it programatically, asking the user to open Control Panel and all that or even worse, opening it from your own code and killing the window just as quick aren’t fantastic solutions.
July 18, 2011
Hookers – Underneath the Sheets
We all need ideas. Whether you’ve just finished something, or are getting a little bit bored with your current project you can’t help but let your mind drift to the next cool thing you’ll create. Sometimes the ideas come thick and fast, other times they’re like gold dust. When I’m in the second camp, and reading the various boards I read, I will quite happily steal other peoples.
Follow MsgHookLister on a journey from client request, to fiddling with Windows bits before returning information on active thread and global hooks back to the client who asked for it.
May 7, 2011
DLL – Demystifying Loader Lapses
DLL hell isn’t just the name given to managing monstrous dependency chains. It’s also the name given to the phenomenon of pulling your hair out because LoadLibrary is returning NULL or because you dotNet app is throwing lots of System.DllNotFoundExceptions. The usual statement Windows gives as witness to these crimes is ‘Module not found’ as if it were some blind referee or umpire giving a call against the local sports team, but like Bud Selig calling the All-Star game a tie, Windows levels the playing field by housing a certain tool you can leverage. And without having to write any more code in investigative anger or download anything too.
March 2, 2011
U-A-Ceen Nothing Yet
Detecting whether UAC is enabled or not is something I’ve never needed to do. I can’t really see how it can affect anything you architect one way or another but nevertheless, some people think it’s necessary and nice to know.
January 29, 2011
WMI’m Going Speed Dating
There’s tonnes of example on how to use SWbemDateTime to convert from FILETIME’s or CDates in VBScript, yet I couldn’t find any for C++. So here’s how…
January 17, 2011
Undefined Behaviour – Star Trek Style!?
We all know that stepping over array bounds is easily managed in C and C++. So much so that the C standard library has a function, gets, which may as well be named ’cause_buffer_overflow’. The consequences of overflowing a buffer are also understood, pretty much anything can happen from nothing to corrupted variables to flat out crashing. To demonstrate just how serious this can be, I’d like to relay something based on a true story.
December 21, 2010
Rooting Windows
What does every self respecting *nix person pine for when they’re using Windows? If you said su or sudo, then congratulations. Make someone you likes’ festive season by making their Windows experience slightly more like their *nix one by implementing sudo, in 1 line of code.
December 16, 2010
7 Questionably Useful Things Visual Studio Can Do
Everybody likes to find out new stuff about tools they use. Fortunately, one of our frequently used tools has lots of undocumented and rarely used switches and behaviour that makes it a great candidate for fun discoveries of questionable value. So without further ado, here are seven things that the Visual Studio C++ compiler lets […]
October 21, 2010
Visual Studio Goes Back to the Future
They said VS2008 couldn’t use C++0x, they were wrong.