vxStream.idl
上传用户:nvosite88
上传日期:2007-01-17
资源大小:4983k
文件大小:2k
源码类别:

VxWorks

开发平台:

C/C++

  1. /* Stream.idl - definition of IStream etc. */
  2. /* Copyright (c) 2000, Wind River Systems, Inc. */
  3. /*
  4. modification history
  5. --------------------
  6. 01b,20jun01,nel  Change WindTypes.h to comCoreTypes.h
  7. 01a,10feb00,dbs  created from vxidl.idl
  8. */
  9. import "comCoreTypes.idl";
  10. [
  11.     local,
  12.     object,
  13.     uuid(0c733a30-2a1c-11ce-ade5-00aa0044773d),
  14.     pointer_default(unique)
  15. ]
  16. interface ISequentialStream : IUnknown
  17.     {
  18.     HRESULT Read
  19. (
  20.         [out, size_is(cb), length_is(*pcbRead)] void *pv,
  21.         [in] ULONG cb,
  22.         [out] ULONG *pcbRead
  23. );
  24.     HRESULT Write
  25. (
  26.         [in, size_is(cb)] const void *pv,
  27.         [in] ULONG cb,
  28.         [out] ULONG *pcbWritten
  29. );
  30.     }
  31. [
  32.     local,
  33.     object,
  34.     uuid(0000000c-0000-0000-C000-000000000046),
  35.     pointer_default(unique)
  36. ]
  37. interface IStream : ISequentialStream
  38.     {
  39.     typedef [unique] IStream *LPSTREAM;
  40.     typedef struct tagSTATSTG
  41. {
  42.         LPOLESTR pwcsName;
  43.         DWORD type;
  44.         ULARGE_INTEGER cbSize;
  45.         FILETIME mtime;
  46.         FILETIME ctime;
  47.         FILETIME atime;
  48.         DWORD grfMode;
  49.         DWORD grfLocksSupported;
  50.         CLSID clsid;
  51.         DWORD grfStateBits;
  52.         DWORD reserved;
  53. } STATSTG;
  54.     typedef enum tagSTGTY
  55. {
  56. STGTY_STORAGE   = 1,
  57.         STGTY_STREAM    = 2,
  58.         STGTY_LOCKBYTES = 3,
  59.         STGTY_PROPERTY  = 4
  60. } STGTY;
  61.     typedef enum tagSTREAM_SEEK
  62. {
  63.         STREAM_SEEK_SET = 0,
  64.         STREAM_SEEK_CUR = 1,
  65.         STREAM_SEEK_END = 2
  66. } STREAM_SEEK;
  67.     typedef enum tagLOCKTYPE
  68. {
  69.         LOCK_WRITE      = 1,
  70.         LOCK_EXCLUSIVE  = 2,
  71.         LOCK_ONLYONCE   = 4
  72. } LOCKTYPE;
  73.     HRESULT Seek
  74. (
  75.         [in] LARGE_INTEGER dlibMove,
  76.         [in] DWORD dwOrigin,
  77.         [out] ULARGE_INTEGER *plibNewPosition
  78. );
  79.     HRESULT SetSize ([in] ULARGE_INTEGER libNewSize);
  80.     HRESULT CopyTo
  81. (
  82.         [in, unique] IStream *pstm,
  83.         [in] ULARGE_INTEGER cb,
  84.         [out] ULARGE_INTEGER *pcbRead,
  85.         [out] ULARGE_INTEGER *pcbWritten
  86. );
  87.     HRESULT Commit ([in] DWORD grfCommitFlags);
  88.     HRESULT Revert ();
  89.     HRESULT LockRegion
  90. (
  91.         [in] ULARGE_INTEGER libOffset,
  92.         [in] ULARGE_INTEGER cb,
  93.         [in] DWORD dwLockType
  94. );
  95.     HRESULT UnlockRegion
  96. (
  97.         [in] ULARGE_INTEGER libOffset,
  98.         [in] ULARGE_INTEGER cb,
  99.         [in] DWORD dwLockType
  100. );
  101.     HRESULT Stat
  102. (
  103.         [out] STATSTG *pstatstg,
  104.         [in] DWORD grfStatFlag
  105. );
  106.     HRESULT Clone([out] IStream **ppstm);
  107.     }