- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
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?
Link Copied
0 Replies

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page