This is a tool I created to work around what I will define as bug-fix extortion. In my life I have a general purpose low wattage server. Even with it's low wattage it is still desirable to allow it to go to various sleep states or complete power down. As with many servers there is no monitor, also known as a headless machine. It is able to be woken remotely inside my LAN by the Wake-On-LAN functionality. It was my first time to use it, although I had been aware of it for years.
Wake-On-LAN (WoL) allows me to sit on my couch or at my desk and wake the server up, so the file shares become available and the daemon processes run to accept client input. However, there's a single snarl in the situation and that is achieving remote administration through VNC after the WoL wakes the machine up. The error when attempting the VNC is "SelectObject to CompatibleDC failed: The operation completed successfully (0)".
Some research into this problem gave me the following insight:
http://www.realvnc.com/pipermail/vnc-list/2006-April/054680.html
From: James Weatherall jnw "at" realvnc.com
Date: Wed, 19 Apr 2006 17:07:23 +0100
Hi there,
VNC Enterprise & Personal Editions 4.2 will include the fix
for this issue.
I'm afraid I don't have a timeframe for the fix making into
Free Edition at
present.
Regards,
Wez @ RealVNC Ltd.
Here we are now a few years later and the fix never made it into the Free Edition. While I like the product and would like to support the company, this is a fairly strange way to operate in my opinion. So, I made this tool to wake up the graphics adapter when a WoL event comes in. This tool lives with no UI other than the stuff you see in the service manager. It probably only works on Windows XP and I have no idea about installation with permissions less than administrator.
1. Go to the download page to download and save the zip package to your hard drive.
2. Unzip the package to where you'd like the executable to remain in your system. I put it in C:\Windows\system32, but it can probably go anywhere you have write permissions and expect to be present at boot up. I'd avoid any usb flash or external hard drives.
3. Run the RegisterDisp.bat by double clicking on it.
Once you have installed it, it will start running as a service and be set to run again each time you boot your machine. If you'd like to alter that then you can manage it through the Conrol Panel (Classic View) -> Administrative Tools -> Services and locating the DispWakeup in the list as shown in the image below. Right click it and select properties for any of the options you want to modify.
To uninstall you can run UnRegDisp.bat.
Could you maybe be a bit more regular with this blog? I have been coming back here every single day for the last year or so and there's not one freaking god-damned update until yesterday.
And I re-iterate my last comment how the quality of this blog just keeps going down.
I can't believe you wrote an entire Windows Service just to be able to make a point and poke fun at RealVNC. If you really needed this feature, you could have upgraded to the Enterprise Edition. If you worked out the cost in terms of amount of time spent versus writing the service and the upgrade cost, you probably would come out ahead if you just upgraded.
Loser.