Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor I

Finding volumes

Jump to solution

In IVF 2016 I was able to declare:

interface
    function FindFirstVolume(lpszVolumeName,cchBufferLength)
    import
    !DEC$ ATTRIBUTES STDCALL, REFERENCE, DECORATE, ALIAS:"FindFirstVolumeA" :: FindFirstVolume
    integer(HANDLE) :: FindFirstVolume
    character(*), intent(OUT) :: lpszVolumeName
    integer(DWORD), intent(IN) :: cchBufferLength
    !DEC$ ATTRIBUTES VALUE :: cchBufferLength
    end function FindFirstVolume
 
    function FindNextVolume(hFindVolume,lpszVolumeName,cchBufferLength)
    import
    !DEC$ ATTRIBUTES STDCALL, REFERENCE, DECORATE, ALIAS:"FindNextVolumeA" :: FindNextVolume
    integer(BOOL) :: FindNextVolume
    integer(HANDLE), intent(IN) :: hFindVolume
    !DEC$ ATTRIBUTES VALUE :: hFindVolume
    character(*), intent(OUT) :: lpszVolumeName
    !DEC$ ATTRIBUTES REFERENCE :: lpszVolumeName
    integer(DWORD), intent(IN) :: cchBufferLength
    !DEC$ ATTRIBUTES VALUE :: cchBufferLength
    end function FindNextVolume
 
    function FindVolumeClose(hFindVolume)
    import
    !DEC$ ATTRIBUTES STDCALL, REFERENCE, DECORATE, ALIAS:"FindVolumeClose" :: FindVolumeClose
    integer(BOOL) :: FindVolumeClose
    integer(HANDLE), intent(IN) :: hFindVolume
    !DEC$ ATTRIBUTES VALUE :: hFindVolume
    end function FindVolumeClose
 
end interface

 

nut i get an error in 2017. What has changed?

Brooks

 

0 Kudos

Accepted Solutions
Highlighted
Black Belt

I'll guess (given the absence

Jump to solution

I'll guess (given the absence of any details about the "error") that the relevant API's have been added to the Intel provided Windows API modules (IFWIN and friends), that you have a USE statement for such a module in the same scope as those interface bodies, and the the names of the added API's and the names in your interface bodies now clash.

View solution in original post

0 Kudos
2 Replies
Highlighted
Black Belt
1 View

I'll guess (given the absence

Jump to solution

I'll guess (given the absence of any details about the "error") that the relevant API's have been added to the Intel provided Windows API modules (IFWIN and friends), that you have a USE statement for such a module in the same scope as those interface bodies, and the the names of the added API's and the names in your interface bodies now clash.

View solution in original post

0 Kudos
Highlighted
New Contributor I

Thanks,

It is now in kernek32

Brooks

0 Kudos