Leaked source code of windows server 2003
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.

63 lines
907 B

  1. /*++
  2. Copyright (c) 1989-2001 Microsoft Corporation
  3. Module Name:
  4. fileio.h
  5. Abstract:
  6. A set of function similar to fopen, fclose, fgetc
  7. Author:
  8. Jiandong Ruan
  9. Revision History:
  10. --*/
  11. #ifndef __FILEIO_H__
  12. #define __FILEIO_H__
  13. #define SMB_FILEIO_LOOKAHEAD_SIZE 256
  14. typedef struct _SMB_FILE {
  15. HANDLE fd;
  16. //
  17. // The offset of next byte in the Buffer
  18. //
  19. int offset;
  20. //
  21. // The # of byte available in the Buffer
  22. // When we reach the end of file, # of byte could be smaller than the buffer size
  23. //
  24. int size;
  25. BYTE Buffer[SMB_FILEIO_LOOKAHEAD_SIZE];
  26. } SMB_FILE, *PSMB_FILE;
  27. PSMB_FILE
  28. Smb_fopen(
  29. PWCHAR path,
  30. PWCHAR mode
  31. );
  32. void
  33. Smb_fclose(
  34. PSMB_FILE fp
  35. );
  36. int
  37. Smb_fgetc(
  38. PSMB_FILE fp
  39. );
  40. #ifndef EOF
  41. #define EOF (-1)
  42. #endif
  43. #endif