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.

61 lines
2.2 KiB

  1. #ifndef _AWDLIB_H
  2. #define _AWDLIB_H
  3. /*++
  4. awdlib.h
  5. header file for the AWD library.
  6. Copyright (c) 1997 Microsoft Corporation
  7. Author:
  8. Brian Dewey (t-briand) 1997-7-2
  9. --*/
  10. // needed includes for the AWD file format
  11. #include <ole2.h> // AWD is an OLE compound document.
  12. // ------------------------------------------------------------
  13. // Defines
  14. #define MAX_AWD_NAME (32)
  15. // ------------------------------------------------------------
  16. // Data types
  17. // This structure holds the primary storages used in an AWD file.
  18. typedef struct awd_file {
  19. IStorage *psAWDFile; // The root storage of the file.
  20. IStorage *psDocuments; // Storage holding the document data.
  21. IStorage *psPersistInfo; // Persistent information storage.
  22. IStorage *psDocInfo; // Document information stream.
  23. IStorage *psPageInfo; // Page information storage.
  24. IStorage *psGlobalInfo; // Global information storage.
  25. } AWD_FILE;
  26. // An AWD_DOC_PROCESSOR is a function that does something with an document
  27. // contained in an AWD file. Used in the EnumDocuments() function. The
  28. // function should return TRUE on success and FALSE on an error that requires
  29. // the enumeration process to abort.
  30. typedef BOOL (*AWD_DOC_PROCESSOR)(AWD_FILE *psStorages, const WCHAR *pwcsDocName);
  31. #include "oleutils.h" // Use the elliott fax viewer definitions.
  32. // ------------------------------------------------------------
  33. // Prototypes
  34. BOOL ConvertAWDToTiff(const WCHAR *pwcsAwdFile, WCHAR *pwcsTiffFile);
  35. BOOL OpenAWDFile(const WCHAR *pwcsFilename, AWD_FILE *psStorages);
  36. BOOL CloseAWDFile(AWD_FILE *psStorages);
  37. IStorage *OpenAWDSubStorage(IStorage *psParent, const WCHAR *pwcsStorageName);
  38. IStream *OpenAWDStream(IStorage *psStorage, const WCHAR *pwcsStreamName);
  39. BOOL AWDViewed(AWD_FILE *psStorages);
  40. void DumpAWDDocuments(AWD_FILE *psStorages);
  41. BOOL EnumDocuments(AWD_FILE *psStorages, AWD_DOC_PROCESSOR pfnDocProc);
  42. BOOL DisplayDocNames(AWD_FILE *psStorages, const WCHAR *pwcsDocName);
  43. BOOL DetailedDocDump(AWD_FILE *psStorages, const WCHAR *pwcsDocName);
  44. void PrintPageInfo(PAGE_INFORMATION *psPageInfo);
  45. void DumpData(LPTSTR pszFileName, LPBYTE pbData, DWORD cbCount);
  46. #endif // _AWDLIB_H