Have you tried Exists(Filename)
?
I know I could used UNC \Network\Shares\SomeFolder\someFile.ext as the path for tps files, but dont know if Exists(Filename)
works.
EXISTS (return file or folder existence)
An expression containing the DOS filename.
The EXISTS procedure returns true (1) if the file is available on disk. If the file is not available, EXISTS returns false (0). You can also use EXISTS to check for the existence of any folder.
Thing is, if Clarion’s Exists(file)
is this Windows api, then its got caveats, namely it can detect the UNC file but not UNC folders so it should work for your image file detection.
PathFileExistsA function (shlwapi.h) - Win32 apps | Microsoft Docs
Remarks
This function tests the validity of the path.
A path specified by Universal Naming Convention (UNC) is limited to a file only; that is, \server\share\file is permitted. A UNC path to a server or server share is not permitted; that is, \server or \server\share. This function returns FALSE if a mounted remote drive is out of service.
Now the reason for not detecting network shares is that you can have a network defined on a workstation and not connect to it because you might not have permission, but this would be some of API I would use to test if a UNC share existed.
WNetOpenEnumA function (winnetwk.h) - Win32 apps | Microsoft Docs
WNetEnumResourceA function (winnetwk.h) - Win32 apps | Microsoft Docs
NetShareEnum function (lmshare.h) - Win32 apps | Microsoft Docs
Edit: Having reread what you put, it sounds like you are getting throttled by the network, so maybe you could use Exists()
to detect its not locally stored and then pull it over the network to a local temp folder before displaying it? And whilst you are copying the file over the network display a temp image saying "downloading image "or “fetching image”
I would this API to get feedback on the progress of the network share copy, its a callback procedure
CopyFileExA function (winbase.h) - Win32 apps | Microsoft Docs
I idont know what security access rights restrictions you might experience using this call back function. I know I’ve experienced some access rights issues with some callback procedure but I cant see any mentioned on this api so you probably wont have any problems.
Are they big image files or a slow network/internet connection?
FWIW.