Skip navigation.

Ambassador

The Royal C++ Embassy

Posts tagged with "windows ce"

Simple member thunk for threads

, , , ...

When you want to create a thread, CreateThread will not accept a member function. It's important to have a thread as an object, I think it's also important to keep caller provided argument to CreateThread (without introducing a tuple that holds this valuable information and casting to and from void*, managing memory, etc). In addition to traditional techniques, we can use a small thunk, too!

Read more...

Opera 9.0 SDK for Windows CE

, , , ...

Opera 9.0 SDK for devices has been released recently and I am working (really hard) to Windows CE SDK to ship to customers very soon. So what does this SDK provide exactly?

Read more...

Did you hear that? Windows CE port is ready!

, , , ...

According to Opera Press Release, we have announced Windows CE SDK officially, as of yesterday.

I have started Windows CE port a few months ago. This official announcement made me very happy! I can now share my porting experience and excitement of rest of the team.

I would like to start with brief information about basic features we have today:
  • Features are equivalent with Linux SDK, so that a company can basically reuse its code on both platforms (Wow!)
  • Multiple tabs
  • One native window, multiple Opera windows
  • Widgets
  • User JavaScript, User CSS
  • AJAX
  • Wand
  • Bookmarks
  • Netscape Plug-ins
  • Multiple rendering modes (like Medium Screen, Small Screen, Desktop, etc)
  • Page Zoom
  • Native JSPlugin (basically; calling native code from JavaScript)
  • Many more, countless features!


It was a real effort
Starting a new port from scratch is difficult. Platform doesn't provide everything you need so you need to re-invent wheel. You need to know what does platform provide, what's the best way to utilize platform's API and not invent an equivalent one (which is potentially slower and less stable).

Preparing an SDK is slightly more difficult than preparing a full application. Customer of an SDK is usually another company, or say, another developer. These people will build their business upon something you do. They need full and correct documentation; what sort of functions does SDK provide, what are function arguments, return values, disaster scenerios... SDK should prefer telling caller that one of its functions is called incorrectly, instead of crashing whole application. SDK should be more stable, rock-solid than application itself.

SDK is a closed box but vendor should not make people to wonder its code (either just to see "how stuff works" or worse "fix a bug"). At this point, well documentation is crucial. Well testing is essential.

Testing an SDK is slightly different than testing a final product. Most users can test a final product, because, for example, it's got buttons, menus, help - something that they can understand and experience; this may not require any software engineering knowledge.

In SDK case, testers have to be experienced software engineers who can harness given library, who can guess pitfalls in software engineering and find potential crash-bugs. They can call functions in many weird ways, try to break it; like passing NULL to a function, where argument is intended to be an output buffer. Similarly, passing -1, calling from multiple threads, subsequent calls, out-of-memory conditions, etc.

We have added just one more platform, Windows CE, and hundreds of different embedded devices to platforms and devices Opera can run.

There is some really cool stuff going on here!

, , , ...

It's been awhile I have moved to another branch in devices department, I am not a part of Windows Mobile team for sometime, although I still live in Windows Mobile team's habitat. I and some more coworkers here do some really cool stuff. What we do is secret :smile:, but really cool stuff.

As you can see from Opera Job Openings, we are running on Windows CE as well. Windows CE is not a Windows XP, as you may already know. This sometimes requires tremenedous amount of work to be done to get a product equivalent to desktop quality - it's a real challenge. In other words, writing serious portions of Win32 API on Windows CE. There are some pitfalls at this re-invention (or porting, or you name it) work. Because there are functions and arguments declared in SDK but are not actually supported on Windows CE. There are functions that do not run like their Win32 equivalents. This requires developer to re-refresh his or her knowledge about Win32 API functions and WinCE API functions. There are lots of stuff to care about on Windows CE - it's a real-time operating system, it's got less memory, less storage, slower CPU, turns out a tough job. So we should be far more careful about resource management, such as threads, messaging, painting, allocations and similar stuff than desktop developers. I don't say they don't respect such issues, but what I am saying is we, for example, should certainly avoid thread thrashing.

Do you think Opera does not care about COM (Component Object Model)? Largely true :smile: but if you are dealing with Windows, you need to get your feet wet in COM sea. We do some really cool stuff with COM, too. It becomes even more fantastic on devices, since COM is more restricted and minimalistic than desktop or server operating systems.

These are "real engineers" - not just graduates! Few days ago, a group of developers and QA people were talking about new coffee machine. Well, new coffee machine is not your father's coffee machine - it's huge and has got an LCD screen, giving all possible information about the status. This, of course, has grabbed attention and people started wondering complexity of coffee machine. I stood a few steps behind the investigation team, with a cup in my hand, waiting for them to complete their job. I actually thought they are awaiting to get coffe. There are two coffee "outputs" and one hot water output from the "device". Then I have realized that they actually are pressing buttons, reading screen and taking closer look at it! Fortunately, investigation team has received a critical advice; "do not test a coffee machine with standing that close and no cups" from an elder. Filing a bug report about new machine may look like:
Summary: Over-complicated coffee machine for average user 
may cause serious injury.
Module: coffemachine
Module Owner: Opera
Description: When user stands too close to the device 
and watches LCD screen after pressing buttons, coffee
 machine may spray 120 degrees hot water out, which 
could cause severe damage on the user.
Repro: (Do not stand too close to the machine before 
starting test.) Ensure there is no cup "plugged to 
coffee output", Press the button in the middle, press
 the red button.
Resol: Don't play with buttons, and if you do, place 
a cup - just in case.


Fortunately, coffee machine does not hurt anybody without his/her intervention. But I certainly would not want to experience "crash of coffee machine".
Download Opera, the fastest and most secure browser
November 2009
S M T W T F S
October 2009December 2009
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30