Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Standard COM Errors
Collapse the table of content
Expand the table of content

Standard COM Errors

Commerce Server 2000

Many, but not all, of the properties and methods of the Commerce Server objects use standard Component Object Model (COM) HRESULT return values to communicate whether the operation was successful or not.

In C++, these values are the actual return values from the methods themselves (including property get_ and put_ methods). The program must explicitly perform error checking by examining these return values, or use some variation of structured error handling.

In Microsoft Visual Basic (VB), and in Visual Basic Scripting Edition (VBS) as used in Active Server Pages (ASP), these values are placed in the Number property of the global Err object. Error handling is either handled automatically, displaying a standard error dialog box, or explicitly by the program, checking the value of the Number property of the global Err object. The On Error Resume Next command disables automatic error handling, thereby enabling explicit error handling.

The following table shows the most common standard COM errors returned by the properties and methods of the Commerce Server objects.

ConstantValue (32-bit)Description
S_OK00000000The standard return value used to communicate successful completion.
S_FALSE00000001An alternate success value, typically used to communicate successful, but non-standard completion. The precise meaning depends on the method or property in question.
E_UNEXPECTED8000FFFFCatastrophic failure error.
E_NOTIMPL80004001Not implemented error.
E_OUTOFMEMORY8007000EOut of memory error.
E_INVALIDARG80070057One or more arguments are not valid error.
E_NOINTERFACE80004002Interface not supported error.
E_POINTER80004003Pointer not valid error.
E_HANDLE80070006Handle not valid error.
E_ABORT80004004Operation aborted error.
E_FAIL80004005Unspecified error.
E_ACCESSDENIED80070005General access denied error.

Additional information may be available using the global Err object. In Visual Basic, the Description property of the Err object may contain a text description of the error.

In C++, call the API function GetErrorInfo to retrieve the most recently set IErrorInfo pointer in the current logical thread. The GetDescription method of that interface may return a text description of the error.


All rights reserved.
Show:
© 2015 Microsoft