How do I get the properties and functions of an activex control in code

tI want to write a function that I can past a name of an activex control and
then it will put the properties and function into a listbox like delphi's
code completion.

AnyIdeas where to start.  Code help would be nice.

Thanks
Chris