Click here to Skip to main content
13,045,417 members (122,540 online)
Click here to Skip to main content
Add your own
alternative version


43 bookmarked
Posted 20 Apr 2004

Video Streaming in Pocket PC 2002

, 20 Apr 2004
Rate this:
Please Sign up or sign in to vote.
An article on creating a streaming video player for Pocket PC.


This project introduces you to use Microsoft Media Player SDK to write a simple video player for Pocket PC 2002


  • Embedded Visual C++ 3.0

Using the code

  • First, download the SDK and install to the system. It would be in the directory C:\WMSDK\WMPktPC\
  • Open the sample project: C:\WMSDK\WMPktPC\Samples\MediaBookmarker\MediaBookmarker.vcw

The sample project present how to play a video file locally. To play a video through http we must use the additional functions provided in PlayerOCX.h. First look at the CMediaBookmaker.h to see the variables

CComPtr<IWMP> m_spWMPPlayer; // A pointer to the 
  //Windows Media Player control interface

To play an video file we can use the function Play() like this


Second, create a text box for user enter the URL

LRESULT CMediaBookmarker::OnCreate(UINT uMsg, 
   WPARAM wParam, LPARAM lParam, BOOL& bHandled)
  0, 20, 220, 20, m_hWnd, (HMENU)IDB_TXT_ADDRESS, hInst, NULL);

CreateWindow(TEXT("BUTTON"), TEXT("Go"), 
  220, 20, 20, 20, m_hWnd, (HMENU)IDB_GO, hInst, NULL); 

h_btnAbout=CreateWindow(TEXT("BUTTON"), TEXT("MediaBookmarker"), 
  0, 40, 240, 20, m_hWnd, (HMENU)IDB_ABOUT, hInst, NULL);


The variable h_editURL was declared in the CMediaBookmaker.h

HWND h_editURL; // the handle for Edit box 

Then we create the function that handle the action click on the button Go (CMediaBookmaker.h )


  HWND hWndCtl, BOOL& bHandled);

Then back to the CMediaBookmarker.cpp to edit the function OnGoURL

LRESULT CMediaBookmarker::OnGoURL(WORD wNotifyCode, WORD wID, 
  HWND hWndCtl, BOOL& bHandled)
 CHAR *m_strURL="";

 // Send a windows message to get the value of the textbox in the program. 

 // Set the Text in Button About to test . Do not need to use this code 

 // And finally use put_FileName() function to prepare to play
 m_spWMPPlayer->put_FileName((unsigned short*)m_strURL); 

 m_spWMPPlayer->Play(); // Play the media from the URL 

 return 0;

Points of Interest

This code was tested on the Acer n10 Pocket PC 2003 using SENAO wireless card. We can play the file remotely in the web server.

I am just a new comer. I have many difficulties when doing the video project on Pocket PC. Now I find this code is interesting and would like to share with you. Finally, thanks for your concerns !


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Tuan Nguyen
Vietnam Vietnam
No Biography provided

You may also be interested in...

Comments and Discussions

Generalvideo Pin
salam ellayan16-Nov-08 22:54
membersalam ellayan16-Nov-08 22:54 
Generalvideo streaming Pin
salam ellayan19-Jul-08 21:26
membersalam ellayan19-Jul-08 21:26 
GeneralWindows mobile 2003 media player codding needed urgently in C# Pin
suppersunny0728-Jun-08 23:22
membersuppersunny0728-Jun-08 23:22 
Generalpocket pc Media Player Control in C# Pin
fita8416-Mar-08 4:46
memberfita8416-Mar-08 4:46 
QuestionQueryControl failed Pin
amou6421-Nov-07 21:15
memberamou6421-Nov-07 21:15 
QuestionRe: QueryControl failed Pin
Jessn4-Feb-09 9:22
memberJessn4-Feb-09 9:22 
AnswerRe: QueryControl failed Pin
sc.valentine2126-Apr-09 17:29
membersc.valentine2126-Apr-09 17:29 
AnswerRe: QueryControl failed Pin
Jessn5-May-09 7:54
memberJessn5-May-09 7:54 
GeneralI'm unable to control UI of VideoStream/ MediaBookmarker Pin
satishknagineni29-Aug-05 6:35
membersatishknagineni29-Aug-05 6:35 
Generalfatal error RC1015: cannot open include file 'winver.h'. Pin
BigDog11117-May-05 20:31
memberBigDog11117-May-05 20:31 
GeneralRe: fatal error RC1015: cannot open include file 'winver.h'. Pin
chrisharden22-Aug-05 3:35
memberchrisharden22-Aug-05 3:35 
GeneralRe: fatal error RC1015: cannot open include file 'winver.h'. Pin
krishind_9914-Sep-06 5:18
memberkrishind_9914-Sep-06 5:18 
Generalmouse event Pin
jloc1-Mar-05 19:19
memberjloc1-Mar-05 19:19 
Generalplayer for pocket pc 2003 Pin
goast15-Sep-04 22:11
membergoast15-Sep-04 22:11 
GeneralRe: player for pocket pc 2003 Pin
arvish2713-Oct-04 1:20
memberarvish2713-Oct-04 1:20 
GeneralRe: player for pocket pc 2003 Pin
arvish2713-Oct-04 1:24
memberarvish2713-Oct-04 1:24 
QuestionSupported newer windows media format (9/10) ? Pin
alien-star11-Sep-04 21:55
memberalien-star11-Sep-04 21:55 
GeneralAny one did it in .NET Pin
Guma29-Jul-04 15:40
memberGuma29-Jul-04 15:40 
GeneralRe: Any one did it in .NET Pin
Anonymous22-Dec-04 9:28
sussAnonymous22-Dec-04 9:28 
GeneralRe: Any one did it in .NET Pin
soundararajandpm15-Dec-06 0:58
membersoundararajandpm15-Dec-06 0:58 
GeneralRe: Any one did it in .NET Pin
mshahidm11-Sep-09 5:25
membermshahidm11-Sep-09 5:25 
GeneralLinking Error Pin
siuchi_fchan13-Jul-04 23:39
membersiuchi_fchan13-Jul-04 23:39 
GeneralRe: Linking Error Pin
Anonymous19-Jul-04 12:06
sussAnonymous19-Jul-04 12:06 
GeneralRe: Linking Error Pin
siuchi_fchan19-Jul-04 21:56
membersiuchi_fchan19-Jul-04 21:56 
GeneralRe: Linking Error Pin
index4920-Jul-04 12:40
memberindex4920-Jul-04 12:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.170713.1 | Last Updated 21 Apr 2004
Article Copyright 2004 by Tuan Nguyen
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid