0 = FSNone 1 = FSUpToDate 2 = FSOutOfDate 3 = FSInvalid MtbGraphFiles Defines the different graph file types. 0 = Text 1 = Numeric 2 = DateTime 3 = DataUnassigned MtbFormulaStatuss Defines the state of the Formula for a Column or Constant object. 0 = ASReady (Minitab is ready to accept commands) 1 = ASBusy (Minitab is busy executing a command) 2 = ASError (The last command executed caused an error) 3 = ASQuit (Quit has been called but the application object is not yet destroyed) MtbDatas Defines the different data types that are currently supported. 6ħ Data s 2 Data s Minitab Data s MtbAppStatuss Defines the different Mtb Application status types. Note The information in this section is from the MSDN Library - January 2001, platform SDK:COM (Component Services). The function failed to allocate necessary memory. 5Ħ Getting Started HRESULT E_NOINTERFACE E_NOTIMPL E_FAIL E_OUTOFMEMORY E_POINTER E_INVALIDARG E_UNEXPECTED E_HANDLE E_ABORT Definition The QueryInterface function did not recognize the requested interface. To use the return values, you must include winerror.h in your project. The following table lists the standard HRESULT definitions. HRESULT Definitions The return value of COM functions and methods is an HRESULT. COM will not propagate traditional C++ exceptions as extended IErrorInfo information. If you are using the Visual C++ COM compiler support, you can use the _com_raise_error class to report an error, and the _com_error class to retrieve error information. The Visual Basic run-time layer takes care of the mapping for you. You can raise errors with the Err Raise function and catch errors with the On Error statement. Visual Basic programmers have easy access to the ErrorInfo object, which is exposed through the Err object. If it does, the caller uses the IErrorInfo interface to retrieve the error information. After the caller inspects the HRESULT and finds that the method call failed, it queries the object to see whether it supports the ErrorInfo object. When an error occurs, the component uses the ICreateErrorInfo interface to initialize an error object. Automation provides three interfaces to manage the error object: Components must implement the ISupportErrorInfo interface to advertise their support for the ErrorInfo object. You can also include pointers to an entry in a Help file. The value of this generic error object is that it supplements an HRESULT, extending the type of error description, the source of the error, and the interface identifier of the method that originated the error. ErrorInfo objects ErrorInfo objects are often called COM exceptions because they allow an object to pass (or throw) rich error information to its caller, even across apartment boundaries. In Microsoft Visual C++, you must explicitly return an HRESULT. Microsoft Visual Basic automatically defines each method with an HRESULT as a return. Using methods that return HRESULTs is fundamental to well-written components and is essential to the debugging process. Lastly, system APIs provide a lookup from an HRESULT to a string that describes the error condition.
HRESULTs also report any errors in making function calls or interface method calls and identify the facilities associated with the errors, such as RPC, WIN32, or ITF for interface-specific errors.
An HRESULT indicates whether a COM method succeeded or failed. Strategies for Handling Errors in COM overview HRESULT values COM returns an HRESULT value for all methods in all component interfaces. You can use this COM library with any COM-compliant language. 9 Minitab Command Automation Objects My Menu My Menu Overview A Minitab Automation Object Reference Application object ApplicationOptions object UserInterface object OutputWindow object Project object B Worksheet Object Reference Worksheets Collection object Worksheet object Columns Collection object Column object Constants Collection object Constant object Matrices Collection object Matrix object C Command Object Reference Commands Collection object Command object Outputs Collection object Output object OutputDocument object Title object Paragraph object Table object Formula object FormulaCoefficients Collection object FormulaCoefficient objectĤ Contents Graph object OutList object Triangle object Message objectĥ Getting Started 1 Getting Started Introducing Automation in Minitab The COM automation library contains a set of standard COM (Component Object Model) objects that expose much of Minitab s internal functionality. 5 Strategies for Handling Errors in COM overview Data s. can be found at All other marks referenced remain the property of their respective owners. and the Minitab logo are registered trademarks of Minitab, Inc., in the United States and other countries.