WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

OLE COM ADO CDO ADSI LDAP
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

COM Interfaces Explained

 Keywords: Late Early Bind Interface iDispatch Dispatch IUnknown ObjectGet ObjectCreate

IUnknown Interface is by definition the base interface of all COM interfaces. WinBatch can only access an "late bind" interface. The late-binding COM interface is based on the IDispatch interface and is what you are using when you use the WinBatch COM and dotNet subsystem. Microsoft intended the IDispatch interface for use by scripting languages like WinBatch. WinBatch is unable to access "early bind" interface in that it is primarily intended for use in native C++. MSFT did this by design and the result is evidenced by the fact that the interface pointers are arranged in memory exactly the same way that pointers to C++ object members are arranged in memory. To make things even more interesting many COM interfaces have both an early bind interface and a late bind interface through IDispatch so that can be used by both scripting and non scripting languages. Of course, the above barely scratches the surface and doesn't even begin to cover things like in-process and out-of-process servers or the COM client/server threading model. In short, WinBatch only makes use of many early bind interfaces internally and in extenders but does not provide a mechanism for accessing them from scripts other than through their late bind interfaces via the WinBatch COM subsystem. This is primarily because it is an interpreted scripting language and not a 'native' or 'managed' language.
Article ID:   W18017
Filename:   COM Interfaces Explained .txt
File Created: 2013:09:26:13:56:40
Last Updated: 2013:09:26:13:56:40