Any good web sites for PPC programming using VS2005? - 8525, TyTN, MDA Vario II, JasJam General

Any good web sites for PPC programming using VS2005 Visual Studio 2005
Any one know how to call other program(exe) from current program using VS2005 and .netcf?
Thanks in Advance.

In .netcf2 im pretty sure you can use shellexecute
Have a google for shellexecute or look it up in the help files on VS it should have some examples in there that apply to the .netcf.. if not let me know and ill have a go tomorrow for you.

I found it using Process
using system.diagnoistics;
and then in code
Process process = new Process();
process.StartInfo.FileName = "iexplore";
process.StartInfo.Arguments = "http://www.xda-developers.com/";
process.Start();
process.WaitForExit();

Related

WM5 - Reading and Writing to Registry

I am looking for some help to assist in reading and writing values to the registry from a program on WM5. I am writing the program in either VB or C# using Visual Studio 2005 as that is what i have experience in.
Can anyone offer any assistance to assist me as my reseach has had me banging my head on the wall all day.
Thnx.
GF
something like this works on a pc in C#
should be 100% the same on a pda
most .net stuff is the same apart from advanced controls
which are excluded in compact framework
string myValue;
RegistryKey pRegKey = Registry.LocalMachine;
pRegKey = pRegKey.OpenSubKey("Software\\Some Program");
Object val=null;
Object val2=null;
if(pRegKey!=null)val = pRegKey.GetValue("Some Key");
if(val==null)
{
RegistryKey key = Registry.LocalMachine.OpenSubKey("Some Key", true);
RegistryKey newkey = key.CreateSubKey("Some Value");
newkey.SetValue("Some Value", "String");
}
else myValue=val.ToString();
If you are using .NET then have a look at the OpenNETCF.Win32.Registry class available from http://www.opennetcf.org which is open source and freely available.
In my opinion .NET is too slow on the PPC. I am just getting used to writing for the PPC and WM5 but I am using eVC4 which being C++ is much faster. I am also writing a RegEdit utility as my first project. I am however a Software Engineer and am used to C++ and also C# and VB6.
Type or Namespace RegistryKey could not be found
Thnx for the help to date. I now get the above error once i have imported the code provided. The help refers to the following declaration:
[ComVisibleAttribute(true)]
public sealed class RegistryKey : MarshalByRefObject, IDisposable
But i am unsure of where to place this within the code to adequately declare the RegistryKey.
I have looked at http://www.opennetcf.org but all the code is for older versions of the VS. One would think there would be an easy solution in the world for this type of thing.
GF
Once you have built the DLL from the OpenNETCF you should then have a OpenNETCF.Win32.Registry.DLL which is a .NET DLL. Then add a reference to this DLL in your project:
Project->AddReference - click on the Browse tab and browse for the said DLL. This will then be added to your project for you to use. In the class where you need to access the classes in the DLL add a using directive for
Code:
[color=blue]using[/color] OpenNETCF.Win32
;
You don't need to use InterOp services as it isn't a COM DLL.
HTH
Sorry the embedding didn't work too well the code to add for a using directive is:
Code:
using OpenNETCF.Win32;
Incorrect reference appeared to be the issue
I have managed to get it running, i think it was a problem with using OpenNETCF.Win32.RegsitryKey, where the default VS uses is Microsoft.Win32.RegistryKey
Thnx for everyones help.
GF
Just download the WM5 SDK for Pocket PC or SmartPhone, Registry editing is then possible using the .NET CF V2
ie:
Code:
Dim RegKey As RegistryKey = Registry.LocalMachine.CreateSubKey("System\StorageManager\FATFS")
Dim RegValue As String = RegKey.GetValue("CacheSize", Nothing)
RegKey.SetValue("ReplStoreCacheSize", GeneralSystemPerformanceCmb.Text, RegistryValueKind.DWord)
Yes of course it is possible. But .NET apps on a PPC is JUST TOOOOO SLOOOOOWWWW. In my opinion there is no chois=ce but to go with C++ until the PPC processors get much faster, which .NET expects.

Reading the registry with Visual Studio 2003

I'm developing a small application for my HTC Wizard, which I'm programming with Visual Studio 2003.
I need to open the shell application for M3U files, which I've tracked down to HKCR\M3UFile\Shell\Open\Command... but now I can't figure out how to either read that key to open the relevant player, or to execute the m3u file directly.
Because I'm using VS2003, I don't have access to system.win32 with the compact framework, so what techniques have others of you used to read or write to the registry?
Also, just as a side note, how do you find the current path?
Thanks,
Jon
There is no real concept of current path in CE. If you want to know the path your EXE is in, use GetModuleHandle(NULL) -- it'll return the fully-qualified path name of that process's EXE, from which you can parse out a path.
I'd advise against using the compact framework; .Net is a loser on PPCs as it just slows things down, taking up extra memory & cycles on a platform where both are in short supply. Use the real Windows APIs instead -- i.e. call RegCreateKeyEx/RegSetValueEx.
And if you choose to use Win32 API you can just call ShellExecuteEx()
and not mess with the registry.
RegQueryValueEx is what you need. Just set the appropriate type and buffer.
V
I'm always willing to learn new stuff... are there any good resources on programming for PPC without using .net?
I know there's EVC++, but I've installed it, and now I don't know what to do with it!
Regards,
Jon
JonTheNiceGuy said:
I'm always willing to learn new stuff... are there any good resources on programming for PPC without using .net?
I know there's EVC++, but I've installed it, and now I don't know what to do with it!
Regards,
Jon
Click to expand...
Click to collapse
You can either use EVC++4, which is free but has an aged, not-so-standard C++ compiler (since it based on VC++6...but it only means a few quirks), or you can use Visual Studio 2005 which is supposed to replace EVC.
Jon, not to state the obvious, but there are many c++ tutorials for the PPC on the interweb.
What kind of experience do you have?
V
I have no prior experience with C++ - I bought the C++ For Dummies book in a charity shop a month or so ago, but it seems to refer to software that isn't available any more!
My core experience is with PHP, and recently I've been more interested in VB.NET for small apps at work, but most of what I want to do is with Windows Mobile - for which, all I have is Visual Studio 2003, and my co. won't fund me buying VS2005 as I got it for an old project that I still maintain, and anything new I need to write for work I can do with VS2005 Express...
That said, I'm not afraid of learning a new language, especially something as powerful as C++.
C++ for dummies is excellent, the best I've come across so far.
Have a read through this:
http://forum.xda-developers.com/viewtopic.php?p=209136#209136
I'm currently unlearning and then relearning my c++ - one thing I've learnt coming from other languages - c++ requires discipline. It's not about shortcuts, you build up from the basics and keep going steadily. But you need to be logical, and prepared to put in the effort. So discipline - it's been a long time since I've had to think about that!
V

Hi all newby here with a few questions

I've been lurking and reading the posts and I'm very impressed with the level of knowledge, willingness to help and general friendliness so I thought it's about time I said hello
I recently got an O2 XDA Exec with Rom 1.30.107 WWE, Rom Date 04/11/06, Radio 1.09.00, Protocol 42.42.P8, ExtRom 1.30.162 WWE
I set it up with minimal branding so there's only a little O2 stuff in there and I've not added any applications, generally I'm very happy with it
however basically it's a small PC or pda with a phone built in and among other things I'm a programmer (years out of practice but it still counts honest! ) I've had a trawl through the forum and can't seem to find the answers I'm looking for so I guess my first couple of questions are these
what tools do I need to write applications for this beastie ?
can the visual studio express suite thats free from M$ be used and if so has anyone else managed it ?
also as it's a windows system it's got a registry soooo....
can anyone recommend a good registry edit tool so I can have a look through the settings ?
and is there a list of registry tweaks anywhere (I'd like to stop the IE key going to pda.o2.co.uk and send it to my home page for a start)
needless to say I am not desperately rich so freeware is preferable to anything I have to pay for, but if I have to pay for something then it will recieve serious consideration
thank you in advance
Official info from Microsoft regarding development http://www.microsoft.com/windowsmobile/developers/default.mspx
As for registry editing, one is as good as another in most cases. Personally I use Tascal Registry Editor http://www2r.biglobe.ne.jp/~tascal/download/pocketpc/tre.htm
And there's some good freeware here http://www.pocketpcfreewares.com/en/index.php but there are many more sites out there.
I'm using embedded visual c to do the job. other than me having difficulty getting hang of the GUI language (I came from DOS based C and Java), seems alright. It suppose the WM2003 SDK but doesn't seems to support the WM5 SDK.
ok thanks for the response so far
looks like I need visual studio 2005 if I want to write any apps according to Microsoft specially if I want to use the WM5 SDK although I've caught a reference to something called Pelles C from http://www.smorgasbordet.com/pellesc/ which is donationware i.e. free but they would like a donation and probably doesn't support the SDK but free is free
I'll check out the TRE registy editor too
thanks so far guys please keep 'em coming
YE GODS! VS2005 Basic costs more than I paid for the XDA !
I think I'm going to look a bit harder at this Pelles C doubrey
thank you AlanJC the registry editor works perfectly
modified HKEY_LOCAL_MACHINE\HARDWARE\OEM\KEYBD\PieHomePage to my home page URL closed TRE and hit the IE button and lo and behold it went to my home page I am now officially a happy bunny
it would have been easier if TRE had a search function but again free is free so not complaining here

Simple database, what to use?

Hi,
I am thinking of creating a simple database application using C# for Windows Mobile 6.
The application is so simple, it is used to store record of data:
- firstname
- lastname
- job
- salary
Then it can be searched to find the data based on certain field.
Preferebly that I can use SQL language.
What kind of library or component that is good for this purpose?
I meant a very small lightweight component
Any examples are really welcome
Thanks.
you can store those info in xml format.
at run time, you can load xml to dataset and query info you want.
Hi imatrix,
Thanks for the idea. Do you have experience with that kind of solution?
I mean, I am interested in the speed of loading the XML into the dataset, because I am not sure if it could be that fast for, let say 2500 records.
or you can use ms compact sql server for pda it's free
or you can use the ms access for pda not free
also not sure if the ms access for pda would be faster then an xml file
personaly i would prob try the xml path first as i'm sure running a compact sql server on a pda would give a bit of overhead
gogol said:
I am thinking of creating a simple database application
Click to expand...
Click to collapse
Try Grandasot XForms (http://www.grandasoft.com/Products/). It's simple and fast, no programming required. The free version totally fulfills your needs.
Thanks, I think I will try the XML approach.

Want to learn to program for Windows Mobile

Let's say I have lots of free time, am a pretty smart guy, and am infatuated with my Windows Mobile device. I am a veterinarian, and know next to nothing about programming, except how to meddle with other people's PHP or javascripts. I know HTML pretty well, and have some experience with basic Flash ActionScript. Can someone help me start learning how to program for Windows Mobile?
I need to know:
1) Some good beginner's books
2) Software to start off with (free stuff preferred)
3) Good websites to check out
Can you help?
I'm no programmer, but have wanted to dabble. From what I can tell, lots of folks use embedded visual c++ to program WM apps. This is a free compiler you can download from Microsoft (search for evc++), but there's not a lot of MSDN articles or MS help in general with evc++ because they want to move you to the .net compiler ($$$). Good luck.
I found this http://www.basic4ppc.com/but haven't tried it. It seems to be like Visual Basic, which is easy to learn. Maybe someone here tried it and can comment on it?
I tried installing Embedded Visual C++ on my Vista machine, but ran into all sorts of problems with it crashing while trying to compile "Hello World!" any ideas?
In the meantime, I've downloaded and am using Visual C++ 2008 Express edition (free). Will that allow me to compile for Windows Mobile (.arm)?
Evb and Evc are old languages,actually most of the programmers are using .Net languages.
You need to install IDE Visual Studio then make a choice of the language you will use..
But I am not a programmer,someone else can redirect you better.
Good luck!
unapproachable2kx said:
Evb and Evc are old languages,actually most of the programmers are using .Net languages.
You need to install IDE Visual Studio then make a choice of the language you will use..
But I am not a programmer,someone else can redirect you better.
Good luck!
Click to expand...
Click to collapse
EVB might be old, but EVC uses C/C++ in the exact same fashion you would use it in Visual Studio 2008. The key for me, is to really think about what you want to do, and what you want out of programming.
If you want to develop a little app that does some simple computation, or things less graphical, and you really don't have a passion for developing, then plunge into .NET. It's easy, it's effective and it'll get the job done.
On the other hand, if you're getting into multimedia, and your heart is in with software developing, then I must stress that the C/C++ route is REALLY where you should be going. I must warn you though, if you're new to programming, don't expect to have things fired up and running in 10 mins. It will take time .
Just my 2-Cents,
Chad.
http://msdn2.microsoft.com/en-us/windowsmobile/bb264341.aspx
heres some videos that will help u get started!
ekw said:
http://msdn2.microsoft.com/en-us/windowsmobile/bb264341.aspx
heres some videos that will help u get started!
Click to expand...
Click to collapse
thanks guyz..i was also looking for this ...

Categories

Resources