Running .NET Compact Framework Application on WinXP - Windows Mobile Development and Hacking General

Some time ago i found out when you resolve the working dir with
Code:
System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase)
and you run your program on a XP computer it crashes if you try to access a file with you AppPath String
this problem comes from that this code gives you the dir with a starting "file:\"
so just remove it and it is fine...
Here a VB.NET code for that
Code:
'Get the Startup Path
AppPath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase)
If AppPath.StartsWith("file:\") Then
AppPath = AppPath.Substring(6)
'MsgBox(AppPath)
End If
You ask for what that is good for?
You can test your apps without an emulator, test if it works on any resolution or play around with you tablet pc

Related

HaRET don't bootup linux :(

Hello ,
I'm a newbie and have used the introductions on http://wiki.xda-developers.com/wiki/HimalayaLinuxBooting to boot linux on my himalaya. Unfortunatily the pops up dialog "Launch a script file. Default ..." when i tap on HaRET-0.3.2d.exe . I can't connect to port 9999, too.
Please Help me
Thanks
Hi snowdrop,
the dialog means that your prepared scriptfile hasn´t been found and executed. This could be because you misspelled the name. Keep in mind that all filenames have a 3-letter extension which is not visible in windows. I.e. if your FileExplorer says "startup.txt" the filename is "startup.txt.txt".
Or maybe you installed the startup script in a different directory than HaRET. IMHO it´s easiest to install all 4 files (haret, startup, kernel, initrd) in a separate dir unter \Storage where you don´t have to reinstall it after a reboot.
Don´t hesitate to ask further if this doesn´t anwer your question.
Matthias
Hallo noone,
thanks for your reply. I copied all neccessary file under "\Storage Card\". The filename is "setup.txt" (the filexplorer says startup without extention but i'm sure it is named startup.txt through my activesync under Windows). All files are under "\Storage Card\", (also the HaRET-0.3.2d.exe and startup.txt files). :roll:
Greets
Hi snowdrop,
I'm not really sure about that. It works for me all the time.
Maybe you can track down the problem with a network connection. You have to disable ActiveSync on your host PC and to start a connection with SynCE. This requires usbserial and ipaq as well as ppp loaded into the kernel. When you cradle the himalaya you should get a message from usbserial about the attached device (usually /dev/ttyUSB0).
After synce-serial-configure (root), dccm (user) and synce-serial-start (root) the Himalaya should display the connection sign in the bottom bar. Be careful: ActiveSync on the Himalaya may or may not try to start a GPRS session. This can become expensive sometimes
After establishing the PPP connection from PC to Himalaya you connect to port 9999 (refer to SynCE's documentation about the IP addresses). Then you can enter the commands of the startup.txt script line by line.
HTH
Matthias
Hello Matthias,
what is SynCE? I'm using Windows as host PC.
Are synce-serial-configure (root), dccm (user) and synce-serial-start Linux Tools??? :?:
Thanks
Ok,
i after some hard work (and hardware reset), i'm now able to see the penguin(with red eyes and red thermometer) . But then nothing will be done
Actually I thought, that there is also a graphical user interface for linux. Now my question:
Do you ONLY remote login into your linux and have JUST a console application? Or have you also GUI applications and a desktop under linux for himalaya at the time.
Thanks for your answers
it will of cause never run any linux applications not compiled for it
like windows CE will not run pc windows applications
if you can find a kernel compiled for it
you can use it otherwise you'll have to compile your own
the same goes for a version of x11 and any other applications you may wish to run
though in the world of linux sourcecode is much easier to come but and compile yourself then they are under windows
Hi,
can you give some usefull links about linux application on PDA?
I want too much to run linux under my himalaya .
havent really messed with it
here is another distro for xda not sure if he ever got finished with it
http://www.pigeond.net/photos/xda-linux/
havent kept up on it really
what you have to look for is pretty much
applications for the arm cpu
and you can also look for linux of ipaq and other pda's which use the arm cpu they would also run on the xda
but i havent really kept up todate about the whole project
so i dont know how long any of the project have gotten
and i dont know how many applications can be portet because of graphical limits in the desktop manager like glib
but i'm sure there must be others in this forum who mess around with these things
Maybe the guys at handhelds.org could give you some more info, got lots of help getting linux running on my ipaq 5550 (never quite got it working to my liking though)

DllMain not run in windows mobile 5.0

It's seems DllMain won't run when a dll loaded by LoadLibrary in wm5.0.
The dll is very simple,complied by vs 2005 beta2,just a MessageBox in dllmain
I load this dll in another process,using the api loadlibrary,In windows mobile 5.0 ppc emulator,no dialog box appear,but you can see that dll.dll had been loaded with remote file viewer.In Pocket PC 2003 SE emulator,every thing is ok
anybody has any idea about it?
Thanks
dll.cpp
#include "stdafx.h"
#include <windows.h>
#include <commctrl.h>
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
MessageBox(NULL,L"11",L"22",0);
return TRUE;
}
Hi,
There is no default entry point in a DLL. You are doing everything fine except you need to load the module (function) you want to call. I cant remember off hand the details but its LoadModule.
Look thought the documentation for calling a function in a dll some more.
Paul
psneddon said:
Hi,
There is no default entry point in a DLL. You are doing everything fine except you need to load the module (function) you want to call. I cant remember off hand the details but its LoadModule.
Look thought the documentation for calling a function in a dll some more.
Paul
Click to expand...
Click to collapse
Thanks for your reply.
I don't want to call any function,excep the default entry point DllMain when loading library.
There should be default entry point in the dll I complied,because in wm2003,everything is ok(Messagebox appears when loading or unloading library)
DllMain worked in my programs in 2K5. Maybe your messagebox appears behind today window? I never tried MessageBox in DLLs, but CreateFile worked fine.
oh right. Maybe I'm wrong - i always thought DLL's didnt have default entry points - I need to get reading the SDK's more
Paul
mamaich said:
DllMain worked in my programs in 2K5. Maybe your messagebox appears behind today window? I never tried MessageBox in DLLs, but CreateFile worked fine.
Click to expand...
Click to collapse
hi mamaich,what device are you using?Emulator?
I've tried in another way:return TRUE or FALSE in DllMain,then check whether the dll is loaded with remote process viewer.
In wm5.0 emulator,DllMain's return value is ingored,the dll is always loaded.And in wm2003 emulator,dll can be loaded only if DllMain's return value is TRUE
I've compiled the DLL with eVC4 and run it on XDA2 with WM5. That DLL was a part of a rather large project.
Maybe VS2005 produces incorrect DLLs?
mamaich said:
I've compiled the DLL with eVC4 and run it on XDA2 with WM5. That DLL was a part of a rather large project.
Maybe VS2005 produces incorrect DLLs?
Click to expand...
Click to collapse
The dll should be ok,it works well on ppc2003's emulator.I have also tried the dll produced by evc4.0.
Seems it's my fault,I got it work on wm emulator now
Thanks for all
I found it,dllmain not run just because the dll export no function.after add a not used fuction,MessageBox appear when loading

Unsuccessful instalation of .Net Framework cf 3.5

Hello
I have a problem with installation .NET framework. I can t install it because the blackstone wrote the installation was unsuccessful.
Please help
I had the same error. Problem solved after a hard reset.
So if you don't have too much programs installed...
once you installed it on your pc go to
C:\Program Files\Microsoft.NET\SDK\CompactFramework\v3.5\WindowsCE
there you will find some cabs for wm!
install: NETCFv35.wm.armv4i.cab
are you trying to install it on your storage card ?
thanks umexed. its working.
mascot4m said:
thanks umexed. its working.
Click to expand...
Click to collapse
came across the same problem a few days ago glad i helped!
To get it installed on mine I just had to run the setup on my PC, then I plugged in my HD and it updated the device on its own
Sorry, i'm a big noob - it's my first wm phone, so i think it's better to ask then to sc**w something up....
I can't start .msi file on the phone because it says the file is not associated with any prog on the phone. If I install this on my pc and copy just NETCFv35.wm.armv4i.cab (if i understood correct) on HD - after i click on it twice it will install?
denied1977 said:
Sorry, i'm a big noob - it's my first wm phone, so i think it's better to ask then to sc**w something up....
I can't start .msi file on the phone because it says the file is not associated with any prog on the phone. If I install this on my pc and copy just NETCFv35.wm.armv4i.cab (if i understood correct) on HD - after i click on it twice it will install?
Click to expand...
Click to collapse
Installations of .exe and .msi are for pc.. if you run them on the pc it'll automatically send it for installation to the ppc via activesync.
if the installation isnt successful for some reason, copy the .cab file mentionted on the previous post and run it from the ppc
Thanks, it worked!!!
I get "Installation error" aswell, but is there any other to to get around this other than doing a hard reset?
anyone have any ideas?
Bennyboy1985 said:
I get "Installation error" aswell, but is there any other to to get around this other than doing a hard reset?
Click to expand...
Click to collapse
No luck, I am still looking.....
Same problem, it won't install.
I 1st installed the MSI, then tried to install the app via Active Sync. No errors, but it just doesn't install.
Then tried copying the CAB file to my phone and running it. It simply won't start on my mobile, again no errors...
Any help would be welcomed
Well, I got it to work. When I soft-reset my mobile, it asked if I wanted to install it, and I did, and it works. Kinda weird/stupid it doesn't initially say you need to reboot to install...
Error msg while installing Mocrosoft Net Framework 35
Hi guys,
I have this problem with my HD. Been using this device without any problem since Sept 08. My problem is I can't install Net Framework on my device.
I've tried to install from the device.
It indicates installation error. Stop all applications and processes, maximize available storage space, and run installation again. Support info: 2.
Done the said but still the same.
Any Help Pls
This is the log I've found
Installation folder is: '\Windows'.
05/07/2009 12:38:23: Build 3.5.7283.00
05/07/2009 12:38:23: Opened CF registry key OK.
05/07/2009 12:38:23: Looking for upgradeable installations for version '3.5.7283.00'
05/07/2009 12:38:23: Got version value '3.5.7283.00'
05/07/2009 12:38:24: Upgradeable installation '3.5.7283.00' detected.
05/07/2009 12:38:24: Record '3.5.7283.00' deleted.
05/07/2009 12:38:24: Got version value '2.0.7045.00'
05/07/2009 12:38:24: Side by side version '2.0.7045.00' found and skipped.
05/07/2009 12:38:24: CF registry key closed.
05/07/2009 12:38:24: Delete GAC list file: failure (E:00000002)
07/05/2009 04:38:24: CGACUTIL: Initializing
07/05/2009 04:38:24: \Windows\mscoree3_5.dll
07/05/2009 04:38:25: CGACUTIL: Initialized
07/05/2009 04:38:25: CGACUTIL: Done
07/05/2009 04:38:25: CGACUTIL: Exiting
05/07/2009 12:38:25: Run: '\Windows\cgacutil.exe /o "Microsoft .NET CF 3.5.LOG.TXT" /silent /refresh ', error code: 0 (00000000), exit code: -1 (FFFFFFFF)
05/07/2009 12:38:25: Refreshed GAC.
05/07/2009 12:38:35: Entered Uninstall_Exit()
Can anyone decipher cos I'm a nooob here
Thanks
there is registry hack
this is from tutorial by geistteufel
install ".NET Compact 3.5", because by default on official first rom (I have the 1.14), it come with ".NET Compact 2.0" which is know to be slower than the "3.5" version.
So, go there : Microsoft .NET Compact 3.5
Install it on your phone (Internal of course, not Storage card)
After, install TCMD or any registry tools to change registry value
TCMD Web Site
Open it, go to "\\Registry\HKLM\Software\Microsoft\.NETCompactFra mework"
You have 2 entry :
2.0.7045.00
and
3.5.7283.00
So edit the 2.0, change value from "1" to "0"
and edit the 3.5, change value from "0" to "1"
Ok, now .NETCompact 3.5 is the default one.
Thank geistteufel for this if it worked properly
I installed orginally by active syc
I installed by active sync method worked like a charm for me once i did the hack
if you are trying to install by cab then close tf3d and install from windows today's page and see, use task manager to close all programs it is a large cab 33 mb
pls check the registry once more to see if it has installed
thnx for ur work umexed

MySQL not working well on WM6

Hi guys!
I'm trying to connect to a mySQL Databese from my Phone (to store highscores for a game).
I downloaded the MySQL .dll, which works fine in a "normal" C# windows app.
But when running the same conde on my mobile device I get an error.
Here's the code:
Code:
string myConnectionString = "SERVER=www.myserver.de;" + "DATABASE=testDatabase;" + "UID=myName;" + "PASSWORD=myPW;";
MySqlConnection connection = new MySqlConnection(myConnectionString);
connection.Open();
The dll I use is called "mysql.data.cf.dll".
The error I get is an "IndexOutOfRange Exception in the last line ("connection.Open();"). The whole thing compiles fine though...
Has anyone done this before? Where could the problem be?
Thanks!

java fix for running QSEE surveillance software

I have a QSEE professional surveillance system that requires a program called mobileToDevice Jar file to run on Java. The HD2 java program that comes with it does not run this program but I found if I loaded Esmertec Jbed 20080912.5.1 ,the program will work good. The only problem is that i must use the keyboard arrow feature to move around the screen. If anyone has another version of Java that works with this application, let me know.

Categories

Resources