hil all,
help for this function MediaInfoA_Get
Functions work in Memory Plugin
Function in MemoryEx not work My code:
help for this function MediaInfoA_Get
Functions work in Memory Plugin
Code:
Stream_General = 0 Stream_Audio = 2 function MediaInfo_Init() Memory.OpenLibrary(60, _SourceFolder.."\\mediainfo.dll") _MediaInfo_New = Memory.OpenFunction(60, "MediaInfoA_New", DLL_CALL_STDCALL, DLL_RETURN_LONG) _MediaInfo_Option = Memory.OpenFunction(60, "MediaInfoA_Option", DLL_CALL_STDCALL, DLL_RETURN_INT) _MediaInfo_Delete = Memory.OpenFunction(60, "MediaInfoA_Delete", DLL_CALL_STDCALL, DLL_RETURN_INT) _MediaInfo_Close = Memory.OpenFunction(60, "MediaInfoA_Close", DLL_CALL_STDCALL, DLL_RETURN_INT) _MediaInfo_Get = Memory.OpenFunction(60, "MediaInfoA_Get", DLL_CALL_STDCALL, DLL_RETURN_INT) _MediaInfo_Inform = Memory.OpenFunction(60, "MediaInfoA_Inform", DLL_CALL_STDCALL, DLL_RETURN_INT) _MediaInfo_Open = Memory.OpenFunction(60, "MediaInfoA_Open", DLL_CALL_STDCALL, DLL_RETURN_INT) end function MediaInfo_New() return Memory.CallFunction(_MediaInfo_New) end function MediaInfo_Delete(Handle) return Memory.CallFunction(_MediaInfo_Delete, Handle) end function MediaInfo_Close(Handle) return Memory.CallFunction(_MediaInfo_Close, Handle) end function MediaInfo_Get(Handle, StreamKind, StreamNumber, Parameter, InfoKind, SearchKind) if InfoKind == nil then InfoKind = Info_Text end if SearchKind == nil then SearchKind = Info_Name end return Memory.GetString(Memory.CallFunction(_MediaInfo_Get, Handle, StreamKind, StreamNumber, Parameter, InfoKind, SearchKind), -1, "Ascii") end function MediaInfo_Open(Handle, file) return Memory.CallFunction(_MediaInfo_Open, Handle, file) end function MediaInfo_Exit() Memory.CloseLibrary(60) end function MediaInfoClear(hwnd) MediaInfo_Close(hwnd) MediaInfo_Delete(hwnd) MediaInfo_Exit() end
Code:
MediaInfo = Library.Load(_SourceFolder.."\\mediainfo.dll") function MediaInfo_New() return MediaInfo.MediaInfoA_New() end function MediaInfo_Open(Handle, File) return MediaInfo.MediaInfoA_Open(Handle, File) end function MediaInfo_Get(Handle, StreamKind, StreamNumber, Parameter, InfoKind, SearchKind) if InfoKind == nil then InfoKind = Info_Text end if SearchKind == nil then SearchKind = Info_Name end return MemoryEx.String(MediaInfo.MediaInfoA_Get(Handle, StreamKind, StreamNumber, Parameter, InfoKind, SearchKind), -1, MEMEX_ASCII, MediaInfo.MediaInfoA_Get(Handle, StreamKind, StreamNumber, Parameter, InfoKind, SearchKind)); end local sFile = Input.GetText("Input1"); local hwnd = MediaInfo_New() if MediaInfo_Open(hwnd, sFile) > 0 then Dialog.Message("", MediaInfo_Get(hwnd, 0, 0, 0, "Performer", 1)); end
Comment