This is a discussion on COM functions in php within the PHP Programming forums, part of the Web Development category; COM: Component Object Model COM is an acronym for Component Object Model; it is an object orientated layer (and associated ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| COM: Component Object Model COM is an acronym for Component Object Model; it is an object orientated layer (and associated services) on top of DCE RPC (an open standard) and defines a common calling convention that enables code written in any language to call and interoperate with code written in any other language (provided those languages are COM aware). Not only can the code be written in any language, but it need not even be part of the same executable; the code can be loaded from a DLL, be found in another process running on the same machine, or, with DCOM (Distributed COM), be found in another process on a remote machine, all without your code even needing to know where a component resides.
__________________ Thanks & Regards, R.Kamalakannan. |
| Sponsored Links |
| |||
| Hi, COM is one of the main ways to glue applications and components together on the Windows platform; using COM you can launch Microsoft Word, fill in a document template and save the result as a Word document and send it to a visitor of your web site. You can also use COM to perform administrative tasks for your network and to configure your IIS; these are just the most common uses; you can do much more with COM.
__________________ With, J. Jeyaseelan Everything Possible |
| |||
| Hi, The COM class allows you to instantiate an OLE compatible COM object and call its methods and access its properties.
__________________ With, J. Jeyaseelan Everything Possible |
| |||
| COM objects abstract a group of functions in software into a redistributable binary component that can interface with a system in ways a scripting language can't interface. Developed by Microsoft, COM objects are traditionally used in more commonplace Windows-based programming environments such as Visual Basic and Active Server Pages (ASP).
__________________ With, J. Jeyaseelan Everything Possible |
| |||
| We can only use these COM object in Windows servers. Generally now a days all are looking for the Linux server with Apache and PHP. I think this would be the major drawback of COM
__________________ With, J. Jeyaseelan Everything Possible |
| |||
| Hi The COM class provides a framework to integrate (D)COM components into your php scripts PHP Code: Falcon ![]() |
| |||
| 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. You are responsible for installing support for the various COM objects that you intend to use (such as MS Word); Don't and can't bundle all of those with PHP.
__________________ Thanks & Regards, R.Kamalakannan. |
| |||
| For Each Starting with PHP 5, you may use PHP's own foreach statement to iterate over the contents of a standard COM/OLE IEnumVariant. In laymans terms, this means that you can use foreach in places where you would have used For Each in VB/ASP code. Example: For Each in ASP Quote:
__________________ Thanks & Regards, R.Kamalakannan. |
| |||
| Example: while() ... Next() in PHP 4 PHP Code:
__________________ Thanks & Regards, R.Kamalakannan. |
| |||
| Example: foreach in PHP 5 PHP Code:
__________________ Thanks & Regards, R.Kamalakannan. |
| |||
| Exceptions (PHP 5) This extension will throw instances of the class com_exception whenever there is a potentially fatal error reported by COM. All COM exceptions have a well-defined code property that corresponds to the HRESULT return value from the various COM operations. You may use this code to make programmatic decisions on how to handle the exception.
__________________ Thanks & Regards, R.Kamalakannan. |
| |||
| Hi, Thanks for providing these information Is there COM functions working on Linux server? if not means is there any other way to use this in PHP using Linux server?
__________________ With, J. Jeyaseelan Everything Possible Last edited by Jeyaseelansarc : 04-11-2008 at 06:28 AM. |
| |||
| Hi Buddies phpinfo() has a "com_dotnet" section. It's kind of odd. Here it says... COM Support: enabled DCOM Support: disabled .net Support: enabled What exactly is COM support? What exactly is DCOM support? And what exactly is .net support? And why would it say enabled when .NET is not installed? DCOM means an ActiveX file gets used. COM pretty much means the same thing. Those files tend to be based upon an object model and have a few extra functions there to help with various programming environments. ordinal hint RVA name 1 0 000017A6 DllCanUnloadNow 2 1 0000177A DllGetClassObject 3 2 00001790 DllRegisterServer 4 3 00001764 DllUnregisterServer Other than that COM is not much different than standard libraries. And DCOM... that one seems like it might be a COM file put into a publicly accessible folder, but I'll need some more help here, if such is available, because something is not sitting too well here. Regards Falcon ![]() |
| |||
| Obviously, DCOM is distributed but COM is not. To be more precise, there are three main elements added to COM: Quote:
__________________ Thanks & Regards, R.Kamalakannan. |
| |||
| com_get com_get -- Gets the value of a COM Component's property [deprecated] Syntax: mixed com_get ( resource com_object, string property ) Returns the value of the property of the COM component referenced by com_object. Returns FALSE on error. Example Quote:
__________________ Thanks & Regards, R.Kamalakannan. |
| |||
| com_propget com_propget -- Alias of com_get() Note: This function does not exist in PHP 5; instead, you should use the regular and more natural OO syntax to access properties or call methods.
__________________ Thanks & Regards, R.Kamalakannan. |
| |||
| com_set com_set -- Assigns a value to a COM component's property. Syntax: void com_set ( resource com_object, string property, mixed value ) Sets the value of the property of the COM component referenced by com_object. Returns the newly set value if succeeded, FALSE on error. Example: PHP Code:
__________________ Thanks & Regards, R.Kamalakannan. |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| PHP FTP Functions | Kamalakannan | PHP Programming | 54 | 04-14-2008 04:42 AM |
| Sql functions | itbarota | Database Support | 11 | 02-29-2008 01:08 AM |
| What are encryption functions in PHP? | Sabari | PHP Programming | 2 | 09-17-2007 08:53 AM |
| What are Virtual Functions? How to implement virtual functions in "C"? | Sabari | C and C++ Programming | 4 | 09-10-2007 10:35 PM |
| Imagemagick functions | Sivamurugan | PHP Programming | 4 | 09-09-2007 10:51 PM |