home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / unknwn.idl < prev    next >
Text File  |  1998-04-25  |  2KB  |  76 lines

  1. //+-------------------------------------------------------------------------
  2. //
  3. //  Microsoft Windows
  4. //  Copyright (C) Microsoft Corporation, 1992-1997.
  5. //
  6. //  File: unknwn.idl
  7. //
  8. //  Contents: IUnknown interface definition
  9. //
  10. //
  11. //--------------------------------------------------------------------------
  12.  
  13. cpp_quote("//+-------------------------------------------------------------------------")
  14. cpp_quote("//")
  15. cpp_quote("//  Microsoft Windows")
  16. cpp_quote("//  Copyright (C) Microsoft Corporation, 1992-1997.")
  17. cpp_quote("//")
  18. cpp_quote("//--------------------------------------------------------------------------")
  19.  
  20. #ifndef DO_NO_IMPORTS
  21. import "wtypes.idl";
  22. #endif
  23.  
  24. [
  25.   local,
  26.   object,
  27.   uuid(00000000-0000-0000-C000-000000000046),
  28.   pointer_default(unique)
  29. ]
  30.  
  31. interface IUnknown
  32. {
  33.     typedef [unique] IUnknown *LPUNKNOWN;
  34.  
  35. cpp_quote("//////////////////////////////////////////////////////////////////")
  36. cpp_quote("// IID_IUnknown and all other system IIDs are provided in UUID.LIB")
  37. cpp_quote("// Link that library in with your proxies, clients and servers")
  38. cpp_quote("//////////////////////////////////////////////////////////////////")
  39.  
  40.     HRESULT QueryInterface(
  41.         [in] REFIID riid,
  42.         [out, iid_is(riid)] void **ppvObject);
  43.     ULONG AddRef();
  44.     ULONG Release();
  45. }
  46.  
  47. [
  48.     object,
  49.     uuid(00000001-0000-0000-C000-000000000046),
  50.     pointer_default(unique)
  51. ]
  52.  
  53. interface IClassFactory : IUnknown
  54. {
  55.     typedef [unique] IClassFactory * LPCLASSFACTORY;
  56.  
  57.     [local]
  58.     HRESULT CreateInstance(
  59.         [in, unique] IUnknown * pUnkOuter,
  60.         [in] REFIID riid,
  61.         [out, iid_is(riid)] void **ppvObject);
  62.  
  63.     [call_as(CreateInstance)]
  64.     HRESULT RemoteCreateInstance(
  65.         [in] REFIID riid,
  66.         [out, iid_is(riid)] IUnknown ** ppvObject);
  67.  
  68.     [local]
  69.     HRESULT LockServer(
  70.     [in] BOOL fLock);
  71.  
  72.     [call_as(LockServer)]
  73.     HRESULT __stdcall RemoteLockServer(
  74.     [in] BOOL fLock);
  75. }
  76.