PPCGeeks

PPCGeeks (http://forum.ppcgeeks.com/index.php)
-   Windows Mobile Development (http://forum.ppcgeeks.com/forumdisplay.php?f=9)
-   -   Shoutcast in WMP (http://forum.ppcgeeks.com/showthread.php?t=32586)

rgildoss 07-21-2008 02:50 PM

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;
}


All times are GMT -4. The time now is 07:28 PM.

Powered by vBulletin® ©2000 - 2025, Jelsoft Enterprises Ltd.
©2012 - PPCGeeks.com


Content Relevant URLs by vBSEO 3.6.0