home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / atl / beeper / beeper.idl < prev    next >
Text File  |  1998-03-26  |  1KB  |  52 lines

  1. // This is a part of the ActiveX Template Library.
  2. // Copyright (C) 1996 Microsoft Corporation
  3. // All rights reserved.
  4. //
  5. // This source code is only intended as a supplement to the
  6. // ActiveX Template Library Reference and related
  7. // electronic documentation provided with the library.
  8. // See these sources for detailed information regarding the
  9. // ActiveX Template Library product.
  10.  
  11. #define DISPID_NEWENUM -4
  12. [
  13.     object,
  14.     uuid(6384D584-0FDB-11cf-8700-00AA0053006D),
  15.     dual,
  16.     helpstring("IBeeper Interface"),
  17.     pointer_default(unique)
  18. ]
  19. interface IBeeper : IDispatch
  20. {
  21.     import "oaidl.idl";
  22.         [helpstring("Play the current sound")]
  23.             HRESULT Beep();
  24.         [propget, helpstring("Returns number of strings in collection.")]
  25.         HRESULT Count([out, retval] long* retval);
  26.  
  27.         [propget, id(0),
  28.         helpstring("Given an index, returns a string in the collection")]
  29.         HRESULT Item([in] long Index, [out, retval] BSTR* pbstr);
  30.  
  31.         [propget, restricted, id(DISPID_NEWENUM)]   // Must be propget.
  32.         HRESULT _NewEnum([out, retval] IUnknown** retval);
  33. };
  34.  
  35. [
  36.     uuid(6384D582-0FDB-11cf-8700-00AA0053006D),
  37.     helpstring("Beeper 1.0 Type Library"),
  38.     version(1.0)
  39. ]
  40. library BeeperLib
  41. {
  42.     importlib("stdole32.tlb");
  43.  
  44.     //  Class information
  45.     [ uuid(6384D586-0FDB-11cf-8700-00AA0053006D), helpstring("Beeper Object") ]
  46.     coclass Beeper
  47.     {
  48.         [default] interface IBeeper;
  49.     };
  50.  
  51. };
  52.