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
This series of articles by Net_assassin finishing, reproduced please indicate the source.
http://blog.csdn.net/net_assassin/article/category/1100363
Author: Net_assassin e-mail: net_assassin@hotmail.com look forward to interacting with like-minded friends
ID3DXSprite objects are a great surprise to programmers who plan to use Direct3D to write 2D games.
The advantage of this is that the full 3D renderer is ready to serve you at the same time as the previous implementation (DirectDraw) a
My ef journey to connect mysql and ef journey to connect mysqlBaidu: ef5 mysqlhttp: // my.oschina.net/u/170703/blog/210814? P = 1 Baidu: dotconnect for mysql can be found on the Limit Software WebsiteDcmysql{"Error occurred when creating the configuration section handler for entityFramework: failed to Load file or assembly" EntityFramework, Version = 4.4.0.0, Culture = neutral, publicKeyToken = b77a5c561934e089 "or one of its dependencies. The Assembly list definition found does not match the As
return type in a COM component, HRESULT is actually a long type, is greater than or equal to 0 to indicate success, a negative value is a failure and itself is a failure code, is not a slight sense of pain, Microsoft great God is nothing to get a wonderful return value to play.2.1.2 GUIDGUIDs and IID are actually a cargo, is a 128-digit number, known as the world's unique identification code, VS provides tools to generate, to ensure that each unique,
There are many kinds of communication between DLL and EXE, this paper uses the method of callback function, this article will also study multi-threaded, multi-module case, the callback function where the thread, do not say, the first attached code:The following is the DLL module, the DLL's project file:[Delphi]View Plaincopy
Library Dllapp;
Uses
Windows
Sysutils,
Classes,
Dllclass in ' Dllclass.pas ';
{$R *.res}
var
Gdllserver:tdllserver;
function Addserver
Supports switching between the left and right sides of the image, and the up and down of the image.(In the simulator, the top and bottom are reversed, and the left and right are reversed. It is estimated that there are still some problems with the animation effect in the actual hardware environment)
//###################################### ######################################## #################################// Main. cpp// Designed by xqh// Date: 2009--12--29
// # Include # Include # Includ
levels of vibration function, and the larger the number, the stronger the adjustment capability. When the device has different levels of vibration capabilities, I can use the vibratenote structure for detailed settings.
How can we start using the vibration function? The mobile phone SDK provides the vibrate function:
Hresult vibrate (Dword cvn,Const vibratenote * rgvn,Bool frepeat,DWORD dwtimeout);
It provides different amplitude, different frequency
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.