- Erwin Milke
- PowerBuilder
- Thursday, 25 June 2020 04:48 PM UTC
Hello guys
I'm trying to read file size, modification date and file type from all files in a given path.
The idea is to simulate a Windows Explorer inside a PB window.
I'm not aware of an object or function inside Appeon, so I will use any of the following APIs from Kernell32.dll
- GetfileSize
- GetFileInformationByHandle
For simplicity, I will use GetFileSize
I declared the external global function GetFileSize as:
Function long GetFileSize (long hFile, double lpFileSizeHigh) Library "Kernell32.dll"
I open the file with ll_file = fileopen(filename) ( ll_file declared as long )
I get "Bad runtime function reference" error.
I assume "long Hfile" is a bad variable declaration, but don't know how to declare it inside PB as docs.microsoft.com shows:
Should it be an structure data type instead of long?
Thanks for the feedback
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.