[Q] newbie help with framework and cab files - Windows Mobile Software Development

Hello xda developers...
First-time poster.
Advanced Beginner/Intermediate programmer attempting first Windows Mobile app.
Got a deal on a t-mobile dash off ebay and am trying to create an application or two for it for personal use.
Problem: Getting a simple program written in c# to run on a t-mobile dash.
Question: How does one create a .cab file?
I've been doing research online and windows website doesn't mention .cab at all. Some discussions i've found said it's impossible. confused.
Back Story:
The Test Application: a text box, listbox and two buttons (one adds entry in text box to list box. the other button clears items from list).
Running Visual Studio 2008 on Vista (business? not the stunted home version).
Programming in C#. For a T-Mobile Dash (HTC Excalibur?)... running windows mobile 6.x.
I coded a simple app just to see if I could get something functioning on my phone. The emulator was windows 5 (which seemed okay. all 3rd-party apps i've used are windows 5. work fine).
App ran fine in emulator; however, when I copied the .exe to phone and ran, it said the framework was too new (which seemed odd going from windows mobile 5 emulation to windows mobile 6 os).
IS root problem from .exe file (where I need .cab?)
Any advice, website links or anything would be gratefully appreciated.
Thanks all!

First of all what version of the .NET CF framework is running on the real device?
Run \WINDOWS\CGACUTIL.EXE
A popup window reports which version(s) are installed.
This is of the form [Major.Minor.Build.0]
Eg [2.0.7045.0] is .NET CF 2.0 and [3.5.9198.0] is .NET CF 3.5
If the version of .NET CF for which you have built the app, is the same as that on the device, the exe should run fine. You do not need a cab, copy the release .exe straight to the device.
Otherwise, there are two options,
1) Install the .NET CF version required on the device.
2) Change the .NET CF in the VS2008 build. This is not always easy as it it is usually selected when you create the project. See attached.
2a) It might be easier creating a new project against the correct .NET CF and the copy the old source files over.
If it lets you change the framework, you will find it in the Application side tab of the Properties of your project, (Project, not Solution). If the "Target Framework:" drop down box is greyed out, see the second image, you are stuck with 2a) above.

Related

Virtual PPC

I ran across Windows Mobile SDK and some emulators/images of WM6.1 on microsoft's website and when i ran it, it comes up on the screen as if it were a real ppc, allowing me to install cabs and have them function and all. I can't get the program to allow me to change the BIN it uses as the image. If this could be figured out, could this be used to test ROMs before flashing (I want to get into cooking)?
i dont not believe the emulator support real roms as it dont deal with drivers and other hardware related issues at all
it also comes as standalone so people dont need to install the sdk

RUUwrapper error please help

uber noob here
just got my htc hermes 100, wanting to update to WM6 (from 5) follow all the steps in page 1, did two things
save the RUUwrapper an that NBH file to my pc, while my phone is sync tried running the file and got error msg (the application failed to initialize properly (0xc0000135)
one last thing i did was copied both files in my phone and run it, got this msg this time (thid spplication (ruuwraper.exe)requires newwr version of ms.net etc)i'm lost, i know this is the 1st step i need to do to make it a WM6 ryt?
Hi...read mrvanx's guide before flashing:
http://forum.xda-developers.com/showthread.php?t=299462
You must to put hardspl on FIRST! U need to install NETCF on your PC. Do not put the ruu or rom files on your PPC and run them. Take Care
lordaxel said:
uber noob here
just got my htc hermes 100, wanting to update to WM6 (from 5) follow all the steps in page 1, did two things
save the RUUwrapper an that NBH file to my pc, while my phone is sync tried running the file and got error msg (the application failed to initialize properly (0xc0000135)
one last thing i did was copied both files in my phone and run it, got this msg this time (thid spplication (ruuwraper.exe)requires newwr version of ms.net etc)i'm lost, i know this is the 1st step i need to do to make it a WM6 ryt?
Click to expand...
Click to collapse
You forgotten one step. Please read the wiki on upgrading
i've just installed NETCF on my pc,copied the RUU_signed.nbh and RUUWrapper on a folder on my desktop (PC) and run the RUUWrapper file while my phone is sync to my PC and get this error ( the appilication failed to initialize properly (0xc0000135) .click on OK to terminate the application)
im not sure what to do next, this is the 1st step and i keep on getting errors, em i doing something wrong? please help!!!
lordaxel said:
i've just installed NETCF on my pc,copied the RUU_signed.nbh and RUUWrapper on a folder on my desktop (PC) and run the RUUWrapper file while my phone is sync to my PC and get this error ( the appilication failed to initialize properly (0xc0000135) .click on OK to terminate the application)
im not sure what to do next, this is the 1st step and i keep on getting errors, em i doing something wrong? please help!!!
Click to expand...
Click to collapse
Let mrvanx hold your hand READ!!
http://www.mrvanx.org/thg/ <------ cLIck hErE
OK I'll happily admit to being a NOOB as well but I have had exactly the same issue and I don't think (and I read the guides many times!) that the answer is there. So it is not helping simply endlessly pointing to the guides (helpful though they are).
The point seems to be that you need the Microsoft 2.0 .NET framework installed on your PC (i.e. the computer not the phone) rather than the NETCF mentioned above.
I think (assuming that I am right!) it would be great to add this clearly to the guide ("Make sure sure your computer has Microsoft .NET 2.0 Installed") preferably with a link to the Microsoft download site for .NET as well.
eliseman said:
OK I'll happily admit to being a NOOB as well but I have had exactly the same issue and I don't think (and I read the guides many times!) that the answer is there. So it is not helping simply endlessly pointing to the guides (helpful though they are).
The point seems to be that you need the Microsoft 2.0 .NET framework installed on your PC (i.e. the computer not the phone) rather than the NETCF mentioned above.
I think (assuming that I am right!) it would be great to add this clearly to the guide ("Make sure sure your computer has Microsoft .NET 2.0 Installed") preferably with a link to the Microsoft download site for .NET as well.
Click to expand...
Click to collapse
I once was a noob too, this is three months ago, and I had spent days on reading up before I did my first flash. The wiki is there just for that! hmm, also with .net framework, you'll be surprise how many software these days that will run WITHOUT them installed.
Hi . I had same problem with my 3 PCs. I downloaded latest version of .NET framework from microsoft site & reinstalled it & WOW.. it started..
zocster said:
I once was a noob too, this is three months ago, and I had spent days on reading up before I did my first flash. The wiki is there just for that! hmm, also with .net framework, you'll be surprise how many software these days that will run WITHOUT them installed.
Click to expand...
Click to collapse
.Net Framwork is required ONLY by software that is written directly for it and does NOT include the required DLLs in the app itself...which is most. C# is one language that you MUST have the framwork installed most of the time. Very few people want to include the DLLs because people SHOULD have the .Net Framework installed anywas.
This thread was very useful by the way. I'd come across this problem today and it's helped me to solve it. I'm sure any noobs (like myself) will find this thread useful in future.
Just wanted to add one thing, RUUWrapper was crashing on me as well.....
You cannot run this from a network drive! Has to be ran from a local drive, or it crashes...heh (I have a main file server setup over gigabit)
If you've read up then you have Hard SPL installed. That means you can bypass the computer for the flashing. You can use the sd card method. I believe its safer and doesn't have those niggly little sync errors and there's less chance of the phone crashing/being reset or powered off. Recommended if you flash the radio rom where a simple problem results in a permanent brick.
Cheers...

Starting custom executables in phone

One way to start custom executabled in windows phone 7 is following method:
1) create a exe file that runs in phone
2) create a zip file and put exe inside
3) upload zip file to some internetpage and create .html page for it with <a href.. link for it.
4) navigate to the page with phone IE.
5) when clicking the link the phone can open the zip file and display its contents (tap to open the file ...zip)
6) when clicking the .exe file the phone asks are you sure you want to run
(The program ...exe is from an unknown publisher. Running it could harm your phone. Do you want to continue?)
7)enjoy your homebrews
will this also work on a phone that isn't developer unlocked ?
if that is right than this is the ultimate way to jailbreak a wp7 phone
Never-mind
Nope, he isn't, and described above method works (I guess because of MS ZipView executable bug). But I can't get my apps running, probably because they are not compatible with CE 7.0 and WP7 .Net (I've tried CE 6.0 native code and .NET code).
sensboston said:
Nope, he isn't, and described above method works (I guess because of MS ZipView executable bug). But I can't get my apps running, probably because they are not compatible with CE 7.0 and WP7 .Net (I've tried CE 6.0 native code and .NET code).
Click to expand...
Click to collapse
is your phone developer unlocked ?
Yes, unlocked.
sensboston said:
Yes, unlocked.
Click to expand...
Click to collapse
**** bummer , do you have a web link to that test file of yours then I can try it my phone is locked
xttp://home.comcast.net/~sergsv/
There are two links to zip archives at the left top corner of the page. I can't run these files but MS zip archiver open these zips and asked to run
yes man this is working on a locked phone
now we need some code that works to test this
lets say an .exe that run the file explorer
yes. right now we don't know whether the apps are opened at all. Are the managed Apps in VS compiled into an exe? Maybe we could extract one from an xap for testing purposes...
Silverlight XAPs use XAMLs and DLLs, no EXEs involved I'm afraid.
Hmm yes you're right. Are there extracted executables from the leaked Mondrian ROM?
There are, but they are not GUI apps, they look mainly like command line executables provided by Qualcomm, and some of them look like they could mess up your phone if you don't know what you're doing.
There are some GUI apps, but they come disassembled. I've been trying to assemble them but haven't had much luck yet.
Neat. I shall put together a sample application to test this. (I have Visual Studio 2010 configured to pump out CE7 native executables.)
I think the executable run is blocked. They left typical MS (say - stupid) dialog box but, I believe, ignore the user input...
However the Word and Excel documents can be opened this way.
I tried a few things -- rebooting the phone, crashing the program with invalid pointers, and launching some known executables. Nothing. I even signed my executable with a valid certificate; It still claims unknown publisher.
Wonder if this is some left over dialog as mentioned by sensboston
WithinRafael said:
I tried a few things -- rebooting the phone, crashing the program with invalid pointers, and launching some known executables. Nothing. I even signed my executable with a valid certificate; It still claims unknown publisher.
Wonder if this is some left over dialog as mentioned by sensboston
Click to expand...
Click to collapse
The dialog will be hidden by the shell. You need to add your cert into the phone, email it, resign your app and try it again.
It's possible it'll work.
this will only work with MSFT signed exe's.
walshieau said:
this will only work with MSFT signed exe's.
Click to expand...
Click to collapse
I tried with both my signed executable (with Root CA cert installed) and a Microsoft executable. Neither show signs of execution.

[PROJ] Prescription Medicines Manager v0.9.0 17-03-2011

This app is designed so that you can keep track of any medications you take on a regular basis.
When you last ordered a particular drug, how many you currently have to hand, which surgery the repeat was requested from and which pharmacy filled the prescription.
It is designed to be used for multiple patients, surgeries, pharmacies and doctors.
It was initially an Access database but I thought that migrating it to my PPC was a challenge I might be able to complete.
There will also be the ability to log doctor's appointments as well, hopefully.
All data is currently stored in an SQL-CE database.
For reasons I am currently trying to solve, when you open any secondary form with a data table and then return to the main menu you are unable to go back into any other form again.
Changed to a tabbed layout, screen shots attached.
09/02/2011
New version attached with new format SQLCE.
17-Mar-2011
Latest version attached
All data entry and editing working - I hope.
08-Apr-2011
Latest version, autoscroll and popup SIP.
Possible dependant files.
I am coding for CF2.
[Reserved] - For Comments
deedee said:
[PROJ] Prescription Medicines Manager
...medications you take on a regular basis.
When you last ordered a particular drug, how many you currently have to hand, which surgery the repeat was requested from and which pharmacy filled the prescription...
Click to expand...
Click to collapse
Thank you!
These records can be life-saving if you have them with you at the right time. I have tried many systems of keeping track, but rarely managed to have anywhere close to this much information on hand.
I have not had time to try it out properly so I do not yet have any comments or suggestions. For now, I just wanted to say THANKS!
Glad it's going to be if use to someone.
Hopefully by the end of tonight I will have a new version up with the ability to add records to each of the tables. No interlinking yet and at the moment editing is also broken but I am getting there.
deedee said:
Glad it's going to be if use to someone.
Hopefully by the end of tonight I will have a new version up with the ability to add records to each of the tables. No interlinking yet and at the moment editing is also broken but I am getting there.
Click to expand...
Click to collapse
Don't feel rushed on my account. It's great that you're interested in this project, whenever you finish will be soon enough.
Meanwhile, I'll play with it and start planning how to "feed" it my information.
Have you considered some sort of encryption? It just occurred to me that it will hold a lot of very personal information.
Again, thank you.
deedee said:
...at the moment editing is also broken...
Click to expand...
Click to collapse
I know next to nothing about programming, but would the PC editor you wrote for the W Watcher calc work for this project? That might make it easier for the user to input the information AND save you some programming...
(BTW: I was very impressed with how quickly you developed those applications! Very usable and no charge for fast delivery!)
Jesterfell said:
I know next to nothing about programming, but would the PC editor you wrote for the W Watcher calc work for this project? That might make it easier for the user to input the information AND save you some programming...
(BTW: I was very impressed with how quickly you developed those applications! Very usable and no charge for fast delivery!)
Click to expand...
Click to collapse
Unfortunately the WW editor is designed for an XML file and this app keeps everything in an SQLCE database. I am trying to find a nice, useable and, more importantly, free desktop app to edit these files and am trying a couple out at present.
While a purely PC based editor would be easier from a WM coding point it would stop the app being completely mobile and standalone.
New version added to post 1.
You can now add records.
For desktop managemnent try
SQLCE Desktop Manager
FlyHoward SDF viewer
Neither of these seem to be free though the second one does have a 14 day trial.
deedee said:
... While a purely PC based editor would be easier from a WM coding point it would stop the app being completely mobile and standalone...
Click to expand...
Click to collapse
Of course!
Sorry, I got tunnel vision and forgot the project's purpose.
What am I missing?
I have been unable to run Prescription Medicines Manager on my HTC 8925 (Kaiser) with WM 6.5.x.
When I run the EXE all that happens is that the WM wait animation plays indefinitely until I switch to another application.
Since I play with this phone a lot, I hard reset it to clear any lingering results of my modding (it's a spare phone, so no great loss). Before installing other programs, I ran PMM again, but the same thing happened.
I got the same results with an even older HTC phone running WM 6.1.
SQL desktop applications
I found some free SQL desktop apps. I was only able to get one, SdfBrowser, to read MedicalRecords.sdf and all it allowed was viewing the structure and creating a query.
I'll keep looking, but I agree with you that being totally portable is very important for this project.
LINKS: SdfBrowser --- Resources link
Jesterfell said:
I have been unable to run Prescription Medicines Manager on my HTC 8925 (Kaiser) with WM 6.5.x.
When I run the EXE all that happens is that the WM wait animation plays indefinitely until I switch to another application.
Since I play with this phone a lot, I hard reset it to clear any lingering results of my modding (it's a spare phone, so no great loss). Before installing other programs, I ran PMM again, but the same thing happened.
I got the same results with an even older HTC phone running WM 6.1.
Click to expand...
Click to collapse
Completely forgot to say, you will need to install SQL CE on your HTC.
I do not usually resort to smileys, but my lack of knowledge is frustrating!
deedee said:
Completely forgot to say, you will need to install SQL CE on your HTC.
Click to expand...
Click to collapse
I installed SQL CE with no errors but got the same lack of results. The phone did become VERY sluggish and Task Manager still showed "prjMedicalRecords" running as a process.
Does prjMedicalRecords.exe need to be installed?
I just executed it from the SD card, and then tried it from the device memory. I placed MedicalRecords.sdf in the same directory each time.
Update: After about 5 min of the WM wait animation spinning, got the following error message:
"File or assembly name 'System.Data.SqlServerCe,Version 3.0.3600.0, Culture=neutral, PublicKeyToken=3BE235DF1C8D2AD3', or one of its dependencies, was not found."
I opened the SQL CE .CAB file and it DOES contain "system.data.sqlserverce.dll" it is meant to be installed to "%InstallDir%" and the rest of the DLLs go to "%InstallDir%\v3.5". I used file explorer to look in those directories (%InstallDir%="Microsoft SQL Server Compact Edition") but did NOT find "system.data.sqlserverce.dll" in either dir.
I copied the DLL to "%InstallDir%\v3.5" and ran the program again. The same results occurred.
After soft reset, copied the DLL to "%InstallDir%" and ran PMM again. The same thing happened, long wait, then error msg.
I am falling asleep now, but will try re-installing .NET 3.5 and running PMM again. I'll let you know what happens.
I had gotten the same error before installing SQL CE but did not connect the error to PMM so I ignored it. This time nothing else was happening on the phone.
Apologies for not giving the initial steps, I am new to development and forget others need to be given the assumptions.
SQLCE needs to be installed, as you have done. PMM is just an exe, copy it to the device.
PMM and the SDF file need to be placed in \Program Files\prjMedicalRecords on the device itself. At the moment this location is hard coded and is on my list of things to do to make it "moveable". HTH
New version in post 1 that is now independent of location, just make sure both exe and SDf are in thhe same place.
deedee said:
New version in post 1 that is now independent of location, just make sure both exe and SDf are in thhe same place.
Click to expand...
Click to collapse
Sorry, Deedee. It still does the same thing.
.1. I put both files in device memory (just in case): \Program Files\prjMedicalRecords\
.2. Tried to re-install NET framework 3.5--it refused to install in either device or card memory, saying the same version was already in ROM.
.3. Re-installed sqlceppcwce5armv4i.cab
.4. Ran prjMedicalRecords.exe
After the same delay, it gave the same error.
It also gave a NET error that, because of the delay between program launch and errors, I did not associate with Medical Records before, but it only occurs after I have launched prjMedicalRecords.exe:
"The application failed to load required components. If the .NET Compact Framework is installed on a storage card, please ensure that this card is in place and launch the application again. If this fails, a re-installation of .NET compact Framework is recommended. Support info: -2147483643 (80000005)"​
Thank you for your continued interest.
Not sure what the error is pointing to but I am coding for .Net CF v2, CAB in post 2, try installing this.
OK, finally tried this on a virgin device, without using the "debug" option in VS2005 to copy the files and discovered that .NET CF2, along with SQLCE 3 and SQL CE 3 replication is needed.
All CABs are in post 2.
There is a new version hopefully out this weekend with the ability to log patient medications and doctors appointments.
Editing is still on the road map, as is deletion.
New version in post #1, CAB format as well.
Make sure all the dependencies are installed, for me this has been .NET CF2 and the SQLCE cabs.
There are bugs I am aware of but please list anything and everything. As this is my first real App any feedback is welcome.

Windows 10 on Surface RT : additional apps + WPF support

Thanks to the help of this forum, I have successfully installed Windows 10 on my Tablet Surface RT 1.
I was wondering 1) if there were additional applications to install somewhere else than the store and 2) how to get support of WPF (which appears not to be the case by default).
Below some of my findings.
Installation of recompiled applications
On page https://forum.xda-developers.com/showthread.php?t=2092348, GoodDayToDie did the great job of collecting several apps recompiled for Windows RT (work done between 2013 and 2015). I tried Notepad++, but I encountered a "missing DLL" error.
I solved this issue by installing vcredist_arm.exe from https://www.microsoft.com/en-US/download/details.aspx?id=30679
It contains the C libraries used by the cross-compilation process. I have made Notepad++ and prboom (a Doom equivalent) to work. Qupzilla (browser) also technically works but does not support https, so makes it pretty useless.
Support of WPF
The Windows 10 ARM version apparently does not support WPF. I tried the procedure described on page https://forum.xda-developers.com/windows-8-rt/rt-development/wpf-windows-rt-devices-t3763345 and it worked !
Thanks a lot @black_blob !
Some tips:
* The 7z file containing the DLLs and the instructions is in the "downloads" tab of the page
* Just follow the instructions located in the "notes.txt" file. There was no file already existing on the Windows 10 ARM version when I did the copy of the files.
* I have disabled hardware acceleration as described in the instructions, because the forms of my test application were blank.
=> I had to take ownership of the Avalon.Graphics Registry node, and to give the rights to my account before being able to add the DisableHWAcceleration registry key.
You can now write C# WPF applications targeting .NET 4.5, they will work (unless you use unsupported references) !
As an example, have a look on the image attached. It shows sample apps from https://github.com/microsoft/InteractiveDataDisplay.WPF. I just compiled the code on a standard PC and then moved and run the binaries on the tablet.
Hi. I need help on disabling secure boot. i tried downgrading it ti 8.0, i managed to unlock bitlocker but still I cant disable secureboot. the secureboot file only shows F3 options. is there any fix into this? thanks
I tried this 3 months ago but I realized not all compiled programs for WPF work, but it's still great.

Categories

Resources