2009-01-18

Windows CE

I've been busy with the port to Windows CE of libogg, libvorbis, libflac. This is only the beginning, there is still allot of work remaining.

Also I've done a bit of restructuring, I've reduced the number of binaries from 30 to 20, by changing from dynamic link libraries to static libraries. I've changed the usage of the CRT, from dynamic to static linking, this has increased the size of the binaries but overall the installer has the same size, thanks to LZMA solid compression :-)

The above changes will ease the usage of the libraries, for example only dsfOggDemux2.dll dsfVorbisDecoder.dll are needed for Vorbis decoding.

I have created my first Windows CE "Hello World" program. I've wanted for a long time to do that. I've learned that Windows CE has only Unicode support, no more multi byte nightmare.

Because you don't have a console attached the classical "Hello World" is a bit different, a bit WIN32 APIsh:


#include <windows.h>

int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nShowCmd )
{
    
wchar_t message[] = L"Goodbye cruel adventure world!";
    
wchar_t caption[] = L"Monkeys are listening";

    ::
MessageBox(0, message, caption, MB_OK | MB_ICONINFORMATION);
    
    
return 0;
}



If you try to run an executable which is not digitally signed, you are being prompted by the operating system telling you that it's dangerous to run "unknown" software.

Since I have a certificate from CERTUM I have signed the executable, but still the prompt was there. The problem was that my telephone doesn't have the root certificate from CERTUM installed. I've went to CERTUM's root certificate page and taken the "Public Key of Certum Level II", installed it and my program ran without any prompts from the operating system.

And now the mandatory "screen shot":

6 comments:

Florin said...

Wasn’t it originally “Goodbye, cruel adventure game?”

Nice phone, BTW.

Cristian said...

Oh no! Nobody expects the spa^H^H^H monkey island inquisition!

I have made two mistakes, the one you pointed out and "The monkeys are listening"

I'll have to replay Monkey Island, to refresh my memory.

Anonymous said...

First of all, WinCE actually has a Console if you let it have it :P (I hade some huge problems with a console that popped up, grabbed focus and didn't release it :P )
About the full Unicode support - it's rather distasteful, because in the core you actually have some components (READ: Drivers) that are not so Unicode-ish as you might think. Plus the _T()-ing of the texts is absolutely annoying.

Pankaj said...
This comment has been removed by the author.
Pankaj said...
This comment has been removed by the author.
Pankaj said...

hey ! have you to ported the libogg to wince .. i am trying to port the libogg to wince on arm architecture. I need some help. please help me.