Friday, 28 May 2010

Exception in Toolhelp.dll

Hi all,
 
recently i've written a simple taskmanger and used the toolhelp.dll to enumerate the processes running on my target. 
 
Here is my sample:
       // PROCESSENTRY32 saves the information of one running process
       PROCESSENTRY32 pe32 = {0};
       HANDLE hSS; 
       // Create a snapshot of your system 
       hSS = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS|
                                                         TH32CS_SNAPNOHEAPS, 0);

       if( hSS == INVALID_HANDLE_VALUE)
             return FALSE;
       //prepare the enumeration 
      pe32.dwSize = sizeof(PROCESSENTRY32);
 
       //now get the first process running
       BOOL bRet = Process32First(hSS, &pe32);
       //iterate through all proccesse in the snapshot
       while(FALSE != bRet)
 
      {
 
             if( pe32.dwSize != sizeof(PROCESSENTRY32) )
   
            break; 
  
            // get the next process running 
  
            bRet =Process32Next(hSS, &pe32);
 
      }
       //close the snapshot.
 
      CloseToolhelp32Snapshot(hSS);
 

My problem was that when i called  the Process32First function a data abort exception has been thrown in the toolhelp.dll. On my development machine CE5 and CE6 are installed in parallel which works well. But, for my application debugging, VisualStudio 2005 and/or one of my Remote Tools copied the toolhelp.dll located in "\Program Files\CE Remote Tools\5.01\target\wce500\armV4i"  to  my target. It replaced the CE6 toolhelp.dll with the CE5 one from the folder mentioned above. The problem is, that Microsoft has changed the PROCESSENTRY32 struct Two new members have been added.
So with the initialization of my PROCESSENTRY32 struct (pe32.dwSize = sizeof(PROCESSENTRY32);)  I  passed 
the CE5 toolhelp Process32First function a struct with the size of the CE6 PROCESSENTRY32 struct. This results in a DataAbort exception inside the Process32First call because the CE5 Process32First function can not handle a CE6 PROCESSENTRY32 struct.
 
So if you get an exception in one of the toolhelp functions, check the version of  your dll, first.
 
bye
 
sascha

Read more! Post this to a friend!

Tuesday, 25 May 2010

SPARK hobbyist competition

To all those hobbyists out there!
An alle Freizeitbastler!

The embeddedSPARK 2010 Summer challenge has just started! Show off your Genius and get the chance to present live at ESC Boston and win $15.000.
Der embeddedSPARK 2010 Sommer Wettbewerb hat gerade begonnen! Zeige wie genial du bist und nutze die Chance deine Idee bei der ESC Boston zu präsentieren und gewinne $15.000.

Round 1 ends in 13 Days, 09 Hours, 38 minutes and 13 seconds.
Runde 1 endet in 13 Tagen, 09 Stunden, 37 Minuten und 43 Sekunden.

Find more information and how to register at http://www.embeddedspark.com/Default.aspx
Weitere Informationen und wie du dich registrieren kannst findest Du unter http://www.embeddedspark.com/Default.aspx

Or take a look at this video

Oder schaut euch dieses video an
http://www.embeddedspark.com/public/videos/embeddedSPARKSUMMER_howto.wmv


Good Luck!
Viel Glück!

So long and thanks for all the fish!

Das braucht keine Übersetzung ;-)

Read more! Post this to a friend!

Windows Embedded CE Live Chat - May

Sorry folks, that we are not able to put the chat transcript online this time.

There seems to have been some technical issues with the chat room today as we could not enter it -
I myself had several different messages from "This chat has been closed", "The max number of visitors has been reached" even to "You have been banned".

If anybody else was able to visit the chat room it would be good to have some feedback - although I would like message #2 to be true, I don't really believe it.

Well, next time next month there will hopefully be no technical problems.

So long and thanks for all the fish!
Read more! Post this to a friend!

Saturday, 22 May 2010

DON’T FORGET: Windows Embedded CE Live Chat on Tuesday!

Microsoft is hosting a live chat about Windows Embedded CE next week. Do you have tough technical questions regarding Windows Embedded CE for which you're seeking answers? Then join the upcomming live chat with the Microsoft guys!

Don't forget to put the date in your schedule and join it!!!

Title: Windows Embedded CE Live Chat!
Date: Tuesday, May 25, 2010 18:00 - 19:00 CET

To join this chat, please log on via the main MSDN chat page at:
http://www.microsoft.com/communities/chats/default.mspx

Have fun!


Read more! Post this to a friend!

Wednesday, 19 May 2010

Windows Embedded Compact forums now live!

Hi folks,

as previously promised, the new Windows Embedded Compact forums are now live:

http://social.msdn.microsoft.com/Forums/en-US/category/windowsembeddedcompact

I am looking forward to some very interesting discussions!

See you there!
Read more! Post this to a friend!

Windows Embedded Standard 7 Launch 2010 in München

Hallo zusammen,

am 15. Juni 2010 findet von 16:00 – 22:00 Uhr MEZ in der Microsoft Geschäftsstelle in München das Windows Embedded Standard Launch 2010 statt! Selbstverständlich ist auch EB als Key Partner und Aussteller anwesend.


Auf dieser Veranstaltung wird Ihnen das neue, auf Windows 7 basierende, Embedded Betriebssystem vorgestellt damit Sie neue, innovative Geräte und Systeme entwickeln können:
  • 16:00 Willkommen beim Windows Embedded Standard 7 Launch 2010:
    Anmeldung und Begrüßung
  • 16:30 Keynote: Bringing the Power of Windows 7 to specialized Devices
  • 17:00 Partner Showcases und live Windows Embedded Standard 7 Demos
  • 17:30 Round Table Diskussionen: Erfahren Sie mehr über die verbesserte
    Funktionalität, Sicherheit und Zuverlässigkeit, sowie die Netzwerk-fähigkeiten unserer neuesten Windows Embedded Standard 7 Software.
  • 18:00 Informelles Networking Cocktail Dinner und Partner Showcases
  • 20:30 Erleben Sie das FIFA WM 2010 Vorrundenspiel Brasilien vs. Nord Korea auf der neuesten Windows Embedded Standard 7 Digital Screen Lösung
Sind Sie neugierig geworden? Weitere Informationen sowie zur Anmeldung geht es hier!

Wir freuen uns auf Sie!
Read more! Post this to a friend!

Saturday, 15 May 2010

Windows Embedded CE 6.0 Monthly Update April 2010 available

Hi guys,

the latest Windows CE updates have been recently released and are available for download, in this month only for Windows CE 6.0. Some important issues (especially the fix of the kernel) have been resolved so get them now!

Windows Embedded CE 6.0 Monthly Update April 2010

Follow this link and download the latest QFEs.                      Fixes made in this update:

Component:  CAPI2

  • 100429_KB979675 - This update adds support for SHA2 signature algorithms to the CryptoAPI 2.0.

Component:  COMM

  • 100416_KB981375 - The DNSQuery_W function does not return valid DNS record(s) if DNS_TYPE_NS type is specified.

  • 100416_KB982228 - This update addresses a few memory leaks.

Component:  NK

  • 100429_KB982192 - Kernel may call OEMGLOBAL::pfnNotifyReschedule after OEMGLOBAL::pfnNotifyThreadExit was called for this thread.

Component:  NTLM

  • 100416_KB981841 - Users may not be able to connect to the Widows Embedded CE 6.0 file share from Windows Vista or Windows 7.

  • 100430_KB980997 - This update adds Unicode support to the NTLMSSP for client side APIs and server side APIs. The SSP now negotiates Unicode support with the remote end (client or server) and then uses Unicode character set if the remote end also supports it.

Component:  RDP

  • 100429_KB982527 - Terminal server Applications may not be able to read the data off serial port buffer as the Output buffer length does not get updated.Data send from the client is not received by the redirected serial port on the server.

Keep your OS up to date!


Read more! Post this to a friend!

Thursday, 6 May 2010

Memory usage investigation

Hello guys,

the screenshot below shows the new memory investigation tool for Windows CE 6.x.

image

It’s DevHealth60 from MSDN Gallery and I put the short description below.

DevHealth60 can be used to monitor device memory usage or as the starting point for memory leak and other memory issues investigation. DevHealth60 is a standalone tool to run on Windows Embedded CE6.x devices to take snapshot of virtual memory and output overview of the device memory footprint and detailed memory space layout with page types for all processes. It sums up all the heap pages for each process, as well as the total heap usage for the device. It also gives you a summary for each heap for all processes, including the allocation size, the number of blocks, and the starting and ending addresses.

Check it out and have fun!


Read more! Post this to a friend!

Wednesday, 5 May 2010

Microsoft will migrate newsgroups to forums

Hi folks,

starting this May, Microsoft will migrate the Microsoft NNTP Public Newsgroups to the web based Microsoft Community forums.

The reason being to enable the user to maximize the utilization of the community knowledge by only providing ONE community approach. Furthermore it is easier to get rid of redundant information and it is easier to protect the forums from being spammed than the newsgroups.

As you probably all know the next version of Windows Embedded CE will be named Windows Embedded Compact 7 so the new forums for Windows Embedded CE will be called:

  • Windows Embedded Compact Managed Application Development
  • Windows Embedded Compact Native Application Development
  • Windows Embedded Compact Platform Development

These new forums will appear here very soon.

You can find further information about the migration here.

Have fun!
Read more! Post this to a friend!

Windows CE network fix for x86 devices

Hi all,

Today I want to post a very helpful fix to improve the Windows CE network stack performance. This fix is not from me but from Anthony van Woerdekom, thanks a lot Anthony!

“Earlier this week, I promised to tell you about a tweak I have to enhance the performance of the WinCE network stack dramatically. It’s a pity that this is not a generic fix, it will only work on Intel compatible x86 systems (i.e. the ones that could run WinXP) and use DMA based Ethernet controllers.

NDIS has quite a number of functions to support the DMA with network adapters. As you may know, on most systems, using DMA means that the software must ensure that the processor cache is always coherent with the memory contents by flushing the processor cache at the right moment. If the software does not want to do this, it is often possible to access the memory that is used by the DMA buffers through an uncached memory "window".

When using Intel compatible systems (or AKA wintel), the software does not have to bother about maintaining coherency between the processor cache and the DMA buffers. This is really a great feature, because it allows you to use cached memory for DMA buffers, without you ever using the wrong data!

The main function NDIS has for allocating DMA buffers is
NdisMAllocateSharedMemory. It allows the driver to allocate buffers in cached or uncached memory. You will often see that drivers will allocate uncached memory because that is much easier to use.

However, even if the driver tries to allocate cached memory, Wince 5.0 and 6.0 will ALWAYS return uncached memory! Using uncached memory from software usually incurs a very large overhead - and in the case of NDIS drivers on wintel platforms, it will slowdown Ethernet throughput by more than a factor of 2.

There may be alternatives, but what I did, was to change the memory attributes of the memory returned by
NdisMAllocateSharedMemory:

NdisMAllocateSharedMemory(
hAdapterHandle,
dwRawSize,
TRUE, // Try to allocate all in cached mem (but WinCE
// will return uncached memory)
&pvRawVAddr,
&npaRawPAddr
);

// Check the allocation success
if (pvRawVAddr == (PVOID)NULL) return FALSE;
if (NdisGetPhysicalAddressHigh(npaRawPAddr) != 0) return FALSE;

// On WinCE, NDIS always allocates memory as uncached. This is not
// needed on intel platforms
// so simply change the allocated memory into cached memory
VirtualProtect(pvRawVAddr, dwRawSize, PAGE_READWRITE, &ulProt);


For me, the speed improvement was dramatic! I also did the following:
  • Removed all calls to NdisFlushBuffer, just in case this took a long time
  • Removed calls to NDisMGetCurrentSystemTime. If this is called on each packet, you will see a large hit count on a 64-bit division function in coredll.dll.

With these changes, I can get 500MBit/s TCP/IP throughput @100% CPU load on
a 1.5GHz VIA C7 processor with a CX700 bridge chip. And that is very similar
to what WinXP can do on that same system.”

Have fun!
Read more! Post this to a friend!

Tuesday, 4 May 2010

Is the .NET Compact Framework still alive? And what about Windows Embedded CE?

Hi Folks,

lately I’ve been hearing questions along that line more often. Probably mainly due to the fact that VS2010 does not support “Smart Device” application development (at least as of now, let’s hope that this will change) and also due to the announcement of the Windows Phone 7 Series Programming Model at the MIX 2010 conference. Just to recite the major aspects of that programming model: “The application model supported on Windows Phone 7 series will be managed only and will leverage Silverlight, XNA and the .NET Framework”.

From Abhinaba’s Blog you will see that there is a lot of work being done on the .NET Compact Framework, not only for Windows Phone 7 Series but also for Windows Embedded CE. By the way, Abhinaba also goes into details of the Windows Phone 7 Series Programming model as well as comparing it to the .NET Compact Framework 3.5. Thanks Abhinaba!

So to answer my question from the title: YES the .NET Compact Framework is still alive, so don’t worry!

Let’s have a look at Windows Embedded CE now. Again, due to the same reasons some people are worried that Windows Embedded CE will be discontinued, but don’t worry, the release for Windows Embedded Compact 7 is planned for later this year. But don’t take my word for it, just read Olivier Bloch’s post “Windows CE is NOT dead!”.

Have fun!
Read more! Post this to a friend!