2025-04-27 07:49:33 -04:00

57 lines
1.7 KiB
Plaintext

// Counter.idl : IDL source for Counter.dll
//
// This file will be processed by the MIDL tool to
// produce the type library (Counter.tlb) and marshalling code.
import "oaidl.idl";
import "ocidl.idl";
[
object,
uuid(89B9D28A-AAEB-11D0-9796-00A0C908612D),
dual,
oleautomation,
helpstring("ICounterCtl Interface"),
pointer_default(unique)
]
interface ICounterCtl : IDispatch
{
//Custom Component Methods
[id(3), helpstring("The Get method takes the name of a counter and returns the current value of the counter.")]
HRESULT Get(
[in] BSTR counterName,
[out, retval] unsigned long *value);
[id(4), helpstring("The Set method takes the name of a counter and an integer, sets the counter to the value of the integer, and returns the new value.")]
HRESULT Set(
[in] BSTR counterName,
[in] unsigned long newValue,
[out, retval] unsigned long *value);
[id(5), helpstring("The Increment method takes the name of a counter, adds 1 to the current value of the counter, and returns the counter's new value.")]
HRESULT Increment([in] BSTR counterName, [out, retval] unsigned long *value);
[id(6), helpstring("The Remove method takes the name of a counter, removes the counter from the Counters object, and deletes the counter from the Counters.txt file.")]
HRESULT Remove([in] BSTR counterName);
};
[
uuid(89B9D27D-AAEB-11D0-9796-00A0C908612D),
version(1.0),
helpstring("MSWC Counters Object Library")
]
library Counters
{
importlib("stdole2.tlb");
[
uuid(89B9D28B-AAEB-11D0-9796-00A0C908612D),
helpstring("Counters Class")
]
coclass Counters
{
[default] interface ICounterCtl;
};
};