Introduced
The purpose of this tutorial is to show you how to create a COM server using ATL and use Visual C + + and Visual Basic programs to call this server separately. I don't want to delve into the details of COM, nor do I want you to get bogged down in IDL. This tutorial is designed for VC + + novice programmers, telling them how easy it is to use ATL to create a COM object and allow them to have more
similar to the assembly process of various plug-ins in the hardware industry, enabling the software to industrialize, Greatly reduces the software development cost, greatly enhances the software production efficiency, realizes the software resources sharing.
ATL technology
1) ATL
ATL is an abbreviation for the ActiveX Template Library, which is a set of C + +
--visual Studio in the next version of Visual studio®. NET will include an application called an ATL Server for C + + programmers, which greatly simplifies the development of high-performance, scalable Web applications. The ATL server provides a set of classes that extend the Active Template Library (ATL) to access all of the functionality of IIS through ISAPI. T
5. com_interface_entry_aggregate (IID, punk) parameter ATL routine commap
This section describes the macros used to aggregate objects in ATL. For more information about the concept of a clustered object, see other reference books.Now let's take a look at the typical usage of this macro:Class cnames:Public idispatchimpl,Public isupporterrorinfo,Public ccomobjectroot,Public ccomcoclass{.....};Caggregate is a
ATL is used to write COM programs, the CLR is the common language runtime of. NET, MFC refers to the MFC class Library, MFC programs are used in these class libraries to make programs, WIN32 General is not MFC, using API functions compiled by the program. MFC, ATL, and the CLR are the 3 largest libraries built into VC2005, covering a variety of Windows development methods and development applications. Of co
of the entire project. In general, this is an old database. 10 In addition MFCNo major improvements or updates were made in addition to repairs and supplements. If you ask MFC How long will it last? Well, this is a problem. If one day MFC No, at this level, Microsoft does not have other products to replace it; you can call the MFC class library;
1) MFC Appwizard (exe)
2) MFC Appwizard (DLL)
3) MFC ActiveX controlwizard
3. ATL, an Active
Implementation window in ATL
ATL provides some tool classes to implement windows, so that you can easily create windows without relying on MFC In the ATL component.
1. Implementation dialog box
There are three template classes in ATL for creating a dialog box:
(1) csimpledialog: Create mode dialog box, which can be ho
This article describes the complete process of developing an ActiveX control using ATL.
1. Create a project
Click "new project…" on the start page ...", Select the "ATL Project" project under the "ATL" category. The project name is "Calculator ". In the Project Wizard that appears later, use the default configuration.
2. Add controls
Right-click the project in
Create a signed cab file for the MFC and ATL controls
If you plan to sell the MFC control and ATL control over the Internet, you should package it into a signed small (Cabinet-cab) file. Sign the file to ensure that the source code is safe when the user downloads your control. A cab file contains a compressed version of your control and its installation information (for example, which dynamic link library D
ATL provides some tool classes to implement windows, so that you can easily create windows without relying on MFC In the ATL component.
1. Implementation dialog box
There are three template classes in ATL for creating a dialog box:
(1) csimpledialog: Create mode dialog box, which can be host Windows controls
Template Class csimpledialog: Public cdialo
The ATL component registration is a bad bug that needs to be solved by modifying the ATL source code. This record is recorded here to facilitate the next time you reinstall the machine.
I used ATL to write a COM component (compiled under MBCS). If it is installed in a Chinese path, registration will fail.Why does it fail?Open the source file statreg. h of
Specific functions of uses_conversion in ATL
From http://blog.csdn.net/xiaoxiongli/archive/2008/02/22/2113783.aspx
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->
ATL: conversion macros are a convenient way to convert various character encodings. They are very useful in function calls. The name of the ATL
The application in this article is vc6.0. For other versions, the wizard may be different from the one described in this article.
Address: http://www.codeproject.com/atl/com_atl.aspBeginner's Tutorial: COM/ATL simple project
Author: C. Lung.
Introduction
The purpose of this tutorial is to give readers a preliminary impression on How to Use ATL to create a COM Ser
Author: useresu download source code
SummaryThis article introduces a simple com plug-in (addin) that uses VC ++ ATL (Active Template Library) and idtextensibility2 to add a simple function to Microsoft Word ), add the toolbar buttons, menus, and other visual components, and add the Event Response Method to them. Finally, the method for mixed programming with office macros is briefly described.When talking about office-related programming, you may fi
Ccomobjectrootobjectbase provides an internal implementation of interface query in table-driven mode, that is, internalqueryinterface (). Therefore, when creating an ATL-Based Com class, you must create a ing table containing all the Implemented interfaces.
1. begin_com_map, end_com_map, com_interface_entry, and com_interface_entry2 macros
ATL provides
Begin_com_map,
End_com_map,
Com_interface_entry
Com_in
12.1.10Use ATL to create out-of-process Components
1. Problem Description
All components created earlier belong to In-process components, that is, the component object is in the same process as the customer process, and the customer process calls the services provided by the component object within the same process; external components, the component object and the customer process belong to different processes. The customer process can call the s
Tip: It took me nearly two days to solve a purely technical article. I found that I hope I could solve this problem for anyone who encountered this kind of problem. For details, please indicate the source (asnowwolf.blog.hexun.com)
It was not long before I learned VC and encountered a problem: the ATL component I wrote triggers an event, but cannot be responded by the script. To solve the problem, follow these steps:
1. Write a test page to simplify t
1. Open vs2008 and click "new project…" on the start page ...", Select the "ATL Project" project under the "ATL" category. The project name is "atltest ". In the Project Wizard that appears later, use the default configuration.
2. Add controls
Right-click the project in solution manager, select "add" and "class", and select the ATL control type u
The ATL window process adopts a call mechanism called thunk to solve the following problems:To create a window by using a UI thread, register a window class, create a window, and display a window. The corresponding API functions are registerclass, createmediawex, and showwindow. In the registration window stage, you need to transmit the address of a callback function. The dispatchmessage in the message loop is responsible for distributing the message
1. Where is progid?
This is the first problem I encountered when I used the ATL wizard. You cannot find the progid you want to modify. It used to hide in the. RGS file with the same name as the component. RGS is the script file registered by the component. When you register the component with regsvr32.exe, the component calls this file internally. RGS files are stored in dll as resources.
2. manually add a method to modify the location.
Assume
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.