This is a brief description of the project.
Contains of two libraries, one containing interfaces, other containing coclasses, COM visible.
Used Module Wizard to create modules out of these libraries.
Created COM objects using CLSIDs provided. Two methods from different objcts worked fine, but it brakes at third method that is no different than these two. This is the error I get:
"Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))"
I found that program goes inside the correct .f90 file, finds the right description of a method, but after viewing the Log file, I saw that program never enters the actual function. This is the part of the code which returns the error.
INTEGER(4) FUNCTION $IFlash_SetReferenceFluid($OBJECT, ReferenceFluid) IMPLICIT NONE
INTEGER(INT_PTR_KIND()), INTENT(IN) :: $OBJECT ! Object Pointer
!DEC$ ATTRIBUTES VALUE :: $OBJECT
INTEGER(INT_PTR_KIND()), INTENT(IN) :: ReferenceFluid ! IUnknown
!DEC$ ATTRIBUTES REFERENCE :: ReferenceFluid
INTEGER(INT_PTR_KIND()) $VTBL ! Interface Function Table
$VPTR = $OBJECT ! Interface Function Table
$VPTR = $VTBL + 9 * INT_PTR_KIND() ! Add routine table offset
IFlash_SetReferenceFluid_PTR = $VTBL
$RETURN = IFlash_SetReferenceFluid($OBJECT, ReferenceFluid) !!!!!!!!!!!!!!!!!!!! THIS LINE RETURNS ERROR !!!!!!!!!!!!!!!!
$IFlash_SetReferenceFluid = $RETURN
END FUNCTION $IFlash_SetReferenceFluid
Thing is that I created sample programs in VB, C++, C#, HTML and they all work without a problem. I'm using Visual Studio 2010 and Intel Composer XE 2013.