Quantcast
Channel: Intel® Fortran Compiler
Viewing all articles
Browse latest Browse all 3270

Marshalling an ALLOCATABLE array through IVF's generated COM interfaces

$
0
0

I have this function prototype as given below. It was generated by the COM Server functionality which runs after editing an .HIE file in Visual Studio, which describes the function like this: 

<METHOD Name="get_Vertices" AUTOID="1" MAGIC="8" NAME="get_Vertices" PROPERTY="TRUE" PROPINTENT="propget"><ARGUMENT Name="value" ASSUMEDSHAPE="TRUE" DATATYPE="REAL(4)" INTENT="out" NAME="value" RANK="1" RETVAL="TRUE"/></METHOD></INTERFACE>

And then generates this:

function IIsoSurface9_get_Vertices( ObjectData ,&
         value) result (hresult)
    use IsoSurface9_Types
    implicit none
    type(IsoSurface9_InstanceData) ObjectData
    !dec$ attributes reference :: ObjectData
    REAL(4), intent(out) :: value
    DIMENSION value(1:)
    integer(long) hresult
    ! <B8> DO NOT REMOVE THIS LINE
    ! TODO:  Add implementation

    hresult = S_OK
    ! <E8> DO NOT REMOVE THIS LINE
end function

ObjectData contains a field, ObjectData%Vertices, which is an ALLOCATABLE array. The structure starts like this: 

 type IsoSurface9_InstanceData
        sequence
        ! <B6DEF> DO NOT REMOVE THIS LINE
        !  TODO:  Add fields and remove "dummy"
        real*4,   ALLOCATABLE :: VERTICES(:)

I have to assign the contents of VERTICES to the intent(out) variable VALUE. I am able to populate the VERTICES variable using the "put" method for my property, but I haven't figured out how to get it to go the other direction.

How is that done? 



 


Viewing all articles
Browse latest Browse all 3270

Trending Articles