Monthly Archives: September 2006

Movie Maker’s downfall

I put together a 15 minute compilation video in Windows Movie Maker. Now, WMM is okay… it’s free with XP and does the job of a basic movie editor quite well. Well, as long as you’re happy with it only spitting out WMV. Which I’m not overjoyed about.

WMM’s big problem is it doesn’t like MPEGs. Oh sure, it’ll work with them, but it doesn’t like them. I can’t find any other explanation for how slow it gets when dealing with them. Once you have a few MPEGs in your project, you’ll find it takes an agonisingly long time to re-open the project. Seriously, by the time I got finished I had 15 minute long project with a couple of dozen MPEG-1 clips, and it literally took two hours of “checking project files” before I could do anything.

I thought it was some kind of hideous mistake the first time it happened, and cancelled and rebooted the machine. But it wasn’t. I ended up doing some research (on another PC, since that one was busy burning up CPU and disk cycles) and the word on the forums is that it just doesn’t like MPEGs. Throw a bunch of AVI or WMV videos at it, and it’s fine.

Well, I say fine, but in fact WMM regularly freezes up. My kids describe it as “going out to lunch” and it’s a source of constant frustration.

As it happens I’ve just bought Pinnacle Studio Plus version 10 ($189 via Harris Technology, and widely available elsewhere), something of an upgrade from both WMM and the Pinnacle Studio Quickstart 9 I got with the TV tuner card I just bought. Australian purchases of Studio Plus (and a couple of other Pinnacle products) will get a bonus USB TV tuner if they buy before the end of the year. (Yes, this is a bummer for me. Maybe I’ll put one of them on eBay.) So hopefully the next video project won’t be subject to WMM’s vagaries.

Other lessons: Google Video suggests 640 x 480 is the ideal resolution for uploads. But this resulted in a file close to 100Mb long, which not only took ages to upload, but was also sluggish on playback. Eventually I downsized it to 320×240, and it’s much faster in both cases, though quite pixellated. The default Google player (embedded in a web page) is actually 400×300, though I’m not sure this is actually supported in an AVI or WMV file, since Tmpgenc refused to resize to that, saying that 300 isn’t divisible by 16.

More on Studio Plus when I actually get around to installing and using it.

QueryInterface for interface xxx.yyy failed

My .NET web service – which wraps some legacy COM objects – wasn’t working. Development under VS2003 using .NET 1.1 worked fine in my dev environment, but in test env it just kept whinging:

InvalidCastException: QueryInterface for interface xxx.yyy failed

That’s a pretty basic failure – it couldn’t even obtain a xxx.yyy interface from the COM object. I figured it was a IIS security problem: a .NET desktop app using the same set of COM libraries worked fine.

The thing was, when I set the user account to operate annoymous web users under to local Administrator, it still didn’t help. Perhaps, I thought, this isn’t a permissions problem. Web users are now, after all, Gods.

Perhaps, Glen suggested, I was running .NET 2.0 and .NET 1.1 simultaneously?


It turns out missing part was the

<identity impersonate="true" />

line out of the web.config file in the directory in which my webservice lived. Also, the lack of a web.config file in the directory in which my webservice lived caused a little bit of a problem. I didn’t realise that at the time, but found out that the impersonate setting can also go in one’s machine.config file also – but that has global implications. So I stepped back to putting it in my web service’s own web.config file.

Why does the Web Setup Project fail to include important little files, like my .asmx and web.config files? What is the point in having a wizard that just makes a installer that doesn’t install a working system? And the dependancies tree! God, just let me specify – or figure it out for yourself – the order in which to register the COM objects.

But guess what? All of that is unnecessary, if only your Installer derieved MyEventLogInstaller is set up thusly:

	public class MyEventLogInstaller : Installer
		private EventLogInstaller myEventLogInstaller;
		public MyEventLogInstaller()
			//Create Instance of EventLogInstaller
			myEventLogInstaller = new EventLogInstaller();
			// Set the Source of Event Log, to be created.
			myEventLogInstaller.Source = "Josh's Web Service";
			// Set the Log that source is created in
			myEventLogInstaller.Log = "Application";
			// Add myEventLogInstaller to the Installers Collection.

– with the RunInstallerAttribute being the super important part. Or perhaps it should read RunInstaller. But don’t worry, neither of them actually cause the installer to run them. As such, all you need do is issue the command

installutil "MyStupidWebService.dll"

after the installation program is done and you’ll be cooking with gas.

Simple, huh? No need for that nasty web.config file after all! Especially with it impersonating a dud security context.

Oh! And remember to issue a regsvr32 comcomponent.dll command also!

A dead giveaway that you haven’t run installutil is if you get an exception like this:

System.TypeInitializationException: The type initializer for "MyStupidWebService.Global" threw an exception. ---> 
System.InvalidOperationException: Cannot open log for source {0}. You may not have write access. ---> 
System.ComponentModel.Win32Exception: Access is denied
   --- End of inner exception stack trace ---
   at System.Diagnostics.EventLog.OpenForWrite()
   at System.Diagnostics.EventLog.WriteEvent(Int32 eventID, Int16 category, EventLogEntryType type, String[] strings, Byte[] rawData)
   at System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData)
   at System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType type, Int32 eventID, Int16 category)
   at System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType type, Int32 eventID)
   at System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType type)

because installutil will create an entry for Event Logging, if you’ve developed the appropriate installer. And because the person running installutil has decent privileges, it will actually work, as opposed to your web service trying to do it when it’s running in a securely locked down account.

Broken links

A major web site of my acquaintance just got a makeover.

I’m not going to deny it was due for a revamp. Or that (eventually, when it’s all working) the new functionality will be worthwhile.

But apart from the list of data errors (which is as long as your arm), and the functionality they should be providing in this day and age but aren’t, they’ve also changed every single page address, apart from the home page, and so they’re writing to people who link to them to ask them to change hyperlinks.

I’m really trying not to lose my temper and say to them:

“Well WTF did you let your programmers change your URLs in the first place?”


“WTF don’t you get your programmers to set up page forwarding so all the old links work?”

I mean really… it’s like changing all the internal phone numbers and telling everybody to ring the switchboard.

Oh, I should mention that this is a public transport information site, with timetables… they have partially-numeric URLs that bear no resemblance to the route numbers.

Releases and recalls

Another major release of iTunes, another batch of complaints about glitches and poor performance. I’ll wait for an x.02 or x.03 release.

Mind you it could be worse… a recall of Segways cites random reversing. At least if iTunes skips a track you’re not risking your life.

C# module entry point

I’ve made a C# Web Service. Now I need a deployment project for my Web Service. After installing, it turns out that my Web Service needs to set the security on a registry key to allow the ASPNET user Full Control. Fine. I’ll need some sort of hand-written code to do that, because security is something the installer doesn’t cover. Stumbling around the help and web, I find I need to View | Editor | Custom Actions to create a Custom Action (right-click On the Install event/action, select Primary Output from JoshsPrimaryOutput; on the properties of this new Custom Action set InstallerClass to false and set EntryPoint to JoshsEntryPointFunction). Build.

I get the error:

Unspecified module entry point for custom action ‘<name>’ in JoshsPrimaryOutput.dll

Which the help… helpfully tells me to fix it I need to

…specify a valid entry point within the DLL.

Fine, makes sense. I’m not stoopid, I’ve been a C++/Windows programmer for a very long time. I know DLLs, I know entry points, this holds no fear for me. C# has DLLimport. It seems to be missing DLLexport. I’ve just spent several hours searching online help and the web for an answer, so now I turn to you, our esteemed readers.

How do I specify a module entry point in C#?

Basic Windows setup

I got a “new” secondhand PC for my girlfriend. An off-cast from a friend, so obviously it’s not the latest and greatest, but it’s faster than the box she has now. 500Mhz P3, 192Mb, about 40Gb space over two hard drives. Might see if I can find some more memory for it, but I can live with that. It was running Win98 SE, and was overdue for a rebuild.

Wordprocessing and web were the main requirements. An old computer and basic requirements call for basic software, and old versions in some cases.

So, here’s the setup I did on it:

Found a spare Win2K licence, booted up using the CD and wiped the disks. Installed.

It picked up all the hardware no problems, but later I found it didn’t shut down automatically (went to “It is safe” instead). Made a note to fix that later.

Installed Win2K SP4 and the post-SP4 rollup (aka SP4 and a half). And IE6 SP1.

Then went to Windows Update and got it to grab everything going; well, at least the security stuff — don’t really want the latest bloated MediaPlayer. 45 updates and many minutes later, it was okay. Except for one thing, which I came back to later.

Found a spare Office licence (XP) and installed Word, Powerpoint and Excel. She’s not a geek, so she didn’t need Access or Frontpage, and her email is all web-based, so I didn’t bother with Outlook. Went through the custom setup to ensure minimum bloat (eg no VBA help, obscure file conversion, speech input, that kind of thing).

Put on Office XP SP3, then went to Office Update to see what was going. Stupid thing wanted to install patches for Visio. Switched them off.

Grabbed the typical extras useful for web browsing: Acrobat Reader 5.05 (just before they went stupid with bloat; still obtainable from Flash Player (latest). Quicktime Alternative. Real Alternative. And Google Toolbar for popup blocking.

Also plonked on the latest DirectX. Winzip. AVG Free. This PC will live behind a NAT router/firewall, so I’m not going to bother with a firewall.

Put a copy of Mame32 on there for some light entertainment.

Created a logon for her, and a logon for me. Standard users of course; not Admin. Verified everything works under those new users.

Used Ed Bott’s method for securing IE: Once the ActiveX controls you want are in place, go into the security settings and disable Active X Signed downloads. You have to do this for each individual user, but it solves a major gripe of mine; that IE can install any old crap provided it’s signed.

Went through the services and disabled the extraneous stuff, like Messenger. Likewise checked for any other little applets that decided they should run in the background. Most of them aren’t needed.

Turned on automatic Windows updates. One problem: it insisted one patch needed installing, but each time it claimed it had worked, it hadn’t. Next time it looked, it still needed to be installed. Downloading and running the patch manually showed it had been superseded by something else… but Windows Update apparently couldn’t figure that out. Eventually I solved it by going into the Windows Updates web site and manually telling it to ignore this patch. (Thanks Malcolm for the help on this.)

As for the “Safe to turn off” instead of turning itself off, that was solved by going into the Control Panel power options and turning on APM.

Am considering Paint.Net, but then I’d have to put the Dot Net Framework on it as well. Don’t want to over-burden the poor box.

Ditto Firefox — IE has the advantage of virtually sitting in memory most of the time. Firefox is great on fast machines, but is an extra load on slow ones — as I write this, Firefox on my PC is sitting on more than 70Mb of memory. Sure, I could get Opera or whatever, but if IE is relatively safe (patched, unable to download more ActiveX, most popups blocked, running under non-Admin users, and not being used by idiots), why bother?

Considering adding Java (my Internet banking needed it until very recently, but they just switched to pure HTML, woo hoo!) and DivX.

Anything else I’ve missed before I hand it over? Will it be secure enough?

Site maintenance

NOW HEAR THIS, all contributors and readers:

The site will be moving servers. This is expected to happen on Wednesday afternoon. During the move, we should remain reachable, but interactive features (that means Comments) will be turned off to avoid data loss. They’ll come back on as re-delegation to the new server reaches completion.

Contributors should avoid posting their brilliant and lengthy diatribes until it’s all over.

Wednesday 9:40pm. Well, that wasn’t entirely without its challenges. But we should be okay now.

Citylink goes down

CricketersA power outage resulted in a shutdown of Melbourne’s CityLink tollway tunnels today around 9am, for several hours. Apart from the obvious electronic signs that rely on power, I assume it affected lighting and exhaust pumps.

According to the Herald-Sun, Citylink spokeswoman Jean Ker Walsh said: “We have rebooted the systems that allow our operators to manage the tunnels safely.” So there you go. They rebooted the tunnel. Ms Ker Walsh also mentioned on the evening TV news that they’d be upgrading their UPS!

Interestingly on the Herald-Sun’s RSS feed, this story came through in the early afternoon. The feed claimed there was an attached picture, but it turned out not to be a picture of gridlocked cars or an empty motorway — rather it seemed to be a picture of cricket players.

The other effect of the shutdown was the Citylink web site also appeared to lose power… or perhaps it was just snowed under by the traffic. Like some other transport providers, they didn’t cope well under stress.

The Vicroads web site kept running under the load, though apart from showing slow traffic in the area, didn’t contain specific information relevant to motorists who might be caught there. I assume the information for radio reports and the like are gathered by phone, not off the web sites.

Scott Meyers’ five top fives – EVER

I’ve been waiting for the full set to be published, before dumping ’em here:

Headlines via PHP/RSS

This utterly rocks, and I can’t believe I didn’t go looking for something like it before: MagpieRSS lets you show RSS headlines on a PHP page. I’m using it on my old page to show the latest headlines from my diary and the site’s News and Guide to Australia pages (which all run WordPress). It includes caching so you won’t burn up your (or anybody else’s) bandwidth by grabbing the feed continually.


Now this is handy: Geekbench, a cross-platform (Mac OS-X, Windows and Linux, that is) benchmark system. It’s written in platform-neutral C++.

My aging cobbled-together PC (1.7 Ghz Celeron) returns an overall score of 73.6.

My newish cheap but cheerful PC (3 GHz P4) returns an overall score of: 137.4

Windows 2000 within Virtual PC on the above: 103.5 (I note it was only configured for 128Mb of “RAM”, even though Geekbench claims to need 256Mb.)

In all cases I shut down other applications, but obviously the figures would be subject to whatever background services were grabbing CPU time.