[Lazarus] DLL unicode value

aradeonas aradeonas at operamail.com
Fri May 22 17:34:29 CEST 2015


Hi,

I want to get unicode value from an mp3 file and I used MediaInfo
library for this and its unicode support and I used unicode methods.
Code is simple :

> MediaInfoDLL_Load('MediaInfo.dll'); HND := MediaInfo_New();
> MediaInfo_Open(HND, 'test.mp3'); ListBox.Items.Add(MediaInfo_Get(HND,
> Stream_General, 0, 'Title', Info_Text, Info_Name)); //MediaInfo_Get:
> function (Handle: Cardinal; StreamKind: TMIStreamKind; StreamNumber:
> Integer; Parameter: PWideChar; KindOfInfo: TMIInfo; KindOfSearch:
> TMIInfo): PWideChar cdecl stdcall;

It work if Title value is ansi but if it is unicode it returns
"???????" ! But if I debug andset value to an string it's deug it shows
me correct value.
> s:=MediaInfo_Get(HND, Stream_General, 0, 'Title', Info_Text,
>   Info_Name);//in debug s hint shows correct value but ListBox add ???
>   ListBox.Items.Add(s);

Regards, Ara


-- 
http://www.fastmail.com - Access your email from home and the web

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20150522/706ddc22/attachment-0002.html>


More information about the Lazarus mailing list