calling eVC++ code into c#.net

  • Thread starter sunny p via DotNetMonster.com
  • Start date
S

sunny p via DotNetMonster.com

Hi frnds,
I am verymuch new to .NET compact framework. i have a program written in
eVC++ for a PPC. Now i want to call that into c#.net how can i do that??
any suggestions would be great.
 
D

Daniel Moth

Define "call that into".

You cannot call managed code (c#) from native (evc).

You can call exported functions (implemented in c dlls) from c# via the
pinvoke mechanism (DllImport attribute). COM Interop is not supported in CF
1.0

You can have two processes communicate via any IPC mechanism (thus getting
communication between managed and native code).

If the above doesn't cover it then post back with specifics.

Cheers
Daniel
 
S

sunny p via DotNetMonster.com

hi,
thanks for ur reply.

i have created the dll for the eVC++ code i have. i dont know how to
use the dll file to write pinvoke in my c# application. if you have any
sample codes that would be of great help to me.

thanks,
sunny.
 
P

Paul G. Tobey [eMVP]

Well, OpenNETCF is full of example code for calling OS APIs from C#. You
might do a search on Web or on Microsoft.com, also, looking for samples of
P/Invoke. Basically, you want to make sure that the exported functions from
your DLL are declared extern "C", so that their names won't be mangled by
the compiler.

Paul T.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top