Wednesday, March 28, 2007

Fix: Regsvr32 error "The specified module could not be found"

This morning, a tester to whom I had provided a COM .dll file with some extra logging to drop into his installation of one of our products reported to me that he was getting this error when trying to register the .dll on his machine using regsvr32: LoadLibrary([Filename.dll]) failed - The specified module could not be found. I re-checked, and the .dll file I had sent did register properly with regsvr32 on my own machine.

I investigated, and Google Groups helped me find the solution in a microsoft.public.win32.programmer.ole thread. The problem was the .dll file I had built was built in Visual C++ 6 in "debug" mode .dll; the "debug".dll (unbeknownst to me at thetime) had extra .dll dependencies which were present on my machine, but not on the tester's machine.

The solution was to build the .dll in "release" mode instead.

Google also turned up a helpful article which lists (1) "The name of the COM object is wrong" and (2) "The COM object requires another library which is missing" as possible causes of the "The specified module could not be found" regsvr32 error. The article suggests using the Sysinternals Filemon utility to determine which .dll file(s) are missing.

Tuesday, March 20, 2007

At Wit's End with Wii Wireless

A couple of weeks ago, I snagged a Nintendo Wii on a Sunday morning from a Target in my area that had gotten a shipment during the week and had released them for sale as their new ad flyer featuring the Wii came out that Sunday.

As I've previously posted, I have a Linksys BEFW11S4 wireless router, hardware revision version 4.

When I initially set up the Wii for wireless connectivity with the router, it worked like a charm. I was able to connect, and the various online functionality -- the store, news, weather, web browsing, and the "Everybody Votes" application -- all worked just fine.

However, the next day, the Wii reported that it was unable to connect to the Internet. I reset the router (by disconnecting it from wall power for a couple of seconds and then plugging it back in), and the Wii was once again able to connect successfully.

I knew to try resetting the router because I recognized the behavior as the same as what my TiVo has been exhibiting -- the TiVo will work normally for about a week, but then report that TV program data is low because it hasn't been able to successfully connect to the server, and I'll need to reset the router to get it to connect successfully again.

This problem hadn't been terribly annoying when just the TiVo was affected, since it wasn't too bad to just briefly pull the plug on the router once a week or so (since the TiVo is able to get TV program data for about a week in advance each time it connects). With the Wii, though, it will usually only go about half a day or so before it will lose the wireless connection and be unable to reconnect; this means that pretty much any time I want to use any of the online functionality of the Wii, I need to run upstairs to my office and pull the plug on the router first. And even then, the Wii takes longer than it should to display the news, since it didn't have a chance to download it in the background earlier while the system was idle via the "WiiConnect24" feature, and instead needs to download it on-the-fly. Annoying!

My desktop PCs, which are connected to the router via wired connections, aren't affected by this issue. Further, although I use my PDA's wireless connection functionality at home only infrequently, I've also never observed it be affected by the issue; the PDA seems to be able to connect with no trouble, even at times when the Wii won't connect.

The problem does seem to be with the router as opposed to with the Wii, since the TiVo is affected by the same problem.

It's a frustrating problem to troubleshoot, since each time I change a setting on my router to try and address the problem, I need to wait at least half a day before the Wii's connection will fail again (and thus establish that the attempted fix didn't work).

I've tried the following steps so far to fix the problem, one at a time; none have been successful so far:

  • Assigned the Wii a fixed IP address (and DHCP server IPs) rather than having it pick up an IP via DHCP.
  • Changed the broadcast channel of the router. (Tried channels 1, 2, 6, and 11).
  • Disabled the WEP security on the router. (Turned it back on afterwards after this didn't help.)
  • Disabled restriction of clients permitted to connect based on the client MAC address. (Re-enabled this after it didn't help.)
  • Reverted the firmware from 1.52.02 (the latest version) back to 1.50.14, after reading online about people having (unrelated) problems with the 1.52.02 firmware.
  • Changed the router's "Internet Connection Type" setting from "Connect on Demand" to "Keep Alive", thinking that maybe if my router's DHCP IP address lease from my ISP had expired, then the wireless connection from the Wii wasn't for whatever reason triggering the router to request a new IP, and that this setting change might trigger the router to always make sure that it had a current IP.
Unfortunately, none of these attempted solutions have had any impact on the problematic behavior. (After I applied the firmware version downgrade, I thought that might have done the trick since the Wii behaved itself for a little over a day after that, but the problem subsequently returned, just as before.)

I also haven't been able to find anything about this specific problem by searching around online. I've seen lots of posts about problems where people can't get the wireless connection to work at all, or where specific areas of functionality (like the online store) won't work, but no posts about this type of problem where the connection just seems to expire or time out after several hours.

At this point I feel like my best option to address the problem is to just pick up a new router, but I hesitate to throw $50 at the problem to fix it, since it really is just an annoyance.

If anyone knows of a fix for this issue, or even just has a suggestion for something else to try that might fix the problem, by all means please let me know! I'll update this post if I ever do come up with a solution for this issue.

Update 5/4/2007: Everything is working once again now! The Wii and the Tivo are now able to connect to the Internet over the wireless connection on a daily basis with no problem. So what did I change?

Nothing!... except that I left the BEFW11S4 router powered off for about 9 days straight while my family and I were away from home on vacation! When I returned and powered the router back up, everything started working fine. Prior to that, I had always had the router plugged in around the clock (except when I'd unplug it for a few seconds at a time to get the Wii and Tivo connectivity temporarily working again).

So if you're having this problem and have tried everything else, you could try unplugging your router for a while, perhaps overnight, or longer if you can get away with it. I'm not sure why this solution worked in my case -- maybe some hardware component in the router had overheated and needed some time unplugged to cool down? -- but I'm happy that things are working once again!

Thursday, March 01, 2007

Possible fix: IE7 won't show Favicon

I ran into a problem this morning where my install of Internet Explorer 7 was refusing to show the new favicon that I had dropped into the root directory of the website on my local IIS 5 installation for web pages hosted on the server. (Previously, the site had been running without any favicon.)

(A "favicon" is the icon image that gets displayed in the browser's address bar and as the bookmark icon, among other places, for websites that are designed to take advantage of that functionality. For example, the University of Michigan site uses a maize-and-blue "M" icon as the favicon. Note that in IE6, you need to bookmark a site and load that site back from the bookmark before the favicon will display in the address bar.)

Although all the reading I had done suggested that IE7 has full support for favicons, the new icon wasn't being displayed for any of the pages on my site; IE7 would instead just show the generic "IE document" icon. The icon did display correctly in Firefox, and also in another copy of IE on a different machine. Looking at the web server's IIS log, I could see that IE7 wasn't even attempting to request the favicon.ico file from the server.

I tried some simple workarounds to try and trigger IE7 to request the new icon, such as clearing IE's temporary internet files and re-bookmarking the web site, but didn't have any luck. And I could see that my IE7's support for favicons wasn't totally broken, as other sites in my bookmarks (favorites) list did still correctly display their favicons.

After spending a fair amount of time researching the problem across various websites and newsgroup postings, I finally came across a suggested workaround/solution at Wickham's XHTML & CSS tutorial (thanks Wickham!) that ended up fixing the problem for me. The workaround was to clear my IE7 browsing history. (Ctrl+H to bring up the History panel, then select each of the top-level items and delete them with the Delete key).

After clearing my IE history and closing and reopening the browser window, the favicon finally did display properly.

I'm unable to reproduce the issue now; my copy of IE7 is now correctly immediately picking up changes when I remove the favicon.ico file or drop a different favicon.ico into place, so I can't be certain that deleting the IE7 history (which admittedly seems like an odd solution) was what actually fixed the problem. Still, I'm posting this here in hopes that the workaround of clearing IE7's browsing history might be helpful to anyone else who is having a similar problem getting IE7 to properly show a particular website's favicon.

Update 3/7/2007: Jeff Davis ("jeffdav") from the Microsoft Internet Explorer team has posted to his blog a troubleshooting guide for favicons in IE7. It actually does mention clearing browsing history as a possible fix for favicons not showing up as expected. Go check it out if you're having trouble with favicons in IE7! (Thanks for the info, Jeff!)