I think you have more chance in finding this out if you look it up on the web (google) as this is not something specific to MSN Messenger; Lots of programs use UPnP.
And how to detect if it is enabled and/or disabled should be well documented. And I wouldn't be surprised if it was a simple call to some API or something.....
Did you try searching the Microsoft's Knowledge Base or the
MSDN Library? maybe you could find something there, and if not I'm sure Google will come up with something...
Of course, unless, someone here knows the answer strait away...