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.

68 lines
1.4 KiB

  1. /*
  2. * S Z S R C . H
  3. *
  4. * Multi-language string support
  5. *
  6. * Copyright 1986-1997 Microsoft Corporation, All Rights Reserved
  7. */
  8. #ifndef _SZSRC_H_
  9. #define _SZSRC_H_
  10. // Include CAL common defines ('cause they used to live in this file!)
  11. #include <ex\calcom.h>
  12. #include <except.h>
  13. // Localized string lookup ---------------------------------------------------
  14. //
  15. class safe_lcid
  16. {
  17. LONG m_lcid;
  18. // NOT IMPLEMENTED
  19. //
  20. safe_lcid(const safe_lcid& b);
  21. safe_lcid& operator=(const safe_lcid& b);
  22. public:
  23. // CONSTRUCTORS
  24. //
  25. explicit safe_lcid (LONG lcid = LOCALE_SYSTEM_DEFAULT)
  26. : m_lcid(GetThreadLocale())
  27. {
  28. SetThreadLocale (lcid);
  29. }
  30. ~safe_lcid ()
  31. {
  32. if (!SetThreadLocale (m_lcid))
  33. throw CLastErrorException();
  34. }
  35. };
  36. // Localized string fetching -------------------------------------------------
  37. //
  38. BOOL FLookupLCID (LPCSTR psz, ULONG * plcid);
  39. ULONG LcidAccepted (LPCSTR psz);
  40. LPSTR LpszAutoDupSz (LPCSTR psz);
  41. LPWSTR WszDupWsz (LPCWSTR psz);
  42. BOOL FInitResourceStringCache();
  43. VOID DeinitResourceStringCache();
  44. LPSTR LpszLoadString (
  45. UINT uiResourceID,
  46. ULONG lcid,
  47. LPSTR lpszBuf,
  48. INT cchBuf );
  49. LPWSTR LpwszLoadString (
  50. UINT uiResourceID,
  51. ULONG lcid,
  52. LPWSTR lpwszBuf,
  53. INT cchBuf);
  54. // Service instance (otherwise referred as server ID)
  55. // parsing out of virtual root
  56. //
  57. LONG LInstFromVroot( LPCWSTR pwszServerId );
  58. #endif // _SZSRC_H_