Platform SDK: CDO 1.2.1 |
When the CDO Library or the CDO Rendering Library calls MAPI, the desired return value is zero, meaning the call was successful and produced the expected results. MAPI can also return either a warning value or an error value to the CDO libraries. A warning means the call was at least partially successful but may have produced an unexpected result or side effect. An error means the call was not successful. All warning and error return codes are nonzero. Warning values have the high-order bit zero, while error values set it to one.
For the convenience of the Microsoft® Visual Basic® programmer, the CDO libraries define 32-bit type library constants for all relevant warning and error codes. These are provided here in alphabetic and then in numeric order.
A program running on a 16-bit platform cannot use these type library constants. Such a program must test against the low-order word of the constant's value incremented by decimal 1000. For more information on error checking, see Handling Errors.
Note MAPI returns 32-bit values to Visual Basic for both warnings and errors, but Visual Basic treats the two cases differently. Errors are passed to the CDO libraries as 32-bit codes, while warnings are returned as the sum of decimal 1000 and the low-order word of the warning, even on a 32-bit platform. This means that a partial completion, for example, is returned as &H0680 + 1000, or 2664, instead of &H00040680, the full value of CdoW_PARTIAL_COMPLETION.
To test for a MAPI warning in a Visual Basic program, you can code the decimal value from the following tables directly into your program. Alternatively, if you prefer to use the type constant for improved readability, you can prepare it for comparison by subtracting the &H40000 bit and then adding 1000 decimal. This is equivalent to subtracting decimal 261144 from the constant:
If Err() = CdoW_PARTIAL_COMPLETION - 261144 Then ...
Microsoft Visual Basic Scripting Edition (VBScript) and Microsoft® JScript™ do not support any predefined constants. If your application is running as server-side or client-side script, you must use the appropriate hexadecimal or decimal values instead of these type library constants.
The following table lists the return values from MAPI in alphabetic order:
Warning or error code value
|
HRESULT [VB4 error value] (hexadecimal) |
Low-order word + 1000 (decimal) |
---|---|---|
CdoE_ACCOUNT_DISABLED | &H80040124 | 1292 |
CdoE_AMBIGUOUS_RECIP | &H80040700 | 2792 |
CdoE_BAD_CHARWIDTH | &H80040103 | 1259 |
CdoE_BAD_COLUMN | &H80040118 | 1280 |
CdoE_BAD_VALUE | &H80040301 | 1769 |
CdoE_BUSY | &H8004010B | 1267 |
CdoE_CALL_FAILED | &H80004005 | 17389 |
CdoE_CANCEL | &H80040501 | 2281 |
CdoE_COLLISION | &H80040604 | 2540 |
CdoE_COMPUTED | &H8004011A | 1282 |
CdoE_CORRUPT_DATA | &H8004011B | 1283 |
CdoE_CORRUPT_STORE | &H80040600 | 2536 |
CdoE_DECLINE_COPY | &H80040306 | 1774 |
CdoE_DISK_ERROR | &H80040116 | 1278 |
CdoE_END_OF_SESSION | &H80040200 | 1512 |
CdoE_EXTENDED_ERROR | &H80040119 | 1281 |
CdoE_FAILONEPROVIDER | &H8004011D | 1285 |
CdoE_FOLDER_CYCLE | &H8004060B | 2547 |
CdoE_HAS_FOLDERS | &H80040609 | 2545 |
CdoE_HAS_MESSAGES | &H8004060A | 2546 |
CdoE_INTERFACE_NOT_SUPPORTED | &H80004002 | 17386 |
CdoE_INVALID_ACCESS_TIME | &H80040123 | 1291 |
CdoE_INVALID_BOOKMARK | &H80040405 | 2029 |
CdoE_INVALID_ENTRYID | &H80040107 | 1263 |
CdoE_INVALID_OBJECT | &H80040108 | 1264 |
CdoE_INVALID_PARAMETER | &H80070057 | 1087 |
CdoE_INVALID_TYPE | &H80040302 | 1770 |
CdoE_INVALID_WORKSTATION_ACCOUNT | &H80040122 | 1290 |
CdoE_LOGON_FAILED | &H80040111 | 1273 |
CdoE_MISSING_REQUIRED_COLUMN | &H80040202 | 1514 |
CdoE_NETWORK_ERROR | &H80040115 | 1277 |
CdoE_NO_ACCESS | &H80070005 | 1005 |
CdoE_NO_RECIPIENTS | &H80040607 | 2543 |
CdoE_NO_SUPPORT | &H80040102 | 1258 |
CdoE_NO_SUPPRESS | &H80040602 | 2538 |
CdoE_NON_STANDARD | &H80040606 | 2542 |
CdoE_NOT_ENOUGH_DISK | &H8004010D | 1269 |
CdoE_NOT_ENOUGH_MEMORY | &H8007000E | 1014 |
CdoE_NOT_ENOUGH_RESOURCES | &H8004010E | 1270 |
CdoE_NOT_FOUND | &H8004010F | 1271 |
CdoE_NOT_IN_QUEUE | &H80040601 | 2537 |
CdoE_NOT_INITIALIZED | &H80040605 | 2541 |
CdoE_NOT_ME | &H80040502 | 2282 |
CdoE_OBJECT_CHANGED | &H80040109 | 1265 |
CdoE_OBJECT_DELETED | &H8004010A | 1266 |
CdoE_PASSWORD_CHANGE_REQUIRED | &H80040120 | 1288 |
CdoE_PASSWORD_EXPIRED | &H80040121 | 1289 |
CdoE_SESSION_LIMIT | &H80040112 | 1274 |
CdoE_STRING_TOO_LONG | &H80040105 | 1261 |
CdoE_SUBMITTED | &H80040608 | 2544 |
CdoE_TABLE_EMPTY | &H80040402 | 2026 |
CdoE_TABLE_TOO_BIG | &H80040403 | 2027 |
CdoE_TIMEOUT | &H80040401 | 2025 |
CdoE_TOO_BIG | &H80040305 | 1773 |
CdoE_TOO_COMPLEX | &H80040117 | 1279 |
CdoE_TYPE_NO_SUPPORT | &H80040303 | 1771 |
CdoE_UNABLE_TO_ABORT | &H80040114 | 1276 |
CdoE_UNABLE_TO_COMPLETE | &H80040400 | 2024 |
CdoE_UNCONFIGURED | &H8004011C | 1284 |
CdoE_UNEXPECTED_ID | &H80040307 | 1775 |
CdoE_UNEXPECTED_TYPE | &H80040304 | 1772 |
CdoE_UNKNOWN_CPID | &H8004011E | 1286 |
CdoE_UNKNOWN_ENTRYID | &H80040201 | 1513 |
CdoE_UNKNOWN_FLAGS | &H80040106 | 1262 |
CdoE_UNKNOWN_LCID | &H8004011F | 1287 |
CdoE_USER_CANCEL | &H80040113 | 1275 |
CdoE_VERSION | &H80040110 | 1272 |
CdoE_WAIT | &H80040500 | 2280 |
CdoW_APPROX_COUNT | &H00040482 | 2154 |
CdoW_CANCEL_MESSAGE | &H00040580 | 2408 |
CdoW_ERRORS_RETURNED | &H00040380 | 1896 |
CdoW_NO_SERVICE | &H00040203 | 1515 |
CdoW_PARTIAL_COMPLETION | &H00040680 | 2664 |
CdoW_POSITION_CHANGED | &H00040481 | 2153 |
The following table lists the return values from MAPI in numeric order:
HRESULT [VB4 error value] (hexadecimal) |
Low-order word + 1000 (decimal) |
Warning or error code value
|
---|---|---|
&H00040203 | 1515 | CdoW_NO_SERVICE |
&H00040380 | 1896 | CdoW_ERRORS_RETURNED |
&H00040481 | 2153 | CdoW_POSITION_CHANGED |
&H00040482 | 2154 | CdoW_APPROX_COUNT |
&H00040580 | 2408 | CdoW_CANCEL_MESSAGE |
&H00040680 | 2664 | CdoW_PARTIAL_COMPLETION |
&H80004002 | 17386 | CdoE_INTERFACE_NOT_SUPPORTED |
&H80004005 | 17389 | CdoE_CALL_FAILED |
&H80040102 | 1258 | CdoE_NO_SUPPORT |
&H80040103 | 1259 | CdoE_BAD_CHARWIDTH |
&H80040105 | 1261 | CdoE_STRING_TOO_LONG |
&H80040106 | 1262 | CdoE_UNKNOWN_FLAGS |
&H80040107 | 1263 | CdoE_INVALID_ENTRYID |
&H80040108 | 1264 | CdoE_INVALID_OBJECT |
&H80040109 | 1265 | CdoE_OBJECT_CHANGED |
&H8004010A | 1266 | CdoE_OBJECT_DELETED |
&H8004010B | 1267 | CdoE_BUSY |
&H8004010D | 1269 | CdoE_NOT_ENOUGH_DISK |
&H8004010E | 1270 | CdoE_NOT_ENOUGH_RESOURCES |
&H8004010F | 1271 | CdoE_NOT_FOUND |
&H80040110 | 1272 | CdoE_VERSION |
&H80040111 | 1273 | CdoE_LOGON_FAILED |
&H80040112 | 1274 | CdoE_SESSION_LIMIT |
&H80040113 | 1275 | CdoE_USER_CANCEL |
&H80040114 | 1276 | CdoE_UNABLE_TO_ABORT |
&H80040115 | 1277 | CdoE_NETWORK_ERROR |
&H80040116 | 1278 | CdoE_DISK_ERROR |
&H80040117 | 1279 | CdoE_TOO_COMPLEX |
&H80040118 | 1280 | CdoE_BAD_COLUMN |
&H80040119 | 1281 | CdoE_EXTENDED_ERROR |
&H8004011A | 1282 | CdoE_COMPUTED |
&H8004011B | 1283 | CdoE_CORRUPT_DATA |
&H8004011C | 1284 | CdoE_UNCONFIGURED |
&H8004011D | 1285 | CdoE_FAILONEPROVIDER |
&H8004011E | 1286 | CdoE_UNKNOWN_CPID |
&H8004011F | 1287 | CdoE_UNKNOWN_LCID |
&H80040120 | 1288 | CdoE_PASSWORD_CHANGE_REQUIRED |
&H80040121 | 1289 | CdoE_PASSWORD_EXPIRED |
&H80040122 | 1290 | CdoE_INVALID_WORKSTATION_ACCOUNT |
&H80040123 | 1291 | CdoE_INVALID_ACCESS_TIME |
&H80040124 | 1292 | CdoE_ACCOUNT_DISABLED |
&H80040200 | 1512 | CdoE_END_OF_SESSION |
&H80040201 | 1513 | CdoE_UNKNOWN_ENTRYID |
&H80040202 | 1514 | CdoE_MISSING_REQUIRED_COLUMN |
&H80040301 | 1769 | CdoE_BAD_VALUE |
&H80040302 | 1770 | CdoE_INVALID_TYPE |
&H80040303 | 1771 | CdoE_TYPE_NO_SUPPORT |
&H80040304 | 1772 | CdoE_UNEXPECTED_TYPE |
&H80040305 | 1773 | CdoE_TOO_BIG |
&H80040306 | 1774 | CdoE_DECLINE_COPY |
&H80040307 | 1775 | CdoE_UNEXPECTED_ID |
&H80040400 | 2024 | CdoE_UNABLE_TO_COMPLETE |
&H80040401 | 2025 | CdoE_TIMEOUT |
&H80040402 | 2026 | CdoE_TABLE_EMPTY |
&H80040403 | 2027 | CdoE_TABLE_TOO_BIG |
&H80040405 | 2029 | CdoE_INVALID_BOOKMARK |
&H80040500 | 2280 | CdoE_WAIT |
&H80040501 | 2281 | CdoE_CANCEL |
&H80040502 | 2282 | CdoE_NOT_ME |
&H80040600 | 2536 | CdoE_CORRUPT_STORE |
&H80040601 | 2537 | CdoE_NOT_IN_QUEUE |
&H80040602 | 2538 | CdoE_NO_SUPPRESS |
&H80040604 | 2540 | CdoE_COLLISION |
&H80040605 | 2541 | CdoE_NOT_INITIALIZED |
&H80040606 | 2542 | CdoE_NON_STANDARD |
&H80040607 | 2543 | CdoE_NO_RECIPIENTS |
&H80040608 | 2544 | CdoE_SUBMITTED |
&H80040609 | 2545 | CdoE_HAS_FOLDERS |
&H8004060A | 2546 | CdoE_HAS_MESSAGES |
&H8004060B | 2547 | CdoE_FOLDER_CYCLE |
&H80040700 | 2792 | CdoE_AMBIGUOUS_RECIP |
&H80070005 | 1005 | CdoE_NO_ACCESS |
&H8007000E | 1014 | CdoE_NOT_ENOUGH_MEMORY |
&H80070057 | 1087 | CdoE_INVALID_PARAMETER |