Use C code on C#

C

Cool_Zer0

Hi.

I'm trying to use a SIP Stack that I found on the web.
This stack compiles to a .lib for the ARMV4I architecture.


My problem is using that .lib on my C# Smart Device project.

Anyone can give me some highlights?


Thanks
 
P

Paul G. Tobey [eMVP]

You can't do that. The closest you can come would be to build a DLL with
suitable exports from the C code and P/Invoke them from C#.

Paul T.
 
S

Steve B.

What does this lib do ?
SIP is already managable in C#...
What are your requirements ?

Steve
 
C

Cool_Zer0

Hi.

What do you mean by "SIP is already managable in C#"? You mean that C#
already supports SIP? I don't understand...

I'm developing a VoIP application for audio and video and the ideia is
to be portable to Windows Mobile 5 (Smartphone/PocketPC) and Symbian
OS. The problem is that Symbian OS is C++ :(

Can you point to a link where explains where to build a .DLL with the
..LIB? Or to build the .DLL with the sources available?


Thanks
 
S

Steve B.

Sorry... I understood SIP as Software Input Panel (the virtual keyboard on
devices).
Concerning the dll, instead of updating the source code of the lib, you can
create a C++ dll class (VS 2005 supports this) that wrap each function of
the c lib to a exported dll function. In your c# code, use the dllimport
attribute to call this c++ methods.

You can also (I never tryed) create a managed assmbly using C++ in which you
can call the C lib.

HTH
Steve



"Cool_Zer0" <[email protected]> a écrit dans le message de (e-mail address removed)...
Hi.

What do you mean by "SIP is already managable in C#"? You mean that C#
already supports SIP? I don't understand...

I'm developing a VoIP application for audio and video and the ideia is
to be portable to Windows Mobile 5 (Smartphone/PocketPC) and Symbian
OS. The problem is that Symbian OS is C++ :(

Can you point to a link where explains where to build a .DLL with the
..LIB? Or to build the .DLL with the sources available?


Thanks
 
G

Guest

Concerning the dll, instead of updating the source code of the lib, you
can create a C++ dll class (VS 2005 supports this) that wrap each function
of the c lib to a exported dll function. In your c# code, use the
dllimport attribute to call this c++ methods.

You can cal C methods, but not C++ class members through P/Invoke.
You can also (I never tryed) create a managed assmbly using C++ in which
you can call the C lib.

No. Managed C++ is not supported in the CF.


--
Chris Tacke
OpenNETCF Consulting
Managed Code in the Embedded World
www.opennetcf.com
--
 

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