1.The difference between include directive on require directive is only in the kind of error they throw on failure. Include () andinclude_once () will merely generate a warning on failure, while require () andrequire_once () will cause a fatal error and termination Of the script.
COM_STUDY1. When the client wants to call a COM object, he finds a pointer to the corresponding COM object interface through a 128-bit GUID, and calls the corresponding function collection through the interface pointer. 2. Cright is only deed with the interface 3. The customer gets the COM object through the classID. In the system, there must be information about the COM object, you can pass the relevant COM object's module file and the entry point of the COM object, customer You can create a COM object by CLSID. So, when the client creates a COM object, he also gets at least one of the GUID of the interface pointer, then the client can call the interface by the GUID, a COM object at least Implement an interface. 5. A COM object may implement multiple interfaces, he can get the structure, inclusion and aggregation of all other interface 6.com via a interface pointer, see the book 147. Reusability is in the C object with the COM object Different, the former is a non-private method of the parent class by inheritance, while the latter is an interface method including an object through inclusion and polymerization. And the reuse of the COM object, that is, after the COM object B is updated, COM object A can still use the COM object B method and do not need to recompile, but it is impossible in C . 8. The polymorphism of Com object is expressed through the interface. In C , it is to express its polymorphism by a method with a Virtual modifier. 9. The interface is also obtained by uniquely identifying its corresponding memory address, and the interface pointer is obtained, in fact, by IID. 10. Convert the IDL interface description file to a common * .h header file can only be inherited using the interface in the MIDL tool 11.com in the VC, and the class can inherit multiple inheritance. 12. Control the lifecycle and interface query of the object through the interface 13. Iunknown introduces the "reference count" method, which can effectively control the living cycle of the object, is not the Java garbage collection mechanism is a matter of 14. Interface query It is a way to obtain other interface functions to obtain an interface pointer. 15. Any COM object that implements the iUnknown interface automatically gets a method iterface iunknown {hResult queryinterface ([in] refiidiid, [out] void ** ppv); ulong addref (void); Ulong Release (void);