Click here to Skip to main content
15,886,137 members
Articles / Programming Languages / C++

COM from scratch - PART ONE

Rate me:
Please Sign up or sign in to vote.
4.89/5 (118 votes)
17 Apr 2004CPOL13 min read 291.9K   9.2K   254  
An article about COM.
extern "C" const IID IID_IComponent1 ;
extern "C" const CLSID CLSID_Component1 ;





  // The extern is required to allocate memory for C++ constants.
//IID and CLSID for Component 1
// {24A0BDB0-596E-4faa-98A6-D715A675679E}
extern "C" const IID IID_IComponent1 = 
{ 0x24a0bdb0, 0x596e, 0x4faa, { 0x98, 0xa6, 0xd7, 0x15, 0xa6, 0x75, 0x67, 0x9e } };

// {3B410A55-1E19-439c-B624-09D2EA3143D3}
extern "C" const GUID CLSID_Component1 = 
{ 0x3b410a55, 0x1e19, 0x439c, { 0xb6, 0x24, 0x9, 0xd2, 0xea, 0x31, 0x43, 0xd3 } };



// Interface definition  for Component1
interface IComponent1 : IUnknown
{
 
	virtual void __stdcall DefineWindow_Com1(bool inner)=0;
    virtual void __stdcall ShowWndBackground_Com1(COLORREF bgcolor)=0;
    virtual IUnknown* __stdcall Queryitself1()=0;
    virtual void __stdcall MenuitemNotselected1()=0;
    virtual void __stdcall Night()=0;
} ;

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
Denmark Denmark
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions