Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

97 lines
3.4 KiB

  1. ////////////////////////////////////////////////////////////////////////////////
  2. //
  3. // stmio.h
  4. //
  5. // Property Set Stream I/O and other common Property Set routines.
  6. //
  7. ////////////////////////////////////////////////////////////////////////////////
  8. #ifndef __stmio_h__
  9. #define __stmio_h__
  10. #include "offcapi.h"
  11. #include "proptype.h"
  12. // Read a VT_LPSTR from the stream.
  13. BOOL PASCAL FLpstmReadVT_LPTSTR (LPSTREAM lpStm,
  14. LPTSTR FAR *lplpstz,
  15. BOOL (*lpfnFCPConvert)(LPTSTR, DWORD, DWORD, BOOL),
  16. DWORD dwType);
  17. // Write a VT_LPSTR to the stream.
  18. BOOL PASCAL FLpstmWriteVT_LPTSTR (LPSTREAM lpStm,
  19. LPTSTR lpstz,
  20. BOOL fAlign,
  21. DWORD dwType);
  22. // Write a VT_FILETIME to the stream
  23. BOOL PASCAL FLpstmWriteVT_FILETIME (LPSTREAM lpStm, LPFILETIME lpFt);
  24. // Write a VT_I4 to the stream
  25. BOOL PASCAL FLpstmWriteVT_I4 (LPSTREAM lpStm, DWORD dwI4);
  26. // Read a VT_CF from the stream.
  27. BOOL PASCAL FLpstmReadVT_CF (LPSTREAM lpStm, LPSINAIL lpSINail);
  28. // Write a VT_CF from to the stream.
  29. BOOL PASCAL FLpstmWriteVT_CF (LPSTREAM lpStm, LPSINAIL lpSINail);
  30. // Read a VT_I2 from the stream
  31. BOOL PASCAL FLpstmReadVT_I2 (LPSTREAM lpStm, WORD *pw);
  32. // Write a VT_I2 to the stream
  33. BOOL PASCAL FLpstmWriteVT_I2 (LPSTREAM lpStm, WORD w);
  34. // Read a VT_BOOL from the stream
  35. BOOL PASCAL FLpstmReadVT_BOOL (LPSTREAM lpStm, WORD *fBool);
  36. // Write a VT_BOOL to the stream
  37. BOOL PASCAL FLpstmWriteVT_BOOL (LPSTREAM lpStm, WORD fBool);
  38. // Read a VT_R8 or VT_DATE from the stream
  39. BOOL PASCAL FLpstmReadVT_R8_DATE (LPSTREAM lpStm, NUM *dbl);
  40. // Write a VT_R8 or VT_DATE to the stream
  41. BOOL PASCAL FLpstmWriteVT_R8_DATE (LPSTREAM lpStm, NUM *dbl, BOOL fDate);
  42. // Read a VT_BLOB from the stream.
  43. BOOL PASCAL FLpstmReadVT_BLOB (LPSTREAM lpStm,
  44. DWORD *pcb,
  45. BYTE FAR * FAR *ppbData);
  46. // Write a VT_BLOB to the stream
  47. BOOL PASCAL FLpstmWriteVT_BLOB (LPSTREAM lpStm,
  48. DWORD cb,
  49. BYTE *bData);
  50. // Read a VT_CLSID from the stream
  51. BOOL PASCAL FLpstmReadVT_CLSID (LPSTREAM lpStm, CLSID *pClsId);
  52. // Write a VT_CLSID to the stream
  53. BOOL PASCAL FLpstmWriteVT_CLSID (LPSTREAM lpStm, CLSID *pClsId);
  54. // Read in unknown data into the array
  55. BOOL PASCAL FLpstmReadUnknown (LPSTREAM lpStm,
  56. DWORD dwType,
  57. DWORD dwId,
  58. DWORD *pirglpUnk,
  59. LPPROPIDTYPELP rglpUnk);
  60. // Write out the unknown data in the array.
  61. BOOL PASCAL FLpstmWriteUnknowns (LPSTREAM lpStm,
  62. DWORD dwcUnk,
  63. LPPROPIDTYPELP rglpUnk);
  64. // Destroy any unknown data
  65. BOOL PASCAL FDestoryUnknowns (DWORD dwcUnk, LPPROPIDTYPELP rglpUnk);
  66. // Write data to the buffer, flushing as needed
  67. BOOL PASCAL FLpstmWrite (LPSTREAM lpStm,
  68. LPVOID lpv,
  69. DWORD cb);
  70. void VAllocWriteBuf(void);
  71. void VFreeWriteBuf(void);
  72. BOOL FFlushWriteBuf(LPSTREAM lpStm);
  73. void VSetRealStmSize(LPSTREAM lpStm);
  74. #endif // __stmio_h__