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.

86 lines
1.9 KiB

  1. //+----------------------------------------------------------------------------
  2. //
  3. // File: cmfdi.h
  4. //
  5. // Module: CMDL32.EXE
  6. //
  7. // Synopsis: CFdi class declarations
  8. //
  9. // Copyright (c) 1996-1998 Microsoft Corporation
  10. //
  11. // Author: nickball Created 04/08/98
  12. //
  13. //+----------------------------------------------------------------------------
  14. #ifndef _CMDL_FDI_INC
  15. #define _CMDL_FDI_INC
  16. #include <windows.h>
  17. extern "C"
  18. {
  19. #include <diamondd.h>
  20. }
  21. //
  22. // CFDIFile declaration
  23. //
  24. class CFDIFile
  25. {
  26. public:
  27. virtual ~CFDIFile();
  28. virtual DWORD Read(LPVOID pv, DWORD cb);
  29. virtual DWORD Write(LPVOID pv, DWORD cb);
  30. virtual long Seek(long dist, int seektype);
  31. virtual int Close();
  32. virtual HANDLE GetHandle();
  33. };
  34. //
  35. // CFDIFileFile declaration
  36. //
  37. class CFDIFileFile : public CFDIFile
  38. {
  39. public:
  40. CFDIFileFile();
  41. ~CFDIFileFile();
  42. BOOL CreateFile(LPCTSTR pszFile,
  43. DWORD dwDesiredAccess,
  44. DWORD dwShareMode,
  45. DWORD dwCreationDistribution,
  46. DWORD dwFlagsAndAttributes,
  47. DWORD dwFileSize);
  48. BOOL CreateUniqueFile(LPTSTR pszFile, DWORD dwDesiredAccess, DWORD dwShareMode, DWORD dwFlagsAndAttributes);
  49. virtual DWORD Read(LPVOID pv, DWORD cb);
  50. virtual DWORD Write(LPVOID pv, DWORD cb);
  51. virtual long Seek(long dist, int seektype);
  52. virtual int Close();
  53. virtual HANDLE GetHandle();
  54. private:
  55. HANDLE m_hFile;
  56. };
  57. //
  58. // FDI wrapper routines
  59. //
  60. void HUGE * FAR DIAMONDAPI fdi_alloc(ULONG cb);
  61. void FAR DIAMONDAPI fdi_free(void HUGE *pv);
  62. INT_PTR FAR DIAMONDAPI fdi_open(char FAR *pszFile, int oflag, int pmode);
  63. UINT FAR DIAMONDAPI fdi_read(INT_PTR hf, void FAR *pv, UINT cb);
  64. UINT FAR DIAMONDAPI fdi_write(INT_PTR hf, void FAR *pv, UINT cb);
  65. long FAR DIAMONDAPI fdi_seek(INT_PTR hf, long dist, int seektype);
  66. int FAR DIAMONDAPI fdi_close(INT_PTR hf);
  67. INT_PTR FAR DIAMONDAPI fdi_notify(FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION pfdin);
  68. #endif // _CMDL_FDI_INC