Click here to Skip to main content
15,891,993 members
Articles / Programming Languages / C++

COM in plain C, Part 6

Rate me:
Please Sign up or sign in to vote.
4.89/5 (32 votes)
22 Jul 2006CPOL25 min read 103.2K   2.4K   102  
How to write an ActiveX Script Host in C.
#ifndef _HOSTSITE_H
#define _HOSTSITE_H

#ifdef __cplusplus
extern "C" {
#endif

// The definition of our MyRealIActiveScriptSite multiple interface
// object. It has an IActiveScriptSite object as the base object,
// and an IActiveScriptSiteWindow sub-object.
typedef struct {
	IActiveScriptSite			site;		// The IActiveScriptSite must be the base object.
	IActiveScriptSiteWindow		siteWnd;	// Our IActiveScriptSiteWindow sub-object for this IActiveScriptSite.
} MyRealIActiveScriptSite;

void initIActiveScriptSiteObject(void);

// Global variables
extern MyRealIActiveScriptSite	MyActiveScriptSite;

#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, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


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

Comments and Discussions