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
1.2 KiB

  1. /*
  2. * string.h - String table ADT description.
  3. */
  4. /* Types
  5. ********/
  6. /* handles */
  7. DECLARE_HANDLE(HSTRING);
  8. DECLARE_STANDARD_TYPES(HSTRING);
  9. DECLARE_HANDLE(HSTRINGTABLE);
  10. DECLARE_STANDARD_TYPES(HSTRINGTABLE);
  11. /* count of hash buckets in a string table */
  12. typedef UINT HASHBUCKETCOUNT;
  13. DECLARE_STANDARD_TYPES(HASHBUCKETCOUNT);
  14. /* string table hash function */
  15. typedef HASHBUCKETCOUNT (*STRINGTABLEHASHFUNC)(LPCTSTR, HASHBUCKETCOUNT);
  16. /* new string table */
  17. typedef struct _newstringtable
  18. {
  19. HASHBUCKETCOUNT hbc;
  20. STRINGTABLEHASHFUNC HashFunc;
  21. }
  22. NEWSTRINGTABLE;
  23. DECLARE_STANDARD_TYPES(NEWSTRINGTABLE);
  24. /* Prototypes
  25. *************/
  26. /* string.c */
  27. extern BOOL CreateStringTable(PCNEWSTRINGTABLE, PHSTRINGTABLE);
  28. extern void DestroyStringTable(HSTRINGTABLE);
  29. extern BOOL AddString(LPCTSTR, HSTRINGTABLE, PHSTRING);
  30. extern void DeleteString(HSTRING);
  31. extern void LockString(HSTRING);
  32. extern COMPARISONRESULT CompareStringsI(HSTRING, HSTRING);
  33. extern LPCTSTR GetString(HSTRING);
  34. #if defined(DEBUG) || defined (VSTF)
  35. extern BOOL IsValidHSTRING(HSTRING);
  36. extern BOOL IsValidHSTRINGTABLE(HSTRINGTABLE);
  37. #endif
  38. #ifdef DEBUG
  39. extern ULONG GetStringCount(HSTRINGTABLE);
  40. #endif