From 848b4765d50f5b8bd2cf950a99f2f191785597fd Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 13:13:28 +0000 Subject: Utilisateur : Fcolin Date : 3/10/02 Heure : 10:55 Créé Commentaire: (vss 1) --- comIvy/Expression.h | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 comIvy/Expression.h (limited to 'comIvy') diff --git a/comIvy/Expression.h b/comIvy/Expression.h new file mode 100644 index 0000000..e60bbd2 --- /dev/null +++ b/comIvy/Expression.h @@ -0,0 +1,77 @@ +// Expression.h : déclaration de CExpression + +#pragma once +#include "resource.h" // symboles principaux + +#include "Ivy.h" +#include "IvyCallback.h" + +// IExpression +[ + object, + uuid("65B2CF08-0B15-4752-AEEA-655157A87367"), + dual, helpstring("Interface IExpression"), + pointer_default(unique) +] +__interface IExpression : IDispatch +{ + [id(1), helpstring("method Unbind")] HRESULT Unbind(void); +}; + + +// _IExpressionEvents +[ + dispinterface, + uuid("74C250EC-2393-452D-9CC4-042313AB7268"), + helpstring("Interface _IExpressionEvents") +] +__interface _IExpressionEvents +{ + [id(1), helpstring("method Received")] void Received([in] BSTR applicationName, [in] VARIANT arguments); +}; + + +// CExpression + +[ + coclass, + threading("apartment"), + event_source("com"), + vi_progid("comIvy.Expression"), + progid("comIvy.Expression.1"), + version(1.0), + uuid("FAD2AFA6-44F7-430A-9344-F20C804DA97B"), + helpstring("Expression Class") +] +class ATL_NO_VTABLE CExpression : + public IExpression, + public IvyMessageCallback +{ +public: + CExpression(); + ~CExpression(); + + __event __interface _IExpressionEvents; + + DECLARE_PROTECT_FINAL_CONSTRUCT() + + HRESULT FinalConstruct() + { + return S_OK; + } + + void FinalRelease() + { + } + +public: + + STDMETHOD(Unbind)(void); + friend class CBus; + +protected: + CBus* bus; + int id; + virtual void OnMessage(IvyApplication * app, int argc, const char ** argv); +}; + -- cgit v1.1