Hi
I would like to write a GPRS connection wrapper/lib in C# (to initiate connection, select connection etc..). However, I have some existing VB .NET CF v 1.0 code already running on a XDA and that needs to talk to this wrapper/lib...
Is this going to be a problem? or am I better/safer sticking with VB .NET for the wrapper/lib as well?
Any help appreciated...
GPS VB.net
Would you be willing to post your code so that others can have a look - there seeme to be a lot of people who want to do things like this...
VB.NET to C#.NET
make your C# wrapper a dll , the MSIL code will be the same wether it's written in C# or VB.NET
Happy Coding
Related
Hi all,
I am developing applications in C# using Visual Studio 2003.
While my need to create some specific applications, it seems some applications seems virtually impossible to develop using C#.
For instance, I cannot create a SIP (soft-input panel) using C#, and I haven't found a way to develop a today plugin using C#. These applications seems only to be developed using C++.
I know C# is a managed code, as opposed to C++ which isn't by default.
Are the differences between C# and C++ applications -- managed vs. unmanaged code -- the reason I cannot develop a today plugin or SIP, or is there a way I can use C# to achieve this?
I'm using C# since it somewhat resembles the Java language I'm familiar with, and learning C++ would take a while.
Any thoughts and help would be much appreciated!
With kind regards
the syntax is not all that different between java c# and c++ even even ansi c
suppose some difference is what platform you would be programming to
maybe .net which i asume most c# programmers use cant make todayplugins
not sure
you can program .net from c++ aswell if you like or you could program win stk directly or miniMFC
a language is just syntax and speed difference in some cases
how much learning is needed is all about the platform you are developing to
Rudegar said:
the syntax is not all that different between java c# and c++ even even ansi c
suppose some difference is what platform you would be programming to
maybe .net which i asume most c# programmers use cant make todayplugins
not sure
you can program .net from c++ aswell if you like or you could program win stk directly or miniMFC
a language is just syntax and speed difference in some cases
how much learning is needed is all about the platform you are developing to
Click to expand...
Click to collapse
Well, applications created with C# must use the .NET Compact Framework if I understand correctly, and since C# (or .NET) applications require the use of a Common Language Runtime, I can image some applications simply cannot be developed.
BTW, the platform I'm targeting to is my much beloved MDA-II
What I'd like to know is, is it possible to create a Today Plugin or a SIP using C#? Or should I switch to C++?
yes i know you mean xda2 but i ment platform as in .net or mfc or pure win stk
not sure if it's possible to make today stuff and other shell stuff from .net
but what i'm trying to say is that you can make .net from c++ aswell and there the difference between c# and c++ are not all that great
if you have to do pure win stk it's a whole other ball game as in how much they are the same
you could ask zendrui the maker of phonezenprofile he's programming in the pure stk and he prob knows if you can assess those today and shell stuff from anywhere else
Ok, thanks for the tip, I will ask him
Sorry but I never looked on the c# as all the applications developped with .net for PocketPC are slower and as I well know c++
So I don't know if it is possible to create a today plugin or access SIP with c# sorry ...
But if you know a little c++ you can get many examples how to create easily a today plugin and for sure access SIP is really really easy with c++ but I suppose that it should be easy to with c# ...
Link to SIP in C#
This might help you out. I just googled for "pocketpc sip c#".
http://www.c-sharpcorner.com/Code/2002/May/SIPOnPocketPC.asp
D.
Hmm that article just gives you information about showing the SIP from your C# app.
I have a feeling, it's going to be easiest to write a SIP in C++, mainly because you're implementing COM interfaces, but also because it's so fiddly and the only examples I've ever seen are in C++.
Best one I've seen is here (also covers today screen items):
http://www.woodslane.com.au/net/titles/samp0735614431.html
.NET CF
A more general question. I have just started looking at using C# (I too am a Java developer) and Visual Studio .NET 2003 to develop apps for the Pocket PC. Help & samples in VS.NET are rather sketchy, and info on MSDN websites is very scattered. What are some good resources to get started? Any books recommended? Any good web resources?
What about MFC?? Can we include MFC on a today plugin DLL?
Because at least CString would sure come handy!! :?
Hello everybody!
I recently went through a learning experience writing a today plug-in and found out there's nothing to it. Basically it’s a dll that needs to export 2 (1 if no options) functions and create a simple window.
You can certainly use MFC, and MSDN has an article on how to create a today plug-in using .NET: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnppcgen/html/TodayScrn.asp
As for sip, that is more complicated, sorry I can't help you there.
I tried the c# today pluggin that microsoft made to try and show their language is usefull. It needed two seperate projects, one in vis studio 2003 and one in evc. i got it to work but it was way too complicated. As levenum said, its not that hard in c++. The responsiveness of their example was very slow compared to native ones. The up side was that it created a today item that lets you display data like pie. I did not experiment other than to modify the background colour to see if it worked.
I think the compact framework is a bit too compact. The features don't help enough with device specific programming, but its good for a lot of other stuff like gui's.
Is there any other way to creat today plugin application instead of using C++ and .net host. Is .net 2.0 support it?
Is there any other way to creat today plugin application instead of using C++ and .net host. Is .net 2.0 support it?
I think this topic is pretty much dead, but the answer is that C# does not support exported DLL functions. Since Today plugins and new SIPs require libraries with exported functions, it's not possible to write either entirely in C#. You have to at least have the C library to export the functions, and that's why the MS article goes about it that way.
This class will show/hide the sip in C#:
Code:
public class Sip
{
[System.Runtime.InteropServices.DllImport("coredll.dll")]
private static extern int SipShowIM(SIPStatus i);
private enum SIPStatus
{
SIPF_OFF = 0,
SIPF_ON
};
/// <summary>
/// Show the SIP.
/// </summary>
public static void Show()
{
SipShowIM(SIPStatus.SIPF_ON);
}
/// <summary>
/// Hide the SIP.
/// </summary>
public static void Hide()
{
SipShowIM(SIPStatus.SIPF_OFF);
}
}
Hi,
Before people reply with "use VC++ instead": I don't have the time and willpower to look into VC++ programming.
Anyway, I was fiddling around with embedded VB and the lack of DoEvents is a great limitation!
Is there any way around?
Also, is it just me, or is VB extremly slow on PocketPC?
Finally, all I got was a file with *.vb extension, which would get executed inside the PocketPC. Shouldn't it be possible to compile to *.exe?
Thanks,
vma
i think the new vb .NET is about as fast and have the same support of evens and such as C# .NET
of cause both would still be slower then pure win32 in c++
Hi all,
Generaly, I am Symbian programmer but i will have a look at Pocket PC side... so I am not bloody beginner :wink:
Jep.. I wrote/clicked a C# application with .Net 2003 (very comfortably!!). I saw fast that I have to use C++ to reach interesting APIs.
I know its possible to call (C++) DLL from C# so I can let the frontend in easy C# and can use C++ to get more functionality.
Other than for C#, I couldn't find a "Smart Device" template for C++ in .Net 2003! Someone can tell me, which kind of template I have to use for programming a PocketPC C++ DLL? Is it in .Net 2005?
Thanks a lot!
BR eidelen
Hi,
I thin VS.NET 2003 can only produce managed and x86 native code, so writing for the arm platform was not build in. Your solution would be to use Embedded Visual C++4 which is available free from Microsoft, or to answer your second question I *think* VS.NET 2005 does include the ability to write unmanaged code for smart devices.
Paul
Hi Paul,
Thank for your fast answer! I found it in ".Net 2005" and first DLL-prototypes running!
Now I have some other problems concerning callbacks from native unmanaged DLLs, but I will create a new topic about it.
Thanks a lot!
BR Adrian
Hello,
is there a free IDE for .net Programming on WM 2003 PhoneEdition using C#?
I have Visual Studio 2003 Express Edition...and the SDK is downloading...
eVC 4.00 is running but i thing .net is better...and more convinient
It woud be nice a link list with items i need for this.
Perhaps use the SharpDevelop IDE for Creation this Apps?
Thx
SharpDevelop is not really working with .NET CF. There is a workaround but it is a mess, you can't use GUI for making forms and such, do a search on their site and wiki. While .NET might be convenient, I suggest you to learn C++ and use EVC++4 and possibly MFC; native apps is the way to go under PPC, especially since .NET apps tends to be slow (and you can't do some stuff in .NET either).
Evc++ I cant get the SRC Files for this example CTapiConnec
Hello,
hmm yes i can use evc++, i have tested it and it works fine.
Creating a Standard Dialog based app no "beginning" Problems...
BUT
I want to use the tapi do make a call. Ok MS has a CallIt sample on Homepage and some post in this Forum...
I cant get the SRC Files for this example CTapiConnection
defined in TAPIUTILS.H
And reimplement this again is mutch work...i tried it but many compiler errors after 20 Fixes i give it up.
Where can i download it? Or only for MSDN Subscribers?
And the issue about looking what is included in .h Files
I'm sure I can learn a lot of this at microsoft.com --
Which compiler and add-ons do you install to get started with writing apps in VB and VC?
Are the only tools VB.Net and VC# ?
Phoney said:
I'm sure I can learn a lot of this at microsoft.com --
Which compiler and add-ons do you install to get started with writing apps in VB and VC?
Are the only tools VB.Net and VC# ?
Click to expand...
Click to collapse
You should forget .NET under Pocket PC...it is painfully slow. The only option is C++, which for you can use either the free Embedded Visual C++ 4, or Visual Studio 2005.
Thanks!
And does this mean that I should forget about using Visual Basic for anything as well?
Phoney said:
Thanks!
And does this mean that I should forget about using Visual Basic for anything as well?
Click to expand...
Click to collapse
Indeed... eVB is not supported on WM5 anyways (at least not officially...and eVB is not too powerful either).
Agree with KTamas! For now, VS2005 is the BEST tool perhaps.
is ws2005 also mfc and win32 stk or only .net like 2003 was ?
Hi Rudegar!
VS2005 works with MFC and Win32 for both PC and mobile devices. It also claims to support WM2003 SDKs but I was unable to compile an exe with it that would run on a 2003 device (although I tried adding WM2003 SDK to an existing WM5 project so maybe I just go the settings wrong)
Yes, vs2005 do support pure WIN32 programming in WM2003, I wrote two or more app for PPC-6600, it works fine.
Isn't C# compiled during first execution (it takes time, so startup is long) and then it's as fast as C++?
Marx2 said:
Isn't C# compiled during first execution (it takes time, so startup is long) and then it's as fast as C++?
Click to expand...
Click to collapse
No. It starts up slowly cause it has to load the Compact Framework into the memory. .NET (therefore C# included) apps are compiled while they are running, they are running on a JIT-compiler (Just-in-Time).
Instead of MFC, I recommend using the Windows Template Library (WTL) -- it's a set of C++ template classes for Windows UI elements, and is CE-friendly. I've used it on big Windows for many years; IMHO it's much better than MFC.
Isn't effect of JIT compiler cached?
I think JVM can do that. There is also an option to compile permamentaly to exe (this lacks portability)