Developer Forums | About Us | Site Map
Search  
HOME > PHPMANUAL


Sponsors





Web Host
site hosted by netplex
Partners

Online Manuals

VIII. COM support functions for Windows

Introduction

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.

Requirements

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

Installation

There is no installation needed to use these functions; they are part of the PHP core.

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.

Runtime Configuration

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

Table 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().

Predefined Constants

The constants below are defined by this extension, and will only be available when the extension has either been compiled into PHP or dynamically loaded at runtime.

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)

See Also

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

Table of Contents
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 -- Alias of com_get()
com_propput -- Alias of com_set()
com_propset -- Alias of com_set()
com_release --  Decreases the components reference counter.
com_set --  Assigns a value to a COM component's property
Copyright 2004-2024 GrindingGears.com. All rights reserved. Site hosted by NETPLEX