Forum und email

Funkcie na podboru COM pre Windows

Úvod

COM je technológia, ktorá umožňuje znovupoužitie kódu napísaného v akomkoľvek jazyku (akýmkoľvek jazykom) pomocou štandardnej volacej konvencie a skrývania sa za implementačné detaily API akými sú, na ktorom počítači je komponent uložený a ktorý spustiteľný súbor ho uchováva. Možete si to prestaviť ako mechanizmus Remote Procedure Call (RPC) s niektorými základnými koreňmi objektu. Oddeľuje implementáciu od rozhrania.

COM podpruje verziovanie, separáciu implementácie od rozhrania a skrývanie implementačných detailov akými sú vykonateľná lokácia a jazyk, v ktorom bol napísaný.

Požiadavky

Funkcie COM sú k dispozícii iba v PHP pre Windows.

Inštalácia

Nie je potrebná žiadna inštalácia na použitie týchto funkcií; sú časťou jadra PHP.

Windows verzie PHP majú vstavanú podporu pre toto rozšírenie. Nemusíte načítať žiadne dodatočné rozšírenie, aby ste mohli tieto funkcie používať.

Runtime Konfigurácia

Správanie tejto funkcie je ovplyvnené nastaveniami v php.ini.

Konfiguračné voľby COM
Názov Default Zameniteľný
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
Pre ďalšie detaily a definície o PHP_INI_* konštantách si pozrite ini_set().

Preddefinované Konštanty

Konštanty uvedené nižšie sú definované týmto rozšírením a budú dostupné iba keď rozšírenie bolo buď kompilované do PHP alebo dynamicky načítané za behu (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)

Tiež pozri

Pre ďalšie informácie o COM si prečítajte » COM specification alebo sa môžete pozrieť na » Yet Another COM Library (YACL) Dona Boxa.

Table of Contents

  • COM — COM trieda
  • DOTNET — DOTNET class
  • VARIANT — VARIANT trieda
  • com_addref — Zvyšuje referenčné počítadlo komponentu.
  • com_create_guid — Generate a globally unique identifier (GUID)
  • com_event_sink — Connect events from a COM object to a PHP object
  • com_get_active_object — Returns a handle to an already running instance of a COM object
  • com_get — Získava hodnotu vlastnosti COM komponentu
  • com_invoke — Volá metódu COM komponentu.
  • com_isenum — Uchopí IEnumVariant
  • com_load_typelib — Načítava Typelib
  • com_load — Vytvára nový odkaz na COM komponent
  • com_message_pump — Process COM messages, sleeping for up to timeoutms milliseconds
  • com_print_typeinfo — Print out a PHP class definition for a dispatchable interface
  • com_propget — Alias pre com_get
  • com_propput — Alias pre com_set
  • com_propset — Alias of com_set
  • com_release — Znižuje referenčné počítadlo komponentu.
  • com_set — Vlastnosti COM komponentu priraďuje hodnotu
  • variant_abs — Returns the absolute value of a variant
  • variant_add — "Adds" two variant values together and returns the result
  • variant_and — performs a bitwise AND operation between two variants and returns the result
  • variant_cast — Convert a variant into a new variant object of another type
  • variant_cat — concatenates two variant values together and returns the result
  • variant_cmp — Compares two variants
  • variant_date_from_timestamp — Returns a variant date representation of a Unix timestamp
  • variant_date_to_timestamp — Converts a variant date/time value to Unix timestamp
  • variant_div — Returns the result from dividing two variants
  • variant_eqv — Performs a bitwise equivalence on two variants
  • variant_fix — Returns the integer portion ? of a variant
  • variant_get_type — Returns the type of a variant object
  • variant_idiv — Converts variants to integers and then returns the result from dividing them
  • variant_imp — Performs a bitwise implication on two variants
  • variant_int — Returns the integer portion of a variant
  • variant_mod — Divides two variants and returns only the remainder
  • variant_mul — multiplies the values of the two variants and returns the result
  • variant_neg — Performs logical negation on a variant
  • variant_not — Performs bitwise not negation on a variant
  • variant_or — Performs a logical disjunction on two variants
  • variant_pow — Returns the result of performing the power function with two variants
  • variant_round — Rounds a variant to the specified number of decimal places
  • variant_set_type — Convert a variant into another type "in-place"
  • variant_set — Assigns a new value for a variant object
  • variant_sub — subtracts the value of the right variant from the left variant value and returns the result
  • variant_xor — Performs a logical exclusion on two variants