W1008 Integer and HRESULT interchanged

From Appmethod Topics
Jump to: navigation, search

Go Up to Error and Warning Messages (Object Pascal) Index


This message relates to C++ compatibility. In the (relatively distant) past, certain interfaces written in Object Pascal used the type 'Integer' where they should have used 'HRESULT'. The problem is that in the C++ translation, 'Integer' and 'HRESULT' mangle differently, and so any methods with parameter lists containing these types have different names in the .OBJ files, depending on whether the Object Pascal or C++ definition of the interface was used.

This message is only a warning in the case of .OBJ files not being produced. If .OBJ files are requested from the dcc32 compiler, then this warning message becomes an error instead (X1008).

The solution is generally to use HRESULT in both COM interfaces and the methods that implement those interfaces where the C++ translation of those interfaces also uses HRESULT.

See Also