PC Review


Reply
Thread Tools Rate Thread

CF Program running in Desktop Framework

 
 
Christian Stelte
Guest
Posts: n/a
 
      2nd Dec 2003
Hello!

My CE Program runs half-decent on my desktop, if I start the exe.

It is possible to determinate on which framework (ce or desktop) the program
runs?
In that case it might be possible to decide which function or dll.call the
program should use?
So that I can create a CE-Program that runs also on a desktop-pc without
recompile it.

Is this possible? If I understand the .net right, it is one of the
fundamental ideas creating plattform independent programs!?

Chris



 
Reply With Quote
 
 
 
 
Peter Foot [MVP]
Guest
Posts: n/a
 
      2nd Dec 2003
generally the Compact Framework is a direct subset of the full framework and
because the Compact Framework runtimes are marked as retargettable,
applications built for .NETCF will run on the desktop. There are a few
exceptions you should be aware of though:-

There are a couple of assemblies which are unique to the Compact Framework -
System.Net.IrDA, System.Data.SqlServerCe and Microsoft.WindowsCE.Forms

File paths are different on Windows CE to desktop versions of windows

If your program involves using Platform Invoke to API functions these may be
located in a different dll on the desktop - e.g. in Windows CE most API
functions are in coredll.dll but on the desktop exist in a range of separate
dlls kernel32.dll etc

Peter

--
Peter Foot
Windows Embedded MVP
OpenNETCF.org Senior Advisor
www.inthehand.com | www.opennetcf.org

"Christian Stelte" <cstelte(at)sytec-net.de> wrote in message
news:(E-Mail Removed)...
> Hello!
>
> My CE Program runs half-decent on my desktop, if I start the exe.
>
> It is possible to determinate on which framework (ce or desktop) the

program
> runs?
> In that case it might be possible to decide which function or dll.call the
> program should use?
> So that I can create a CE-Program that runs also on a desktop-pc without
> recompile it.
>
> Is this possible? If I understand the .net right, it is one of the
> fundamental ideas creating plattform independent programs!?
>
> Chris
>
>
>



 
Reply With Quote
 
Chris Tacke, eMVP
Guest
Posts: n/a
 
      2nd Dec 2003
To determine what platform your code is running on, use
System.Environment.OSVersion.Platform

--
Chris Tacke, eMVP
Co-Founder and Advisory Board Member
www.OpenNETCF.org
---
Windows CE Product Manager
Applied Data Systems
www.applieddata.net


"Christian Stelte" <cstelte(at)sytec-net.de> wrote in message
news:(E-Mail Removed)...
> Hello!
>
> My CE Program runs half-decent on my desktop, if I start the exe.
>
> It is possible to determinate on which framework (ce or desktop) the

program
> runs?
> In that case it might be possible to decide which function or dll.call the
> program should use?
> So that I can create a CE-Program that runs also on a desktop-pc without
> recompile it.
>
> Is this possible? If I understand the .net right, it is one of the
> fundamental ideas creating plattform independent programs!?
>
> Chris
>
>
>



 
Reply With Quote
 
Bill Draper
Guest
Posts: n/a
 
      2nd Dec 2003
Chris,

On the desktop, your app will use the desktop CLR (framework.) As Peter
points out, there are differences that you would need to account for if
you're using platform-specific functionality. Depending on what it is, you
can either branch to the appropriate code depending on the platform (in the
case of p/Invoke's for example) or load an assembly at run-time that
contained the platfrom-specific code. This would be useful if your
application provided some additional functionality when running on the
desktop or if you were using functionality that is implemented significantly
different on the two platforms, such as MessageWindow. With just a little
effort, I've become convinced you can get very good interoperability between
CE and desktop.

Bill


"Christian Stelte" <cstelte(at)sytec-net.de> wrote in message
news:(E-Mail Removed)...
> Hello!
>
> My CE Program runs half-decent on my desktop, if I start the exe.
>
> It is possible to determinate on which framework (ce or desktop) the

program
> runs?
> In that case it might be possible to decide which function or dll.call the
> program should use?
> So that I can create a CE-Program that runs also on a desktop-pc without
> recompile it.
>
> Is this possible? If I understand the .net right, it is one of the
> fundamental ideas creating plattform independent programs!?
>
> Chris
>
>
>



 
Reply With Quote
 
Christian Stelte
Guest
Posts: n/a
 
      3rd Dec 2003
Thanks to all!

I will test it...

Chris


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Running program just after login and before the desktop loads =?Utf-8?B?U2FuamVldiBTaGFybWE=?= Windows XP General 1 4th Jul 2007 01:08 PM
Remote Desktop Connection not showing running program =?Utf-8?B?UkRDIE5vdmljZQ==?= Windows XP General 0 2nd Jul 2006 08:14 PM
stopping Remote desktop from running a initial program Bruce Musgrove Windows XP Work Remotely 1 11th Nov 2005 08:12 PM
detecting a running program on pocketpc from desktop code Sai Microsoft Dot NET Compact Framework 2 19th Jan 2005 08:40 PM
How To Copy File using compact framework from Desktop to Pocket PC device when application is running on Pocket PC msnews.microsoft.com Microsoft Dot NET Compact Framework 0 8th May 2004 09:37 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:27 PM.