Program not opening on device

jschuchert

Active Member
Licensed User
Longtime User
Here are the steps I have taken:

Wrote code
compiled (Optimized) for Device
the resulting exe opens and runs fine
used setupbuilder and ezsetup
copied cab file into device with Windows Mobile Device Center
also used the 'setup.exe program created
tapped the program on device but nothing happens
tried several times on Dell Axim X30 and Ipaq 4500 series
using Windows 7

Thanks for any ideas.

Jim
 
Last edited:

jschuchert

Active Member
Licensed User
Longtime User
Hi Mike,

Guess I wasn't very clear. I meant that I created a <myfile>setup.exe file on the pc with 'ezsetup' and executed it from the PC to install the necessary files on the device. I also installed each of the a cab files. Some text files were included in the installation that opened on the device without a problem. It is just the program file itself that won't open. Soft resetting didn't help. I'll keep trying. Thanks for your help.

Jim
 

jschuchert

Active Member
Licensed User
Longtime User
Hi Erel,

Thanks for your response. Yes, I tried that, too, but without success. I think I will take a couple of the samples and see it they will install and open. I will post the results. Incidentally, before I installed the program 'exe' to the device with Windows Mobile Device Center, it said "Your device may not be able to play or view this file". When I tap the program on the device, the icon goes gray. The program file created through the compile feature runs good on the desktop.

Jim
 

jschuchert

Active Member
Licensed User
Longtime User
As a follow-up, I compiled the "Accounts" sample program, installed it on my device but it, too, will not open. Since I am writing my app to be distributed, this is a serious issue and I must get it resolved before going much further. I was able to open my application on the emulator but it gave some intermittent errors. So far, the program opens and runs faithfully from the IDE.

Jim
 

jschuchert

Active Member
Licensed User
Longtime User

Problem solved. I know now what was wrong. I finally got it to work on the Ipaq but not on the Dell Axim, even after a hard reset. So I compiled WITHOUT OPTIMIZING and now it opens on the Axim. It is a Mobile 2003 OS Second edition device as is the other one but I can't explain why it works on one but not the other. This probably means that I will have to compile unoptimized to satisfy all the units out there or ask which device they have prior to distributing to them OR make it BOTH ways and let them decide. In any case, I appreciate the responses I got as well as those who read the post and may come back for answers, themselves. Thanks everybody.

Jim
 

agraham

Expert
Licensed User
Longtime User
Optimised compilation requires Compact Framework 2.0 to be installed on the device for the exe to run. Non-optimised compilation only requires Compact Framework 1.0 which I think is in ROM on WM2003 devices although you should install the SP3 update for reliable execution. CF 2.0 is a separate install. I recommend that you use optimised compilation, the execution speed is way faster than non-optimised.

Basic4ppc - Windows Mobile programming and Pocket PC Development has a link to the Compact Framework SP2 installer, the second one down.
 

jschuchert

Active Member
Licensed User
Longtime User
Thanks agraham for the information. I had already installed the compact framework 2.0 to my PC after getting error messages during compilation and before the problem I posted. How do I get it on the device?

Jim
 

jschuchert

Active Member
Licensed User
Longtime User
agraham,

Nothing in WMDC as you said but I re-installed NETCFSetupv2.msi with the device in its cradle and it seemed to do the trick. Thanks again. You guys are awesome. Incidentally, the compiler chokes when I have more than 3 arguments in a sub and I have several subs like that. Is there any easy way around that? It will be a major pain to crawl through the code making changes. Maybe somewhere in B4P's documentation it warned of that but I didn't see it. My bad!

Jim

Jim
 

agraham

Expert
Licensed User
Longtime User
Nothing in WMDC as you said
Are you sure? It is present for me on my Vista system but a bit buried under Programs and Services -> More -> Add/Remove programs. I use it if I have to reload my WM2003 device after a hard reset.
the compiler chokes when I have more than 3 arguments in a sub and I have several subs like that.
The only 3 parameter limitation that I can think of is that you can't use CallSub on Subs with more than 3 parameters in an optimised compiled app. This is documented under Help -> Main Help -> Keywords -> Runtime control manipulation-> CallSub
 

jschuchert

Active Member
Licensed User
Longtime User
This is getting embarrassing :sign0013: You are correct again and I apologize for wasting your time. That 'more...' gets by me on other things, too, but there it was big as life. Here I thought I had to use 'Call Sub' each time I called one. You cleared that up and now I will not worry about it since I don't have any dynamically called subs...yet. Thank you so much for being around on a Sunday to keep those like me out of trouble. I should be in church but don't want to spread a cold I have.

Jim
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…