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.

63 lines
1.4 KiB

  1. // StResource.h -- String Resource helper routines
  2. // (c) Copyright Schlumberger Technology Corp., unpublished work, created
  3. // 1998. This computer program includes Confidential, Proprietary
  4. // Information and is a Trade Secret of Schlumberger Technology Corp. All
  5. // use, disclosure, and/or reproduction is prohibited unless authorized
  6. // in writing. All Rights Reserved.
  7. #if !defined(SLBCSP_STRESOURCE_H)
  8. #define SLBCSP_STRESOURCE_H
  9. #if defined(_UNICODE)
  10. #if !defined(UNICODE)
  11. #define UNICODE
  12. #endif //!UNICODE
  13. #endif //_UNICODE
  14. #if defined(UNICODE)
  15. #if !defined(_UNICODE)
  16. #define _UNICODE
  17. #endif //!_UNICODE
  18. #endif //UNICODE
  19. #include <string>
  20. #include <windef.h>
  21. #include <slbRcCsp.h>
  22. #include <iopPriBlob.h>
  23. class StringResource
  24. {
  25. public:
  26. StringResource(UINT uID);
  27. const std::string
  28. AsString() const;
  29. const CString
  30. AsCString() const;
  31. static const std::string
  32. AsciiFromUnicode(LPCTSTR szSource);
  33. static const scu::SecureArray<char>
  34. CheckAsciiFromUnicode(LPCTSTR szSource);
  35. static bool
  36. IsASCII(LPCTSTR szSource);
  37. static const CString
  38. UnicodeFromAscii(std::string const &rsSource);
  39. private:
  40. std::string m_s;
  41. CString m_cs;
  42. };
  43. extern HANDLE
  44. GetImageResource(DWORD dwId,
  45. DWORD dwType);
  46. #endif // SLBCSP_STRESOURCE_H