Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29282 Discussions

Subroutine generated by the IVF Module Wizard requiring "Object" Input

Dr__Crypt
Beginner
424 Views
Using the Fortran Module Wizard, one of the subroutines require some type of Integer representing an e-mail object to be passed. I don't know what to give it as input ("Message" which is described as "IDispatch"). I have worked with COM and Automation interfaces before and this is the first time that I have had a problem like this. I created a derived Type using a module and tried to pass the Derived Type object to the subroutine using the "loc" function with no luck. The $Object is the pointer to the object's interface that I get by calling COMCreateObjectByGUID. The $Status is just a plain old integer that gives you the error code if there is one or "0" for no error. I just don't know what "Message" is and what I need to do.

The subroutine generated by the IVF Fortran Module Wizard is:

!Sends an email thru the sender in asynchronous mode.

SUBROUTINE $EmailSender_SendEmail($OBJECT, Message, $STATUS)

IMPLICIT NONE

INTEGER(INT_PTR_KIND()), INTENT(IN) :: $OBJECT ! Object Pointer
!DEC$ ATTRIBUTES VALUE :: $OBJECT
INTEGER(INT_PTR_KIND()), INTENT(IN) :: Message ! IDispatch
!DEC$ ATTRIBUTES REFERENCE :: Message
INTEGER(4), INTENT(OUT), OPTIONAL :: $STATUS ! Method status
!DEC$ ATTRIBUTES REFERENCE :: $STATUS
INTEGER(4) $$STATUS
INTEGER(INT_PTR_KIND()) invokeargs
invokeargs = AUTOALLOCATEINVOKEARGS()
CALL AUTOADDARG(invokeargs, '$ARG1', Message, AUTO_ARG_IN, VT_DISPATCH)
$$STATUS = AUTOINVOKE($OBJECT, 1610809368, invokeargs)
IF (PRESENT($STATUS)) $STATUS = $$STATUS
CALL AUTODEALLOCATEINVOKEARGS (invokeargs)

END SUBROUTINE $EmailSender_SendEmail

Does anyone know what is needed for the input "Message" in the subroutine?
0 Kudos
0 Replies
Reply