Back to index

php5  5.3.10
com_extension.c
Go to the documentation of this file.
00001 /*
00002    +----------------------------------------------------------------------+
00003    | PHP Version 5                                                        |
00004    +----------------------------------------------------------------------+
00005    | Copyright (c) 1997-2012 The PHP Group                                |
00006    +----------------------------------------------------------------------+
00007    | This source file is subject to version 3.01 of the PHP license,      |
00008    | that is bundled with this package in the file LICENSE, and is        |
00009    | available through the world-wide-web at the following url:           |
00010    | http://www.php.net/license/3_01.txt                                  |
00011    | If you did not receive a copy of the PHP license and are unable to   |
00012    | obtain it through the world-wide-web, please send a note to          |
00013    | license@php.net so we can mail you a copy immediately.               |
00014    +----------------------------------------------------------------------+
00015    | Author: Wez Furlong  <wez@thebrainroom.com>                          |
00016    +----------------------------------------------------------------------+
00017  */
00018 
00019 /* $Id: com_extension.c 321634 2012-01-01 13:15:04Z felipe $ */
00020 
00021 #ifdef HAVE_CONFIG_H
00022 #include "config.h"
00023 #endif
00024 
00025 #include "php.h"
00026 #include "php_ini.h"
00027 #include "ext/standard/info.h"
00028 #include "php_com_dotnet.h"
00029 #include "php_com_dotnet_internal.h"
00030 #include "Zend/zend_exceptions.h"
00031 
00032 ZEND_DECLARE_MODULE_GLOBALS(com_dotnet)
00033 static PHP_GINIT_FUNCTION(com_dotnet);
00034 
00035 TsHashTable php_com_typelibraries;
00036 
00037 zend_class_entry
00038        *php_com_variant_class_entry,
00039        *php_com_exception_class_entry,
00040        *php_com_saproxy_class_entry;
00041 
00042 /* {{{ arginfo */
00043 ZEND_BEGIN_ARG_INFO_EX(arginfo_variant_set, 0, 0, 2)
00044        ZEND_ARG_INFO(0, variant)
00045        ZEND_ARG_INFO(0, value)
00046 ZEND_END_ARG_INFO()
00047 
00048 ZEND_BEGIN_ARG_INFO_EX(arginfo_variant_add, 0, 0, 2)
00049        ZEND_ARG_INFO(0, left)
00050        ZEND_ARG_INFO(0, right)
00051 ZEND_END_ARG_INFO()
00052 
00053 ZEND_BEGIN_ARG_INFO_EX(arginfo_variant_cat, 0, 0, 2)
00054        ZEND_ARG_INFO(0, left)
00055        ZEND_ARG_INFO(0, right)
00056 ZEND_END_ARG_INFO()
00057 
00058 ZEND_BEGIN_ARG_INFO_EX(arginfo_variant_sub, 0, 0, 2)
00059        ZEND_ARG_INFO(0, left)
00060        ZEND_ARG_INFO(0, right)
00061 ZEND_END_ARG_INFO()
00062 
00063 ZEND_BEGIN_ARG_INFO_EX(arginfo_variant_mul, 0, 0, 2)
00064        ZEND_ARG_INFO(0, left)
00065        ZEND_ARG_INFO(0, right)
00066 ZEND_END_ARG_INFO()
00067 
00068 ZEND_BEGIN_ARG_INFO_EX(arginfo_variant_and, 0, 0, 2)
00069        ZEND_ARG_INFO(0, left)
00070        ZEND_ARG_INFO(0, right)
00071 ZEND_END_ARG_INFO()
00072 
00073 ZEND_BEGIN_ARG_INFO_EX(arginfo_variant_div, 0, 0, 2)
00074        ZEND_ARG_INFO(0, left)
00075        ZEND_ARG_INFO(0, right)
00076 ZEND_END_ARG_INFO()
00077 
00078 ZEND_BEGIN_ARG_INFO_EX(arginfo_variant_eqv, 0, 0, 2)
00079        ZEND_ARG_INFO(0, left)
00080        ZEND_ARG_INFO(0, right)
00081 ZEND_END_ARG_INFO()
00082 
00083 ZEND_BEGIN_ARG_INFO_EX(arginfo_variant_idiv, 0, 0, 2)
00084        ZEND_ARG_INFO(0, left)
00085        ZEND_ARG_INFO(0, right)
00086 ZEND_END_ARG_INFO()
00087 
00088 ZEND_BEGIN_ARG_INFO_EX(arginfo_variant_imp, 0, 0, 2)
00089        ZEND_ARG_INFO(0, left)
00090        ZEND_ARG_INFO(0, right)
00091 ZEND_END_ARG_INFO()
00092 
00093 ZEND_BEGIN_ARG_INFO_EX(arginfo_variant_mod, 0, 0, 2)
00094        ZEND_ARG_INFO(0, left)
00095        ZEND_ARG_INFO(0, right)
00096 ZEND_END_ARG_INFO()
00097 
00098 ZEND_BEGIN_ARG_INFO_EX(arginfo_variant_or, 0, 0, 2)
00099        ZEND_ARG_INFO(0, left)
00100        ZEND_ARG_INFO(0, right)
00101 ZEND_END_ARG_INFO()
00102 
00103 ZEND_BEGIN_ARG_INFO_EX(arginfo_variant_pow, 0, 0, 2)
00104        ZEND_ARG_INFO(0, left)
00105        ZEND_ARG_INFO(0, right)
00106 ZEND_END_ARG_INFO()
00107 
00108 ZEND_BEGIN_ARG_INFO_EX(arginfo_variant_xor, 0, 0, 2)
00109        ZEND_ARG_INFO(0, left)
00110        ZEND_ARG_INFO(0, right)
00111 ZEND_END_ARG_INFO()
00112 
00113 ZEND_BEGIN_ARG_INFO_EX(arginfo_variant_abs, 0, 0, 1)
00114        ZEND_ARG_INFO(0, left)
00115 ZEND_END_ARG_INFO()
00116 
00117 ZEND_BEGIN_ARG_INFO_EX(arginfo_variant_fix, 0, 0, 1)
00118        ZEND_ARG_INFO(0, left)
00119 ZEND_END_ARG_INFO()
00120 
00121 ZEND_BEGIN_ARG_INFO_EX(arginfo_variant_int, 0, 0, 1)
00122        ZEND_ARG_INFO(0, left)
00123 ZEND_END_ARG_INFO()
00124 
00125 ZEND_BEGIN_ARG_INFO_EX(arginfo_variant_neg, 0, 0, 1)
00126        ZEND_ARG_INFO(0, left)
00127 ZEND_END_ARG_INFO()
00128 
00129 ZEND_BEGIN_ARG_INFO_EX(arginfo_variant_not, 0, 0, 1)
00130        ZEND_ARG_INFO(0, left)
00131 ZEND_END_ARG_INFO()
00132 
00133 ZEND_BEGIN_ARG_INFO_EX(arginfo_variant_round, 0, 0, 2)
00134        ZEND_ARG_INFO(0, left)
00135        ZEND_ARG_INFO(0, decimals)
00136 ZEND_END_ARG_INFO()
00137 
00138 ZEND_BEGIN_ARG_INFO_EX(arginfo_variant_cmp, 0, 0, 2)
00139        ZEND_ARG_INFO(0, left)
00140        ZEND_ARG_INFO(0, right)
00141        ZEND_ARG_INFO(0, lcid)
00142        ZEND_ARG_INFO(0, flags)
00143 ZEND_END_ARG_INFO()
00144 
00145 ZEND_BEGIN_ARG_INFO_EX(arginfo_variant_date_to_timestamp, 0, 0, 1)
00146        ZEND_ARG_INFO(0, variant)
00147 ZEND_END_ARG_INFO()
00148 
00149 ZEND_BEGIN_ARG_INFO_EX(arginfo_variant_date_from_timestamp, 0, 0, 1)
00150        ZEND_ARG_INFO(0, timestamp)
00151 ZEND_END_ARG_INFO()
00152 
00153 ZEND_BEGIN_ARG_INFO_EX(arginfo_variant_get_type, 0, 0, 1)
00154        ZEND_ARG_INFO(0, variant)
00155 ZEND_END_ARG_INFO()
00156 
00157 ZEND_BEGIN_ARG_INFO_EX(arginfo_variant_set_type, 0, 0, 2)
00158        ZEND_ARG_INFO(0, variant)
00159        ZEND_ARG_INFO(0, type)
00160 ZEND_END_ARG_INFO()
00161 
00162 ZEND_BEGIN_ARG_INFO_EX(arginfo_variant_cast, 0, 0, 2)
00163        ZEND_ARG_INFO(0, variant)
00164        ZEND_ARG_INFO(0, type)
00165 ZEND_END_ARG_INFO()
00166 
00167 ZEND_BEGIN_ARG_INFO_EX(arginfo_com_get_active_object, 0, 0, 1)
00168        ZEND_ARG_INFO(0, progid)
00169        ZEND_ARG_INFO(0, code_page)
00170 ZEND_END_ARG_INFO()
00171 
00172 ZEND_BEGIN_ARG_INFO(arginfo_com_create_guid, 0)
00173 ZEND_END_ARG_INFO()
00174 
00175 ZEND_BEGIN_ARG_INFO_EX(arginfo_com_event_sink, 0, 0, 2)
00176        ZEND_ARG_INFO(0, comobject)
00177        ZEND_ARG_INFO(0, sinkobject)
00178        ZEND_ARG_INFO(0, sinkinterface)
00179 ZEND_END_ARG_INFO()
00180 
00181 ZEND_BEGIN_ARG_INFO_EX(arginfo_com_print_typeinfo, 0, 0, 1)
00182        ZEND_ARG_INFO(0, comobject)
00183        ZEND_ARG_INFO(0, dispinterface)
00184        ZEND_ARG_INFO(0, wantsink)
00185 ZEND_END_ARG_INFO()
00186 
00187 ZEND_BEGIN_ARG_INFO_EX(arginfo_com_message_pump, 0, 0, 0)
00188        ZEND_ARG_INFO(0, timeoutms)
00189 ZEND_END_ARG_INFO()
00190 
00191 ZEND_BEGIN_ARG_INFO_EX(arginfo_com_load_typelib, 0, 0, 1)
00192        ZEND_ARG_INFO(0, typelib_name)
00193        ZEND_ARG_INFO(0, case_insensitive)
00194 ZEND_END_ARG_INFO()
00195 /* }}} */
00196 
00197 const zend_function_entry com_dotnet_functions[] = {
00198        PHP_FE(variant_set, arginfo_variant_set)
00199        PHP_FE(variant_add, arginfo_variant_add)
00200        PHP_FE(variant_cat, arginfo_variant_cat)
00201        PHP_FE(variant_sub, arginfo_variant_sub)
00202        PHP_FE(variant_mul, arginfo_variant_mul)
00203        PHP_FE(variant_and, arginfo_variant_and)
00204        PHP_FE(variant_div, arginfo_variant_div)
00205        PHP_FE(variant_eqv, arginfo_variant_eqv)
00206        PHP_FE(variant_idiv, arginfo_variant_idiv)
00207        PHP_FE(variant_imp, arginfo_variant_imp)
00208        PHP_FE(variant_mod, arginfo_variant_mod)
00209        PHP_FE(variant_or, arginfo_variant_or)
00210        PHP_FE(variant_pow, arginfo_variant_pow)
00211        PHP_FE(variant_xor, arginfo_variant_xor)
00212        PHP_FE(variant_abs, arginfo_variant_abs)
00213        PHP_FE(variant_fix, arginfo_variant_fix)
00214        PHP_FE(variant_int, arginfo_variant_int)
00215        PHP_FE(variant_neg, arginfo_variant_neg)
00216        PHP_FE(variant_not, arginfo_variant_not)
00217        PHP_FE(variant_round, arginfo_variant_round)
00218        PHP_FE(variant_cmp, arginfo_variant_cmp)
00219        PHP_FE(variant_date_to_timestamp, arginfo_variant_date_to_timestamp)
00220        PHP_FE(variant_date_from_timestamp, arginfo_variant_date_from_timestamp)
00221        PHP_FE(variant_get_type, arginfo_variant_get_type)
00222        PHP_FE(variant_set_type, arginfo_variant_set_type)
00223        PHP_FE(variant_cast, arginfo_variant_cast)
00224        /* com_com.c */
00225        PHP_FE(com_create_guid, arginfo_com_create_guid)
00226        PHP_FE(com_event_sink, arginfo_com_event_sink)
00227        PHP_FE(com_print_typeinfo, arginfo_com_print_typeinfo)
00228        PHP_FE(com_message_pump, arginfo_com_message_pump)
00229        PHP_FE(com_load_typelib, arginfo_com_load_typelib)
00230        PHP_FE(com_get_active_object, arginfo_com_get_active_object)
00231        PHP_FE_END
00232 };
00233 
00234 /* {{{ com_dotnet_module_entry
00235  */
00236 zend_module_entry com_dotnet_module_entry = {
00237        STANDARD_MODULE_HEADER,
00238        "com_dotnet",
00239        com_dotnet_functions,
00240        PHP_MINIT(com_dotnet),
00241        PHP_MSHUTDOWN(com_dotnet),
00242        PHP_RINIT(com_dotnet),
00243        PHP_RSHUTDOWN(com_dotnet),
00244        PHP_MINFO(com_dotnet),
00245        "0.1",
00246        PHP_MODULE_GLOBALS(com_dotnet),
00247        PHP_GINIT(com_dotnet),
00248        NULL,
00249        NULL,
00250        STANDARD_MODULE_PROPERTIES_EX
00251 };
00252 /* }}} */
00253 
00254 #ifdef COMPILE_DL_COM_DOTNET
00255 ZEND_GET_MODULE(com_dotnet)
00256 #endif
00257 
00258 /* {{{ PHP_INI
00259  */
00260 
00261 /* com.typelib_file is the path to a file containing a
00262  * list of typelibraries to register *persistently*.
00263  * lines starting with ; are comments
00264  * append #cis to end of typelib name to cause its constants
00265  * to be loaded case insensitively */
00266 static PHP_INI_MH(OnTypeLibFileUpdate)
00267 {
00268        FILE *typelib_file;
00269        char *typelib_name_buffer;
00270        char *strtok_buf = NULL;
00271        int cached;
00272 
00273        if (!new_value || !new_value[0] || (typelib_file = VCWD_FOPEN(new_value, "r"))==NULL) {
00274               return FAILURE;
00275        }
00276 
00277        typelib_name_buffer = (char *) emalloc(sizeof(char)*1024);
00278 
00279        while (fgets(typelib_name_buffer, 1024, typelib_file)) {
00280               ITypeLib *pTL;
00281               char *typelib_name;
00282               char *modifier, *ptr;
00283               int mode = CONST_CS | CONST_PERSISTENT;   /* CONST_PERSISTENT is ok here */
00284 
00285               if (typelib_name_buffer[0]==';') {
00286                      continue;
00287               }
00288               typelib_name = php_strtok_r(typelib_name_buffer, "\r\n", &strtok_buf); /* get rid of newlines */
00289               if (typelib_name == NULL) {
00290                      continue;
00291               }
00292               typelib_name = php_strtok_r(typelib_name, "#", &strtok_buf);
00293               modifier = php_strtok_r(NULL, "#", &strtok_buf);
00294               if (modifier != NULL) {
00295                      if (!strcmp(modifier, "cis") || !strcmp(modifier, "case_insensitive")) {
00296                             mode &= ~CONST_CS;
00297                      }
00298               }
00299 
00300               /* Remove leading/training white spaces on search_string */
00301               while (isspace(*typelib_name)) {/* Ends on '\0' in worst case */
00302                      typelib_name ++;
00303               }
00304               ptr = typelib_name + strlen(typelib_name) - 1;
00305               while ((ptr != typelib_name) && isspace(*ptr)) {
00306                      *ptr = '\0';
00307                      ptr--;
00308               }
00309 
00310               if ((pTL = php_com_load_typelib_via_cache(typelib_name, COMG(code_page), &cached TSRMLS_CC)) != NULL) {
00311                      if (!cached) {
00312                             php_com_import_typelib(pTL, mode, COMG(code_page) TSRMLS_CC);
00313                      }
00314                      ITypeLib_Release(pTL);
00315               }
00316        }
00317 
00318        efree(typelib_name_buffer);
00319        fclose(typelib_file);
00320 
00321        return SUCCESS;
00322 }
00323 
00324 PHP_INI_BEGIN()
00325     STD_PHP_INI_ENTRY("com.allow_dcom",                        "0", PHP_INI_SYSTEM, OnUpdateBool, allow_dcom, zend_com_dotnet_globals, com_dotnet_globals)
00326     STD_PHP_INI_ENTRY("com.autoregister_verbose",       "0", PHP_INI_ALL, OnUpdateBool, autoreg_verbose, zend_com_dotnet_globals, com_dotnet_globals)
00327     STD_PHP_INI_ENTRY("com.autoregister_typelib",       "0", PHP_INI_ALL, OnUpdateBool, autoreg_on, zend_com_dotnet_globals, com_dotnet_globals)
00328     STD_PHP_INI_ENTRY("com.autoregister_casesensitive", "1", PHP_INI_ALL, OnUpdateBool, autoreg_case_sensitive, zend_com_dotnet_globals, com_dotnet_globals)
00329        STD_PHP_INI_ENTRY("com.code_page", "", PHP_INI_ALL, OnUpdateLong, code_page, zend_com_dotnet_globals, com_dotnet_globals)
00330        PHP_INI_ENTRY("com.typelib_file", "", PHP_INI_SYSTEM, OnTypeLibFileUpdate)
00331 PHP_INI_END()
00332 /* }}} */
00333 
00334 /* {{{ PHP_GINIT_FUNCTION
00335  */
00336 static PHP_GINIT_FUNCTION(com_dotnet)
00337 {
00338        memset(com_dotnet_globals, 0, sizeof(*com_dotnet_globals));
00339        com_dotnet_globals->code_page = CP_ACP;
00340 }
00341 /* }}} */
00342 
00343 /* {{{ PHP_MINIT_FUNCTION
00344  */
00345 PHP_MINIT_FUNCTION(com_dotnet)
00346 {
00347        zend_class_entry ce, *tmp;
00348 
00349        php_com_wrapper_minit(INIT_FUNC_ARGS_PASSTHRU);
00350        php_com_persist_minit(INIT_FUNC_ARGS_PASSTHRU);
00351 
00352        INIT_CLASS_ENTRY(ce, "com_exception", NULL);
00353        php_com_exception_class_entry = zend_register_internal_class_ex(&ce, zend_exception_get_default(TSRMLS_C), NULL TSRMLS_CC);
00354        php_com_exception_class_entry->ce_flags |= ZEND_ACC_FINAL;
00355 /*     php_com_exception_class_entry->constructor->common.fn_flags |= ZEND_ACC_PROTECTED; */
00356 
00357        INIT_CLASS_ENTRY(ce, "com_safearray_proxy", NULL);
00358        php_com_saproxy_class_entry = zend_register_internal_class(&ce TSRMLS_CC);
00359        php_com_saproxy_class_entry->ce_flags |= ZEND_ACC_FINAL;
00360 /*     php_com_saproxy_class_entry->constructor->common.fn_flags |= ZEND_ACC_PROTECTED; */
00361        php_com_saproxy_class_entry->get_iterator = php_com_saproxy_iter_get;
00362        
00363        INIT_CLASS_ENTRY(ce, "variant", NULL);
00364        ce.create_object = php_com_object_new;
00365        php_com_variant_class_entry = zend_register_internal_class(&ce TSRMLS_CC);
00366        php_com_variant_class_entry->get_iterator = php_com_iter_get;
00367 
00368        INIT_CLASS_ENTRY(ce, "com", NULL);
00369        ce.create_object = php_com_object_new;
00370        tmp = zend_register_internal_class_ex(&ce, php_com_variant_class_entry, "variant" TSRMLS_CC);
00371        tmp->get_iterator = php_com_iter_get;
00372 
00373        zend_ts_hash_init(&php_com_typelibraries, 0, NULL, php_com_typelibrary_dtor, 1);
00374 
00375 #if HAVE_MSCOREE_H
00376        INIT_CLASS_ENTRY(ce, "dotnet", NULL);
00377        ce.create_object = php_com_object_new;
00378        tmp = zend_register_internal_class_ex(&ce, php_com_variant_class_entry, "variant" TSRMLS_CC);
00379        tmp->get_iterator = php_com_iter_get;
00380 #endif
00381 
00382        REGISTER_INI_ENTRIES();
00383 
00384 #define COM_CONST(x) REGISTER_LONG_CONSTANT(#x, x, CONST_CS|CONST_PERSISTENT)
00385        
00386        COM_CONST(CLSCTX_INPROC_SERVER);
00387        COM_CONST(CLSCTX_INPROC_HANDLER);
00388        COM_CONST(CLSCTX_LOCAL_SERVER);
00389        COM_CONST(CLSCTX_REMOTE_SERVER);
00390        COM_CONST(CLSCTX_SERVER);
00391        COM_CONST(CLSCTX_ALL);
00392 
00393 #if 0
00394        COM_CONST(DISPATCH_METHOD);
00395        COM_CONST(DISPATCH_PROPERTYGET);
00396        COM_CONST(DISPATCH_PROPERTYPUT);
00397 #endif
00398 
00399        COM_CONST(VT_NULL);
00400        COM_CONST(VT_EMPTY);
00401        COM_CONST(VT_UI1);
00402        COM_CONST(VT_I1);
00403        COM_CONST(VT_UI2);
00404        COM_CONST(VT_I2);
00405        COM_CONST(VT_UI4);
00406        COM_CONST(VT_I4);
00407        COM_CONST(VT_R4);
00408        COM_CONST(VT_R8);
00409        COM_CONST(VT_BOOL);
00410        COM_CONST(VT_ERROR);
00411        COM_CONST(VT_CY);
00412        COM_CONST(VT_DATE);
00413        COM_CONST(VT_BSTR);
00414        COM_CONST(VT_DECIMAL);
00415        COM_CONST(VT_UNKNOWN);
00416        COM_CONST(VT_DISPATCH);
00417        COM_CONST(VT_VARIANT);
00418        COM_CONST(VT_INT);
00419        COM_CONST(VT_UINT);
00420        COM_CONST(VT_ARRAY);
00421        COM_CONST(VT_BYREF);
00422 
00423        COM_CONST(CP_ACP);
00424        COM_CONST(CP_MACCP);
00425        COM_CONST(CP_OEMCP);
00426        COM_CONST(CP_UTF7);
00427        COM_CONST(CP_UTF8);
00428        COM_CONST(CP_SYMBOL);
00429        COM_CONST(CP_THREAD_ACP);
00430 
00431        COM_CONST(VARCMP_LT);
00432        COM_CONST(VARCMP_EQ);
00433        COM_CONST(VARCMP_GT);
00434        COM_CONST(VARCMP_NULL);
00435 
00436        COM_CONST(NORM_IGNORECASE);
00437        COM_CONST(NORM_IGNORENONSPACE);
00438        COM_CONST(NORM_IGNORESYMBOLS);
00439        COM_CONST(NORM_IGNOREWIDTH);
00440        COM_CONST(NORM_IGNOREKANATYPE);
00441 #ifdef NORM_IGNOREKASHIDA
00442        COM_CONST(NORM_IGNOREKASHIDA);
00443 #endif
00444        COM_CONST(DISP_E_DIVBYZERO);
00445        COM_CONST(DISP_E_OVERFLOW);
00446        COM_CONST(DISP_E_BADINDEX);
00447        COM_CONST(MK_E_UNAVAILABLE);
00448 
00449        return SUCCESS;
00450 }
00451 /* }}} */
00452 
00453 /* {{{ PHP_MSHUTDOWN_FUNCTION
00454  */
00455 PHP_MSHUTDOWN_FUNCTION(com_dotnet)
00456 {
00457        UNREGISTER_INI_ENTRIES();
00458 #if HAVE_MSCOREE_H
00459        if (COMG(dotnet_runtime_stuff)) {
00460               php_com_dotnet_mshutdown(TSRMLS_C);
00461        }
00462 #endif
00463 
00464        zend_ts_hash_destroy(&php_com_typelibraries);
00465        return SUCCESS;
00466 }
00467 /* }}} */
00468 
00469 /* {{{ PHP_RINIT_FUNCTION
00470  */
00471 PHP_RINIT_FUNCTION(com_dotnet)
00472 {
00473        COMG(rshutdown_started) = 0;
00474        return SUCCESS;
00475 }
00476 /* }}} */
00477 
00478 /* {{{ PHP_RSHUTDOWN_FUNCTION
00479  */
00480 PHP_RSHUTDOWN_FUNCTION(com_dotnet)
00481 {
00482 #if HAVE_MSCOREE_H
00483        if (COMG(dotnet_runtime_stuff)) {
00484               php_com_dotnet_rshutdown(TSRMLS_C);
00485        }
00486 #endif
00487        COMG(rshutdown_started) = 1;
00488        return SUCCESS;
00489 }
00490 /* }}} */
00491 
00492 /* {{{ PHP_MINFO_FUNCTION
00493  */
00494 PHP_MINFO_FUNCTION(com_dotnet)
00495 {
00496        php_info_print_table_start();
00497 
00498        php_info_print_table_header(2, "COM support", "enabled");
00499        php_info_print_table_header(2, "DCOM support", COMG(allow_dcom) ? "enabled" : "disabled");
00500 
00501 #if HAVE_MSCOREE_H
00502        php_info_print_table_header(2, ".Net support", "enabled");
00503 #else
00504        php_info_print_table_header(2, ".Net support", "not present in this build");
00505 #endif
00506 
00507        php_info_print_table_end();
00508 
00509        DISPLAY_INI_ENTRIES();
00510 }
00511 /* }}} */
00512 
00513 /*
00514  * Local variables:
00515  * tab-width: 4
00516  * c-basic-offset: 4
00517  * End:
00518  * vim600: noet sw=4 ts=4 fdm=marker
00519  * vim<600: noet sw=4 ts=4
00520  */