Well there in lies the problem. When aaron added the output system, he basically generically converted all of the game that used to use the keyboard leds to "led0-led2" so they could represent anything, depending upon the game. Usually it's the coin lights, but you can't always assume that. Gorf, for example has 6 rank lights, that have been labeled led0-led5.
Output names are stored in individual drivers unfortuantely. Also imho they are kind of useless because of the way it has been setup. You see your app doesn't get data from "led0" it gets data from a digit address, like 0001. Once you get some data from a digit address, you can call mame asking it for the string name and it'll send it back. This is all well and good, except that you don't know what outputs are in there until each one sends you data, and by then it's too late. Couple that and the fact that you have to pretty much treat each game on a case by case basis and you might as well use the digit addresses as it saves you a step.
I should also note that I couldn't get the string to return for me in vb6, but that is my issue. In c languages it works fine.
So basically, to support a game properly you need to look in it's driver, get the addresses, and make a custom ini file that describes the outputs. Now you could make a "discover mode" app that pretty much only reads for addresses and translates them to thier string names for a custom ini, but again, you aren't going to get the string name if some data doesn't get sent to the address, which could happen more often then you'd think.
Imho, the easiet and best way to deal with these issues is to do a controls.dat deal, but maybe on a simpler scale. People could go into a driver, get the data, and make an ini file that looks something like this:
[captions]
Coin Light 1=00010
Coin Light 2=00020
[settings]
00010=
00020=
And basically a developer could bind the caption to the address from the captions entries and then in the configuration part of thier app, use the real caption names, only save the real life dodad they want to control to the actual address number. Then when you are actually running mame, it is super fast as it can ignore the captions read the addresses instantly without doing a translation.
I was the guy that bugged aaron to add output support, and I'm ashamed to say I've sat on it for a few months now. I have thought about ways of doing it though, as you can see.