Server code -----------------------------------------------------------------------------------------------------------------------------------------------------------
Server code certificate ------------------------------------------------------------------------------------------------------------------------------------------------------------
Altstopwatch. idl [interface definition file]
// altstopwatch.idl : IDL source for altstopwatch//// This file will be processed by the MIDL tool to//
.tli two files under your Project compilation folder, open and look at these two files contain declarations of COM interface types and functions, as well as some library information. In fact, #import指令使dll库中的类型信息导出为描述的COM接口的c + + class header file. The "raw_interfaces_only" attribute makes the generated file only one MSXML6.TLH, and the interface function only has the HRESULT return type one form, and omit the raw_ prefix; If you remove this property,
Initialization and ActiveX control templates ".
Note:This article does not cover how to mark the control as secure download. For more information about code download and $ code signature, see Internet client SDK. Go back to the top. For more information, follow these steps to mark your MFC ActiveX control as a secure operation for Script Security and initialization:
Add the following cathelp. h and cathelp. cpp files to your project to implement the helper function of CreateComponentCategory
7. com_interface_entry_autoaggregate (IID, punk, CLSID) parameter ATL routine commap
Let's take a look at the macro definition:# Define com_interface_entry_autoaggregate (IID, punk, CLSID )/{ IID ,/(DWORD) _ ccomcachedata (DWORD) offsetof (_ commapclass, punk )/>: Data ,/_ Cache },Let's take a look at its typical usage:Class cautoagg:Public idispatchimpl,Public isupporterrorinfo,Public ccomobjectroot,Public ccomcoclass{............};Similar to general components.Class couter:Public cchainbase,
array. When dllgetclassobject requests a factory class object, it searches for this array to see if there is a factory class object that matches clsid. When it finds a matched CLSID, it creates a class factory object and returns the class factory pointer to cogetclassobject. Then the client can call iclassfactory based on the class factory pointer returned :: the createinstance method creates a component, and the class factory creates a COM component based on the methods defined in the array.
T
, cparticle is not very complicated. It has a series of public variables, the attributes of the particles-set the default value through the constructor, And the inline function executes the update. Don't worry about updating functions-you will know how it works later. Now let's look at cparticle's mother cparticleemitter.
Cparticleemitter
This class contains our particle array, using particle attributes (gravity, texture, etc)
Class cparticleemitter
{Public: cparticleemitter (); Virtual ~ Cparti
Donuts from Microsoft
//-----------------------------------------------------------------------------// File: filewatch. cpp//// Copyright (c) Microsoft Corporation. All rights reserved.//-----------------------------------------------------------------------------# Include "stdafx. H"
//-----------------------------------------------------------------------------// Name:// Desc://-----------------------------------------------------------------------------Cfilewatch: cfilewatch (){M_nfilestowa
include:
1. comimport: it marks the class as an external com class.
2. guid: it is used to specify a universal unique identifier (UUID) for a class or interface ).
3. interfacetype, which specifies whether the interface is derived from iunknown or idispatch.
4. preservesig, which specifies whether the native return value should be converted from hresult to. NET Framework exception.Section 6 Interface Conversion
C # not only supports the. NET
contained object only needs to implement a lightweight iobjectwithsite interface. This interface provides the following methods:Table 3 iobjectwithsite DefinitionMethod descriptionHresult setsite (iunknown * punksite) receives the iunknown pointer from IE. A typical implementation is to save the pointer for future use ..Hresult getsite (refiid riid, void ** ppvsite) receives and returns the specified interface from the location set through setsite, A
dllgetclassobject requests a factory class object, it searches for this array to see if there is a factory class object that matches clsid. When it finds a matched CLSID, it creates a class factory object and returns the class factory pointer to cogetclassobject. Then the client can call iclassfactory based on the class factory pointer returned :: the createinstance method creates a component, and the class factory creates a COM component based on the methods defined in the array.
The factory t
END;
Four, get IHTMLDocument2 how to operate
Procedure Tmyform.btlogoutclick (Sender:tobject); var myform:ihtmlformelement; Begin if assigned (myDocument) THEN BEGIN if rightposex (' Judge page title ', Mydocument.title)
Prohibit the Page Pop-up dialog box (mainly is the CSDN forum a Warrior's method)
Uses Windows, Messages, sysutils, variants, Classes, Graphics, Controls, Forms, Dialogs, Olectrls, SHDOCVW, stdctrls,mshtm L, Extctrls, Comctrls, Idbasecomponent, Idcomponent, Idtcpconnection, Id
();};
The constructor is responsible for allocating resources and initializing member variables. The Destructor is responsible for releasing resources:
cAnimMesh::cAnimMesh(){m_is_play_anim = true;m_device = NULL;m_anim_controller = NULL;m_root_frame = NULL;
m_alloc_hierarchy = new cAllocateHierarchy();}
cAnimMesh::~cAnimMesh(){D3DXFrameDestroy(m_root_frame, m_alloc_hierarchy);release_com(m_anim_controller);
delete m_alloc_hierarchy;}
The main task of the load_from_xfile () function is
and potentially unnecessary parts, such as com registration, runtime service, proxy, thread model, and mail handling.
Create an XML reader and writer for functions exported from xmllite. dll. Link to xmllite. lib and include the xmllite. h header file in the Windows SDK to access them. The generated com style interface uses the familiar iunknown interface method to manage the lifetime. The com istream interface also plays a role and indicates memory. In addition, there is no com dependency; no
Let's not talk about anything else.
Code , The code is very simple, do not understand the message.
Code
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1 Using System; 2 Using System. Collections. Generic; 3 Using System. LINQ; 4 Using System. text; 5 Using System. runtime. interopservices; 6 Using Mshtml; 7 Using System. Threading; 8 Using System. runtime. interopservices. comtypes; 9 Using System. I
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.