DISPIDNEWENUM
DISPID_NEWENUM, sometimes written as DISPID_NEWENUM or DISPIDNEWENUM, is the dispatch identifier used in COM automation to access the _NewEnum member of a collection object. The value is defined as -4 in the standard OLE Automation headers. When a client uses IDispatch to interact with a collection, it maps the string "_NewEnum" to this dispatch ID and invokes it with a property get request to obtain an enumerator, typically an IEnumVARIANT.
The obtained enumerator provides the items of the collection one by one, as VARIANT values, enabling language
What distinguishes DISPID_NEWENUM is its role as a standardized hook for enumeration rather than a regular
In practice, developers rarely call DISPID_NEWENUM directly; instead, they rely on the language runtime's automation layer
See also: IDispatch, IEnumVARIANT, VARIANT, DISPID_PROPERTYPUT.