hi, I am developing an application in Windows CE platform is Windows Ce .net 4.2. i need to play media file through C code, i have managed to play media file in win32 through "system" command but this command is not available for Windows CE, i have tried CreateProcess function for Windows CE application but by this i am only able to play the files having the extention .exe. Here i need to play .wmv file in media player and i m having windows media player 9 series, can anyone please provide me any api by which i can play the media file(.wmv) in windows CE, i need it urgently any suggestion is appreciable.

Thanks
Himanshu

yes i have tried a lot of things,as i m working on it since last 6 or 7 days i have already gone through this thread which u provided, but there is nothing helpful for me, thanks for providing help but if anything else can be done that will be really very helpful for me.

Thanks
Himanshu

Are you trying to use the WinCE emulator or an actual device? The emulators don't support a lot of stuff that the actual devices do mainly because emulators don't have access to the hardware. But I don't know if that's your problem or not. And not all devices that run WinCE are the same -- so what works on one manufacturer's device may or may not work on another. For example the scanners made by Symbols Technologies is a lot different than those made by Intermec. We had to make a lot of program changes when porting from one device to the other.

I am using the actual device not the simulator, well also my problem has been solved i have used the createProcess to play the media file but now i want to terminate the process by which the console of media player should also get closed autometically, right now i m using the TreminateProcess api but this process is returning the error code as 6 saying the handel is invalid, this is what i m using right now

CreateProcess(_T("\\windows\\ceplayer.exe"),_T("\\windows\\mo1263.wmv"), NULL, NULL, FALSE, CREATE_NEW_CONSOLE, NULL, NULL, NULL, &ProcessInfo);

WaitForSingleObject( ProcessInfo.hProcess, INFINITE );

TerminateProcess(ProcessInfo.hProcess, uExitCode);

// Close process and thread handles.
CloseHandle( ProcessInfo.hProcess );

but i m not able to close the mediaplayer autometically.can u please provide some help on this.

hi, i have also managed to kill the process, thanks for ur help, do u have any information bout disabling the status bar and task bar of media player from the registry.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.