Click here to Skip to main content
15,886,806 members
Articles / Desktop Programming / WTL

Use your own ATL-Objects in Dev-Studio Macros

Rate me:
Please Sign up or sign in to vote.
1.00/5 (1 vote)
17 Feb 20023 min read 48.4K   243   9  
Shows how to develop ATL-Objects to extend VB-Script. Uses ISharedPropertyGroupManager to keep data in memory. Supervises MSDEV-shutdown.
// MakroExtensions.idl : IDL-Quellcode f�r MakroExtensions.dll
//

// Diese Datei wird mit dem MIDL-Tool bearbeitet,
// um den Quellcode f�r die Typbibliothek (MakroExtensions.tlb)und die Abruffunktionen zu erzeugen.

import "oaidl.idl";
import "ocidl.idl";
	[
		object,
		uuid(E5CEC815-7999-4628-A53A-7FBF1A779F15),
		dual,
		helpstring("IExtFuncs-Schnittstelle"),
		pointer_default(unique)
	]
	interface IExtFuncs : IDispatch
	{
		[id(1), helpstring("Methode IsFilePresent")] HRESULT IsFilePresent([in] VARIANT bsFileName, [out, retval] VARIANT* pIsPresent);
		[propget, id(2), helpstring("Eigenschaft TextClipboard")] HRESULT TextClipboard([out, retval] VARIANT *pVal);
		[propput, id(2), helpstring("Eigenschaft TextClipboard")] HRESULT TextClipboard([in] VARIANT newVal);
		[id(3), helpstring("Methode Append2TextClipboard")] HRESULT Append2TextClipboard([in] VARIANT vtAppend, [optional] VARIANT vtInsertCRLF);
		[id(4), helpstring("Methode Copy2Clipboard")] HRESULT Copy2Clipboard([in] VARIANT vtCopyText);
	};

[
	uuid(5737D4D6-D4F9-4858-AE41-179156188B9E),
	version(1.0),
	helpstring("MakroExtensions 1.0 Typbibliothek")
]
library MAKROEXTENSIONSLib
{
	importlib("stdole32.tlb");
	importlib("stdole2.tlb");

	[
		uuid(AAA89AA6-38BF-4B5D-8AC3-35059CFA33E6),
		helpstring("ExtFuncs Class")
	]
	coclass ExtFuncs
	{
		[default] interface IExtFuncs;
	};
};

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
Germany Germany
I'm a (paid) software-developer since about 1995. All started in 1983 with hacking assembly code on a commodore 64. I'm using the one and only Language "C++" since 1996. I know others like VB Java TCL/TK (Sometime I was forced to use them) but they can't be compared to the power and mystic of C++.

Comments and Discussions