Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Brooks_Van_Horn
New Contributor I
105 Views

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
1 Solution
IanH
Black Belt
105 Views

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

2 Replies
IanH
Black Belt
106 Views

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

Brooks_Van_Horn
New Contributor I
105 Views

Thanks,

It is now in kernek32

Brooks

Reply