I've done a lot of research, but haven't been able to put together some code in Liberty BASIC to get the length (time) of an mp3 file. I'm relatively new to Liberty BASIC, but have been programming for many years, so I didn't think this belonged in the Novice topic.

I have VBA code in an Excel Macro that accomplishes this. It uses GetDetailsOf, which I believe is in shell32.dll. Length is retrieved using:

objFolder.GetDetailsOf(Filename, 27)

I know how to get to the files, but not how to call GetDetailsOf. Can anyone fill in the blanks in my knowledge of Liberty BASIC?

This is my first post in the Forum, so I apologize if I didn't do this correctly. Thanks very much.

Computers are like babies, you must teach them what you like them to do ...

Gender:
Posts: 5317

Re: Get File Details?« Reply #3 on: Feb 18th, 2018, 4:34pm »

The folder object you are working with is not present for anything that LB is able to use directly. VBA and .NET is not part of the regular Windows API, but one layer higher present only in the mentioned languages.You will have to use regular Windows API functions to get this kind of information. You may succeed by using code from the example media players from the LB resources, but I have never tried this.