PrabuKumar's WinCE Blog

July 30, 2012

OMAP35x\DM37x VRFB and Video Capture in WEC7

Filed under: WinCE 7 — Prabu Kumar @ 4:14 pm
Tags: , , , , , , ,

With OMAP35x/DM37x EVM ,we will face issue of image corruption while rendering the camera output to the screen because of presence of Virtual Rotate Frame Buffer(VRFB). But if we want to use  both VRFB and Camera preview to work together in WinCE 6.0 ,we can set the renderer of the DShow  camera application to use the GDI mode instead of the DirectDraw renderer.The code used in WinCE 6.0,


IAMVideoRendererMode::SetMode(DWORD dwMode)






But in the WEC7,there is a change in the DShow renderer (i.e., Video Mixing Renderer(VMR)),which does not support the IAMVideoRendererMode interface or method which we used in WinCE 6.0 to switch the GDI mode.


In this blog ,I will show how to fix this issue. But it will have a disadvantage of very low frame rate in the rendering because of not using the hardware overlay.


In VMR we can control the renderer preferences using the IVMRFilterConfig::SetRenderingPrefs() method.


For this issue here is the fix, we can force the VMR to use the RenderPrefs_ForceOffscreen instead of Overlays, which is more or less the same functionality as used in the WinCE 6.0.


IVMRFilterConfig    *pVMRConfig;


hr = m_pVMRRenderer.QueryInterface(&pVMRConfig );

if(FAILED(hr) || pVMRConfig == NULL)


            FAIL(TEXT("Retrieving the IID_IVMRFilterConfig failed."));




hr = pVMRConfig->SetRenderingPrefs( RenderPrefs_ForceOffscreen| RenderPrefs_AllowOffscreen );

if ( FAILED(hr) )


FAIL( TEXT("%S: ERROR %d@%S – failed to set the rendering prefs. (0x%08x)" ), __FUNCTION__, __LINE__, __FILE__, hr );







June 16, 2012

MIPI camera(CSI2) working with OMAP35x/37x on WinCE 6.0

Filed under: WinCE 6.0 — Prabu Kumar @ 11:18 pm
Tags: , , , , ,

Since MIPI camera interface(CSI2) is not officially supported by TI on the OMAP35x/37x processors ,we had a little bit a struggle in getting the same working. We developed a DirectShow Camera driver on WinCE 6.0 to get the MIPI camera working in TI OMAP35x/37x EVM kit.

Check out this blog post for images of the same.

May 30, 2012

Subscribe to Microsoft Windows Embedded Team Blog

Filed under: WinCE 6.0,WinCE 7 — Prabu Kumar @ 7:56 pm
Tags: , ,

Microsoft Windows embedded team started new blog to update about the presence of Windows Embedded in Intelligent Systems.

"The Windows Embedded Team Blog brings together a range of voices to spotlight Windows Embedded news and information and reflect the evolving world of intelligent systems and specialized devices."

"Approaching Embedded Intelligently"

Follow this blog to check updates on Microsoft Windows Embedded.

October 14, 2011

Windows CE Boot Time

Filed under: WinCE 6.0,WinCE 7 — Prabu Kumar @ 12:04 pm
Tags: , ,

One of the waving feature of "Windows 8" is the 8 sec boot time.As they said it really boots in 8 sec in my PC.That is a cool one!!!!!!!

Since we are working in Windows Embedded OSes it raises the question.

"What is the least time for WinCE boot with some application?"

Check out the following blog post in which Windows Embedded CE 6.0 boots in 3 sec and starts streaming the camera frames live in the LCD.

Also keeping watching the e-con Systems blog in the coming weeks for interesting blogs.RSS feed for the Windows CE blog is

June 13, 2011

eImageViewer- Free Image Viewer for Windows Embedded CE 6.0

Filed under: WinCE 6.0,WinCE 7 — Prabu Kumar @ 10:47 pm
Tags: , , , ,

Hi Guys,

e-con Systems not only experts in windows CE BSP and Window CE driver development but also showcases its expertise in Image viewing software for Windows Embedded CE 6.0 R3.

eImageViewer from e-con addresses the most common requirements for image viewing is aimed at being a default image viewing application for Windows CE and Windows Embedded Compact devices. This freeware application can be ported on Windows Mobile and Windows Phone operating systems. This application helps users in contrast to the Internet Explorer on the devices which allows only the basic image viewing features and is less user-friendly.

And also check out the features video of the same on the youtube link.

It is absolutely FREE to download and use it on your device .So start download immediately and enjoy browsing your favorite photos on your Windows Embedded CE devices.eimageview_240x320

Start evaluating and throw your comments!!!!!!!!!!!

December 23, 2010

Working with display controller using DDraw APIs in WinCE / Windows Mobile

I had seen few questions in the wince newsgroups about drawing text or drawing any bitmap over the camera video stream output render.I had thought of sharing my experience for this requirement.So I wrote this article with sample demo application and I hope this will help the community who are searching for a solution.

And also take a look at the application source of the sample which is described in the article.I had also created a project for this sample application in Codeplex server.If you have any comments or issues with this application please post it in this blog comments or in codeplex project discussion page,I will try to fix it.

October 7, 2008

USB Function driver dynamic Switching in WINCE

We have three USB function class drivers in WinCE.

1. Serial

2. Mass Storage


Usually only one driver will load by default.Now the question is

“Is it possible to switch the USB Function driver dynamically during WinCE runtime?”

Yes it is possible.We have one IOCTL(IOCTL_UFN_CHANGE_CURRENT_CLIENT) for changing the current USB function driver.I found this solution in wince newsgroups only.Just to share the code I have written this blog.

You can test this by doing the following things:

But before doing these steps,first confirm the working of individual functions(Serial,Mass Storage,RNDIS) on your platform.Then go for this option.

1. Add all the three components in the catalog items.”Device Driver–>USB Function Driver–>Serial

                                                                                                                –>Mass Storage


2. Compile and generate the OS binary.

3. Write simple application to add the following functions.

HANDLE GetUfnController()
    HANDLE hUfn = NULL;
    BYTE rgbGuidBuffer[sizeof(GUID) + 4]; // +4 because scanf writes longs
    LPGUID pguidBus = (LPGUID) rgbGuidBuffer;
    LPCTSTR pszBusGuid = _T(“E2BDC372-598F-4619-BC50-54B3F7848D35”);
    // Parse the GUID
    int iErr = _stscanf(pszBusGuid, SVSUTIL_GUID_FORMAT,SVSUTIL_PGUID_ELEMENTS(&pguidBus));
    if (iErr == 0 || iErr == EOF)
        return INVALID_HANDLE_VALUE;
    // Get a handle to the bus driver
    memset(&di, 0, sizeof(di));
    di.dwSize = sizeof(di);
    HANDLE hf = FindFirstDevice(DeviceSearchByGuid, pguidBus, &di);
    if (hf != INVALID_HANDLE_VALUE) {
        RETAILMSG(1,(TEXT(“FindDevice = %s\r\n”),di.szBusName));
        hUfn = CreateFile(di.szBusName, GENERIC_READ, FILE_SHARE_READ,
    else {
    return hUfn;


BOOL ChangeClient(HANDLE hUfn, LPCTSTR pszNewClient)
    if(hUfn == INVALID_HANDLE_VALUE || pszNewClient == NULL)
    _tcscpy(ucn.szName, pszNewClient);
    RETAILMSG(1,(TEXT(“NewClient Name: %s\r\n”),pszNewClient));
    BOOL fSuccess = DeviceIoControl(hUfn,IOCTL_UFN_CHANGE_CURRENT_CLIENT, &ucn, sizeof(ucn), NULL, 0, NULL,

    RETAILMSG(1,(TEXT(“DeviceIOcontrol Returned value=0x%x\r\n”),fSuccess));
   return fSuccess;


4. I have written small menu based application with three menus for selecting the current client driver to load.Here is the code which I handled in the menus.By selecting the corresponding menu will change the corresponding function driver to load.




With this solution now you have all the three functions in single NK.bin but still you can use only one function(i.e.either serial or mass storage or RNDIS)at a time.If you want to use two functions(ex:Serial and Mass storage) simultaneously then you need to go for new feature USB Function Composite device driver which is supported in Wince 6.0.

Blog at