Click here to Skip to main content
15,893,722 members
Articles / Programming Languages / C#

Building COM Servers in .NET

Rate me:
Please Sign up or sign in to vote.
4.87/5 (95 votes)
2 Feb 2006CPOL98 min read 460.4K   4K   301  
Learn the fundamental principles of building COM DLL and EXE Servers using a .NET language.
// SimpleCOMObject_CPPImpl.idl : IDL source for SimpleCOMObject_CPPImpl
//

// This file will be processed by the MIDL tool to
// produce the type library (SimpleCOMObject_CPPImpl.tlb) and marshalling code.

import "oaidl.idl";
import "ocidl.idl";
import "SimpleCOMObject.idl";

[
	object,
	uuid(F990BAEB-4380-4A28-A4A8-2F30A571B195),
	dual,
	nonextensible,
	helpstring("ISimpleCOMObject_CPPImpl Interface"),
	pointer_default(unique)
]
interface ISimpleCOMObject_CPPImpl : IDispatch{
};
[
	uuid(881D7F1E-698B-40B9-9347-860B5E00A9AD),
	version(1.0),
	helpstring("SimpleCOMObject_CPPImpl 1.0 Type Library")
]
library SimpleCOMObject_CPPImplLib
{
	importlib("stdole2.tlb");
	[
		uuid(DF7FD692-A598-4AD8-A59E-AE0E3E65BD1C),
		helpstring("_ISimpleCOMObject_CPPImplEvents Interface")
	]
	dispinterface _ISimpleCOMObject_CPPImplEvents
	{
		properties:
		methods:
	};
	[
		uuid(5E5F1A4A-3F76-4F07-946D-DF40E7B29C8B),
		helpstring("SimpleCOMObject_CPPImpl Class")
	]
	coclass SimpleCOMObject_CPPImpl
	{
		[default] interface ISimpleCOMObject;
				  interface ISimpleCOMObject_CPPImpl;
		[default, source] dispinterface _ISimpleCOMObject_CPPImplEvents;
	};
};

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
Systems Engineer NEC
Singapore Singapore
Lim Bio Liong is a Specialist at a leading Software House in Singapore.

Bio has been in software development for over 10 years. He specialises in C/C++ programming and Windows software development.

Bio has also done device-driver development and enjoys low-level programming. Bio has recently picked up C# programming and has been researching in this area.

Comments and Discussions