Changeset 35445 in vbox for trunk/src/VBox/Runtime
- Timestamp:
- Jan 10, 2011 11:05:23 AM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 69316
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/win/errmsgwin.cpp
r28800 r35445 5 5 6 6 /* 7 * Copyright (C) 2006-20 07Oracle Corporation7 * Copyright (C) 2006-2011 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 81 81 return &g_aStatusMsgs[i]; 82 82 83 /* The g_aStatusMsgs table contains a wild mix of error codes with and 84 * without included facility and severity. So the chance is high that there 85 * was no exact match. Try to find a non-exact match, and include the 86 * actual value in case we pick the wrong entry. Better than always using 87 * the "Unknown Status" case. */ 88 for (i = 0; i < RT_ELEMENTS(g_aStatusMsgs); i++) 89 if (g_aStatusMsgs[i].iCode == HRESULT_CODE(rc)) 90 { 91 int32_t iMsg = (ASMAtomicIncU32(&g_iUnknownMsgs) - 1) % RT_ELEMENTS(g_aUnknownMsgs); 92 RTStrPrintf(&g_aszUnknownStr[iMsg][0], sizeof(g_aszUnknownStr[iMsg]), "%s 0x%X", g_aStatusMsgs[i].pszDefine, rc); 93 return &g_aUnknownMsgs[iMsg]; 94 } 95 83 96 /* 84 97 * Need to use the temporary stuff.
Note:
See TracChangeset
for help on using the changeset viewer.