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.

37 lines
750 B

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1998 - 1999
  6. //
  7. // File: errmap.c
  8. //
  9. //--------------------------------------------------------------------------
  10. typedef long LONG;
  11. typedef LONG NTSTATUS;
  12. #include <ntstatus.h>
  13. #include <winerror.h>
  14. //#define WIN32_NO_STATUS
  15. #include "errmap.h"
  16. LONG
  17. MapWinErrorToNtStatus(
  18. LONG in_uErrorCode
  19. )
  20. {
  21. LONG i;
  22. for (i = 0; i < sizeof(CodePairs) / sizeof(CodePairs[0]); i += 2) {
  23. if (CodePairs[i + 1] == in_uErrorCode) {
  24. return CodePairs[i];
  25. }
  26. }
  27. return -1;
  28. }