In early 2000, Mike Woodring moved Heaven and Earth to write a tool that would inject a DLL into a process’s memory for purposes of finding the command line with which the process was launched. While hanging around Don and Tim this week, Don was all hot on WMI, so we fired it up in .NET and rebuilt Mike’s tool like so:
using System; using System.Management; class cmdline { staticvoidMain(string[] args) { if( args.Length != 1 ) { Console.WriteLine(“usage: cmdline <processId>“); return; }
ManagementObject obj = new ManagementObject(string.Format(“Win32_Process.Handle="{0}\“”, args[0])); Console.WriteLine(obj.Properties[“CommandLine”].Value); } }
This makes WMI pretty darn cool in my book. I’ll be reading Jon Fancey’s article on WMI + .NET in the latest MSDN Magazine.
BTW, I have to admit that I’m nowhere near as manly as Mike. I’ll take this sissy code any day. : )
For those folks asking, another drop of Genghis is on the way, which includes an HTML link class that handles links for you, a user-sizeable panel, a gradient progress bar, a completely revamped FileDocument and a host of fixes and enhancements, including stacking support and terminal server support for toast windows. However, before that can come, Mike Marshall, the Genghis build-master, stopped to email me about the impending arriving of his first child. Now *that’s* dedication! I doubt if I’d stop to email any of the folks in charge of the shared source projects I’m involved with on the way to the hospital… : )
Given Aaron’s wonderful set of .NETXML tools, I don’t know why Tony Malandain found my little xmlValid tool for checking XML well-formedness and schema validness, but he did and then added the ability to take XML input from stdin (he apparently uses it to check compressed SVG files).
What makes this kind of unusual is that I built this tool almost 2.5 years ago. In fact, it was the first .NET tool I posted on my site. Before that, it was all C++ and COM, although almost none of that has gone up since. It was kind of fun digging into that code again. I spent a bunch of time rearranging it to map more closely to my current .NET coding style not because it added any more functionality but because I couldn’t stand not to. This developer thing is just a sickness, isn’t it? : )
Plenty of folks have asked for updates to my IM client classes to support the new MSNP8 protocol, but only Robert M. Wagner Jr. made the changes and sent them to me. Thanks, Robert!
I used to brag that, unlike most C++ programmers, I learned C++ directly from the CFRONT 2.0 release notes and not from Stanley Lippman (his C++ Primer is a key part of C++ canon law). That boast came to a screeching halt when I had Stan in one of my COM courses and he revealed that he’d written the CFRONT 2.0 release notes.
Here. I noticed that Stephane Rodriguez put an SDI and MDI wizard up on CodeProject. I've been *dying* for those forever, but I couldn't get his to work. Anyone come up with a simplified set up for them? Anyone interested in porting them to Genghis?