!
! ********************************************************************
! *                                                                  *
! *  Copyright 2001 Compaq Computer Corporation                      *
! *                                                                  *
! *  COMPAQ Registered in U.S. Patent and Trademark Office.          *
! *                                                                  *
! *  Confidential computer software. Valid license from Compaq or    *
! *  authorized sublicensor required for possession, use or copying. *
! *  Consistent with FAR 12.211 and 12.212, Commercial Computer      *
! *  Software, Computer Software Documentation, and Technical Data   *
! *  for Commercial Items are licensed to the U.S. Government under  *
! *  vendor's standard commercial license.                           *
! *                                                                  *
! ********************************************************************
!
MODULE OLEAUT32
!dec$objcomment lib: "oleaut32.lib"

  USE DFWINTY  
  INTERFACE 
      
! BSTR routines
    INTEGER*4 FUNCTION SysAllocString(unistr);
!DEC$IF DEFINED(_X86_)
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : '_SysAllocString@' :: SysAllocString
!DEC$ELSE
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : 'SysAllocString' :: SysAllocString
!DEC$ENDIF
          INTEGER*2,     INTENT(IN)           :: unistr(*)
    END FUNCTION SysAllocString
    INTEGER*4 FUNCTION SysReAllocString(bstr, unistr);
!DEC$IF DEFINED(_X86_)
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : '_SysReAllocString@' :: SysReAllocString
!DEC$ELSE
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : 'SysReAllocString' :: SysReAllocString
!DEC$ENDIF
          INTEGER*4,     INTENT(INOUT)        :: bstr
          !DEC$ ATTRIBUTES REFERENCE          :: bstr
          INTEGER*2,     INTENT(IN)           :: unistr(*)
    END FUNCTION SysReAllocString
    INTEGER*4 FUNCTION SysAllocStringLen(unistr, unisize);
!DEC$IF DEFINED(_X86_)
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : '_SysAllocStringLen@' :: SysAllocStringLen
!DEC$ELSE
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : 'SysAllocStringLen' :: SysAllocStringLen
!DEC$ENDIF
          INTEGER*2,     INTENT(IN)           :: unistr(*)
          INTEGER*4,     INTENT(IN)           :: unisize
          !DEC$ ATTRIBUTES VALUE              :: unisize
    END FUNCTION SysAllocStringLen
    INTEGER*4 FUNCTION SysReAllocStringLen(bstr, unistr, unisize);
!DEC$IF DEFINED(_X86_)
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : '_SysReAllocStringLen@' :: SysReAllocStringLen
!DEC$ELSE
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : 'SysReAllocStringLen' :: SysReAllocStringLen
!DEC$ENDIF
          INTEGER*4,     INTENT(INOUT)        :: bstr
          !DEC$ ATTRIBUTES REFERENCE          :: bstr
          INTEGER*2,     INTENT(IN)           :: unistr(*)
          INTEGER*4,     INTENT(IN)           :: unisize
          !DEC$ ATTRIBUTES VALUE              :: unisize
    END FUNCTION SysReAllocStringLen
    SUBROUTINE SysFreeString(bstr);
!DEC$IF DEFINED(_X86_)
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : '_SysFreeString@' :: SysFreeString
!DEC$ELSE
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : 'SysFreeString' :: SysFreeString
!DEC$ENDIF
          INTEGER*4,     INTENT(IN)           :: bstr
          !DEC$ ATTRIBUTES VALUE              :: bstr
    END SUBROUTINE SysFreeString
    INTEGER*4 FUNCTION SysStringLen(bstr);
!DEC$IF DEFINED(_X86_)
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : '_SysStringLen@' :: SysStringLen
!DEC$ELSE
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : 'SysStringLen' :: SysStringLen
!DEC$ENDIF
          INTEGER*4,     INTENT(IN)           :: bstr
          !DEC$ ATTRIBUTES VALUE              :: bstr
    END FUNCTION SysStringLen
    INTEGER*4 FUNCTION SysStringByteLen(bstr);
!DEC$IF DEFINED(_X86_)
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : '_SysStringByteLen@' :: SysStringByteLen
!DEC$ELSE
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : 'SysStringByteLen' :: SysStringByteLen
!DEC$ENDIF
          INTEGER*4,     INTENT(IN)           :: bstr
          !DEC$ ATTRIBUTES VALUE              :: bstr
    END FUNCTION SysStringByteLen
  END INTERFACE
        
! Safe array routines
  INTERFACE
    INTEGER*4 FUNCTION SafeArrayCreate(vt, cDims, ab)
!DEC$IF DEFINED(_X86_)
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : '_SafeArrayCreate@' :: SafeArrayCreate 
!DEC$ELSE
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : 'SafeArrayCreate' :: SafeArrayCreate 
!DEC$ENDIF
          USE DFWINTY
          INTEGER*4,     INTENT(IN)           :: vt
          !DEC$ ATTRIBUTES VALUE              :: vt
          INTEGER*4,     INTENT(IN)           :: cDims
          !DEC$ ATTRIBUTES VALUE              :: cDims
          TYPE(SA_BOUNDS), INTENT(IN)         :: ab
          !DEC$ ATTRIBUTES REFERENCE          :: ab
    END FUNCTION SafeArrayCreate
    INTEGER*4 FUNCTION SafeArrayPutElement(array, index, valuePtr)
!DEC$IF DEFINED(_X86_)
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : '_SafeArrayPutElement@' :: SafeArrayPutElement 
!DEC$ELSE
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : 'SafeArrayPutElement' :: SafeArrayPutElement 
!DEC$ENDIF
          INTEGER*4,     INTENT(IN)           :: array
          !DEC$ ATTRIBUTES VALUE              :: array
          INTEGER*4,     INTENT(IN)           :: index
          !DEC$ ATTRIBUTES REFERENCE          :: index
          INTEGER*4,     INTENT(IN)           :: valuePtr
          !DEC$ ATTRIBUTES VALUE              :: valuePtr
    END FUNCTION SafeArrayPutElement
    INTEGER*4 FUNCTION SafeArrayGetElement(array, index, valuePtr)
!DEC$IF DEFINED(_X86_)
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : '_SafeArrayGetElement@' :: SafeArrayGetElement 
!DEC$ELSE
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : 'SafeArrayGetElement' :: SafeArrayGetElement 
!DEC$ENDIF
          INTEGER*4,     INTENT(IN)           :: array
          !DEC$ ATTRIBUTES VALUE              :: array
          INTEGER*4,     INTENT(IN)           :: index
          !DEC$ ATTRIBUTES REFERENCE          :: index
          INTEGER*4,     INTENT(IN)           :: valuePtr
          !DEC$ ATTRIBUTES VALUE              :: valuePtr
    END FUNCTION SafeArrayGetElement
    INTEGER*4 FUNCTION SafeArrayAllocDescriptor(cDims, ppsaOut)
!DEC$IF DEFINED(_X86_)
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : '_SafeArrayAllocDescriptor@' :: SafeArrayAllocDescriptor 
!DEC$ELSE
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : 'SafeArrayAllocDescriptor' :: SafeArrayAllocDescriptor 
!DEC$ENDIF
          INTEGER*4,     INTENT(IN)           :: cDims
          !DEC$ ATTRIBUTES VALUE              :: cDims
          INTEGER*4,     INTENT(OUT)          :: ppsaOut
          !DEC$ ATTRIBUTES REFERENCE          :: ppsaOut
    END FUNCTION SafeArrayAllocDescriptor
    INTEGER*4 FUNCTION SafeArrayAllocData(array)
!DEC$IF DEFINED(_X86_)
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : '_SafeArrayAllocData@' :: SafeArrayAllocData
!DEC$ELSE
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : 'SafeArrayAllocData' :: SafeArrayAllocData
!DEC$ENDIF
          INTEGER*4,     INTENT(IN)           :: array
          !DEC$ ATTRIBUTES VALUE              :: array
    END FUNCTION SafeArrayAllocData
    INTEGER*4 FUNCTION SafeArrayDestroyDescriptor(array)
!DEC$IF DEFINED(_X86_)
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : '_SafeArrayDestroyDescriptor@' :: SafeArrayDestroyDescriptor
!DEC$ELSE
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : 'SafeArrayDestroyDescriptor' :: SafeArrayDestroyDescriptor
!DEC$ENDIF
          INTEGER*4,     INTENT(IN)           :: array
          !DEC$ ATTRIBUTES VALUE              :: array
    END FUNCTION SafeArrayDestroyDescriptor
    INTEGER*4 FUNCTION SafeArrayDestroyData(array)
!DEC$IF DEFINED(_X86_)
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : '_SafeArrayDestroyData@' :: SafeArrayDestroyData
!DEC$ELSE
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : 'SafeArrayDestroyData' :: SafeArrayDestroyData
!DEC$ENDIF
          INTEGER*4,     INTENT(IN)           :: array
          !DEC$ ATTRIBUTES VALUE              :: array
    END FUNCTION SafeArrayDestroyData
        
    INTEGER*4 FUNCTION SafeArrayDestroy(array)
!DEC$IF DEFINED(_X86_)
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : '_SafeArrayDestroy@' :: SafeArrayDestroy
!DEC$ELSE
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : 'SafeArrayDestroy' :: SafeArrayDestroy
!DEC$ENDIF
          INTEGER*4,     INTENT(IN)           :: array
          !DEC$ ATTRIBUTES VALUE              :: array
    END FUNCTION SafeArrayDestroy
    INTEGER*4 FUNCTION SafeArrayRedim(array, ab)
!DEC$IF DEFINED(_X86_)
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : '_SafeArrayRedim@' :: SafeArrayRedim
!DEC$ELSE
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : 'SafeArrayRedim' :: SafeArrayRedim
!DEC$ENDIF
          USE DFWINTY
          INTEGER*4,     INTENT(IN)           :: array
          !DEC$ ATTRIBUTES VALUE              :: array
          TYPE(SA_BOUNDS), INTENT(IN)         :: ab
          !DEC$ ATTRIBUTES REFERENCE          :: ab
    END FUNCTION SafeArrayRedim
    INTEGER*4 FUNCTION SafeArrayGetDim(array)
!DEC$IF DEFINED(_X86_)
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : '_SafeArrayGetDim@' :: SafeArrayGetDim
!DEC$ELSE
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : 'SafeArrayGetDim' :: SafeArrayGetDim
!DEC$ENDIF
          INTEGER*4,     INTENT(IN)           :: array
          !DEC$ ATTRIBUTES VALUE              :: array
    END FUNCTION SafeArrayGetDim
    INTEGER*4 FUNCTION SafeArrayGetElemsize(array)
!DEC$IF DEFINED(_X86_)
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : '_SafeArrayGetElemsize@' :: SafeArrayGetElemsize
!DEC$ELSE
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : 'SafeArrayGetElemsize' :: SafeArrayGetElemsize
!DEC$ENDIF
          INTEGER*4,     INTENT(IN)           :: array
          !DEC$ ATTRIBUTES VALUE              :: array
    END FUNCTION SafeArrayGetElemsize
    INTEGER*4 FUNCTION SafeArrayGetUBound(array, nDim, uBound)
!DEC$IF DEFINED(_X86_)
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : '_SafeArrayGetUBound@' :: SafeArrayGetUBound
!DEC$ELSE
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : 'SafeArrayGetUBound' :: SafeArrayGetUBound
!DEC$ENDIF
          INTEGER*4,     INTENT(IN)           :: array
          !DEC$ ATTRIBUTES VALUE              :: array
          INTEGER*4,     INTENT(IN)           :: nDim
          !DEC$ ATTRIBUTES VALUE              :: nDim
          INTEGER*4,     INTENT(OUT)          :: uBound
          !DEC$ ATTRIBUTES REFERENCE          :: uBound
    END FUNCTION SafeArrayGetUBound
    INTEGER*4 FUNCTION SafeArrayGetLBound(array, nDim, lBound)
!DEC$IF DEFINED(_X86_)
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : '_SafeArrayGetLBound@' :: SafeArrayGetLBound
!DEC$ELSE
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : 'SafeArrayGetLBound' :: SafeArrayGetLBound
!DEC$ENDIF
          INTEGER*4,     INTENT(IN)           :: array
          !DEC$ ATTRIBUTES VALUE              :: array
          INTEGER*4,     INTENT(IN)           :: nDim
          !DEC$ ATTRIBUTES VALUE              :: nDim
          INTEGER*4,     INTENT(OUT)          :: lBound
          !DEC$ ATTRIBUTES REFERENCE          :: lBound
    END FUNCTION SafeArrayGetLBound
    INTEGER*4 FUNCTION SafeArrayLock(array)
!DEC$IF DEFINED(_X86_)
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : '_SafeArrayLock@' :: SafeArrayLock
!DEC$ELSE
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : 'SafeArrayLock' :: SafeArrayLock
!DEC$ENDIF
          INTEGER*4,     INTENT(IN)           :: array
          !DEC$ ATTRIBUTES VALUE              :: array
    END FUNCTION SafeArrayLock
    INTEGER*4 FUNCTION SafeArrayUnlock(array)
!DEC$IF DEFINED(_X86_)
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : '_SafeArrayUnlock@' :: SafeArrayUnlock
!DEC$ELSE
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : 'SafeArrayUnlock' :: SafeArrayUnlock
!DEC$ENDIF
          INTEGER*4,     INTENT(IN)           :: array
          !DEC$ ATTRIBUTES VALUE              :: array
    END FUNCTION SafeArrayUnlock
    INTEGER*4 FUNCTION SafeArrayAccessData(array, ppvData)
!DEC$IF DEFINED(_X86_)
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : '_SafeArrayAccessData@' :: SafeArrayAccessData
!DEC$ELSE
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : 'SafeArrayAccessData' :: SafeArrayAccessData
!DEC$ENDIF
          INTEGER*4,     INTENT(IN)           :: array
          !DEC$ ATTRIBUTES VALUE              :: array
          INTEGER*4,     INTENT(OUT)          :: ppvData
          !DEC$ ATTRIBUTES REFERENCE          :: ppvData
    END FUNCTION SafeArrayAccessData
    INTEGER*4 FUNCTION SafeArrayUnaccessData(array)
!DEC$IF DEFINED(_X86_)
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : '_SafeArrayUnaccessData@' :: SafeArrayUnaccessData
!DEC$ELSE
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : 'SafeArrayUnaccessData' :: SafeArrayUnaccessData
!DEC$ENDIF
          INTEGER*4,     INTENT(IN)           :: array
          !DEC$ ATTRIBUTES VALUE              :: array
    END FUNCTION SafeArrayUnaccessData
    INTEGER*4 FUNCTION SafeArrayCopy(array, ppsaOut)
!DEC$IF DEFINED(_X86_)
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : '_SafeArrayCopy@' :: SafeArrayCopy
!DEC$ELSE
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : 'SafeArrayCopy' :: SafeArrayCopy
!DEC$ENDIF
          INTEGER*4,     INTENT(IN)           :: array
          !DEC$ ATTRIBUTES VALUE              :: array
          INTEGER*4,     INTENT(OUT)          :: ppsaOut
          !DEC$ ATTRIBUTES REFERENCE          :: ppsaOut
    END FUNCTION SafeArrayCopy
  END INTERFACE
        
! Variant manipulation routines
  INTERFACE
    INTEGER*4 FUNCTION VariantChangeType(pvargDest, pvargSrc, wFlags, vt)
!DEC$IF DEFINED(_X86_)
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : '_VariantChangeType@' :: VariantChangeType 
!DEC$ELSE
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : 'VariantChangeType' :: VariantChangeType 
!DEC$ENDIF
          USE DFWINTY
          TYPE(VARIANT), INTENT(OUT)          :: pvargDest
          !DEC$ ATTRIBUTES REFERENCE          :: pvargDest
          TYPE(VARIANT), INTENT(IN)           :: pvargSrc
          !DEC$ ATTRIBUTES REFERENCE          :: pvargSrc
          INTEGER*2,     INTENT(IN)           :: wFlags
          !DEC$ ATTRIBUTES VALUE              :: wFlags
          INTEGER*4,     INTENT(IN)           :: vt
          !DEC$ ATTRIBUTES VALUE              :: vt
    END FUNCTION VariantChangeType
    INTEGER*4 FUNCTION VariantChangeTypeEx(pvargDest, pvarSrc, lcid, wFlags, vt)
!DEC$IF DEFINED(_X86_)
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : '_VariantChangeTypeEx@' :: VariantChangeTypeEx 
!DEC$ELSE
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : 'VariantChangeTypeEx' :: VariantChangeTypeEx 
!DEC$ENDIF
          USE DFWINTY
          TYPE(VARIANT), INTENT(OUT)          :: pvargDest
          !DEC$ ATTRIBUTES REFERENCE          :: pvargDest
          TYPE(VARIANT), INTENT(IN)           :: pvarSrc
          !DEC$ ATTRIBUTES REFERENCE          :: pvarSrc
          INTEGER*4,     INTENT(IN)           :: lcid
          !DEC$ ATTRIBUTES VALUE              :: lcid
          INTEGER*2,     INTENT(IN)           :: wFlags
          !DEC$ ATTRIBUTES VALUE              :: wFlags
          INTEGER*4,     INTENT(IN)           :: vt
          !DEC$ ATTRIBUTES VALUE              :: vt
    END FUNCTION VariantChangeTypeEx
    INTEGER*4 FUNCTION VariantClear(pvarg)
!DEC$IF DEFINED(_X86_)
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : '_VariantClear@' :: VariantClear
!DEC$ELSE
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : 'VariantClear' :: VariantClear 
!DEC$ENDIF
          USE DFWINTY
          TYPE(VARIANT), INTENT(OUT)          :: pvarg
          !DEC$ ATTRIBUTES REFERENCE          :: pvarg
    END FUNCTION VariantClear
    INTEGER*4 FUNCTION VariantCopy(pvargDest, pvargSrc)
!DEC$IF DEFINED(_X86_)
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : '_VariantCopy@' :: VariantCopy
!DEC$ELSE
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : 'VariantCopy' :: VariantCopy
!DEC$ENDIF
          USE DFWINTY
          TYPE(VARIANT), INTENT(OUT)          :: pvargDest
          !DEC$ ATTRIBUTES REFERENCE          :: pvargDest
          TYPE(VARIANT), INTENT(IN)           :: pvargSrc
          !DEC$ ATTRIBUTES REFERENCE          :: pvargSrc
    END FUNCTION VariantCopy
    INTEGER*4 FUNCTION VariantCopyInd(pvarDest, pvargSrc)
!DEC$IF DEFINED(_X86_)
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : '_VariantCopyInd@' :: VariantCopyInd
!DEC$ELSE
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : 'VariantCopyInd' :: VariantCopyInd
!DEC$ENDIF
          USE DFWINTY
          TYPE(VARIANT), INTENT(OUT)          :: pvarDest
          !DEC$ ATTRIBUTES REFERENCE          :: pvarDest
          TYPE(VARIANT), INTENT(IN)           :: pvargSrc
          !DEC$ ATTRIBUTES REFERENCE          :: pvargSrc
    END FUNCTION VariantCopyInd
    SUBROUTINE VariantInit(pvarg)
!DEC$IF DEFINED(_X86_)
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : '_VariantInit@' :: VariantInit
!DEC$ELSE
!DEC$ ATTRIBUTES DEFAULT, STDCALL, ALIAS : 'VariantInit' :: VariantInit 
!DEC$ENDIF
          USE DFWINTY
          TYPE(VARIANT), INTENT(OUT)          :: pvarg
          !DEC$ ATTRIBUTES REFERENCE          :: pvarg
    END SUBROUTINE VariantInit
  END INTERFACE
        
! Type library routines
  INTERFACE
    FUNCTION LoadTypeLib( &
                        szFile, &
                        pptlib)
          USE DFWINTY
          integer(4) :: LoadTypeLib ! HRESULT
!DEC$ ATTRIBUTES DEFAULT :: LoadTypeLib
!DEC$IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS:'_LoadTypeLib@8' :: LoadTypeLib
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS:'LoadTypeLib' :: LoadTypeLib
!DEC$ ENDIF
          integer(LPVOID), intent(in)         :: szFile ! olechar * szFile
          !DEC$ ATTRIBUTES VALUE              :: szFile
          integer(LPVOID), intent(out)        :: pptlib ! ITypeLib* *  pptlib
          !DEC$ ATTRIBUTES REFERENCE          :: pptlib
    END FUNCTION LoadTypeLib
    FUNCTION RegisterTypeLib( &
                            ptlib, &
                            szFullPath, &
                            szHelpDir)
          USE DFWINTY
          integer(4) :: RegisterTypeLib ! HRESULT
!DEC$ ATTRIBUTES DEFAULT :: RegisterTypeLib
!DEC$IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS:'_RegisterTypeLib@12' :: RegisterTypeLib
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS:'RegisterTypeLib' :: RegisterTypeLib
!DEC$ ENDIF
          integer(LPVOID), intent(in)         :: ptlib ! ITypeLib*  ptlib
          !DEC$ ATTRIBUTES VALUE              :: ptlib
          integer(LPVOID), intent(in)         :: szFullPath ! olechar* szFullPath
          !DEC$ ATTRIBUTES VALUE              :: szFullPath
          integer(LPVOID), intent(in)         :: szHelpDir ! olechar*  szHelpDir
          !DEC$ ATTRIBUTES VALUE              :: szHelpDir
    END FUNCTION RegisterTypeLib

    FUNCTION LoadRegTypeLib( &
                        rguid, &
                        wVerMajor, &
                        wVerMinor, &
                        lcid, &
                        pptlib)
          USE DFWINTY
          integer(4) :: LoadRegTypeLib ! HRESULT
!DEC$ ATTRIBUTES DEFAULT :: LoadRegTypeLib
!DEC$IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS:'_LoadRegTypeLib@20' :: LoadRegTypeLib
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS:'LoadRegTypeLib' :: LoadRegTypeLib
!DEC$ ENDIF
          TYPE (GUID), INTENT(IN)	      :: rguid 
          !DEC$ ATTRIBUTES REFERENCE	      :: rguid
          INTEGER*2,     INTENT(IN)           :: wVerMajor
          !DEC$ ATTRIBUTES VALUE              :: wVerMajor
          INTEGER*2,     INTENT(IN)           :: wVerMinor
          !DEC$ ATTRIBUTES VALUE              :: wVerMinor
          INTEGER*4,     INTENT(IN)           :: lcid
          !DEC$ ATTRIBUTES VALUE              :: lcid
          integer(LPVOID), intent(out)        :: pptlib ! ITypeLib* *  pptlib
          !DEC$ ATTRIBUTES REFERENCE          :: pptlib
    END FUNCTION LoadRegTypeLib
  END INTERFACE
   
END MODULE OLEAUT32
