Is this ok? Compiling .NET 2.0 Applications without VS 2005 - Windows Mobile Development and Hacking General

Hello,
Please correct me:
i am new and i think i can compile .NET2 Applications.
Installing .NET Runtime on Mobile Device
1)I installed the .NET Compact FrameWork Runtime on My Magican. Ok no Problem
2)I moved it to Card (registry modification) to save MainMemory
3) Copy all Stuff GAC to My PC in a Folder eg. "DLLs"
Install .NET 2.0 Framework SDK
4) I found it on SharpDevelop 2.0 .NET
5) Create a batch to compile
-----------------------
set path=%path%;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
csc /noconfig /nostdlib /r:GAC_mscorlib_v2_0_0_0_cneutral_1.dll /r:GAC_System.Drawing_v2_0_0_0_cneutral_1.dll /r:GAC_System.Windows.Forms_v2_0_0_0_cneutral_1.dll /r:GAC_System_v2_0_0_0_cneutral_1.dll /r:GAC_CustomMarshalers_v2_0_0_0_cneutral_1.dll /target:winexe /out:test.exe /r:GAC_Microsoft.WindowsCE.Forms_v2_0_0_0_cneutral_1.dll hallo.cs
pause
And the hello.cs...
sing System;
using System.Windows.Forms;
using Microsoft.WindowsCE.Forms;
namespace MsgWindow
{
public class MessageWindowForm : System.Windows.Forms.Form
{
private System.Windows.Forms.MainMenu mainMenu1;
// Create an instance of MsgWindow, a derived MessageWindow class.
MsgWindow MsgWin;
public MessageWindowForm().....................................
--------------------
And copy the test.exe to Mobile device and it work....
Is there any failiure on my doing? And why do i need extra Packages SDK for mobile devices?

Related

How to excute the mapirule.dll in .net 2005?

Hi,all
In EVC 4.0, I set the Remote executable path and filename as "\Windows\tmail.exe",and the mapirule.dll works fine.
But in .net 2005,I set the configuration properties->debug->Remote Executable to "\Windows\tmail.exe",the mapirule.dll dosen't work.Is there any settings i've ignored ?
Thanks for any suggestions.
Ronald

[Q] Write DLL Resource file in Visual Studio

Hi,
I have Visual Studio 2005 and i want to create a DLL that includes resources like Icons and bitmaps, so i made one and tried to compile and create the DLL (Used C++) and it gives me the error error LNK2001:.....
I thought that i must use ARM Platform or Pocket PC, because on the Project Properties is Win32 set as Platform!
Sorry i never used Visual Studio ;-)
yes if you want to compile it for pocket pc, you got to change the platform
if you only got win32, maybe you didn't install the windows mobile SDK (you will find it in microsoft website, wm6 is the lastest i think)
you got to install it, then you choose the WM platform before compile

WinCE 6.0, CF 2.0: File.Copy throws UnauthorizedAccessException

Hey everybody,
I have the following problem: there is a device working Windows CE 6.0 and having Compact Framework 2.0 installed.
There is a file on the flash disk in this device and I need to make a copy of this file with other name.
When I'm calling File.Copy(oldName, newName, true) it throws UnauthorizedAccessException if the file with new name already exists.
What does it mean ? At that time this file can be successfully deleted by File.Delete(newName).
Everything works good under CE 5.0.
Thanks,
Alexey
One detail: the existing file has HIDDEN attribute.
The same happens when I'm using Win32 API. CopyFile(oldName, newName, FALSE) fails and GetLastError() returns 5 - access is denied.
I have an experimental device, so is it a new feature of Win CE 6.0 or it is a device's bug ?
Thanks,
Alexey

WM6: start Java app from C++ app?

Hello,
I'm currently in the need to code a C++ app under Windows Mobile 6 that starts an installed Java app. I already hoped that call system("java java_app") might work, but my C++ compiler (VS 2005) does not even know system() function. And I don't think it would work this way: to install a Java app, I start a .jar file, and then, I can start the app manually via start menu under Start -> Program Files -> Tools -> Java, where I can select from all installed Java apps, and obviously, the installation does not create .jar or. class files anywhere in the file system. The Java runtime environment on my phone (HTC Diamond) is an Esmertec Jbed.
Thanks for any help.
As far as I could find out, Java apps under Jbed JVM can be started from command line by
\windows\jbed.exe -run sX_
where X=0,1,2,3,... ist the index of the desired app in the list of installed Java apps. So, Java app can be started from C++ programm using ShellExecuteEx(), filling the lpFile member of the SHELLEXECUTEINFO parameter with "\\windows\\jbed.exe" and lpParameters member with "-run sX_".
Very nice, so far, however, there are two troubles remaining:
- the index X of the desired Java app depends on the sequence, in which the Java apps have been installed
- the Java midlets have a hierarchical structure. A midlet might contain several sub-midlets, but only the highest-level midlets are accessable by the s-index
Well, I think the hierarchical structure is a solvable problem, the desired midlet can be installed as a top-level midlet. But still the index problem. Is there maybe a registry entry that maps midlets to indices?
I found the solution!
Jbed stores for each installed midlet a sX_.jah, sX_.obj and a sX_suite.utf file in \windows\appdb folder. The .jah and .obj are binary files, but the .utf files are readable text files that contain some information of the corresponding midlet, that enables one to identify midlet from index X. So, all I need to do in my C++ app is to open the .utf files subsequently and to check if I find the information that identifies the desired midlet.

[Q] [FILE] FakeGPS.DLL / FakeGPS.CAB urgently needed

Urgently need FakeGPS.DLL and/or FakeGPS.CAB from Windows Mobile 6 SDK (couldn't extract it myself with MSI Extractor form the .MSI file I downloaded from MS).
TIA
The attached file is the zipped contents of :-
C:\Program Files\Windows Mobile 6 SDK\Tools\GPS
It contains:-
FakeGPS.CAB
FakeGPSReadme.txt
Settings.exe
SettingsReadme.txt
The CAB is 1,793Kb
These files also appear in the 6.5.3 DTK, but they seem to be the same files, (size etc.)
Thanks for helping. Now I could extend a project of mines (installing the necessary fake GPSID in WinCE is omitted next):
Code:
If(DeviceEmulator)
// Install FakeGPS
// Fake GPS enables to receive data using the GPS APIs even if there is no GPS receiver on the device.
// The GPS data is read from NMEA .txt files that reside in \Program Files\FakeGPS\GPSFiles.
If(DirExists(MyFolder\"FakeGPS"))
If(NOT DirExists("\Program Files\FakeGPS"))
MkDir("\Program Files\FakeGPS")
XCopy(MyFolder\"FakeGPS\Program Files\*.*","\Program Files",1)
CreateShortcut("\Windows\StartUp\FakeGPS.lnk","\Program Files\FakeGPS\FakeGPS.exe")
// Restart emulator
Reset
EndIf
EndIf
EndIf
Thanks again.
You are more than welcome.
Fortunately I keep an old laptop running 32 bit XP, just so I can run the emulator images and earlier versions of Visual Studio on it. It even has Embedded Visual C++ 3.0 and 4.0.
None of these will run properly under 64 bit Windows 7. Under an XP virtual machine is not a solution either. Virtual machines under virtual machines? Nope!

Categories

Resources