How to call .NET CF functions from (managed, Windows CE based) code?

Mhaxx

Re: Call managed functions from unmanaged by Mhaxx

Mhaxx
Tue Jul 15 05:01:56 CDT 2008

> from (managed, Windows CE based) code?

Sorry, from unmanaged code..

Mhaxx



Re: Call managed functions from unmanaged by Neil

Neil
Tue Jul 15 06:07:42 CDT 2008

On 2008-07-15 11:01:56 +0100, "Mhaxx" <supermhaxx@despammed.com> said:

>> from (managed, Windows CE based) code?
>
> Sorry, from unmanaged code..
>
> Mhaxx

IPC via window messages or point-to-point messasge queues are pretty
much your only options.

--
Neil Cowburn MVP
Principal Partner
OpenNETCF Consulting


Re: Call managed functions from unmanaged by Mhaxx

Mhaxx
Tue Jul 15 07:19:14 CDT 2008

> IPC via window messages or point-to-point messasge queues are pretty

Oh..

> much your only options.

Is there any example about what you say? I'm a beginner and I really don't
know so much about IPC, etc

Mhaxx



Re: Call managed functions from unmanaged by Mhaxx

Mhaxx
Tue Jul 15 07:28:55 CDT 2008

> IPC via window messages or point-to-point messasge queues are pretty

Oh..

> much your only options.

Is there any example about what you say? I'm a beginner and I really don't
know so much about IPC, etc

Mhaxx





Re: Call managed functions from unmanaged by Mhaxx

Mhaxx
Tue Jul 15 07:30:01 CDT 2008

> IPC via window messages or point-to-point messasge queues are pretty

Oh..

> much your only options.

Is there any example about what you say? I'm a beginner and I really don't
know so much about IPC, etc

Mhaxx







Re: Call managed functions from unmanaged by Neil

Neil
Tue Jul 15 07:51:34 CDT 2008

On 2008-07-15 13:19:14 +0100, "Mhaxx" <supermhaxx@despammed.com> said:

>> IPC via window messages or point-to-point messasge queues are pretty
>
> Oh..
>
>> much your only options.
>
> Is there any example about what you say? I'm a beginner and I really don't
> know so much about IPC, etc
>
> Mhaxx

You really ought to search before you ask:

http://www.google.com/search?q=point-to-point+message+queue
http://www.google.com/search?q=window+message+IPC+compact+framework

First result in each will give you what you need.

--
Neil Cowburn MVP
Principal Partner
OpenNETCF Consulting


Re: Call managed functions from unmanaged by Mhaxx

Mhaxx
Tue Jul 15 08:09:07 CDT 2008

Neil, you're right, I know but at the moment I was only looking for an
example, some code already written.. this is my need.

Thanks,

Mhaxx



Re: Call managed functions from unmanaged by Neil

Neil
Tue Jul 15 08:45:42 CDT 2008

On 2008-07-15 14:09:07 +0100, "Mhaxx" <supermhaxx@despammed.com> said:

> Neil, you're right, I know but at the moment I was only looking for an
> example, some code already written.. this is my need.
>
> Thanks,
>
> Mhaxx

Click the links and the click through to first item in each result set
and you will find example code.

--
Neil Cowburn, MVP
Principal Partner
OpenNETCF Consulting

www.opennetcf.com
www.smartdeviceframework.com


RE: Call managed functions from unmanaged by superclass

superclass
Wed Jul 16 05:09:45 CDT 2008



"Mhaxx" wrote:

> How to call .NET CF functions from (managed, Windows CE based) code?
>
> Mhaxx
>
>
>

use #pragma managed/#pragma unmanaged in your C++ program(cpp) file.
in managed block you can make a function that do your .NET CF and then
call this function from unmanaged code.



Re: Call managed functions from unmanaged by Christopher

Christopher
Wed Jul 16 05:19:13 CDT 2008

Hi,

"superclass" <superclass@discussions.microsoft.com> wrote in message
news:8D88CD5E-426A-428A-8909-F594B85964E7@microsoft.com...
> use #pragma managed/#pragma unmanaged in your C++ program(cpp) file.
> in managed block you can make a function that do your .NET CF and then
> call this function from unmanaged code.

Managed C++ is not a supported language for the .NET Compact Framework. So
this solution will not work.

Hope this helps,
Christopher Fairbairn



Re: Call managed functions from unmanaged by superclass

superclass
Fri Jul 18 06:50:00 CDT 2008



"Christopher Fairbairn [MVP]" wrote:

> Hi,
>
> "superclass" <superclass@discussions.microsoft.com> wrote in message
> news:8D88CD5E-426A-428A-8909-F594B85964E7@microsoft.com...
> > use #pragma managed/#pragma unmanaged in your C++ program(cpp) file.
> > in managed block you can make a function that do your .NET CF and then
> > call this function from unmanaged code.
>
> Managed C++ is not a supported language for the .NET Compact Framework. So
> this solution will not work.
>

so why I can still compile program with managed/umanaged code with Visual
Device Compiler??




Re: Call managed functions from unmanaged by Chris

Chris
Fri Jul 18 08:38:57 CDT 2008

Compile != run. The CF doesn't support all of the opcodes that managed C++
creates, so compile all you want, the CLR can't interpret all o the IL and
trying to run may fail. I say "may" becassue it's quite possible to create
a simple app in managed C++ that doesn't contain unsupported opcodes, but
there's no way to prevent it, so you will undoubtedly get to a point in any
real-world application where the opcode is used and the app will not work.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com

"superclass" <superclass@discussions.microsoft.com> wrote in message
news:9EE489F9-D23E-4A3D-9B6A-49F30ABB5D50@microsoft.com...
>
>
> "Christopher Fairbairn [MVP]" wrote:
>
>> Hi,
>>
>> "superclass" <superclass@discussions.microsoft.com> wrote in message
>> news:8D88CD5E-426A-428A-8909-F594B85964E7@microsoft.com...
>> > use #pragma managed/#pragma unmanaged in your C++ program(cpp) file.
>> > in managed block you can make a function that do your .NET CF and then
>> > call this function from unmanaged code.
>>
>> Managed C++ is not a supported language for the .NET Compact Framework.
>> So
>> this solution will not work.
>>
>
> so why I can still compile program with managed/umanaged code with Visual
> Device Compiler??
>
>
>