+ has several different types of uses:
1. Application Agent: A file that contains application registration information, that is, when a client accesses a remote computer
Server program, the application agent running on the client will write the information about the server application
into the client computer.
2. Server application: The COM + application executes within the process of the COM + application
this InputStreamReader class. The program will use this Objinreader object to complete the actual data read operation and save the result as a string.
while ((Strinputline = Objinreader.readline ())!= null)
Strresponse + = Strinputline + "
";
Objinreader.close ();
In this part of the code, the program uses a while loop to read all the data until the input is empty (null). Objinreader is an object of the BufferedReader class that buffers the read characters and returns the entire block to the s
problems described in ClassInterfaceAttribute.This is the default setting of ClassInterfaceAttribute.
None: indicates that the class interface is not generated for the class. If no interface is explicitly implemented, the class can only provide post-bound access through the IDispatch interface. This is the recommended setting for ClassInterfaceAttribute. The only way to publish a function through an interface explicitly implemented by the class is t
Dev (08-20-00) Running as CGI
COM mark in PHP4
Now let's get started. to instantiate a component with COM of PHP4, we need the "OLE program identifier" of the new operator and object ":
$ Instance = new COM ("$ identifier ");
?>
Because COM is a reserved word of PHP4, it transmits the identifier of this object
versions. this may cause applications that require features of a specific version to crash. these types of situations are commonly knownDLL hell. With reg-free COM, you can avoid these problems because other applications cannot access your application's COM component.
In addition, reg-free com streamlines the upg
that defines the ID of the COM object type library; Classroot\typelib the registry key, enumerates all the TypeLib in the system.
Look at what we're going to do first: Get ClassID from ProgID, which can be done by invoking the CLSIDFromProgID function of the COM base library, which is defined in the Platform SDK as follows:
HRESULT CLSIDFromProgID (
LPCOLESTR Lpszprogid ,
Lpclsid pCLSID
);
In order to be
Go near COM Interop
Getting Started with--RCW
Introduction
As a result of the current addition of a responsibility to the original system porting to. NET platform, spent some time on COM--GT; NET has done some basic research. Post this article and hope to share with you. Deficiencies, please correct me. Thanks first.
First, the basic concept
What is COM Intero
) Running as CGI
COM tags in the PHP4
Now let's start by instantiating a component with PHP4 COM, which requires the "OLE program identity" of the new operator and the object:
$instance = new COM ("$identifier");
?>
Because COM is a PHP4 reserved word, it transmits this object's identity to a constructor, now ge
workbook
$ex->application->activeworkbook->saveas ("Ourtest");
#Close all workbooks without questioning
$ex->application->activeworkbook->close ("False");
Unset ($EX);
?>
This is example should get your going with the Excel COM and PHP. Of course there are many more objects to use. Writing an OOP wrapper for the principal functions'll make access to the Excel objects even.
Using PHP
Recently, due to project needs and access to COM technology that has never been thoroughly understood, I decided to calm down and study it well. Let's get started with COM.
COM (Component Object Model) is a component standard proposed by Microsoft. In the com standard, a c
"personal database" website from Fujian, broke into sight and provided personal information storage and online dating functions. Despite being a small site, "The performance is very good, and the average PV value is 35". "The form is actually very similar to Myspace ". In March 2005, Pang Shengdong spent 0.98 million yuan to buy a domain name 51.com, and in July of the same year, it acquired 10770.
get started. to instantiate a component with COM of PHP4, we need the "OLE program identifier" of the new operator and object ":$ Instance = new COM ("$ identifier ");?>Because COM is a reserved word of PHP4, it transmits the identifier of this object to a constructor. Now we get an example of this component. Based on the nature of the OOP class, we can easilyTo
Information Access
√
√
Model Structure Tree
√
√
object property Access
√ But the API structure is cumbersome
√API Clear Structure
Object Lookup
√ But the API structure is cumbersome
√API Clear Structure
LINQ Lookup
X
√
Object user custom property additions and modifications
√
X,
requires the development of a specification for these component objects to work in a uniform and standard manner.
COM is a binary specification that is independent of the source code. In this way, even though COM objects are created by different programming languages and run in different process spaces and different operating system platforms, these objects can communicate with each other.
Object | Transformation run Environment: Visual Studio.NET Beta2, VC7, C #
References: MSDN
Level: Entry level
First, the preface
COM component objects are completely different from. NET class objects, but to make a COM client call a. NET object like a COM component, the. NET program
Like to use. NET objects using COM
can be related to the interface of the component communication! )What is an interfaceThe interface is the only way for COM to communicate with the outside world, and his definition is the core of the COM specification. An interface is a set of logically related functions that can be thought of as a pointer to a reorganization function!The following in easy language use WinHTTP this
export the COM type library using Tlbexp.exe.
TlbExp siscallib.dll/out:siscallib.tlb
(3 Registration Fitting
REGASM MyService.dll
(4) Add accessories to the GAC
Gacutil-i MyService.dll
Note: This step is not required.
(5) Modify COM external visibility configuration in AssembyInfo.cs
Set ComVisible to False so that the type in this assembly
is not visible to C
type library, and generates an InterOP assembly and a namespace. for instructions, see How to: Generate InterOP assemblies from type libraries.
System. runtime. interopservices.Typelibconverter classThis class provides methods to convert coclasses and interfaces in a Type Library to metadata within an assembly. it produces the same metadata output as tlbimp.exe. however, unlike tlbimp.exe, The typelibconverter class can convert an in-memory type library to metadata.
Custom wrappersWhen a T
OCX. screennum = 4;Content from 17 jquery
Jquery together, 17 jquery
3. Register com events and implement function callback We can call the com methods and attributes to access and set the com.But this is not enough, because we cannot always take the initiative to call com methods or attributes to obtain data
The COM (ComponentObjectModel) Component Object Model is a way to share binary code across applications and languages. COM can be loaded as a DLL by a local program or called by a remote process in PHP 4.2.0 to 4.2.3 through DCOM. you can use the w32api_register_function function to call an external DLL. open the extended php_w32api.dll in ini.
If PHP 5 is used, only the php
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.