Posts

Showing posts from 2007

COM attributes, C++, and MS's fail

Attributes... simplified programming model, hides the complexity of COM, allows easy specification without obscure syntax, must be a good idea, right? Nope, FAIL. The problem lies in the failure of documentation and ubiquitous support for the other MS libraries. Specifically, are you using MFC (and really, most native C++ Windows programmers probably are, duh)? Sorry, attributing breaks your application. Not that you could tell, since converting to attributed leaves all the other files in the project, and creates new hidden files with the current interfaces. Um... UTTER FAIL. Not to mention the attributes themselves. How do they work? Oh, don't worry about that. Where can I see the source? You can't, it's compiled into DLL's which inject it. How can I see what it's generating? Compile with a special flag, and look for the hidden, undocumented files it might generate. How can I debug issues? Um... online support forums maybe? UTTER FAIL. Nothing pisses off native dev...

Xtreme Toolkit's TaskPanel

So Codejock has done what I thought someone should do, make a generic, all Windows versions version of the Task Dialog. It's not perfect (points off for putting your copy of the structure definitions in effectively the global namespace), but it's pretty good.

Bootstrapper for installs is cool

This is cool: http://msdn.microsoft.com/msdnmag/issues/04/10/bootstrapper/ http://blogs.msdn.com/chrsmith/rss_tag_Bootstrapper+awesomeness.xml Basically, it's a installer builder for Visual Studio with which you can set dependencies on other modules, which are packaged for the bootstrapper (eg: versions of the .NET framework). When your installer runs, the bootstrapper will verify the installation of the component (including version) you need, and if it's not present, automatically download and install it, before your installer even runs. What's cool about it (versus just packaging in the MSI's for the dependent components) is that you don't bloat your installer very much (bootstrapper is about 500k), but you get virtually the same effect, due to auto-downloading. Very cool.

Some people are dumb

So the /. FotD is bashing on the MS proclamation that their vouchers for Novell to distribute linux do not entitle the redeemer to any software licensed under GPLv3. For reference, see: http://www.microsoft.com/presspass/misc/07-05statement.mspx http://linux.slashdot.org/article.pl?sid=07/07/06/1333257 Now for their part, MS is being fairly smart. The recognize that GPLv3 is crafted to screw them, and are trying to preemptively disclaim any distribution of GPLv3 code. Basically, if you get linux with a MS voucher, your not getting the right to use anything licensed under GPLv3; a perfectly valid condition to impose. Enter the dumb zealots, claiming that this is tantamount to MS declaring the law itself invalid by fiat. It's kinda like the fanatics who don't understand that their religion is opposed to killing people... have you guys even read the GPL, or is it just the magic anti-Microsoft golden idol in your minds? MS doesn't want to distribute GPLv3 code, cause GPLv3...

Breaking polymorphism with templates

Intriguing title, huh? So here's the issue. Say I want to have a collection of objects, each of which is an instance of a template class (with various template types). Not going to work, you say, cause each template typed version of the object is a different type, and you can't have a collection of different types, unless they are derived from a base type. Fine, no problem, I can have a non-templated base type as the pointer type for the list; something like this simplified example code. Now the fun starts... class CBaseClass { public:     virtual ~CBaseClass(); }; template class CSubClass : public CBaseClass { public:     TYPE m_tValue; }; Say I want to get the value from an element in the list, where the type of the value is the template type of the subclass of the actual object instance. Simple enough conceptually, but wait... there's an issue. Iterating the list give me pointers to the base class, and I need to call a method which is explicitl...

Microsoft API's blow sometimes

So I'm calling UpdateLayeredWindow to do transparency effects, and it's failing with no error code set. Turns out it seems to be an issue with running the app through Terminal Services. Would have been nice for Microsoft to actually produce a useful error code, like, say, I dunno, "this API is broken with Terminal Services cause our coders didn't finish it" or something. Kinda like the multi-threaded apartment version of the IShell interface in Windows XP (oops, we ran out of time, sorry). Seriously, people... documentation, it's what makes a platform usable for developers.