Click here to Skip to main content
15,896,467 members
Articles / Desktop Programming / WTL

Web Win32/WTL Hybrid

Rate me:
Please Sign up or sign in to vote.
4.83/5 (15 votes)
22 Dec 20054 min read 136.5K   2.1K   50  
How to implement a two-way communication path from IExplorer and WTL code
// WebWin32Sample.idl : IDL source for WebWin32Sample.exe
//

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

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

[
	object,
	uuid(17D4BA6F-0565-4C27-9549-89ACA363B8EC),
	dual,
	nonextensible,
	helpstring("IWebWin32Lib Interface"),
	pointer_default(unique)
]
interface IWebWin32Lib : IDispatch{
	[id(1), helpstring("method MyMessageBox")] HRESULT MyMessageBox([in] BSTR Text, [in] BSTR Title, [out,retval] LONG* Result);
	[id(2), helpstring("method HideTree")] HRESULT HideTree(void);
	[id(3), helpstring("method ShowTree")] HRESULT ShowTree(void);
	[id(4), helpstring("method SetMainFrame")] HRESULT SetChildFrame([in] LONG pChildFrame);
	[id(5), helpstring("method AddChildToTree")] HRESULT AddChildToTree([in] BSTR childText);
	[propput, id(6), helpstring("property StatusBarText")] HRESULT StatusBarText( [in] BSTR Text );
	[id(7), helpstring("method FormSubmit")] HRESULT FormSubmit(BSTR FormName);
};
[
	object,
	uuid(DDD0E784-6B9A-4D89-91AE-A33A314269EB),
	dual,
	nonextensible,
	helpstring("IWebWin32EventHandler Interface"),
	pointer_default(unique)
]
interface IWebWin32EventHandler : IDispatch{
	[id(1), helpstring("method SetHandler")] HRESULT SetHandler([in] LONG pThis , [in] LONG pMember );
	[id(0), helpstring("method CallHandler")] HRESULT CallHandler(void);
	
};
[
	uuid(00DBDF8B-3686-4CC7-AE28-0E6309BB1DEC),
	version(1.0),
	helpstring("WebWin32Sample 1.0 Type Library")
]
library WebWin32SampleLib
{
	importlib("stdole32.tlb");
	importlib("stdole2.tlb");

	[
		uuid(F5B33126-8AD7-4A05-956D-04036F97B0BB),
		helpstring("WebWin32Lib Class")
	]
	coclass WebWin32Lib
	{
		[default] interface IWebWin32Lib;
	};
	[
		uuid(68BB8438-FB59-4B24-84E8-41A324696BEA),
		helpstring("_IWebWin32EventHandlerEvents Interface")
	]
	dispinterface _IWebWin32EventHandlerEvents
	{
		properties:
		methods:
		[id(0), helpstring("method HandleEvent")] HRESULT HandleEvent(void);
	};
	[
		uuid(CF333D13-2608-46DA-AED0-5E1FAEF96913),
		helpstring("WebWin32EventHandler Class")
	]
	coclass WebWin32EventHandler
	{
		[default] interface IWebWin32EventHandler;
		[default, source] dispinterface _IWebWin32EventHandlerEvents;
	};
};

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
CEO wave-vs.net
Spain Spain
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions