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.

43 lines
1.0 KiB

  1. /***********************************************************************
  2. * Microsoft (R) Windows (R) Resource Compiler
  3. *
  4. * Copyright (c) Microsoft Corporation. All rights reserved.
  5. *
  6. * File Comments:
  7. *
  8. *
  9. ***********************************************************************/
  10. #include "rc.h"
  11. void __cdecl SET_MSGV(int msgnumber, va_list arg_list)
  12. {
  13. DWORD cb = FormatMessageW(FORMAT_MESSAGE_FROM_HMODULE,
  14. hInstance,
  15. msgnumber,
  16. 0,
  17. Msg_Text,
  18. sizeof(Msg_Text) / sizeof(wchar_t),
  19. &arg_list);
  20. if (cb == 0) {
  21. #if DBG
  22. printf("Internal error : message not found: %d\n", msgnumber);
  23. #endif
  24. Msg_Text[0] = L'\0';
  25. }
  26. }
  27. void __cdecl SET_MSG(int msgnumber, ...)
  28. {
  29. va_list arg_list;
  30. va_start(arg_list, msgnumber);
  31. SET_MSGV(msgnumber, arg_list);
  32. va_end(arg_list);
  33. }