Quoting Alexandre Julliard julliard@winehq.com:
That's much better than the previous one. I'm not convinced you really need to build a static list, you might as well have a function to register a single interface and call it a number of times.
The main reason I used a static list was to make it impossible to forget to unregister one of the interfaces you registered; that is why the unregister functions take the entire structures (but only need the first members).
OTOH, if we might someday want to avoid unregistering one or more interfaces or classes we registered, having separate functions would make that easier.
I think I still prefer the structures, but are you convinced enough?
I'm afraid copying it is the best choice; I don't think we want a new dll for just a couple of routines. It's not very elegant to duplicate it, but it shouldn't be a lot of code anyway.
What would it take to make a static library work for this? Unlike a dll, that would not have any overhead, would it? I'm a real sucker for elegance, you know. :-)
I used to think any library, even a static one, had to have a certain amount of bloat, until I came across the dietlibc (http://www.fefe.de/dietlibc/).