casting problem in com server code

casting problem in com server code

Hi friends,

I am facing a casting problem in my COM server code.Can anyone help me.I am attaching my code below.

function Itestcmptfreq_testing( ObjectData ,&
y) result (hresult)
use testcmptfreq_Types
use dfcom
implicit none
type(testcmptfreq_InstanceData) ObjectData
!dec$ attributes reference :: ObjectData
REAL(8), intent(in) :: x
type(variant), intent(out) :: y
integer(LONG) hresult
integer*4 status
! TODO: Add implementation
y=x------------->>>HERE I AM GETTING ERROR
hresult = S_OK
end function

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.


The VARIANT data type is a system defined data type, and not one that Fortran knows about. A VARIANT contains an indication of the type of value contained in the VARIANT (the vt field) and the value. The value field is actually a union of all possible values.

For an output VARIANT, you must initialize it with the right type and value. Here is an example:

call VariantInit(y)
y%vt = VT_R8
y%vu%DOUBLE_VAL = x


Leave a Comment

Please sign in to add a comment. Not a member? Join today