Kon
Member
From: USA
Email
|
posted 2004-05-06 03:20:27 |
Reply -Delete |
When you write script like:
set obj = WScript.CreateObject("PManager.Application")
for each i in obj
WScript.Echo("Plugin '"+i.Name+"' functions:")
for each j in i
WScript.Echo(" "+j)
next
next
VBScript actually calls COM methods Item, Count and _NewEnum
These three methods implement standard simple COM collection.
If you are curious how they look like in an IDL file, here it is:
[id(DISPID_NEWENUM), propget] HRESULT _NewEnum([out, retval] IUnknown** ppUnk);
[id(DISPID_VALUE), propget] HRESULT Item([in] long Index, [out, retval] VARIANT* pVal);
[id(38), propget] HRESULT Count([out, retval] long* pVal);
learn more about COM collections: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcconatlcollectionsenumerators.asp
| |