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.

66 lines
1.7 KiB

  1. /*****************************************************************************\
  2. * MODULE: spljob.h
  3. *
  4. * Header file for the local-jobfile-spooling.
  5. *
  6. *
  7. * Copyright (C) 1996-1997 Microsoft Corporation
  8. * Copyright (C) 1996-1997 Hewlett Packard
  9. *
  10. * History:
  11. * 07-Oct-1996 HWP-Guys Initiated port from win95 to winNT
  12. *
  13. \*****************************************************************************/
  14. #ifndef _SPLJOB_H
  15. #define _SPLJOB_H
  16. #define SPLFILE_SPL 0 // Specifies a file extension of .spl.
  17. #define SPLFILE_TMP 1 // Specifies a file extension of .tmp.
  18. class CFileStream;
  19. typedef struct _SPLFILE {
  20. LPTSTR lpszFile; // Name of file.
  21. HANDLE hFile; // Handle to file.
  22. CFileStream *pStream; // Stream interface
  23. } SPLFILE;
  24. typedef SPLFILE *PSPLFILE;
  25. typedef SPLFILE *NPSPLFILE;
  26. typedef SPLFILE *LPSPLFILE;
  27. HANDLE SplCreate(DWORD, DWORD);
  28. BOOL SplFree(HANDLE);
  29. BOOL SplWrite(HANDLE, LPBYTE, DWORD, LPDWORD);
  30. BOOL SplWrite(HANDLE hSpl, CStream *pStream);
  31. CFileStream* SplLock(HANDLE hSpl);
  32. BOOL SplUnlock(HANDLE);
  33. BOOL SplClose(HANDLE);
  34. BOOL SplOpen(HANDLE);
  35. VOID SplClean(VOID);
  36. /*****************************************************************************\
  37. * SplFileName
  38. *
  39. \*****************************************************************************/
  40. _inline LPCTSTR SplFileName(
  41. HANDLE hSpl)
  42. {
  43. return (hSpl ? ((PSPLFILE)hSpl)->lpszFile : NULL);
  44. }
  45. /*****************************************************************************\
  46. * SplFileSize
  47. *
  48. \*****************************************************************************/
  49. _inline DWORD SplFileSize(
  50. HANDLE hSpl)
  51. {
  52. return (hSpl ? GetFileSize(((PSPLFILE)hSpl)->hFile, NULL) : 0);
  53. }
  54. #endif