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.

36 lines
1.2 KiB

  1. #ifndef PACKUTIL_H__
  2. #define PACKUTIL_H__
  3. #define CHAR_SPACE TEXT(' ')
  4. #define CHAR_QUOTE TEXT('"')
  5. #define SZ_QUOTE TEXT("\"")
  6. #define BUFFERSIZE 4096 // 4k buffer size for copy operations
  7. /////////////////////////////////
  8. // Icon structure
  9. //
  10. typedef struct _IC // ic
  11. {
  12. HICON hDlgIcon; // handle to icon
  13. TCHAR szIconPath[MAX_PATH]; // path to icon
  14. TCHAR szIconText[MAX_PATH]; // text for icon
  15. INT iDlgIcon; // index of icon in a resource
  16. RECT rc; // bounding rect of icon and text
  17. } IC, *LPIC;
  18. VOID ReplaceExtension(LPTSTR lpstrTempFile,LPTSTR lpstrOrigFile);
  19. LPIC IconCreate(void);
  20. LPIC IconCreateFromFile(LPCTSTR);
  21. BOOL IconCalcSize(LPIC lpic);
  22. VOID IconDraw(LPIC,HDC,LPRECT);
  23. VOID GetCurrentIcon(LPIC lpic);
  24. VOID GetDisplayName(LPTSTR, LPCTSTR);
  25. HRESULT CopyStreamToFile(IStream*, LPTSTR);
  26. HRESULT CopyFileToStream(LPTSTR, IStream*);
  27. HRESULT StringReadFromStream(IStream* pstm, LPSTR pszBuffer, UINT cchChar);
  28. HRESULT StringWriteToStream(IStream* pstm, LPCSTR pszBuffer, DWORD *pdwWrite);
  29. BOOL PathSeparateArgs(LPTSTR pszPath, LPTSTR pszArgs);
  30. #endif