Hello,
today I had decided to start this thread about native development for WP7.

At the current moment I don't upload/attach any working stuffs to this message. It will happen a bit later, after new DFT ROMs release. This is because it's very difficult to run them for now.

Let's start from current achieved results:

1) It's possible to run any EXE files (after "FullUnlock")
2) Those EXE files can do any operations in the system (after "FullUnlock")
3) It's possible to show some GUI from this applications. But GUI has legacy Windows CE style, it's impossible to create Metro-style applications for now.

How can it be used by community?

We can develop a lot of homebrew applications: like porting emulators, old native applications, video players and etc.
It can be possible to port famous TCPMP player for example and get ultimate playback on Windows Phone 7!

Is it possible to run old Windows Mobile 6.5 applications without modifications?

No, it's not possible. A lot of different APIs are missing for those applications.

Is it hard to modify old Windows Mobile 6.5 applications?

Well, it's almost same like porting to pure Windows CE, but a lot of Windows CE stuffs are "damaged" inside Windows Phone. They just doesn't work right, because nobody never used/tested them before :P

Photos of sample "WP7 Native test"

Information for developers you can find in the next messages.

So I will release demo WP7 native application, when we fix issues with FullUnlock.

Demo will be as binary EXE file. And as VS2008 project, which can be good start point for other developers.

DevUnlock actually allows only to deploy XAP files from external sources.
It doesn't give more privileges.

So we (DFT) developed "FullUnlock". FullUnlock is implemented as replacing some system files by wrappers, which allows any kind of access (disable access checking at all)

We replace LVMOD.DLL which used to check files and data (checksums, certificates and etc) and POLICYENGINE.DLL which implements internal objects access checking.

All written before means that FullUnlock at the current moment only possible by flashing custom ROM to device. In future maybe we can find good ways to do it without flashing, but for now I don't see any ideas how to do it without flashing.

Maybe we can replace DLLs inside \Windows\ directory (put a shadow copy), but I am not sure if it will work really. It's stuffs for future experiments.

It can be possible to do something near by editing policy values, but it need big research to find right way. As it still won't disable file checking, maybe we can add own certificate to right store and then sign files with them.

The last DFT 7720 MANGO ROMs contains FullUnlock, but it doesn't work as expected there few issues. as well some users got issues with debugging on those ROMs and etc. We will continue work under it

So I will release demo WP7 native application, when we fix issues with FullUnlock.

Demo will be as binary EXE file. And as VS2008 project, which can be good start point for other developers.

Most applications built in inside WP7 are native. But they don't use usual Dialog UI style, they are using some kind of Silvelight scripts. This kind of UI is called "UIX".
Main idea of UIX that DLL files have UIX resources inside which describe whole UI.
Something similar is used inside CE 7.0 Slivelight - there some xml compiler which make binary data and put them as resources inside DLL. I don't know how to decode this binary data.
Seems Zune desktop application also using this framework.

So UIX used some kind of scripts for UI part and callbacks for all actions.
If we decode this UIX format, we will able to change/modify UI as we want, like it was before with regular resources inside DLL. But UIX must be much more powerful.

We can't use UIX for native application because we don't know how to use it, how to make proper binary data and etc. It's hard to reverse.

But native application can have some GUI with Windows CE style (you can see examples on the photos above)

Another issue: If you call API function "CreateWindowW" you won't see anything on the screen. It seems because shell handle all output, so window doesn't visible.
After some searching I found inside some test ROM nice DLL called "WindowTreeUpdater.dll". After looking inside and decoding functions parameters, it's working!
Basic idea: you create window and call function from this DLL and Window appear on the screen. There seems some kind of proxy engine to output legacy windows on top of shell output.
Nice, it's working...

So we can use usual windows for UI inside native application.
There present standard controls, but they work rather laggy (hey, and looks too).
Basic controls like PushButton, Static, CheckBox, Radiobutton, Icon are working.
About extended controls: (Progress bar, list view, and etc)
they come from Commctrl.dll usually, it was present inside Initial/NODO releases, ut it was removed inside MANGO. I was able to run NODO Commctrl.dll under MANGO after some modifications. But all this controls are shown on screen, but they don't do anything on input. So you can see toolbar, but can't press any button.
CommDlg.dll is missing and never was inside WP7.

There present AYGSHELL.DLL, but most functions are broken. For example, I was not able to create menu bar.

So, a lot of functions are broken, like MessageBox not working.

But we still can create own custom controls and use them for developing.

For example porting TCPMP means that we will need reimplement UI fully - because toolbar doesn't work. slider also won't. Maybe get and reuse some source from ReactOS or NT40 CommCtrl

XDA Developers was founded by developers, for developers. It is now a valuable resource for people who want to make the most of their mobile devices, from customizing the look and feel to adding new functionality.Are you a developer?