Long time no hear… Useful auto ptr class for referencing Objective-C objects from C++. Especially useful when putting Objective-C objects into STL containers:

template<typename TClass> class NSPtr
{
public:
	NSPtr() : _obj(NULL)
	{}
	NSPtr(TClass* o) : _obj(NULL)
	{
		this->operator=(o);
	}
	NSPtr(const NSPtr<TClass>& o) : _obj(NULL)
	{
		this->operator=(o);
	}
	
	~NSPtr()
	{
		this->operator=(NULL);
	}
	
	NSPtr& operator=(const NSPtr<TClass>& other)
	{
		this->operator=(*other);
		return *this;
	}
	NSPtr& operator=(TClass* o)
	{
		if (o != _obj)
		{
			if (o != NULL)
			{
				[o retain];
			}
			if (_obj != NULL)
			{
				[_obj release];
			}
			_obj = o;
		}
		return *this;
	}
	
	TClass* operator*() const
	{
		return _obj;
	}
	TClass* operator->() const
	{
		return _obj;
	}
	
private:
	TClass* _obj;
};

When files have at least artist and album name set, the new command may find the missing information quite well. This even works if the artist and album name miss parts thus do not exactly match the original, thx to the search engine used by the guys @ MusicBrainz. Unfortunately the query is quite slow and MusicBrainz does not allow to fire more queries than one per second. Nevertheless a great service that found its way into PureMp3. Download and more information here.

PureMp3 version 2.0.0.0 comes with a build in library database. Just set-up your library folder in preferences and it is scanned in background for MP3 files. All files are presented in the new library tab offering a search bar for full text search. Download and more information here.

PureMp3 is a MP3 tag editor with a nice user interface, batch capabilities and fully supported undo. It solved at least my use-cases which were…

  • Find fine and badly tagged albums on local/network disks
  • Batch rename files and folders according to pattern
  • Batch FreeDB+Discogs tag download
  • Batch cover download
  • Batch copy fine tagged albums from local/network disks into library
  • Edit single tags
  • on gigabytes of MP3s with mainly no user interaction. Maybe it also solves your use-case. More information here.

    Screenshot pure mp3

    This was the first use-case for dynamics from C# 4.0 that I got into mind. One can bind the texts from XAML to a singleton class inherting DynamicObject that publishs the text IDs as properties. Here a label is bound to a property called ‘Ready’:

    <Label
        x:Name="labelStatus"
        Content="
          {
              Binding Source={x:Static text:TextProvider.Instance},
              Path=Ready
          }" />

    The TextProvider singleton inherits DynamicObject and returns a text for each requested property. As ID, the property name is taken. It actually re-directs the calls to an object which is here called LocalizationDatabase:

    public class TextProvider : DynamicObject
    {
        public static TextProvider Instance
        {
            get
            {
                return instance;
            }
        }
    
        public override bool TryGetMember(
            GetMemberBinder binder,
            out object result)
        {
            result = LocalizationDatabase.Instance.GetText(binder.Name);
            return true;
        }
    
        private static TextProvider instance = new TextProvider();
    }

    MSDN: New UAC Technologies for Windows Vista
    MSDN: Registry Virtualization

    You can verify the status of Virtualization in Task Manange / View / Select Columns / show the Virtualization column.

    MSDN: About Structured Exception Handling. Coarse overview.

    Matt Pietrek: A Crash Course on the Depths of Win32 Structured Exception Handling (1997). Telling in detail how structured exception handling works on machine level and how compilers implement them on x86.

    Matt Pietrek: New Vectored Exception Handling in Windows XP (2001). Telling how vectored exception handling works that came with Windows XP.

    cbrumme’s WebLog: Windows SEH. The Exception Model, Windows SEH, Managed Exceptions, Flow Control, Performance and Trends…

    Additional:
    MSDN: AddVectoredExceptionHandler
    MSDN: RemoveVectoredExceptionHandler
    MSDN: Example: Using a Vectored Exception Handler
    MSDN: Smart Device Development: SEH in x86 Environments
    MSDN: _set_se_translator
    MSDN: EXCEPTION_POINTERS
    MSDN: EXCEPTION_RECORD