Reference
COM interfaces

 

COM interfaces are declared using an automation language. Because that language is neutral to the entire set of programming languages that support automation-enabled components, the syntax details are left apart.

Because of this, a VB developer for instance may find it rather difficult to get the most of those interfaces because they are not expressed with the VB language syntax.

As a matter of simplifying the readability and the use of those interfaces, below are simple rules that apply according to your preferred programming language.

 

1) VB developer

 

2) C# developer

 

3) C/C++ developer

If you use raw C/C++ code then you can skip this section. The rules apply to a C/C++ developer using smart pointers.

All HRESULT error values returned by xlsgen are standard Win32 error values (see winerror.h from the Platform SDK) : a value of 0 means OK, a non-zero value means an error occured. xlsgen however creates five additional HRESULT values :

DescriptionValueComment
HRESULT_ERROR_EXCEL950x80072000Excel 95 files are not supported. The file format is different than the format in Excel 97/2000/XP/2003/2007.
HRESULT_ERROR_PASSWORDPROTECTED0x80072001The file cannot be opened because it's password-protected.
HRESULT_ERROR_ISO295000x80072002The file cannot be opened because it uses the strict ISO29500 file format.
HRESULT_ERROR_UNEXPECTEDFILEFORMAT0x80072003The file cannot be opened because it uses an unknown file format.
HRESULT_ERROR_MALFORMEDXLSXFILE0x80072004The file cannot be opened because it uses a malformed XLSX file.