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.

92 lines
3.2 KiB

  1. /*++
  2. * File name:
  3. * bmpdb.h
  4. * Contents:
  5. * bmpdb structures
  6. *
  7. * Copyright (C) 1998-1999 Microsoft Corp.
  8. --*/
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif
  12. #define MAX_STRING_LENGTH 128
  13. typedef long FOFFSET;
  14. typedef struct _BMPENTRY {
  15. UINT nDataSize; // Total size of pData (bmpSize+bmiSize)
  16. UINT bmpSize; // Size of bits. Located at pData
  17. // After BITMAPINFO (if any)
  18. UINT bmiSize; // Size of BITMAPINFO header
  19. // if zero -> monocrome bitmap
  20. // BITMAPINFO is located in begining of
  21. // pData
  22. UINT xSize, ySize;
  23. UINT nChkSum;
  24. BOOL bDeleted; // Valuable in DB
  25. char szComment[MAX_STRING_LENGTH];
  26. HBITMAP hBitmap; // Valuable in linked list
  27. FOFFSET FOffsMe; // My pointer in DB
  28. FOFFSET FOffsNext; // DB
  29. struct _BMPENTRY *pNext; // linked list
  30. PVOID pData; // Pointer to BMP data, in DB it is
  31. // immediatly after this structure
  32. } BMPENTRY, *PBMPENTRY;
  33. typedef struct _GROUPENTRY {
  34. WCHAR WText[MAX_STRING_LENGTH];
  35. BOOL bDeleted;
  36. FOFFSET FOffsMe; // My pointer in DB
  37. FOFFSET FOffsBmp; // DB
  38. PBMPENTRY pBitmap; // linked list
  39. FOFFSET FOffsNext; // DB
  40. struct _GROUPENTRY *pNext; // linked list
  41. } GROUPENTRY, *PGROUPENTRY;
  42. typedef BOOL (_cdecl *PFNENUMGROUPS)(FOFFSET nOff,
  43. PGROUPENTRY pGroup,
  44. PVOID pParam);
  45. typedef BOOL (_cdecl *PFNENUMBITMAPS)(FOFFSET nOff,
  46. PBMPENTRY pBitmap,
  47. PVOID pParam);
  48. BOOL OpenDB(BOOL bWrite);
  49. VOID CloseDB(VOID);
  50. BOOL ReadGroup(FOFFSET nOffset, PGROUPENTRY pGroup);
  51. BOOL WriteGroup(FOFFSET nOffset, PGROUPENTRY pGroup);
  52. VOID EnumerateGroups(PFNENUMGROUPS pfnEnumGrpProc, PVOID pParam);
  53. BOOL ReadBitmapHeader(FOFFSET nOffset, PBMPENTRY pBitmap);
  54. BOOL WriteBitmapHeader(FOFFSET nOffset, PBMPENTRY pBitmap);
  55. PBMPENTRY ReadBitmap(FOFFSET nOffset);
  56. VOID FreeBitmap(PBMPENTRY pBmp);
  57. VOID EnumerateBitmaps(FOFFSET nOffset,
  58. PFNENUMBITMAPS pfnEnumProc,
  59. PVOID pParam);
  60. FOFFSET FindGroup(LPWSTR szWText);
  61. FOFFSET FindBitmap(LPWSTR szWText, char *szComment);
  62. UINT CheckSum(PVOID pData, UINT nLen);
  63. BOOL AddBitMap(PBMPENTRY pBitmap, LPCWSTR szWText);
  64. BOOL AddBitMapA(PBMPENTRY pBitmap, LPCSTR szAText);
  65. BOOL DeleteBitmap(LPWSTR szWText, char *szComment);
  66. BOOL DeleteBitmapByPointer(FOFFSET nBmpOffs);
  67. BOOL DeleteGroupByPointer(FOFFSET nGrpOffs);
  68. PGROUPENTRY GetGroupList(VOID);
  69. VOID FreeGroupList(PGROUPENTRY pList);
  70. PBMPENTRY GetBitmapList(HDC hDC, FOFFSET nOffs);
  71. VOID FreeBitmapList(PBMPENTRY pList);
  72. #ifdef __cplusplus
  73. }
  74. #endif