VIII. COM support functions for Windows

Wprowadzenie

COM is a technology which allows the reuse of code written in any language (by any language) using a standard calling convention and hiding behind APIs the implementation details such as what machine the Component is stored on and the executable which houses it. It can be thought of as a super Remote Procedure Call (RPC) mechanism with some basic object roots. It separates implementation from interface.

COM encourages versioning, separation of implementation from interface and hiding the implementation details such as executable location and the language it was written in.

Wymagania

COM functions are only available on the Windows version of PHP.

Instalacja

By u┐ywaµ tych funkcji, nie trzeba niczego instalowaµ. S▒ one czΩ╢ci▒ j▒dra PHP.

The windows version of PHP has built in support for this extension. You do not need to load any additional extension in order to use these functions.

Konfiguracja startowa

The behaviour of these functions is affected by settings in php.ini.

Tabela 1. Com configuration options

NameDefaultChangeable
com.allow_dcom"0"PHP_INI_SYSTEM
com.autoregister_typelib"0"PHP_INI_SYSTEM
com.autoregister_verbose"0"PHP_INI_SYSTEM
com.autoregister_casesensitive"1"PHP_INI_SYSTEM
com.typelib_file""PHP_INI_SYSTEM
For further details and definition of the PHP_INI_* constants see ini_set().

Predefiniowane sta│e

Poni┐sze sta│e s▒ zdefiniowane w tym rozszerzeniu i staj▒ siΩ dostΩpne, gdy rozszerzenie jest dokompilowane do PHP, lub za│adowane dynamicznie przy starcie.

CLSCTX_INPROC_SERVER (integer)

CLSCTX_INPROC_HANDLER (integer)

CLSCTX_LOCAL_SERVER (integer)

CLSCTX_REMOTE_SERVER (integer)

CLSCTX_SERVER (integer)

CLSCTX_ALL (integer)

VT_NULL (integer)

VT_EMPTY (integer)

VT_UI1 (integer)

VT_I2 (integer)

VT_I4 (integer)

VT_R4 (integer)

VT_R8 (integer)

VT_BOOL (integer)

VT_ERROR (integer)

VT_CY (integer)

VT_DATE (integer)

VT_BSTR (integer)

VT_DECIMAL (integer)

VT_UNKNOWN (integer)

VT_DISPATCH (integer)

VT_VARIANT (integer)

VT_I1 (integer)

VT_UI2 (integer)

VT_UI4 (integer)

VT_INT (integer)

VT_UINT (integer)

VT_ARRAY (integer)

VT_BYREF (integer)

CP_ACP (integer)

CP_MACCP (integer)

CP_OEMCP (integer)

CP_UTF7 (integer)

CP_UTF8 (integer)

CP_SYMBOL (integer)

CP_THREAD_ACP (integer)

Zobacz r≤wnie┐

For further information on COM read the COM specification or perhaps take a look at Don Box's Yet Another COM Library (YACL)

Spis tre╢ci
COM -- COM class
VARIANT -- VARIANT class
com_addref --  Increases the components reference counter.
com_get --  Gets the value of a COM Component's property
com_invoke --  Calls a COM component's method.
com_isenum -- Grabs an IEnumVariant
com_load_typelib -- Loads a Typelib
com_load --  Creates a new reference to a COM component
com_propget --  Gets the value of a COM Component's property
com_propput --  Assigns a value to a COM component's property
com_propset --  Assigns a value to a COM component's property
com_release --  Decreases the components reference counter.
com_set --  Assigns a value to a COM component's property