Click here to Skip to main content
15,893,161 members
Articles / Desktop Programming / ATL

DCOM D-Mystified: A DCOM Tutorial, Step 4

Rate me:
Please Sign up or sign in to vote.
5.00/5 (5 votes)
11 Aug 2000CPOL 158.2K   1.9K   43  
Here we add a method to our DCOM-remoted object, and start on implementing its functionality.
// HelloServ.idl : IDL source for HelloServ.dll
//

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

import "oaidl.idl";
import "ocidl.idl";
	[
		object,
		uuid(706A50D1-6C74-11D4-A359-00104B732442),
	
		helpstring("IHelloWorld Interface"),
		pointer_default(unique)
	]
	interface IHelloWorld : IUnknown
	{
		[helpstring("method SayHello")] HRESULT SayHello();
	};

[
	uuid(27613737-6A27-11D4-A358-00104B732442),
	version(1.0),
	helpstring("HelloServ 1.0 Type Library")
]
library HELLOSERVLib
{
	importlib("stdole32.tlb");
	importlib("stdole2.tlb");

	[
		uuid(706A50D4-6C74-11D4-A359-00104B732442),
		helpstring("DHelloWorldEvents event interface")
	]
	dispinterface DHelloWorldEvents
	{
		properties:
		methods:
	};

	[
		uuid(706A50D3-6C74-11D4-A359-00104B732442),
		helpstring("HelloWorld Class")
	]
	coclass HelloWorld
	{
		[default] interface IHelloWorld;
		[default, source] dispinterface DHelloWorldEvents;
	};
};

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
Team Leader
United States United States
Brian C. Hart, Ph.D., is a strategic engagement leader on a mission to leverage space technology to protect U.S. interests and assets against adversaries. Throughout Dr. Hart's career, he has enjoyed: Working closely with business executives to provide strategic direction and leadership, translating customer and competitive intelligence into compelling capture strategies and solutions, and mentoring teams to enhance individual and company capabilities while fostering an engaging and accountable environment, being involved in STEAM initiatives and education to develop greater awareness in the community, and serving the armed forces with the U.S. Navy and U.S. Army National Guard. He is excited to begin developing his career in Jacobs's Critical Mission Systems business unit, supporting NORAD and the U.S. Space Force.

Comments and Discussions