How to programmatically set WMP the default player of Windows Vista and Windows 7?

Here is the API that one can use to set the default playback application of Windows Vista and Windows 7:

IApplicationAssociationRegistration::SetAppAsDefaultAll Method
https://msdn.microsoft.com/en-us/library/bb776338(v=VS.85).aspx

This method takes only one parameter - a pointer to a null-terminated Unicode string that specifies the registered name of the application. In this case it will be “Windows Media Player”.