November 2009 Entries

Flash device driver in Windows Embedded CE 6.0

In previous version of Windows CE the flash drivers followed a model based on FAL (Flash Abstraction Layer): the developer had to write the FMD (Flash Media Driver) layer and link it with fal.lib to create a DLL which exposed a block (DSK_Xxx) stream interface. Starting with Windows Embedded CE 6.0 R2 MS introduces a new model based on a MDD/PDD layer structure. The MDD part is implemented in a DLL (flashmdd.dll) exposing a block (DSK_Xxx) stream interface which handles some specific IOCTL_FLASH_XXX...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Get last error and set it meaningfully

Very often I read posts in the newsgroups like: I call function Foo(dwParam) and it returns FALSE. What's wrong? If I cannot tell it immediately -for example because the dwParam is clearly wrong - my standard answer is: Have you called GetLastError()? Which error value it returns? GetLastError (if the call that fails actually sets an error and the error is meaningful) can be very helpful to detect why the call is failing. If you do not understand exactly what the code means and you have the code...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati