Thursday, 12 August 2010

Kernel-Mode and User-Mode DLLs

The new memory architecture in Windows CE 6.0 leads us to two types of DLLs: Kernel-Mode DLLs and User-Mode DLLs. We put a Kernel-Mode DLL in the MODULES section of our BIB-File and mark it with a K:

MODULES

MyDll.dll $(_FLATRELEASEDIR)\MyDll.dll NK SK

If we want to use the DLL in both Kernel- and User-Mode we replace the K with a Q:

MODULES

MyDll.dll $(_FLATRELEASEDIR)\MyDll.dll NK SQ

MakeImg creates a copy of our DLL named K.MyDll.dll. Each version of the DLL will relocated to the corresponding XIP section in User-Space and in Kernel-Space.

Up to this point the facts are easy and every BSP developer should know about it.

Now it starts to be tricky:

What about LoadLibrary()? What happens if I try to call LoadLibrary(L”MyDll.dll”); from a driver in the Kernel context?

The answer is: LoadLibrary() loads K.MyDll.dll, you don’t have to add a “K.”!

But what if the DLL needs another DLL, e.g. My2ndDll.dll?

It is obvious that My2ndDll.dll must be also a Kernel-Mode DLL, but the name mustn’t be K.My2ndDll.dll.

Alternatively you may move My2ndDll.dll from the MODULES section to the FILES section. Remember to remove any K or Q!

MakeImg cannot resolve all dependencies in this situation:

Warning: Unable to do imports from K.MyDll.dll to My2ndDll.dll - will late bind

But if My2ndDll.dll is on your target, K.MyDll.dll will be loaded successfully.

It’s a good idea to review all DLL dependencies and think about the special functionalities of your DLLs. Some DLLs do kernel-specific things and cannot run in User-Mode, e.g. read from KSeg1 addresses. Some DLLs use application interfaces you won’t move to the Kernel, e.g. MFC or OleAut32.

Tschüß Holger


Read more! Post this to a friend!

Windows Embedded CE QFEs for July 2010 have arrived!

Hi all,
new updates for Windows Embedded CE are available for download. Some issues (especially the scheduler fix for Windows CE 6.0) have been resolved, no time to loose and get them now! More information for each update is provided in the Readme document available after the individual update(s) has been installed.

Windows Embedded CE 5.0 Monthly Update July 2010:

Fixes made in this update:

Component:  Internet Explorer

Windows Embedded CE 6.0 Monthly Update July 2010:

Fixes made in this update:

Component:  COMM

Component:  Internet Explorer

Component:  IPSec

  • 100727_KB2252004 - This update addresses a few thread leaks in udevice.exe system process.

Component:  MSFlash

  • 100722_KB2263918 - The block may get marked as bad block during CompactDataBlock process.

  • 100731_KB2289488 - During stress tests the device could get into a state where the critical compaction loop runs during boot initialization of the Flash MDD. This may prevent the device from booting.

Component:  .NET CF v3.5

  • Remote Performance Monitor crash when attempting to get GC Heap snapshot

  • RPM may show exception message "Error displaying GC heap view: The given key was not present in the dictionary"

  • TRemote Performance Monitor crash when attempting to get GC Heap snapshot

  • Deserialization incorrectly succeeds on bad XML creating bad objects

  • Data passed to Serializer is serialized twice

  • Unable to obtain information when PInvoked code or CLR generates an exception

Component:  Scheduler

  • 100723_KB2267739 - Co-processor registers may get restored in the wrong thread.

Component:  TimeSVC

Component:  USB 2.0

  • 100722_KB2193954 - This update adds missing curly brackets in CIsochronousPipe::AddTransfer.

Keep your OS up to date!


Read more! Post this to a friend!

Tuesday, 10 August 2010

Programming Windows Phone 7

Hello guys,

it should be quite interesting for all Windows Phone7 developers. The second draft preview of Charles Petzold’s upcoming Programming Windows Phone 7 ebook including several code examples is available to download :)

Image1

The final version of this ebook will be available in october and will be free!

Have fun!


Read more! Post this to a friend!

Thursday, 5 August 2010

Missing extern "C"

I'm sure most of us hit the problem of that annoying linker error "unresolved external symbol "aoein0hepqo2washpeofh a@foo" (ok, I just hammered the keyboard - it's no real live symbol name!).
After triple-checking the library link list it turns out that (again) the mixing of C and C++ modules and libraries is the root of the problem.

But what to do if you have a C++ module that references an API function declared in a header file that is not prepared to be included by C++ code?

If you are not allowed to patch the file (may be its 3rd party stuff) there is a quite simple solution:

extern "C"
{
#include
}

Cheers,
Jürgen
Read more! Post this to a friend!

Monday, 2 August 2010

Cool stuff – new Windows CE based devices from METTLER TOLEDO

Hello guys,

METTLER TOLEDO is a global manufacturer and marketer of precision instruments for laboratory, industrial and food retailing applications and launched a new generation of density meters and refractometers.

MT hired EB as a software partner to strengthen its own software team thereby utilizing EB architecture, design and software project management expertise. MT and EB jointly created a complex software solution that integrated 250 screens in 40 different device combinations on a Windows Embedded CE platform. The solution reused parts, such as the user interface concept and basic software design of a previous project for titration devices and used EB GUIDE Studio as HMI tool.

Check out the video below, which shows you the huge range of possibilities of the new devices:

Have fun!


Read more! Post this to a friend!

Wednesday, 28 July 2010

Windows CE Live Chat Transcript July 2010

Hello guys,

Just in case you missed the MS Live chat today, the transcript of the chat is available here.

Q: [1] What is the plans for Silverlight Web for CE? If it will be possible to use the same silverlight >= 2.0 what CPU/Memory will be required

A: We are continuing to evaluate the plans to bring Silverlight in the Browser support to the CE product line. We don't have details to share at this time. Silverlight for Windows Embedded delivers the same SL based UX expierence in a out of the browser hosting model. You can use the same rich designer tools (Expression Blend) And VS to build and test the application while takeing advantage of embedded hardware capabilites such as GPU offloading and hardware based media playback.

davbo-msft (Moderator)[18:18]:

Q: [7] Can you answer any questions around Windows Embedded HandHeldTerminal?

A: Yes we can answer questions around Handheld Terminal

davbo-msft (Moderator)[18:19]:

Q: [5] Yep, to echo Bob's question, is there any word about whether application development for Compact 7 platforms will be supported in Visual Studio 2010? (Is it a 'no, never' thing, a 'yes, this is coming' thing, or a 'yeah, maybe someday' thing?)

A: The Windows Embedded team is currently focused on delivering the next major version of the Windows CE OS, Windows Embedded Compact 7, which will be released later this year. Windows Embedded Compact 7 will also provide an updated version of the Platform Builder development tools as a plug-in to Visual Studio 2008. With Compact 7, the Embedded community will continue to have the same great support for developing drivers, OS images, and applications as they do with the current available version, Windows Embedded CE 6.0 R3. The enterprise support lifecycle will ensure that the Embedded development community has the needed support in Visual Studio 2008 throughout 2017.
The Windows Embedded team is working with the Visual Studio team to determine whether and how Windows Embedded Compact support would be added to Visual Studio 2010, but as of now there is nothing planned. For those developers also creating applications for Windows Phone 7, Visual Studio 2010 will install side-by-side with Visual Studio 2008.

davbo-msft (Moderator)[18:19]:

Q: [4] I mean VS 2010

A: answered as part of Question #5

davbo-msft (Moderator)[18:19]:

Q: [3] I have heard a lot of confusing and contradictory reports of support for Smart Devices running WIndows CE in VS 2008? What's the official line?

A: answered as part of Question #5

GLanger[MS] (Expert)[18:30]:

Q: [8] How will Embedded Compact 7 be different from WinCE? Is it totally new or based on WinCE 6.0? It's a bit confusing/concerning that I've found very little as to what Embedded Compact 7 will be. With the release this fall can you share any more details or point me to a web page with more information

A: Hi Mike, Windows Embedded Compact 7 is based on previous OS releases and adds new features. The best source of information is http://www.microsoft.com/windowsembedded/en-us/products/windowsce/compact7.mspx. There's information about the upcoming release and you can register to download a Public Community Technology Preview copy for evaluation now.

davbo-msft (Moderator)[18:40]:

Q: [9] Who licenses the Windows Embedded HandHeldTerminal - Microsoft or distributor?

A: For OEMs we have a few direct relationships but the majority of the OEMs go through distribution. BSquare http://www.BSQUARE.com is the only distributor for Windows Mobile and Windows Embedded Handheld today.

davbo-msft (Moderator)[18:42]:

Q: [11] Hi
I have some questions about the Silverlight for Windows Embedded
1.Should microsoft support the Silverlight for Windows Embedded with manage code in next version ,such as C#?
2.Why currently verion Silverlight for Windows Embedded do not support the "DispatcherTimer" and "Dispatcher",
How can I update the UI use another thread?

A: It is not recommended to update the UI in a second thread, but it’s possible if the VisualHost is created with AllowsMultipleThreadAccess. <http://msdn.microsoft.com/en-us/library/ee502975.aspx>; . Working on responses for the other questions and will post when information is available.

Travis Hobrla [MS] (Expert)[18:44]:

Q: [10] Is there any plan for the Direct2D or DirectWrite APIs to be supported in Compact 7?

A: No, there is no planned support for this.

davbo-msft (Moderator)[18:48]:

Q: [6] To follow up my question, Win7 phones use Silverlight Web, correct? Can you elablorate why Embedded CE 7 is different? The issue with Silverlight Embedded is that now I have two sets of code behind and then also have to re-write the app twice. It is difficult to justify this approach. Please take this and encouragement and not a complaint. I understand issues with CPU and memory but the C++ only Silverlight is something of a non-starter.

A: To our knowledge Win7 Phone doesn't use Silverlight in a browser. The same XAML can be used in both WinCE and WP7 but yes the code behind the XAML is different between WinCE and WP7.

Have fun!


Read more! Post this to a friend!

Friday, 23 July 2010

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

Hi guys,

there is a new opportunity to chat with Microsoft 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!

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

Title: Windows Embedded CE Live Chat!
Date: Tuesday, July 27, 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!