|
|
|
| 1 |
|
/************************************************************************ |
| 2 |
|
* * |
| 3 |
|
* winerror.h -- error code definitions for the Win32 API functions * |
| 4 |
|
* * |
| 5 |
|
* Copyright (c) Microsoft Corp. All rights reserved. * |
| 6 |
|
* * |
| 7 |
|
************************************************************************/ |
| 8 |
|
|
| 9 |
|
#ifndef _WINERROR_ |
| 10 |
|
#define _WINERROR_ |
| 11 |
|
|
| 12 |
|
#if defined (_MSC_VER) && (_MSC_VER >= 1020) && !defined(__midl) |
| 13 |
|
#pragma once |
| 14 |
|
#endif |
| 15 |
|
|
| 16 |
|
#ifndef FORCEINLINE |
| 17 |
|
#if (_MSC_VER >= 1200) |
| 18 |
|
#define FORCEINLINE __forceinline |
| 19 |
|
#else |
| 20 |
|
#define FORCEINLINE __inline |
| 21 |
|
#endif |
| 22 |
|
#endif |
| 23 |
|
|
| 24 |
|
#include <specstrings.h> |
| 25 |
|
|
| 26 |
|
// |
| 27 |
|
// Values are 32 bit values laid out as follows: |
| 28 |
|
// |
| 29 |
|
// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 |
| 30 |
|
// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 |
| 31 |
|
// +---+-+-+-----------------------+-------------------------------+ |
| 32 |
|
// |Sev|C|R| Facility | Code | |
| 33 |
|
// +---+-+-+-----------------------+-------------------------------+ |
| 34 |
|
// |
| 35 |
|
// where |
| 36 |
|
// |
| 37 |
|
// Sev - is the severity code |
| 38 |
|
// |
| 39 |
|
// 00 - Success |
| 40 |
|
// 01 - Informational |
| 41 |
|
// 10 - Warning |
| 42 |
|
// 11 - Error |
| 43 |
|
// |
| 44 |
|
// C - is the Customer code flag |
| 45 |
|
// |
| 46 |
|
// R - is a reserved bit |
| 47 |
|
// |
| 48 |
|
// Facility - is the facility code |
| 49 |
|
// |
| 50 |
|
// Code - is the facility's status code |
| 22796 |
|
// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 |
| 22797 |
|
// +-+-+-+-+-+---------------------+-------------------------------+ |
| 22798 |
|
// |S|R|C|N|r| Facility | Code | |
| 22799 |
|
// +-+-+-+-+-+---------------------+-------------------------------+ |
| 22800 |
|
// |
| 22801 |
|
// where |
| 22802 |
|
// |
| 22803 |
|
// S - Severity - indicates success/fail |
| 22804 |
|
// |
| 22805 |
|
// 0 - Success |
| 22806 |
|
// 1 - Fail (COERROR) |
| 22807 |
|
// |
| 22808 |
|
// R - reserved portion of the facility code, corresponds to NT's |
| 22809 |
|
// second severity bit. |
| 22810 |
|
// |
| 22811 |
|
// C - reserved portion of the facility code, corresponds to NT's |
| 22812 |
|
// C field. |
| 22813 |
|
// |
| 22814 |
|
// N - reserved portion of the facility code. Used to indicate a |
| 22815 |
|
// mapped NT status value. |
| 22816 |
|
// |
| 22817 |
|
// r - reserved portion of the facility code. Reserved for internal |
| 22818 |
|
// use. Used to indicate HRESULT values that are not status |
| 22819 |
|
// values, but are instead message ids for display strings. |
| 22820 |
|
// |
| 22821 |
|
// Facility - is the facility code |
| 22822 |
|
// |
| 22823 |
|
// Code - is the facility's status code |
| 22824 |
|
// |
| 22825 |
|
|
| 22826 |
|
// |
| 22827 |
|
// Severity values |
| 22828 |
|
// |
| 22829 |
|
|
| 22830 |
|
#define SEVERITY_SUCCESS 0 |
| 22831 |
|
#define SEVERITY_ERROR 1 |
| 22832 |
|
|
| 22833 |
|
|
| 22834 |
|
// |
| 22835 |
|
// Generic test for success on any status value (non-negative numbers |
| 22836 |
|
// indicate success). |
| 22837 |
|
// |
| 22838 |
|
|
| 22839 |
|
#define SUCCEEDED(hr) (((HRESULT)(hr)) >= 0) |
| 22840 |
|
|
| 22841 |
|
// |
| 22842 |
|
// and the inverse |
| 22843 |
|
// |
| 22844 |
|
|
| 22845 |
|
#define FAILED(hr) (((HRESULT)(hr)) < 0) |
| 22846 |
|
|
| 22847 |
|
|
| 22848 |
|
// |
| 22849 |
|
// Generic test for error on any status value. |
| 22850 |
|
// |
| 22851 |
|
|
| 22852 |
|
#define IS_ERROR(Status) (((unsigned long)(Status)) >> 31 == SEVERITY_ERROR) |
| 22853 |
|
|
| 22854 |
|
// |
| 22855 |
|
// Return the code |
| 22856 |
|
// |
| 22857 |
|
|
| 22858 |
|
#define HRESULT_CODE(hr) ((hr) & 0xFFFF) |
| 22859 |
|
#define SCODE_CODE(sc) ((sc) & 0xFFFF) |
| 22860 |
|
|
| 22861 |
|
// |
| 22862 |
|
// Return the facility |
| 22863 |
|
// |
| 22864 |
|
|
| 22865 |
|
#define HRESULT_FACILITY(hr) (((hr) >> 16) & 0x1fff) |
| 22866 |
|
#define SCODE_FACILITY(sc) (((sc) >> 16) & 0x1fff) |
| 22867 |
|
|
| 22868 |
|
// |
| 22869 |
|
// Return the severity |
| 22870 |
|
// |
| 22871 |
|
|
| 22872 |
|
#define HRESULT_SEVERITY(hr) (((hr) >> 31) & 0x1) |
| 22873 |
|
#define SCODE_SEVERITY(sc) (((sc) >> 31) & 0x1) |
| 22874 |
|
|
| 22875 |
|
// |
| 22876 |
|
// Create an HRESULT value from component pieces |
| 22877 |
|
// |
| 22878 |
|
|
| 22879 |
|
#define MAKE_HRESULT(sev,fac,code) \ |
| 22880 |
|
((HRESULT) (((unsigned long)(sev)<<31) | ((unsigned long)(fac)<<16) | ((unsigned long)(code))) ) |
| 22881 |
|
#define MAKE_SCODE(sev,fac,code) \ |
| 22882 |
|
((SCODE) (((unsigned long)(sev)<<31) | ((unsigned long)(fac)<<16) | ((unsigned long)(code))) ) |
| 22883 |
|
|
| 22884 |
|
|
| 22885 |
|
// |
| 22886 |
|
// Map a WIN32 error value into a HRESULT |
| 22887 |
|
// Note: This assumes that WIN32 errors fall in the range -32k to 32k. |
| 22888 |
|
// |
| 22889 |
|
// Define bits here so macros are guaranteed to work |
| 22890 |
|
|
| 22891 |
|
#define FACILITY_NT_BIT 0x10000000 |
| 22892 |
|
|
| 22893 |
|
// |
| 22894 |
|
// HRESULT_FROM_WIN32(x) used to be a macro, however we now run it as an inline function |
| 22895 |
|
// to prevent double evaluation of 'x'. If you still need the macro, you can use __HRESULT_FROM_WIN32(x) |
| 23478 |
|
// |
| 23479 |
|
// MessageId: CO_E_NO_SECCTX_IN_ACTIVATE |
| 23480 |
|
// |
| 23481 |
|
// MessageText: |
| 23482 |
|
// |
| 23483 |
|
// Unable to complete the call since there is no COM+ security context inside IObjectControl.Activate. |
| 23484 |
|
// |
| 23485 |
|
#define CO_E_NO_SECCTX_IN_ACTIVATE _HRESULT_TYPEDEF_(0x8000402BL) |
| 23486 |
|
|
| 23487 |
|
// |
| 23488 |
|
// MessageId: CO_E_TRACKER_CONFIG |
| 23489 |
|
// |
| 23490 |
|
// MessageText: |
| 23491 |
|
// |
| 23492 |
|
// The provided tracker configuration is invalid |
| 23493 |
|
// |
| 23494 |
|
#define CO_E_TRACKER_CONFIG _HRESULT_TYPEDEF_(0x80004030L) |
| 23495 |
|
|
| 23496 |
|
// |
| 23497 |
|
// MessageId: CO_E_THREADPOOL_CONFIG |
| 23498 |
|
// |
| 23499 |
|
// MessageText: |
| 23500 |
|
// |
| 23501 |
|
// The provided thread pool configuration is invalid |
| 23502 |
|
// |
| 23503 |
|
#define CO_E_THREADPOOL_CONFIG _HRESULT_TYPEDEF_(0x80004031L) |
| 23504 |
|
|
| 23505 |
|
// |
| 23506 |
|
// MessageId: CO_E_SXS_CONFIG |
| 23507 |
|
// |
| 23508 |
|
// MessageText: |
| 23509 |
|
// |
| 23510 |
|
// The provided side-by-side configuration is invalid |
| 23511 |
|
// |
| 23512 |
|
#define CO_E_SXS_CONFIG _HRESULT_TYPEDEF_(0x80004032L) |
| 23513 |
|
|
| 23514 |
|
// |
| 23515 |
|
// MessageId: CO_E_MALFORMED_SPN |
| 23516 |
|
// |
| 23517 |
|
// MessageText: |
| 23518 |
|
// |
| 23519 |
|
// The server principal name (SPN) obtained during security negotiation is malformed. |
| 23520 |
|
// |
| 23521 |
|
#define CO_E_MALFORMED_SPN _HRESULT_TYPEDEF_(0x80004033L) |
| 23522 |
|
|
| 23523 |
|
|
| 23524 |
|
// |
| 23525 |
|
// Success codes |
| 23526 |
|
// |
| 23527 |
|
#define S_OK ((HRESULT)0L) |
| 23528 |
|
#define S_FALSE ((HRESULT)1L) |
| 23529 |
|
|
| 23530 |
|
// ****************** |
| 23531 |
|
// FACILITY_ITF |
| 23532 |
|
// ****************** |
| 23533 |
|
|
| 23534 |
|
// |
| 23535 |
|
// Codes 0x0-0x01ff are reserved for the OLE group of |
| 23536 |
|
// interfaces. |
| 23537 |
|
// |
| 23538 |
|
|
| 23539 |
|
|
| 23540 |
|
// |
| 23541 |
|
// Generic OLE errors that may be returned by many inerfaces |
| 23542 |
|
// |
| 23543 |
|
|
| 23544 |
|
#define OLE_E_FIRST ((HRESULT)0x80040000L) |
| 23545 |
|
#define OLE_E_LAST ((HRESULT)0x800400FFL) |
| 23546 |
|
#define OLE_S_FIRST ((HRESULT)0x00040000L) |
| 23547 |
|
#define OLE_S_LAST ((HRESULT)0x000400FFL) |
| 23548 |
|
|
| 23549 |
|
// |
| 23550 |
|
// Old OLE errors |
| 23551 |
|
// |
| 23552 |
|
// |
| 23553 |
|
// MessageId: OLE_E_OLEVERB |
| 23554 |
|
// |
| 23555 |
|
// MessageText: |
| 23556 |
|
// |
| 23557 |
|
// Invalid OLEVERB structure |
| 23558 |
|
// |
| 23559 |
|
#define OLE_E_OLEVERB _HRESULT_TYPEDEF_(0x80040000L) |
| 23560 |
|
|
| 23561 |
|
// |
| 23562 |
|
// MessageId: OLE_E_ADVF |
| 23563 |
|
// |
| 23564 |
|
// MessageText: |
| 23565 |
|
// |
| 23566 |
|
// Invalid advise flags |
| 23567 |
|
// |
| 23568 |
|
#define OLE_E_ADVF _HRESULT_TYPEDEF_(0x80040001L) |
| 23569 |
|
|
| 23570 |
|
// |
| 23571 |
|
// MessageId: OLE_E_ENUM_NOMORE |
| 23572 |
|
// |
| 23573 |
|
// MessageText: |
| 23574 |
|
// |
| 23575 |
|
// Can't enumerate any more, because the associated data is missing |
| 23576 |
|
// |
| 23577 |
|
#define OLE_E_ENUM_NOMORE _HRESULT_TYPEDEF_(0x80040002L) |
| 39427 |
|
|
| 39428 |
|
|
| 39429 |
|
// |
| 39430 |
|
// NDIS error codes (802.11 wireless LAN) |
| 39431 |
|
// |
| 39432 |
|
|
| 39433 |
|
// |
| 39434 |
|
// MessageId: ERROR_NDIS_DOT11_AUTO_CONFIG_ENABLED |
| 39435 |
|
// |
| 39436 |
|
// MessageText: |
| 39437 |
|
// |
| 39438 |
|
// The wireless local area network interface is in auto configuration mode and doesn't support the requested parameter change operation. |
| 39439 |
|
// |
| 39440 |
|
#define ERROR_NDIS_DOT11_AUTO_CONFIG_ENABLED _NDIS_ERROR_TYPEDEF_(0x80342000L) |
| 39441 |
|
|
| 39442 |
|
// |
| 39443 |
|
// MessageId: ERROR_NDIS_DOT11_MEDIA_IN_USE |
| 39444 |
|
// |
| 39445 |
|
// MessageText: |
| 39446 |
|
// |
| 39447 |
|
// The wireless local area network interface is busy and can not perform the requested operation. |
| 39448 |
|
// |
| 39449 |
|
#define ERROR_NDIS_DOT11_MEDIA_IN_USE _NDIS_ERROR_TYPEDEF_(0x80342001L) |
| 39450 |
|
|
| 39451 |
|
// |
| 39452 |
|
// MessageId: ERROR_NDIS_DOT11_POWER_STATE_INVALID |
| 39453 |
|
// |
| 39454 |
|
// MessageText: |
| 39455 |
|
// |
| 39456 |
|
// The wireless local area network interface is power down and doesn't support the requested operation. |
| 39457 |
|
// |
| 39458 |
|
#define ERROR_NDIS_DOT11_POWER_STATE_INVALID _NDIS_ERROR_TYPEDEF_(0x80342002L) |
| 39459 |
|
|
| 39460 |
|
// |
| 39461 |
|
// NDIS informational code (ndis.sys) |
| 39462 |
|
// |
| 39463 |
|
|
| 39464 |
|
// |
| 39465 |
|
// MessageId: ERROR_NDIS_INDICATION_REQUIRED |
| 39466 |
|
// |
| 39467 |
|
// MessageText: |
| 39468 |
|
// |
| 39469 |
|
// The request will be completed later by NDIS status indication. |
| 39470 |
|
// |
| 39471 |
|
#define ERROR_NDIS_INDICATION_REQUIRED _NDIS_ERROR_TYPEDEF_(0x00340001L) |
| 39472 |
|
|
| 39473 |
|
#endif//_WINERROR_ |
| 39474 |
|
|
| 39475 |
|
|
|
|
|