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.

60 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. }
  21. NEWSTRINGTABLE;
  22. DECLARE_STANDARD_TYPES(NEWSTRINGTABLE);
  23. /* Prototypes
  24. *************/
  25. /* string.c */
  26. extern BOOL CreateStringTable(PCNEWSTRINGTABLE, PHSTRINGTABLE);
  27. extern void DestroyStringTable(HSTRINGTABLE);
  28. extern BOOL AddString(LPCTSTR pcsz, HSTRINGTABLE hst, STRINGTABLEHASHFUNC pfnHashFunc, PHSTRING phs);
  29. extern void DeleteString(HSTRING);
  30. extern void LockString(HSTRING);
  31. extern COMPARISONRESULT CompareStringsI(HSTRING, HSTRING);
  32. extern LPCTSTR GetString(HSTRING);
  33. #if defined(DEBUG) || defined (VSTF)
  34. extern BOOL IsValidHSTRING(HSTRING);
  35. extern BOOL IsValidHSTRINGTABLE(HSTRINGTABLE);
  36. #endif
  37. #ifdef DEBUG
  38. extern ULONG GetStringCount(HSTRINGTABLE);
  39. #endif