(CLSID_Account,
NULL,
CLSCTX_INPROC_SERVER,
IID_Iaccount,
Reinterpret_cast ( pAccount ));
3. Finally, release the component object. This work should be completed before the program exits, for example, in the response function of message WM_CLOSE:
If (pAccount! = NULL)
PAccount-> reallocate ();
To call other functions in the Code component, you can use the interface pointer pAccount of the component object:
......
BSTR bstrResult;
PAccount-> Post (100, bstrResult );
SysFreeString (bstrResult );
Statement: ThisArticleThis is from http://www.moon-soft.com/doc/51731.htm. if you want to renew it, please refer to the original article.
I often talk about com, but it is always difficult to correctly describe this thing. Therefore, it is necessary to understand it again.
Com -- Component Object Model (Component Object Model) is a set of software development methods and specifications proposed by Micro
services|web|xml| check box for simplicity, the examples above all use VBScript to access Web services. The SOAP WSDL moniker can actually be written using Visual c+, Visual Basic 6.0, Visual Basic. NET, or C #. For example, Visual Basic. NET can also use compiled managed code to access the same object, as shown in the following example:
Imports System
Imports System.Runtime.InteropServices
Module wkoclien
serialization.In use, you can use coinitialize to create an object that can be directly connected to a thread to achieve the highest performance. Creating a multi-threaded object can directly receive calls from all threads, without queuing of messages as a single thread, but with the need for com to create a collection proxy between threads, the access efficiency is not high.
Let's take a look at the Delph
Php calls the implementation code of components through the COM class. In PHP4.2.0 to 4.2.3, you can use the w32api_register_function to call an external DLL, provided that you need to open the extended php_w32api.dll in php. ini. If you are using PHP5, you can use the w32api_register_function function in PHP 4.2.0 to call an external DLL, provided that you need to open the extended php_w32api.dll in php. ini.
If PHP 5 is used, only the php
first, the basic knowledge of COM components introduction:
1, what is COM
COM is a Microsoft set up a component of the specification, the purpose is to achieve the reuse of components, whether you are in C, DELPHI, VB what language to write, as long as the observance of this specification is COM components, can be inv
Part 1 What is com and how to use com
Preface:
The purpose of this article is to provide a programming guide for programmers who have just come into contact with COM and help them understand the basic concepts of COM. The content includes the com standard introduction, impor
In-depth understanding of COM (I)
-- The method parameter types are cruntimeclass * and void *.
I often see questions on the Forum about how to pass void * or a custom class, such as class Ca and Ca. This article describes how to pass a pointer to a custom Class Object and clarify the role of midl, so that it is not necessary. Note that the transfer of custom types mentioned in this article is not the same concept as the transfer of custom structure
one of the principles and implementation of COM
COM component is actually a special object system, follow a unified standard, so that each software can access the object in some way, can do component calls. COM is the unified standard-invoking COM components through interf
To use COM1, first of all, preparations: Access MSSQLSERVER2000 through PHP in Windows, there are two ways, (1) using COM (2) one is to use the MSSQL _ series functions in php. ini settings: (1) to allow DCOM, you need to set php. com. remove the semicolon before allow_dcomTRUE. (2) Use
Use COM 1. First of all, prepara
In PHP 4.2.0 to 4.2.3, you can use the w32api_register_function to call an external DLL, provided that you need to open the extended php_w32api.dll in php. ini.If PHP 5 is used, only the php com class is used to call the DLL.Basic Method: $ obj = new COM ("server. object ")Obviously, the COM class improves the php function. At the same time, this class changes th
of the information, of course, you can also press "I" key into the interactive start mode, of course, after accidentally kicked off the power can also easily input "Y" File system detection, is not very easy to use? But how did you stop when you started the system? Like Linux is stupid, it doesn't know I want to log into the system from here? Do not blame Linux, we will immediately explain why this is the case and the solution.
6, open ttyS0 Landing
In fact, Linux startup information is display
attribute value of an image in XML is a string, all of the image's ID is placed in the image as a string, and then converted to a number in the callback to find the resource, the method is rather stupid, and later found a better way to do the modification.You can complete the process of customizing the Ribbon menu by following the steps above.Third, operate ExcelTo access and manipulate excel in the add-in, you need to add the following statement to
interface later, dispinterface does not have version control problems described in classinterfaceattribute.This is the default setting of classinterfaceattribute.
None: Indicates that a class interface is not generated for a class. If no interface is explicitly implemented, the class can onlyIdispatchInterface provides later bound access. This isClassinterfaceattribute. The only way to publish a function through an interface explicitly implemented b
In this article, we will discuss the following issues:· Use C # to create a simple COM object (using the Interop feature of COM ).· Access COM from the VC ++ client. The client software uses the TypeLibrary (. TLB file ).To make it simple and convenient for developers to use and test, we use the Northwind
1. Advanced Features of COM
There are some advanced features in the COM specification, such as connecting objects, permanent storage, consistent data transfer, and so on, so that the COM specification has more vitality, they are also the basis of OLE, but their applications are not limited to OLE, these advanced features have been widely used on Windows operatin
services|web|xml| check box in the COM + Application Export Wizard shown in Figure 3, enter the location and name of the proxy. msi file.
In the COM + Application Export Wizard shown in Figure 3, enter the location and name of the proxy. msi file.Figure 3:com+ Application Export Wizard
Installs the agent. msi file on a separate client computer as a pre
) are not required because the ASP can directly relate to the presentation layer
Or the Business Rules Layer Component dialog. Because most applications are written separately by ASP, a legitimate problem is:
Why do you want to transfer code to a COM component?
In my opinion, ASP is only used to express layer code, so I choose to use business rule logic or any form of data access
are loaded into the
In PHP 4.2.0 through 4.2.3, you can use the W32api_register_function function to call an external DLL if you need to open an extended php_w32api.dll in php.ini.
If you are using PHP 5, calling the DLL only uses the COM class of PHP.
The basic method is: $obj = new COM ("Server.object")
It's obvious that the COM class has increased the PHP functionality by a large
The services|web|xml| check box compiles and runs this Visual Basic. NET application, producing the same output as the previous two VBScript samples.
Because the server application publishes components as CAO and Wko two forms, the remote client chooses the activation method. Although it may only make sense for academic research, a single client computer can indeed use two remote activation methods of the same component to access the virtual root of
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.