Automation was built based on COM. A automation server is a COM component with IDispatch in fact, and A automation controler is a COM Client communated to automation server by IDispath. In a word, IDispatch will accept a name of function and execute it.
GetIDsOfNames & Invoke are the most interest function of IDispatch. GetIDsOfNames will read a name of function and return it's DISPID.then Automation will transfer the DISPID to Invoke. Invoke regard DISPID as the index of function ptr array and loop the function to execute it.
See the defination by IDL(Microsoft):
interface IDispatch : IUnknown
{
......