Archive for the 'Windows' Category

April 14th 2008

Taglib Property Handler

I’ve recently released, via. Sourceforge, an alpha of my Taglib Property Handler. It allows Windows (Explorer, Search, etc.) to view the metadata that exists in a variety of audio formats.

Taglib supports (so far) ogg (vorbis), flac, oga, mpc, wv, spx, tta, mp3 and wma. The last two have some support in Windows, however, support for id3v2.4 in mp3 files is lacking.

Currently, it works best under Vista (either 32-bit or 64-bit). XP (even with Windows Desktop Search installed) seems not to be interested in the properties I have to offer. The installer (intentionally) completely does not work under XP.

Any comments welcome, but this is an alpha, and, even though there is (nearly) no risk to your files or your system stability, it’s possible that something is horribly broken. :)

No Comments yet »

February 14th 2008

Command-Not-Found on Windows

(Okay, not quite.)

After some posers started duplicating the functionality of the Ubuntu command-not-found package, I thought I may as well have a go on a sensible OS.

Unfortunately for me, it turns out that Windows CMD doesn’t offer, as such, a function that’s run when a command isn’t found, so I had to add my own (everyone loves screenshots of text, right?):

My beautiful assembly defeating Ollydbg's highly competent analysis

For those of you who can’t read my beautiful hand-coded assembler, when a command isn’t found, my patched cmd.exe will now attempt to load “cnf.dll” from the system path, and pass the command-line to a function, imaginatively named cnf, in that dll.

Stage two, obviously, is to get some kind of useful reply…


// cl /Fecnf.dll /EHsc cnf.cpp /link /dll /dynamicbase /subsystem:console
#define UNICODE
#include <iostream>

extern "C" { __declspec(dllexport) void __stdcall cnf(const wchar_t*); }

using std::wcout; using std::endl;

void __stdcall cnf(const wchar_t* command)
{
wcout << L"I'm sorry, it looks like you tried to call ``" << command << "'', but the command doesn't exist!" << endl << endl;
wcout << L"Did you want to try /your mother/ instead?" << endl;
}

I started writing a loader that’d apply the patch on-the-fly/to all existing instances of cmd, but I kind of ran out of care (it should be safe, it’s about a sixty-byte patch). If anyone can think of any actual applications of this…

3 Comments »

December 18th 2007

Escape the black-screen in Vista.

I’ve used this so many times today, I just have to share it.

Occasionally, when tabbing out of legacy games/SDL/dosbox/etc. under Vista (on my machine? New in Vista sp1 beta? With the beta nVidia drivers?), the screen will go completely black, but everything underneath will continue working, the mouse cursor will continue to move and change.

Ctrl+shift+esc (show task-manager), start+d (show desktop) and the usual set of keys don’t make the black go away, nor does Ctrl+alt+delete.

The trick is to lock the machine (start+L), the screen will remain black, it’s useful to have sound on at this point to ensure that it actually locked (ie. you aren’t about to type your password into IRC :) ) and log back in again. Everything will return to normal. I have no idea why this fixes it. :)

1 Comment »

April 13th 2007

C# + DWM -> pretty!

I was reading a nice, if slightly dated, set of articles about the new features in Windows Vista, including ars technica’s rundown. This article mentions that not much of the functionality avaliable in the Desktop Window Manager (Aero to everyone else) is going to be exposed to third parties, which I think it a great shame.

However, quick investigation reveals that, at least, the thumbnaling stuff has an API.

B#’s blog shows how to get at the DWM previews in .NET, and the MSDN magazine shows how to create pure glass windows.

A quick combination (and about an hour trying to work out a decent layout algorithm) gives:

I’ve actually put a FDWMlist.net binary (sig) up, for once, even though it’s generally worse than the code I normally hide. :)

Any key to refresh. Any use may invalidate your Reliability Index. You have been warned.

No Comments yet »

April 12th 2007

Updates: Dell’s 2407WFP, Vista.

Before I mentioned that my 2407 was getting terrible artifacts.

So…

It turns out they go away if you plug it into the other port on my graphics card.

Doh.

Also, I mentioned that I was using mostly Microsoft apps on Vista. Some changes:

  • Windows Media Player has been sacrificed for Foobar2000 for music, after it “removed” most of the id3 tags from my mp3 files.
    Nitpickers’ Corner: Technically, it didn’t remove the tags at all.

    • Windows Media Player (and Windows Explorer) (and, for other things, pretty much the entirety of Windows) likes things in UTF-16. Most of the files in my collection have both id3v2.3 and id3v2.4 tags.
    • The 2.4 version of the tags, having been written by Picard (which, by default, writes UTF-8 tags (which I’d have probably picked anyway)), were not acceptable to WMP.
    • In this situation, WMP reads the 2.3 version of the tags (which has some nasty limitations like, for instance, cutting off all fields at a certain length), and writes a second id3v2.4 block to the files, at the start.
    • Next time anything attempts to read the file, it’ll see WMP’s 2.4 block (containing just the 2.3 information), skip over the real 2.4 block, and see the original 2.3 block, making it look like the tags have gone, whereas they’re actually still in the file.
  • WMP is still in use for video playing, but most of it’s decoding is now assisted by ffmpeg, which is awesome.
  • IE7 has now disappeared for Opera. Yaaaay, Opera.

1 Comment »

March 23rd 2007

Vista!

Yay, Vista arrived, thanks to Microsoft for running the developer “competition”, and thanks to Ian Moulster for keeping us posted.

Everything worked fine, even automatically grabbing the drivers for my (unflashed) SI3114 card up off Windows Update, and telling me to install the drivers for my X-fi.

So far, I’ve only had one major problem: The GUI is slow. Far too slow.

I expect that some of the slowness is actually being caused by Windows itself, but the one-second-plus black screen whilst switching to the secure desktop for UAC sounds incredibly unlikely. I’ve not worked out what to blame for this yet, but the nvidia drivers and the creative drivers are high up the list of possible candidates.

For reference, I currently have a Windows Experience index of 4.2 (RAM and CPU limited), and have tried disabling Aero and desktop composition, updating graphics drivers, etc.

I find it strange that, despite getting a 5.9 Experience index for “Graphics” (ie. desktop), the Vista required specs, quotes some rather vague definitions for “adequate graphics memory”, which makes no suggestions as to what would be recommended for ~4MP (3520×1200). Some event log messages suggest I’m running out at 256MB, which is bad. :/

Other minor things (note that, bar Miranda, Daemon Tools and BOINC I’ve been sticking to mostly Microsoft apps (yes, even IE7 and Windows Media Player)):

  • The “official” OpenSSL binaries use an old version of MSVCR71.dll, which I didn’t feel like installing (I’m sure I’ll pick it up when I install some crap later), building them is easy:
    perl Configure --openssldir=c:/openssl VC-WIN32
    ms\do_masm
    nmake -f ms\ntdll.mak
    nmake -f ms\ntdll.mak test
    nmake -f ms\ntdll.mak install
  • Textpad 4 (I didn’t get along with 5) needs to be run as Administrator to add itself to right-click menus.
  • You can no-longer set a PNG as your wallpaper?!
  • It’d be nice if there was some official support for XVid and Ogg/Vorbis (and maybe some other free (as in, to implement(ish)) standards, the second doesn’t even have an unofficial solution for WMP/Vista.
  • Aero picks up the artefacts in my tft quite spectacularily, damn.
  • And, most importantly, I suck at pre-format backups. :(

1 Comment »

« Prev - Next »