Extracting Native APIs? Possible...maybe. - Windows Phone 7 Software Development

Okay, so since the unlocked emulator has a file manager and task manager, does that mean it would be possible to extract them and run them on an actual WP7S device? And if that was possible, would it also be possible to extract the Native APIs from these apps? I'm fairly certain that they use Native APIs because ordinary apps can only access their own directory. I'm not very smart with these things, so sorry if it's obviously impossible or something.

It's wince - the native API is always there, where do you want to extract it from? Also some people figured out most WP7 apps from the emulator ROM are written in native as well. it's always here.
But you can't just put file manager on a WP7 device because there's no access for you to put anything on it, except apps from Marketplace you got the picture? even if we could cook our custom ROMs in the future the only thing we could do is throw in our own DLLs, services or background tools on it and customize it a little. I still doubt you'd be able to develop real WP7 style apps like a file manager or registry editor because the GUI is supposed to be written in Silverlight/XNA. And from those frameworks you can't access the native API unless Microsoft would add support for it.
101% dumb phone. If you think about it then WP7 is even WORSE then iphone.

But what if you could use Visual Studio to load it onto the device? If you look around in it, there is an option for that.

Actual devices will have to be unlocked for developement purposes to allow sideloading through Visual Studio and even then I doubt the system would be able to deploy native code. Developer phone means a yearly fee for membership in the MS developer programm.
I don't think that using native APIs from managed code would be impossible in the SDK - carriers, e.g. will be allowed to use it, but for normal applications the Security Context in .Net would prevent the programm from calling them (Code Security Managers are configurably available in Java and .Net from the beginning, so i believe that would be what MS uses to block access).
And of course programs using those wouldn't get on the marketplace.

Oh, too bad then, but thanks for your response anyway!

Fdo35 said:
Okay, so since the unlocked emulator has a file manager and task manager, does that mean it would be possible to extract them and run them on an actual WP7S device? And if that was possible, would it also be possible to extract the Native APIs from these apps? I'm fairly certain that they use Native APIs because ordinary apps can only access their own directory. I'm not very smart with these things, so sorry if it's obviously impossible or something.
Click to expand...
Click to collapse
Okay, the issue here is the lack of a few key DLLs: Windows 7 Series will not offer GDI most likely (I'm downloading the emulator set now, and will confirm this soon) and will lack comctl32.dll and the like, removing these functions. As it's been stated before, like Windows 7 uses the 6.1 NT Kernel, Windows Phone 7 series uses the 6.5 Windows CE kernel, at least, last that I've heard. It would then be both possible to bring Windows Mobile 6.5 DLLs over, but anything that calls GDI will not work. Solution? Make a mock GDI that uses the new render.
This isn't new either, Windows 7 uses WPF more than ever (Which composes most of the games as well as Windows Media Center), which is a 3D accelerated and fancier way to draw to the screen, and Windows 7's GDI subset has been updated to allow hardware acceleration granted the graphics card allows it (It's actually something the video card driver must tell Windows, as MSDN states)

Deploy native code, no. Run it, of course
I'll be investigating the possibility of native code here shortly. Chances are, you will need to set the target to ARMV6, and set the compile type to Native, not Windows. Most developers, if not all, probably have overlooked this.

I would expect that it'll require privileged access to run native code, so you'll need to solve the code signing problem.

ThymeCypher said:
Okay, the issue here is the lack of a few key DLLs: Windows 7 Series will not offer GDI most likely (I'm downloading the emulator set now, and will confirm this soon) and will lack comctl32.dll and the like, removing these functions. As it's been stated before, like Windows 7 uses the 6.1 NT Kernel, Windows Phone 7 series uses the 6.5 Windows CE kernel, at least, last that I've heard. It would then be both possible to bring Windows Mobile 6.5 DLLs over, but anything that calls GDI will not work. Solution? Make a mock GDI that uses the new render.
Click to expand...
Click to collapse
Well, I doubt things like comctl.dll and some other things like GWES will be that big of an issue once Platform Builder 7 is released and we can just generate these components ourselves. Hell, adding back GDI support (if those rumors aren't just lies) may be as easy as replacing the GWES with a less crippled one generated by Platform Builder. Maybe GDI support is still compiled in but just doesn't output directly to the screen using the default graphics driver implementation. That's how the Dreamcast implementation of Windows CE was. To even see apps like IE on the screen, you need to copy the contents of the standard WinCE GDI output to a DirectDraw surface.
What I'm more worried about is the hackability of the hardware/software. I'm really hoping it's not as insanely locked down to the point to being unhackable like every Zune.

do you think Platform builder is still available for WP7? Since MS won't allow the OEMs to modify the OS I doubt that. Do you have a source? You've seen an announcement from MS or something?

RAMMANN said:
do you think Platform builder is still available for WP7? Since MS won't allow the OEMs to modify the OS I doubt that. Do you have a source? You've seen an announcement from MS or something?
Click to expand...
Click to collapse
Platformbuilder is for the OS, which is Windows CE. There is still some debate as to what version the emulator is running, leaving alone the possibility that the actual version of the OS may be different at release.
If the CE6R3 camp is right, you can get platform builder for that right now, though you wont have telshell.exe (WP7 replacement for explorer.exe), and the WP7 specific apps. It would be an interesting exercise to see if they could be run on CE6R3. If no one beats me to the punch, I plan on trying this for myself when I am less swamped at work.
If the CE7 camp is right, you will have to wait till MS releases that version to the public. And they WILL release it because there are far too many embedded systems outside of phones that run on CE for them to neglect it.

No, I was talking about the generic Windows CE 7.0 Platform Builder and not the OEM specific OAK for WP7S. Unless MS plans to completely drop their generic Embedded Windows CE offerings, I see no reason why PB 7.0 will not be released and help with hacking WP7S (if it is even based on 7.0). You always needed to be a large ODM and sing an NDA to use a Platform Builder addon/OAK for the MS platforms like Pocket PC. Those almost never leak and I can't imagine this would be much different.

RAMMANN said:
do you think Platform builder is still available for WP7? Since MS won't allow the OEMs to modify the OS I doubt that. Do you have a source? You've seen an announcement from MS or something?
Click to expand...
Click to collapse
Yes, platform builder was used to build leaked wp7 arm image.
d:\wm700_6176\platform\common\src
\soc\qcom_v1\oal\power\sleep.c
It is from from nk.exe

use dumpbin.exe to get all methods in dll/exe

Related

Linux on Pocket PC

Hi all,
I ask this question cuz I counldn't find enough information about How to install Linux on my PPC.
My ppc is: I-teq X-bond like as Gigabyte gsmart i. with 64MB ROM.
Is there any linux ROM distribution for my ppc? or general linux ROM distribution for PPCs?
Thanks in advance.
Pedram
The reason you could not find information is because there isn't much of it to be found.
Unfortunately, Linux for PPC is in its infancy. The main problem is the drivers - they all need to be reverse engineered and there is no help from the OEMs as they designed this things to only work with MS crap and seem to have no interest in releasing drivers or specifications.
Official reason: Because you can not mess with the OS the device is more stable and secure.
Real reason: If you need to by new phone to get new OS we make more $$$ and so does MS.
As far as I heard there is a half decent version for some iPaq model, and there is version for some HTC devices (check WiKi) but all it does is boot up: no drivers even for touch screen, no graphical interface, no apps.
Thnx levelnum.
I think if linux developers I mean open source world focus on handheld devices they can publish good distribution as desktop or laptop PCs. Today they are very powerful in reverse engineering, .NET Framework in Linux named MONO is one of these reverse engineering issues.
I believe that Linux is much more customizable that WM, especially for XDA-developers that make interesting works on WM. And also it doesn't have copyright restriction as WM has. So may be it makes many progress in world of handheld devices.
Oddly enough I was looking for Linux on Smartphone info yesterday as I've got an Alpine I'd like to be able to do something interesting with.
Demand for something like this is going to be a bit odd - by definition anyone who finds this site, let alone opens an account and posts, is going to be interested in pushing the boundaries of their device but the vast majority of WM device users are going to be in the "don't care how it works as long as it does" group.
Also, I reckon a lot of Linux dev types aren't even going to look at the device, it will never occur to them to buy one because it's sold as a Windows Mobile device, and hence isn't going to be near their installation of the hacker mentality. Without a critical mass of people who can develop in/with Linux it's always going to be a struggle.
problem is the program base
all current wm programs unless they are .net
would not run under linux on our pda's
new ones would be required to be written
or ported or....
The Nokia Internet Tablet runs on a version of Linux with a pretty robust set of applications, and this device uses an ARM processor which should be pretty friendly with regard to 'porting'.
But you'd still be stuck without a telephone application.
You can find some information here:
http://handhelds.org/moin/moin.cgi/HaRET
http://www.handhelds.org/
Oddly enough I was looking for Linux on Smartphone info yesterday as I've got an Alpine I'd like to be able to do something interesting with.
Demand for something like this is going to be a bit odd - by definition anyone who finds this site, let alone opens an account and posts, is going to be interested in pushing the boundaries of their device but the vast majority of WM device users are going to be in the "don't care how it works as long as it does" group.
Also, I reckon a lot of Linux dev types aren't even going to look at the device, it will never occur to them to buy one because it's sold as a Windows Mobile device, and hence isn't going to be near their installation of the hacker mentality. Without a critical mass of people who can develop in/with Linux it's always going to be a struggle.
Click to expand...
Click to collapse
May be! as you said it is Windows mobile device and linux lovers aren't going around of it. but I think they are so curious than it.
problem is the program base
all current wm programs unless they are .net
would not run under linux on our pda's
new ones would be required to be written
or ported or....
Click to expand...
Click to collapse
I do think so. since I in previous post I mentioned that .NET framework available in linux. so many of windows program can run on it.
You can find some information here:
http://handhelds.org/moin/moin.cgi/HaRET
http://www.handhelds.org/
Click to expand...
Click to collapse
Hart (Reverse engineering tool for wm hardware) was interesting tool.
yeah but due to limitations and slowness only the minority of applications on windows mobile are made in .net :S
i want this one
http://www.openmoko.com/press/index.html
Regards,
Jason
Rudegar said:
problem is the program base
all current wm programs unless they are .net
would not run under linux on our pda's
new ones would be required to be written
or ported or....
Click to expand...
Click to collapse
This is not a real problem. If you want to use a particular program from WM that is a problem but why you would do that? There is very large program base for desktop Linux (many of them also exist for desktop Windows) which could be very easily ported to a handheld platform with ARM processor. If you ever looked up how many qualitative programs do exist for Japanese Linux handhelds...
Wexx said:
This is not a real problem. If you want to use a particular program from WM that is a problem but why you would do that? There is very large program base for desktop Linux (many of them also exist for desktop Windows) which could be very easily ported to a handheld platform with ARM processor. If you ever looked up how many qualitative programs do exist for Japanese Linux handhelds...
Click to expand...
Click to collapse
Thats one of the things that is grate about open source software - you don't even have to depend on the original developer to find the time / will to port it. Anyone with the programing knowledge can.

No DirectX on .Net CF 3.7

I've seen that .Net CF 3.7 doesnt have the directx ( Direct 3d) libraries and i was wondering if microsoft decided to delete them and not continue using directx with .net cf or if it's only because the 3.7 version is a beta and lacks many things.
Apart of that, i don't know what new things has 3.7 version, is there any changelog? because if there aren't important changes, i consider it may be better to continue using .net cf 3.5.
No follow up?
I'm curious if anybody has any more information on this matter. I'm currently using a slightly older version of NRGZ's EnergyROM with a Touch Pro and am unable to use Diamond Hologram because of a TypeLoadException stating that Microsoft.WindowsMobile.DirectX can not be found.
There's a chance that the rip of the unreleased .NET CF 3.7 was incomplete (though the GAC is pretty straightforward) or the pre-release state of it could also be used to rationalize missing assemblies, but if I were to take a random crack at it, I would guess that they're working on XNA for Windows CE/Mobile since it's based on CF and runs on Windows, XBox 360 and Zune it would be a logical step for Microsoft (just as they stopped supporting Managed DirectX on desktop editions), though it does seem a bit unfair to developers of existing applications since the desktop edition was not shipped with the framework, but rather with the DirectX SDK whereas this was deployed in the framework.
Is there a chance that someone could test using the 3.5 version on a 3.7 runtime? If the CLRs are compatible (and they seem to be) then it should still be able to load the assembly, and if binding works at all similar to the desktop framework we could probably just copy it into the directory of the application path, rather than GACing it.
After some searching around this is better discussed in the original CF 3.7 thread since it has been brought up. I'll repost my thoughts there and see if someone can help with experimenting.
http://forum.xda-developers.com/showthread.php?p=4060348
Not sure if this should be posted in the aforementioned thread, but it has long been rumoured that MS would phase out Direct3D by Windows Mobile 7, in favour of OpenGL and OpenGLES. Hope this helps at all.
GL
Well, I'm not so sure MS will ever officially support GL since it's a "competing" product to DirectX. In fact, to me it seems very unlikely. While they have been supporting community solutions and open source work more lately, generally Microsoft makes an effort to have developers use Microsoft technologies which in turn makes applications dependent on Microsoft and therefore users dependent on Microsoft. They have (arguably) the most powerful, useful and time-saving development tools which keeps many developers (like myself) developing applications that are inherently designed for their operating systems.
XNA, on the other hand is a Microsoft technology that is gaining a lot of traction and is directly related to the .NET Compact Framework, which is what leads me to believe they'll choose that route. With the right love and care a single XNA game can be played on PC, XBOX 360 and Zune and it seems likely that supporting the platform that .NET CF was first implemented on is only a matter of time. It's been rather surprising to many in the XNA community that MS hasn't already supported it, since their original press releases strongly indicated support for it. One thing's for sure: while there is an XNA Game Studio built on top of Visual Studio, there will probably not be any MS initiative to build a GL game studio.
http://www.microsoft.com/presspass/press/2004/mar04/03-24xnalaunchpr.mspx
To be fair though, that doesn't necessarily mean they won't implement the Windows Mobile version of XNA using OpenGL ES, though it seems likely that the architecture is designed more toward DirectX. Still hardware manufacturers could play a huge role in this decision.

Language of choice

Just curious..What is everyone's programming language of choice when developing apps for WinMo?
Ive been working (lightly) on a VB program, which is ok, but i feel it isnt as efficient as others might be, and i know efficiency and size is a big issue on mobile devices (obviously)
Depends:
A simple program or one that can be done just using the stuff in the standard system DLLs then I will go for the pain of coding it in WIN32 C++. The resulting application runs like the wind, and can be distributed as a single executable file, no CAB, no installation projects, etc etc.
If I need any web or fancy data functionality, then it is .NET, because it is not worth the hassle of getting all this to work from levels lower down.
Having had lots of previous coding experience in C/C++ then C# is the natural choice, but as far as .NET is concerned, the actual language you code in is irrelevant. It compiles down to IL anyway and the CPU 'JIT' compiles this into its own code before it runs. Hence the performance hit when the program starts and runs.
In .NET, in essence, all you are doing anyway, is creating .NET objects, setting their properties and calling their methods, in order to get them to do what your application requires. A simplistic view, I know, but that's is all there is to it!
The language that you use to do this doesn't really matter, it is just personal preference.
I guess i assumed one language had more efficantcy than another. Like im working with VB atm, and i know it simplifies alot of things to make it easier to use, not sure if it includes all that extra code in the final build or not tho.
I would like to get more pratice with C++ and i have yet to use C# so dono whats different about that.
I would like to eventually start making programs that utilize the .net code and get my programs talking though data on the phone, but im not that advanced yet.
currently im still trying to wrap my head about making a program with a local database. The program im working on currently doesn't store any data, but i would like to to. I would also like (if i get ambitious) to have that program possibly talk to a PC (parent) program and sync with it. But that i think is a ways off.
Also, do the Mobile SDK's look different? The program im working on i started in the 5 SDK, but (obviously) doesnt have Finger friendly IU tools. I haven't looked at the 6/6.5 SDK yet (as id have to start over again i think). Does it have more finger friendly options?
In .NET CF, the finger-friendlinnes and kinetic scrolling and this all isn't available for all controls. Most of them (the classic ones) are, but if you try using scrolling for whole form, it won't work, only scrollbar will. (Probably with some playing with physicsengine and marshalling you might be able to get it working here, too).
In C++, there are numerous examples of this gestures etc directly in SDK, also many other stuff is there.
See, the main difference here is that .NET is fully equipped with stuff to get everything done fast, easy way.
In C++, you must first make this way yourself .
i am using the .net 3.5 framework tho.. Unless you mean C++ vs C#. I thought .net was an expansion on a current language, and not a language on it self (meaning i cant choose to program in .net, its an option to VB, C++ or C#)
I did toy with it, and it appears as tho your right, the forums are the same. IE drop down/combo boxes are not finger friendly. Guess id have to turn it to a button and another form with large radio button options.
C# vs C++ main difference is that C++ is compiled to native code right on first time, which makes it very fast. C# is compiled to MSIL, which is NOT native code yet. When you run c# app, the code is being Just-In-Time (JIT) compiled to native code, which makes it "longer" to load and "slower" to run (usually that makes about 20% of speeddown on classic PCs with very optimalized C++ same code - it probably already is lower, this is a bit older result of testing).
C# has those nice features that it can't get out of its memory etc, the JIT is almost unhackable, so you can't write viruses in it etc.
As far as the SDKs are concerned, there are slight differences from one version to the next but they can be quite difficult to spot.
They can become issues, when code written to run on one platform is run on one several generations away. I have a program that was written in C++ WM2003. Works under all versions of WM until 6.5.3, when the About Dialog box fails to close if the (X) button is pressed. Turns out another value has to be added to the dialogbox flags field to get it to behave properly.
This has been a feature of SDK's from WM 5.0 onwards, but the WM2003 SDK is unaware of it. You have to add it manually to the shell code created by the SDK,
Progress I suppose. The full article is here:
http://forum.xda-developers.com/showthread.php?t=635063
Treo 700xw Verizon Spanish language
Hello fellow .... I'm new to this forum
I have a Treo 700wx and I live in Mexico ...
My Treo is Verizon's company and is currently with the version 1.22 ...
My problem is that it is in English and I need to change the language in Spanish ...
Thank you for your support both the need
Greetings
stephj said:
As far as the SDKs are concerned, there are slight differences from one version to the next but they can be quite difficult to spot.
They can become issues, when code written to run on one platform is run on one several generations away. I have a program that was written in C++ WM2003. Works under all versions of WM until 6.5.3, when the About Dialog box fails to close if the (X) button is pressed. Turns out another value has to be added to the dialogbox flags field to get it to behave properly.
This has been a feature of SDK's from WM 5.0 onwards, but the WM2003 SDK is unaware of it. You have to add it manually to the shell code created by the SDK,
Progress I suppose. The full article is here:
http://forum.xda-developers.com/showthread.php?t=635063
Click to expand...
Click to collapse
I noticed something else odd. When i run the app on my pone, the resolution is off. Now everything looks ok, i just mean that when i run it on my phone, theirs alot of "white dead space" at the bottom. I can only guess this is due to the SDK's catered to phones with smaller screen resolutions (ie Touch Pro) with buttons.. Is their a way for me to switch the resolution to ultilize the full Touch Pro 2 screen size (480x320 i think)?
Funny you should mention that. I replied to a similar post a short while ago. I'm not going to type it all in again, it's here.
http://forum.xda-developers.com/showthread.php?t=637417

WP7 Apps Windows 7 Desktop

Could wp7 apps be unlocked to run on windows. They all run in silverlight right. Should it not be like a java app and run anywhere?
Interesting question. I think the developer would have little problem trying to recompile an app for Windows use (given Silverlight is already installed on the target PC), but XAPs are specifically compiled and signed for use on WP7 devices, and thus we can, at best, run them on a PC by deploying an extracted XAP on the Emulator.
kapanak said:
Interesting question. I think the developer would have little problem trying to recompile an app for Windows use (given Silverlight is already installed on the target PC), but XAPs are specifically compiled and signed for use on WP7 devices, and thus we can, at best, run them on a PC by deploying an extracted XAP on the Emulator.
Click to expand...
Click to collapse
If GAC constains required assemblies then it's possible. But it's useless (more than me )...
From what I seem to remember, when you compile for WP7 it compiles into Common Language Runtime. Its much like Java's bytecode but slightly different.
Assuming it does compile to CLR, apps should be able to run, so long as the needed frameworks exist.
windows 8 will do that
I suspect that Windows 8 will do just that. As Microsoft is planning to bring windows 8 to tablets with the Metro UI, i think wp7 apps will be really easy to run on windows 8, so they match the touch UI of the platform...
If you look at Game Chest: Logic Games, it contains a multiplayer game of Chess. If you challenge someone else to a game and they're not using a WP7 device, the notifications of game moves come through to them on xbox.com. When they click the notification, it actually fires up a version of Chess that is IDENTICAL to the one on my phone, in the browser. So it looks to me like they have done exactly what the OP is asking about, i.e. they have recompiled the game to run in silverlight under IE8.
It works brilliantly.

[Q] Develop Apps for Windows Mobile

I want to develop simple apps for Windows Mobile. I read that I can use:
---Compact Framemork. (I downloaded Sharp Develop, it is free. It also exist a program from Resco that speedup the development with C.F.)
--- C or C++ or C# (I don't know if WinMo understand these...)
---Visual Basic (is difficult and Visual Studio isn't free, but I found another program that allows to develop more simple)
---Mortscript (I think is the most simple)
---Which is the best and the most simple language?
---Where can I read or download tutorials?
---I can not develop simple apps with images and sounds yet.
Please Help!
I want to develop
-a lock screen
-an app that turn on and turn off the leds of my device
-an app that change registry values (without softreset the device)
-an app that can copy, cut and delete files
-a Soft Imput Panel (a virtual keyboard)
I haven't done windows mobile development in quite some time, so things may have changed a bit. But to help you out better, it would be good to know what version of windows you intend to develop for (I assume Windows Phone 7?) as well as any specific devices you may want to concentrate on, and what experience you already have with coding.
MortScript is probably a good starting point, though if you want to get some real functionality going, you should look at C#.net CF. Take a look at this MSDN resource: LINK. It should be good for getting started.
I think that for modifying the registry, working with LEDs, and for the software keyboard you may need to use C++ ... though I can be mistaken. I'm not sure how Microsoft has worked out libraries and privileges in WP7.
Cyclonezephyrxz7 said:
I haven't done windows mobile development in quite some time, so things may have changed a bit. But to help you out better, it would be good to know what version of windows you intend to develop for (I assume Windows Phone 7?) as well as any specific devices you may want to concentrate on, and what experience you already have with coding.
MortScript is probably a good starting point, though if you want to get some real functionality going, you should look at C#.net CF. Take a look at this MSDN resource: LINK. It should be good for getting started.
I think that for modifying the registry, working with LEDs, and for the software keyboard you may need to use C++ ... though I can be mistaken. I'm not sure how Microsoft has worked out libraries and privileges in WP7.
Click to expand...
Click to collapse
Thanks CycloneZephyrxz7.
I want to develop for Windows Mobile 6.X for devices with WVGA resolution.
But with Mortscript I can do less things? Because I can only write scripts.
Do you know how is written a simple app like "ClearTemp"?
I wait other replies from Devolpers and people that used these languages...

Categories

Resources