Hi Ara,
Try this:uses lazutf8;var? us: unicodestring;//alternatively you can use widestring begin?? //...?? us := MediaInfo_Get(HND, Stream_General, 0, 'Title', Info_Text, Info_Name);?? ListBox.Items.Add(UTF16ToUTF8(us); end;
From: aradeonas
To:
Sent: Friday, May 22, 2015 6:34 PM
Subject: [Lazarus] DLL unicode value
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