Run exe in WM - Touch HD Themes and Apps

Hi!
is it somehow possible to run exe file, that is for desktop windows, on WM6.1?
I was installing some software, and was unable to run keygen, until I reached my PC.
I'm using WM 6.1 on HTC HD.
Thanks

Perhaps you should describe what is keygen?

Keygen is some small executable file, that usually display graphical form and generates some numeric (or another) data on the output.

philous said:
is it somehow possible to run exe file, that is for desktop windows, on WM6.1? Thanks
Click to expand...
Click to collapse
Long story short: no. You can't just drop an application compiled for Win32 to WinMo and launch it. Even for .NET-stuff the loader-stub-thingamagic (can you tell I've got near to zero .NET-programming experience :-?) that passes the code to the runtime is for a different processor architechture. (and AFAIK XScale/ARM and x86 don't really match)
I guess it could be done with some really weird conditional PE-header wizardy (winmo uses the same kind of portable executable as win32, right?).
But more to the point, I thought discussing warez-related stuff on these boards wasn't ok
I'm sure someone with far more experience in WinMo-development will come along and correct me any minute

shisux said:
Long story short: no. You can't just drop an application compiled for Win32 to WinMo and launch it. Even for .NET-stuff the loader-stub-thingamagic (can you tell I've got near to zero .NET-programming experience :-?) that passes the code to the runtime is for a different processor architechture. (and AFAIK XScale/ARM and x86 don't really match)
I guess it could be done with some really weird conditional PE-header wizardy (winmo uses the same kind of portable executable as win32, right?).
But more to the point, I thought discussing warez-related stuff on these boards wasn't ok
I'm sure someone with far more experience in WinMo-development will come along and correct me any minute
Click to expand...
Click to collapse
well, yeah, I also didn't think that it's possible because of different processor architectures, but maybe somebody heard something about that..
Miracles happens
We are not discussing warez stuff, the question thesis is different.

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.

Windows Mobile Development: RAM Problem

Hey!
First of all: I know that there are many solutions to exactly this problem, but none of them works...
I am currenty working on an Windows Mobile 6.1 professional Application with Visual Studio 2005 Standard Edition in c#. My mobile is a Samsung Omnia i900. Additionally i use the Windows Mobile SDK 6 professional.
My Problem: the app seems to get not enough memory for executation. If i load a large image (2mb) i get an "OutOfMemory"-Exception. Weird: if i run the app via Visual Studio (Deploy on Device) i cant load even pretty small images. When i start the app on the device, i can load bigger images, but i need to load images of 2 mb and that doesnt work either way! This application will get pretty large so i was wondering how this can work, when i only got 1-2 mb ram, even though the mobile tells me that there more than 50 mf ram free to use.
i know that you can free ram of older images, when i dont need em anymore with dispose() but i even fail to load one image, if its big enough.
i also tried the OpenNetCF, didnt work either!
this really drives me crazy as im looking for solutions for the last few days, nothing works! i mean, how can i create a biger app, if i only have 2 mb or Ram to run it in??
please please help!
Michael
P.S.: as i am pretty new to visual studio, i have another tiny question: i added some references (DLLs) to the project, that i do not need anymore! how can i remove those references? cannot find the command *too stupid*
Do you know if you're using DirectDraw in those .NET wrappers?
Windows Mobile powered devices have a graphical memory limit, which no one can do anything about :S
If you use GDI (slower, not hardware accelerated imaging API) I think you'll have less problems.
I work with native code, so I'm not sure you can make those choices using .NET, nor if this is your actual problem.
hey and thanks for responding!
well, as you say im not sure if i am using it! i use the normal System.Drawing Stuff. When i load a picuter i use Image i = new Bitmap(path) or paint with graphics.drawImage, either way the memory overflows! this is driving me crazy
Can you try developing this using native code?
well isnt that extremely complicated? i am quite new to that stuff, so i am horrorfied to even think about writing this in native code!
well i could give it a try, do you know some good tutorials for that? i can code a little java, delphi, haskell, prolog and C#, but all of these are pretty far away from machine language ,so native coding would be pretty hard for me!
Ahah it seems you're under the impression native code = Binary?
Native code, as opposed to Managed Code (C#, VB) is simply running C or C++, without the .NET sandbox around.
Maybe it's too much for now. I can't help with C# or VB, but I advise you to search for GDI and DirectDraw calls on Managed Code and see what you're using.
hehe, i was already wondering, what kind of dude you are, coding in machine language (that was my translation given by google). Ok, i think i can do some stuff in c++. Do i have to tell my visual studio explicitly not to use the .NET-framework when i start a C++ Mobile Device Project or is that the default configuration? sorry im really new to that, used to code in eclipse...
mhmpf! i like that wysiwyg stuff from c#, damn...
but thanks so far!
anybody else got any ideas? i mean it has to be possible... if not, ill try some c++
I suggest you just head over to MSDN.com and check what exactly those functions do. There's no point in learning "Windows driven" C++ if the problem rests in other place.
I'm almost sure there are GDI calls for .NET. I merely wanted you to try them!
hey, i am afraid i am already using the GDI-calls! Found several tutorials, which show how to load an image, exactly like i did it.
That's not good.
I must ask, why do you want 2mb images?
its a navigation-like software, and i need to load the complete image to be able to scroll smoothly through it! for the moment it works as i changed the image into a 600kb one... but im afraid, as the application gets bigger even those 600kb could be too much.when i implemented the other logics like routing and points of interest on the map, i think that will exceed those (apparently only) 2mb ram-space i have...
Sepplo said:
its a navigation-like software, and i need to load the complete image to be able to scroll smoothly through it! for the moment it works as i changed the image into a 600kb one... but im afraid, as the application gets bigger even those 600kb could be too much.when i implemented the other logics like routing and points of interest on the map, i think that will exceed those (apparently only) 2mb ram-space i have...
Click to expand...
Click to collapse
I think it's best to buffer the current position's image and the neighboring ones. When the position changes you automatically show the pre-buffered neighbor, free the previous ones and load the next. If there's a sudden change by a lot, you'll just say "loading" and buffer the new far away position with its neighbors.
Don't try to have the complete "maps" always fully available.
but when the application gets bigger (other things too come), im almost sure i will need more than 1,5mb ram, besides: if i just load parts of the picture, i need to make more changes on the MouseMove-Event, Scrolling will get laggy with that :/
(by the way, thanks a lot for helping me, i appreciate it very much!!)
No, it can be done, buffering is essential in graphical intensive applications on Windows Mobile... You have to keep in memory what you are displaying and the next probable ones
No problem, it's what we're here for
Try writing the code that loads the images in a seperate assembly (dll) and call that from the main exe.
Ta
Dave
Sepplo said:
My Problem: the app seems to get not enough memory for executation. If i load a large image (2mb) i get an "OutOfMemory"-Exception.
Click to expand...
Click to collapse
What kind of image is it? Remember that many image formats are compressed, so doing stuff with em takes more memory than you'd realize.
godefroi said:
What kind of image is it? Remember that many image formats are compressed, so doing stuff with em takes more memory than you'd realize.
Click to expand...
Click to collapse
How big is the image as a Bitmap (ie a .bmp) - this will tell you how much RAM it requires to load (plus overheads for the object)
Its probably best if you take the Google\Bing maps approach and split it into a number of smaller images and load\unload each one as you need it
TehPenguin said:
How big is the image as a Bitmap (ie a .bmp) - this will tell you how much RAM it requires to load (plus overheads for the object)
Its probably best if you take the Google\Bing maps approach and split it into a number of smaller images and load\unload each one as you need it
Click to expand...
Click to collapse
That's what I suggested, but he seems reluctant in buffering only the active and neighboring parts... I don't see any other way here =/
you guys were absolutely right! i knew before that jpeg is a compressed format, but the bmp is actually around 13mb big, that is really too much. Well i really will have to split the image. but thus week i have no time, due to another paper i have to write...
last question: what would be the best approach here?
1. one big panel and draw the images at the right position? (seems not good to me, cause i would have to repaint the panel with all images over and over again)
2. different panels to paint the pieces in?
3. different picture boxes to load the images into?
thanks very much for your help!
Sepplo said:
you guys were absolutely right! i knew before that jpeg is a compressed format, but the bmp is actually around 13mb big, that is really too much. Well i really will have to split the image. but thus week i have no time, due to another paper i have to write...
last question: what would be the best approach here?
1. one big panel and draw the images at the right position? (seems not good to me, cause i would have to repaint the panel with all images over and over again)
2. different panels to paint the pieces in?
3. different picture boxes to load the images into?
thanks very much for your help!
Click to expand...
Click to collapse
What do you mean by 'panel'?

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

Porting application to work with windows mobile

I really want to port a small tool to be able to run my magic jack on my HD2. There is a really small and simple tool called MJMD5 that allows you to use your magicjack with any SIP client.
I have the source code for linux, possibly it can be compiled using cygwin for the HD2?
ftp://ftp.bauer-power.net/misc/magicjack/mjproxy.c.tgz
Also, there is a tool that works with windows, but there is a incompatibility with the GUI that isnt allowing it to run on my HD2, a small tweak should fix it.
ftp://ftp.bauer-power.net/misc/magicjack/MJMD5.zip
I am completely new to mobile software development so I hope someone could help me get this working!
Thanks
Is nobody willing to even put me in the right direction?
The source code is for a linux console app; you can't port that easily to WM GUI. You'd need the source code of the Windows exe. To my knowledge, there is no Cygwin version for WinCE yet, or were you referring to cegcc?! It could probably be ported as a console app anyway, but I assume that you want the GUI.
And using a console on the HD2 is somewhat problematic, as the OS has console debug output. I would not recommend that for user programs.
Yeah, I am referring to cegcc. I am not too concerned about the GUI, I just need the functionality, and this program doesnt really need a console, but just needs to be run with certain parameters which is possible with WinCE. So, does anyone know how to compile it for windows mobile?
I appreciate any help.
kkroo said:
Yeah, I am referring to cegcc..
Click to expand...
Click to collapse
OK; I'm reasonably sure that it can be ported with either cegcc or celib. I'd probably do it with celib. I have adapted celib to work with PocketConsole. I just tested my port of perl 5.8.8 on the HD2, and socket/internet functionality seems OK.
kkroo said:
I am not too concerned about the GUI, I just need the functionality, and this program doesnt really need a console, but just needs to be run with certain parameters which is possible with WinCE. So, does anyone know how to compile it for windows mobile?.
Click to expand...
Click to collapse
About the Windows exe, it appears to be a .NET assembly. But it may not run on Windows Mobile because it is for the desktop Framework, and not the Compact Framework. .NET assemblies can be decompiled, however. Maybe that can help you too.
I don't have this MagicJack, but from what I read about it on the internet, I doubt that it can be used with Windows CE at all if you want to plug it into the HD2 directly, and the USB connector may be different as well. I don't know if that's what you want. Depending on how it communicates with its host, you may even need a driver for it. I think that the HD2 has USB OTG, but it may still not work without a driver. I would find that out first.
In terms of recompiling it, I am pretty sure it will work. Sorry but I am a bit of a novice at this, but how would I do either compiling option?
Thanks
I would use Dis# for decompiling; I just tried to decompile the exe, and that seemed to succeed. No guarantees though; not at all tested. You can have Dis# put the source files and project files in a subdirectory. Then I'd use VS2008 for compiling.
A quick test showed that the IniFile class of this program imports unmanaged functions from kernel32, which is not present on WM. The functions are GetPrivateProfileString and WritePrivateProfileString. I don't think that coredll has them, so porting would probably not be easy. This is a known porting issue; not very severe, but it's only the start. I think that ini files are regarded as legacy by Microsoft. The registry is used for settings.
The most logical thing would seem to me to contact the developer to write a CE version if the device works with generic CE USB drivers. And then you'd still have the connector problem, and possibly even an incompatible interface; I don't know how HTC implemented the USB port. This is assuming that you want to plug it into the HD2 directly. You are not clear about that, so I can't be more specific either.
http://netdecompiler.com/download.html

WM sound generating question

Hi people!
I'm working on an emulator for WM platform. 95% of job is finished fine but I have a problem which I don't know how to solve.
Namely, I need to convert a small fragment of x86 code into ARM equivalent.
here it is:
Code:
__asm in al,61;
__asm and al,0xFC;
__asm mov BYTE PTR speaker,al;
and this one:
Code:
__asm mov al,BYTE PTR port
__asm shl al,1
__asm and al,2
__asm or al,BYTE PTR speaker
__asm out 0x61,al
This code is working with PC's 8253 timer chip and its 61h port. As the result we get sounds from beeper.
It is not a secret that WM devices don't have beeper
Does anybody know how to get sound from WM device which would emulate PC's beeper? I know that this question is not easy one but I hope that someone could help me.
A big thanks in advance.
You may have to do it from a much higher level by calling PlaySound() with a .wav resource of the sound you want.
http://msdn.microsoft.com/en-us/library/aa909766.aspx
I dont think you can get to the underlying hardware that easily.
By fiddling with the sound chip registers, it was possible to alter the frequency of the PC beep. Using PlaySound() this is not possible, you would need a separate wav file for each note.
Thank you, stephj for your answer
As you know, much higher level means, much slower execution A bad thing for emulation. Yes, I knew for this function but I hope that somebody could suggest something more faster.
I've tried with google to find anything about this topic and I found some articles from PocketPC (and even before) era but nothing more concrete. According to that articles, it is possible to emulate beeper on PPC but I couldn't find any code which talks about that.
I suggest that you go ask over at stack overflow, and I'm sure that you'll get your question answered in no time
It isn't a problem to ask but it is a big problem to get a good answer .
Not so many ppl understand low-level programming at all.
I still can't understand why PPC/WM programming is so poorly covered if we know that this platform exists for a very long time. It is almost impossible to find some article how to implement ARM mc in your programs.
Goshx said:
It isn't a problem to ask but it is a big problem to get a good answer .
Not so many ppl understand low-level programming at all.
I still can't understand why PPC/WM programming is so poorly covered if we know that this platform exists for a very long time. It is almost impossible to find some article how to implement ARM mc in your programs.
Click to expand...
Click to collapse
stack overflow contains the best of programmers
and I know, I wish I can learn low level programming some time in the future, stupid .Net and Java made everything so simple and stupid lol
Have a read of this: -
http://blogs.msdn.com/b/medmedia/archive/2007/01/03/windows-ce-audio-driver-samples.aspx
Your attention is drawn to the following sentence in the second paragraph.
That upper-edge is hardware independent, and all the hardware dependent code goes into the driver.
Click to expand...
Click to collapse
There are that many different audio chipsets in WM devices, that only the sound driver knows how it really works and where it actually lives. It presents a standard interface to WM above it. If you did manage to find the port/memory addresses that map to the sound chip in your device, and managed to write some code that could force a sound out of it, it probably would not work on anything else.
thank you, stephj
I'm analyzing now some emulators to check how this problem is solved there. In any case, it is impossible to produce beep sound writing a value into registers which don't exist on WM platform
Unfortunately, a small piece of x86 code should be translated into a large C code with APIs.

Categories

Resources