Source code of Windows XP (NT5)
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.

48 lines
1.1 KiB

  1. /*****************************************************************************************************************
  2. FILENAME: Intfuncs.cpp
  3. COPYRIGHT 2001 Microsoft Corporation and Executive Software International, Inc.
  4. */
  5. #include "stdafx.h"
  6. #ifndef SNAPIN
  7. #include <windows.h>
  8. #endif
  9. #include "ErrMacro.h"
  10. /*****************************************************************************************************************
  11. COPYRIGHT 2001 Microsoft Corporation and Executive Software International, Inc.
  12. ROUTINE DESCRIPTION:
  13. This retrieves a string from the string table and writes it into a buffer.
  14. INPUT + OUTPUT:
  15. OUT TCHAR* cOutString - The buffer to write the string into.
  16. IN DWORD dwOutStringLen - The number of bytes in that buffer.
  17. IN DWORD dwResourceId - The resource id of the desired string.
  18. IN HINSTANCE hInst - The instance so we can access the resources.
  19. GLOBALS:
  20. None.
  21. RETURN:
  22. NULL - Fatal error.
  23. TCHAR* - cOutString
  24. */
  25. TCHAR*
  26. GetString(
  27. OUT TCHAR* ptOutString,
  28. IN DWORD dwOutStringLen,
  29. IN DWORD dwResourceId,
  30. IN HINSTANCE hInst
  31. )
  32. {
  33. EF(LoadString(hInst, dwResourceId, ptOutString, dwOutStringLen));
  34. return ptOutString;
  35. }