1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
   |  
[
  uuid(xxx),
  version(1.0),
  helpstring("Hello 1.0 Type Library")
]
library Hello_Library
{
    importlib("stdole32.tlb");
    importlib("stdole2.tlb");
 
   //! This is the public COM interface exposed by the Hello
   [
	object,
	uuid(yyy),
	dual,
	helpstring("IHello Interface"),
	pointer_default(unique)
  ]
  interface IHello : IDispatch
  {
                [id(1), helpstring("method ConnectMCU")] 
                HRESULT SayHello();
                ......
   };	
 
  //! This interface is used for testing (for example by the testing tool)
  [
              object,
              uuid(zzz),
              dual,
              helpstring("IHelloTest Interface - this interface is used for tests"),
              pointer_default(unique)
  ]
  interface IHelloTest : IDispatch
  {
  };
 
	//! Declares the COM object and its interfaces
	[
		uuid(xxx),
		helpstring("Hello Class")
	]
	coclass Ello
	{
		[default] interface IHello;
		interface IHelloTest;
	};
 
	//! This fake object is used by scripting languages to access the IHelloTest interface
	[
		uuid(www),
		helpstring("HelloTest Class - This class is used by VB to access the IHelloTest interface"),
		hidden,
		noncreatable
	]
	coclass HelloTest
	{
		[default] interface IHelloTest;
	};
 
	//! This fake object is used to declare the IOther and IOther2
	//! interfaces,
	[
		uuid(vvv),
		hidden,
		noncreatable
	]
	coclass HelloRegisterAllInterfaces
	{
		interface IOther;
		interface _IOtherEvents;
		interface IOther2;
	};
};
	{ | 
Partager