! AddingMachine.f90

! This module contains the COM interfaces of the objects defined in 
! C:\Program Files\Microsoft Visual Studio\DF98\SAMPLES\ADVANCED\COM\ADDER\Adder.dll\1
! Generated by the Fortran Module Wizard on 05/19/00

	MODULE AddingMachine
		USE DFWINTY
		USE DFCOM
		IMPLICIT NONE
	

		! CLSIDs		
		TYPE (GUID), PARAMETER :: CLSID_AddingMachine = &
			GUID(#904245FC, #DD6D, #11D3, &
			  CHAR('98'X)//CHAR('35'X)//CHAR('00'X)//CHAR('00'X)// &
			  CHAR('F8'X)//CHAR('75'X)//CHAR('E1'X)//CHAR('93'X))

		! IIDs		
		TYPE (GUID), PARAMETER :: IID_IAdd = &
			GUID(#904245FD, #DD6D, #11D3, &
			  CHAR('98'X)//CHAR('35'X)//CHAR('00'X)//CHAR('00'X)// &
			  CHAR('F8'X)//CHAR('75'X)//CHAR('E1'X)//CHAR('93'X))

		! Interfaces
		INTERFACE
  			INTEGER*4 FUNCTION IAdd_Add($OBJECT, Operand)
				INTEGER(INT_PTR_KIND()), INTENT(IN)	:: $OBJECT	 ! Object Pointer
				!DEC$ ATTRIBUTES VALUE	:: $OBJECT
				REAL*4, INTENT(IN)	:: Operand	
				!DEC$ ATTRIBUTES VALUE	:: Operand
			!DEC$ ATTRIBUTES STDCALL :: IAdd_Add
			END FUNCTION IAdd_Add
		END INTERFACE
		POINTER(IAdd_Add_PTR, IAdd_Add)	! routine pointer
		INTERFACE
  			INTEGER*4 FUNCTION IAdd_Clear($OBJECT)
				INTEGER(INT_PTR_KIND()), INTENT(IN)	:: $OBJECT	 ! Object Pointer
				!DEC$ ATTRIBUTES VALUE	:: $OBJECT
			!DEC$ ATTRIBUTES STDCALL :: IAdd_Clear
			END FUNCTION IAdd_Clear
		END INTERFACE
		POINTER(IAdd_Clear_PTR, IAdd_Clear)	! routine pointer
		INTERFACE
  			INTEGER*4 FUNCTION IAdd_GetValue($OBJECT, CurrentValue)
				INTEGER(INT_PTR_KIND()), INTENT(IN)	:: $OBJECT	 ! Object Pointer
				!DEC$ ATTRIBUTES VALUE	:: $OBJECT
				REAL*4, INTENT(OUT)	:: CurrentValue	
				!DEC$ ATTRIBUTES REFERENCE	:: CurrentValue
			!DEC$ ATTRIBUTES STDCALL :: IAdd_GetValue
			END FUNCTION IAdd_GetValue
		END INTERFACE
		POINTER(IAdd_GetValue_PTR, IAdd_GetValue)	! routine pointer


		! Module Procedures
		CONTAINS
  			INTEGER*4 FUNCTION $IAdd_Add($OBJECT, Operand)
				!DEC$ ATTRIBUTES DLLEXPORT	:: $IAdd_Add
				IMPLICIT NONE
	
				INTEGER(INT_PTR_KIND()), INTENT(IN)	:: $OBJECT	 ! Object Pointer
				!DEC$ ATTRIBUTES VALUE	:: $OBJECT
				REAL*4, INTENT(IN)	:: Operand	
				!DEC$ ATTRIBUTES REFERENCE	:: Operand
				INTEGER*4 $RETURN
				INTEGER(INT_PTR_KIND()) $VTBL			! Interface Function Table
				POINTER($VPTR, $VTBL)
				$VPTR = $OBJECT			! Interface Function Table
				$VPTR = $VTBL + 16	! Add routine table offset
				IAdd_Add_PTR = $VTBL
				$RETURN = IAdd_Add($OBJECT, Operand)
				$IAdd_Add = $RETURN
			END FUNCTION $IAdd_Add
  			INTEGER*4 FUNCTION $IAdd_Clear($OBJECT)
				!DEC$ ATTRIBUTES DLLEXPORT	:: $IAdd_Clear
				IMPLICIT NONE
	
				INTEGER(INT_PTR_KIND()), INTENT(IN)	:: $OBJECT	 ! Object Pointer
				!DEC$ ATTRIBUTES VALUE	:: $OBJECT
				INTEGER*4 $RETURN
				INTEGER(INT_PTR_KIND()) $VTBL			! Interface Function Table
				POINTER($VPTR, $VTBL)
				$VPTR = $OBJECT			! Interface Function Table
				$VPTR = $VTBL + 12	! Add routine table offset
				IAdd_Clear_PTR = $VTBL
				$RETURN = IAdd_Clear($OBJECT)
				$IAdd_Clear = $RETURN
			END FUNCTION $IAdd_Clear
  			INTEGER*4 FUNCTION $IAdd_GetValue($OBJECT, CurrentValue)
				!DEC$ ATTRIBUTES DLLEXPORT	:: $IAdd_GetValue
				IMPLICIT NONE
	
				INTEGER(INT_PTR_KIND()), INTENT(IN)	:: $OBJECT	 ! Object Pointer
				!DEC$ ATTRIBUTES VALUE	:: $OBJECT
				REAL*4, INTENT(OUT)	:: CurrentValue	
				!DEC$ ATTRIBUTES REFERENCE	:: CurrentValue
				INTEGER*4 $RETURN
				INTEGER(INT_PTR_KIND()) $VTBL			! Interface Function Table
				POINTER($VPTR, $VTBL)
				$VPTR = $OBJECT			! Interface Function Table
				$VPTR = $VTBL + 20	! Add routine table offset
				IAdd_GetValue_PTR = $VTBL
				$RETURN = IAdd_GetValue($OBJECT, CurrentValue)
				$IAdd_GetValue = $RETURN
			END FUNCTION $IAdd_GetValue
	END MODULE
