Click here to Skip to main content
15,885,767 members
Articles / Desktop Programming / ATL

Pluggable Components using Component Categories Part I

Rate me:
Please Sign up or sign in to vote.
4.96/5 (17 votes)
18 Sep 20034 min read 68.3K   1.1K   56  
An article on using component categories to create pluggable components
/* this ALWAYS GENERATED file contains the definitions for the interfaces */


/* File created by MIDL compiler version 5.01.0164 */
/* at Mon Jun 09 11:14:03 2003
 */
/* Compiler settings for C:\Documents and Settings\zhowlan\My Documents\My Projects\ComCatTest1\ComCatRed\ComCatRed.idl:
    Oicf (OptLev=i2), W1, Zp8, env=Win32, ms_ext, c_ext
    error checks: allocation ref bounds_check enum stub_data 
*/
//@@MIDL_FILE_HEADING(  )


/* verify that the <rpcndr.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 440
#endif

#include "rpc.h"
#include "rpcndr.h"

#ifndef __RPCNDR_H_VERSION__
#error this stub requires an updated version of <rpcndr.h>
#endif // __RPCNDR_H_VERSION__

#ifndef COM_NO_WINDOWS_H
#include "windows.h"
#include "ole2.h"
#endif /*COM_NO_WINDOWS_H*/

#ifndef __ComCatRed_h__
#define __ComCatRed_h__

#ifdef __cplusplus
extern "C"{
#endif 

/* Forward Declarations */ 

#ifndef __IComCatDrawRed_FWD_DEFINED__
#define __IComCatDrawRed_FWD_DEFINED__
typedef interface IComCatDrawRed IComCatDrawRed;
#endif 	/* __IComCatDrawRed_FWD_DEFINED__ */


#ifndef __ComCatDrawRed_FWD_DEFINED__
#define __ComCatDrawRed_FWD_DEFINED__

#ifdef __cplusplus
typedef class ComCatDrawRed ComCatDrawRed;
#else
typedef struct ComCatDrawRed ComCatDrawRed;
#endif /* __cplusplus */

#endif 	/* __ComCatDrawRed_FWD_DEFINED__ */


/* header files for imported files */
#include "oaidl.h"
#include "ocidl.h"
#include "ComCatDraw.h"

void __RPC_FAR * __RPC_USER MIDL_user_allocate(size_t);
void __RPC_USER MIDL_user_free( void __RPC_FAR * ); 

#ifndef __IComCatDrawRed_INTERFACE_DEFINED__
#define __IComCatDrawRed_INTERFACE_DEFINED__

/* interface IComCatDrawRed */
/* [unique][helpstring][uuid][object] */ 


EXTERN_C const IID IID_IComCatDrawRed;

#if defined(__cplusplus) && !defined(CINTERFACE)
    
    MIDL_INTERFACE("F6BBF24D-F761-4AE9-AB14-78CCD25141B1")
    IComCatDrawRed : public IComCatDraw
    {
    public:
    };
    
#else 	/* C style interface */

    typedef struct IComCatDrawRedVtbl
    {
        BEGIN_INTERFACE
        
        HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )( 
            IComCatDrawRed __RPC_FAR * This,
            /* [in] */ REFIID riid,
            /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject);
        
        ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )( 
            IComCatDrawRed __RPC_FAR * This);
        
        ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )( 
            IComCatDrawRed __RPC_FAR * This);
        
        HRESULT ( STDMETHODCALLTYPE __RPC_FAR *Draw )( 
            IComCatDrawRed __RPC_FAR * This,
            /* [in] */ HDC hDC);
        
        END_INTERFACE
    } IComCatDrawRedVtbl;

    interface IComCatDrawRed
    {
        CONST_VTBL struct IComCatDrawRedVtbl __RPC_FAR *lpVtbl;
    };

    

#ifdef COBJMACROS


#define IComCatDrawRed_QueryInterface(This,riid,ppvObject)	\
    (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)

#define IComCatDrawRed_AddRef(This)	\
    (This)->lpVtbl -> AddRef(This)

#define IComCatDrawRed_Release(This)	\
    (This)->lpVtbl -> Release(This)


#define IComCatDrawRed_Draw(This,hDC)	\
    (This)->lpVtbl -> Draw(This,hDC)


#endif /* COBJMACROS */


#endif 	/* C style interface */




#endif 	/* __IComCatDrawRed_INTERFACE_DEFINED__ */



#ifndef __COMCATREDLib_LIBRARY_DEFINED__
#define __COMCATREDLib_LIBRARY_DEFINED__

/* library COMCATREDLib */
/* [helpstring][version][uuid] */ 


EXTERN_C const IID LIBID_COMCATREDLib;

EXTERN_C const CLSID CLSID_ComCatDrawRed;

#ifdef __cplusplus

class DECLSPEC_UUID("CDB9802F-5AEB-447F-ABC7-2242E6FEBD58")
ComCatDrawRed;
#endif
#endif /* __COMCATREDLib_LIBRARY_DEFINED__ */

/* Additional Prototypes for ALL interfaces */

/* end of Additional Prototypes */

#ifdef __cplusplus
}
#endif

#endif

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 has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
United States United States
I started programming at 15 with a TI-82 calclator in Z80 assembly (oh, those were the days . . .) I am pretty much a self taught programmer. I've taught myself Visual Basic, C/C++, Java, and am currently working on C#. I also like to experiment with system administration and security issues, and occassionally I work on web design. For the last 4 years, I have worked for Leitch, Inc. as a Software Engineer and graduated from Old Dominion University with bachelor's degrees in Computer Science, Mathematics, and Business Management in December of 2004.

Comments and Discussions