Visual C++ 6.0 is getting rather dated at this point, and as Microsoft is increasingly dropping support for it, finding the right versions of SDKs that will work with VC6 is rather hard. MSDN Library is out past about October 2000 or so. You can get pretty far with the Platform SDK if you don't link with the new libs, which shouldn't be a problem if you use GetProcAddress() for compatibility like a good Windows programmer, but you need a fairly old DirectX SDK if you are doing DX stuff. And the end of the line is approaching fast.
Visual Studio 2005 is The New Way(tm) for both native and managed development, and I had hoped that switching to Microsoft's latest and greatest would solve the SDK madness for a while. Sadly, this is not the case. The Platform SDK that comes with Visual Studio 2005 is a little bit old, so if you install only the DirectX SDK you'll still land in the twilight zone where neither the PSDK nor the DXSDK has the DirectShow headers and libs. Basically, if you're doing DirectShow development, you'll still need to install and hook up the latest PSDK.(Read more....)
Sounds similar to and about as good of a name as Intel's "Viiv." It seems that X is out and ii is in. Maybe I should call my program ViiDub.
What's with the names lately? The cool-sounding Windows Longhorn became the lame Windows Vista, and although I usually dislike Macintoshes with a passion, I thought that PowerBook was a pretty good brand name, as opposed to the bland MacBook Pro.(Read more....)
Anyone who's been coding C/C++ long enough in a group environment knows that there are two topics that should be treated like kryptonite:
- tabbing (hard tabs vs. soft tabs, a.k.a spaces, and how big)
- when and where to put braces
If you're smart, you try not to bring these up for discussion unless you have a disaster looming or you have a more amiable/senior group than average. I'm not kidding when I say this. If you get a group of random C/C++ programmers together into a team and bring up one of these issues you're guaranteed to have a long, protracted, bloody argument on your hands. You'll have people arguing about which one is more productive, why one style is better than the other, how everything should be changed to use one of them, why the other style is bad, enforcing style guidelines, etc. And it'll go on, and on, and on.
It's not that people want anarchy -- most will agree on the benefits of consistency -- but the vehement arguments for choosing one style over another can be awe-inspiring.
Now, after hearing all of the arguments, you'll probably come out thinking that one style is indeed superior over the other, for various scientific-sounding reasons. Let me share a secret with you: they're all largely BS. The better and more experienced a programmer is, the more likely he'll be able to read and write a wide variety of styles. The mark of an inexperienced programmer is one who believes that he truly will not be able to write and maintain a working line of code unless the brace is positioned on line 7, column 17. The reason for preferring a particular style? Most likely just either (a) what he learned, or (b) what he's been using (or forced to use) in the past few years. That's basically it.
I won't claim to have transcended this phenomenon myself; I use the style that I do largely just because I learned C from K&R second edition. I have evolved it slightly over time, though.(Read more....)
Public service announcement:
If you are writing TARGA image files with run-length encoding, you should be aware that according to the official Truevision specification, it is not legal in the TARGA format to produce a run that spans scanlines. The TARGA decoder in current versions of VirtualDub strictly validates the RLE data and will flag files with RLE decoding errors if runs spanning scanlines are detected. Unfortunately, many image processing applications do not enforce this restriction and will accept such invalid files, and there are some programs out there that generate them. As much as I hate to do this, I'll probably be tweaking the TARGA decoder in the next version to allow runs that span scanlines, and probably without the evil warning that I usually do (since it's hard to do so with image import).
So, if you're making a TARGA encoder, please make sure you are not generating invalid RLE runs, and if you're making a TARGA decoder, be aware that you're going to see those in the wild, despite what the spec says.
To cause a stack overflow in Windows XP Notepad:
- Find and install two DirectShow audio or video playback effect filters, and set both of them to automatically activate in Windows Media Player.
- Start Notepad, and choose File > Open.
- Change the file filter to All Files.
- Hover over a video file.
This crash occurs because the standard Windows Explorer-based file dialog tries to use DirectShow to determine video file specific information for the video file using DirectShow, and because of the lame way in which some DirectShow filters force themselves into the filter graph created by Windows Media Player, which as a side effect can screw up other programs that use DirectShow. If you install DirectShow filters that have such an "auto-enable on playback" option, please leave it off when using other audio/video programs that may use DirectShow, such as video capture applications.(Read more....)