I am working with C++Builder 10.3 Rio Update 1. I am having a problem migrating some Type Library files to the clang C++17 32bit compiler. I have an application created with the Classic Compiler (C++98) that uses a Type Library. I imported the Type Library years ago and created the three files _OCX.dcr, _TLB.cpp, _TLB.h.
When I try to compile this application in the clang C++17 compiler, I get the error:
[bcc32c Error] ddfpbridge_TLB.h(304): enumerator value evaluates to 2147549182, which cannot be narrowed to type 'int'.
Each of the four lines inside the brackets below gives this same error. Can you suggest a code change to get it to compile?
// ***************************************************//
// Declaration of Enumerations defined in Type Library
// ***************************************************//
enum class HRESULTS
{
HRESULTS_E_SERVERISNULLOREMPTY = 0x8000FFFE,
HRESULTS_E_USERNAMEISNULLOREMPTY = 0x8000FFFD,
HRESULTS_E_PASSWORDISNULLOREMPTY = 0x8000FFFC,
HRESULTS_E_SYMBOLISNULLOREMPTY = 0x8000FFFB
};
I have tried to re-import the Type Library and recreate these files in the current version of C++Builder, but the import wizard gives the error message:
Error accessing the OLE registry