View Single Post
  #1 (permalink)  
Old 07-21-2008, 02:50 PM
rgildoss's Avatar
rgildoss
Regular 'Geeker
Offline
Location: Nort East
 
Join Date: Jun 2008
Posts: 405
Reputation: 1085
rgildoss is halfway to VIP status based on reprgildoss is halfway to VIP status based on reprgildoss is halfway to VIP status based on reprgildoss is halfway to VIP status based on reprgildoss is halfway to VIP status based on reprgildoss is halfway to VIP status based on reprgildoss is halfway to VIP status based on reprgildoss is halfway to VIP status based on rep
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Send a message via AIM to rgildoss Send a message via MSN to rgildoss
Shoutcast in WMP

i found this artical on open source to open playlist files in windows media player...
http://www.codeproject.com/KB/audio-video/pls2wmp.aspx

in a wndows PC it does work and works well ( currently listning to a shoutcast station via WMP ) However i didt try to runt he app in WM6 on my 6700 and it didnt recognize the app as a PPC app so it didnt work

Anyway here is the actual open code, maybe some of the smart coders can do smoething with it...or change it to work with WM6

-----------------------------------------------------------------------

#include <windows.h>
#include <stdio.h>

CALLBACK WinMain( HINSTANCE inst, HINSTANCE prev, char* cmd, int show ) {
int len = strlen(cmd);
if(!len) return -1; cmd++;
if(cmd[len-2]=='"') cmd[len-2]=0;

HANDLE file = CreateFile(cmd,GENERIC_READ,1,0,OPEN_EXISTING,0,0) ; if(file==INVALID_HANDLE_VALUE) return -1;
HANDLE map = CreateFileMapping(file,0,PAGE_WRITECOPY,0,10,0); if(!map) return -1;
char* url = (char*)MapViewOfFile(map,1,0,0,0); if(!url) return -1;
url = strstr(url,"ile"); if(!url) return -1;
url = strchr(url,'=' ); if(!url) return -1;
char* end = strchr(url,'\n' ); if( end) *end = 0;

ShellExecute(0,"open","wmplayer",url+1,0,SW_SHOW);
UnmapViewOfFile(url);

CloseHandle(file);
CloseHandle(map);
return 0;
}