Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2006.10.29;
Скачать: CL | DM;

Вниз

Как узнать какой файл используеться приложением   Найти похожие ветки 

 
eRoR_rrr ©   (2006-10-03 09:03) [0]

Нужно узнать полный путь к файлу который проигрываеться в WinAMP.
Заренее благодарен.


 
pavel_guzhanov ©   (2006-10-03 09:31) [1]

Выбрать файл в плей-листе и нажать Alt+3(цифра три). Или тебе программно надо?


 
Гриха(снова пароль забыл)   (2006-10-03 09:32) [2]


> Или тебе программно надо?

=)


 
eRoR_rrr ©   (2006-10-03 19:57) [3]

Конечно программно =))))


 
Furyz ©   (2006-10-03 20:12) [4]

Winampsdk угадал?


 
eRoR_rrr ©   (2006-10-03 21:32) [5]

Furyz ©   (03.10.06 20:12) [4]
Хм, покапался, не нашёл что нужно отсылать дабы получить имя файла. Или плохо искал просто ...


 
Zeqfreed ©   (2006-10-03 22:07) [6]

function ActiveTracksFileName() : String;
const
 IPC_GETPLAYLISTFILE = 211; //Returns the pointer to title of the Nth track in active playlist
 IPC_GETLISTPOS = 125; //Returns an index of the current track in active playlist
var
 hwndWinamp : HWND;
 Idx, p : Integer;
 op, process, read : Cardinal;
 Buf : Pointer;
begin
 Result := "";

 hwndWinamp := FindWindow("Winamp v1.x", nil);
 if (hwndWinamp <> 0) then begin
  Idx := SendMessage(hwndWinamp, WM_USER, 0, IPC_GETLISTPOS);
  p := SendMessage(hwndWinamp, WM_USER, Idx, IPC_GETPLAYLISTFILE);
  if (p = 0) then Exit;

  GetWindowThreadProcessId(hwndWinamp, process);
  op := OpenProcess(PROCESS_VM_READ, false, process);
  if (op <> 0) then begin
   GetMem(Buf, 1024); //We assume that 1K will be enough to store the filename
   try
    ReadProcessMemory(op, Pointer(p), Buf, 1024, read);
    if (read > 0) then Result := PChar(Buf);
   finally
    FreeMem(Buf);
   end;

   CloseHandle(op);
  end;
 end;
end;


 
Zeqfreed ©   (2006-10-03 22:10) [7]

> [6] Zeqfreed ©   (03.10.06 22:07)

Returns the pointer to title of the Nth track in active playlist

Тут имелось в виду Returns a pointer to the filename of the Nth track in active playlist.


 
eRoR_rrr ©   (2006-10-04 00:48) [8]

Спасибо.
Всё таки я плохо искал =)



Страницы: 1 вся ветка

Текущий архив: 2006.10.29;
Скачать: CL | DM;

Наверх




Память: 0.48 MB
Время: 0.092 c
15-1160008584
Ketmar
2006-10-05 04:36
2006.10.29
TechnoJocks Object Toolkit для Virtual Pascal


15-1159883324
GRAND25
2006-10-03 17:48
2006.10.29
Американские обыватели на ситуацию Россия-Грузия (рыдалъ!)


2-1160419230
redlord
2006-10-09 22:40
2006.10.29
запись в файл несколькими потоками


15-1160137481
oldman
2006-10-06 16:24
2006.10.29
Завтра Россия-Израиль. Ваши ставки?


2-1160739574
i-am-vladko
2006-10-13 15:39
2006.10.29
WinAPI на OnShow