keyongtech


  keyongtech > dotnet.framework.* > dotnet.framework.compactframework > 10/2003

 #1  
10-08-03, 09:01 AM
Sagaert Johan
Some ways to reuse C code i tried are not supported when programming for CF
 #2  
10-08-03, 10:27 AM
Maarten Struys eMVP
It depends what you want to do with your existing code
base. If your code exists inside a DLL you could consider
P/Invoking to native code. Keep in mind that there are
limitations to P/Invoking to native code. There are some
articles available on P/Invoke, for instance
[url down]
us/dnnetcomp/html/netcfintrointerp.asp and
[url down]
us/dnnetcomp/html/netcfadvinterop.asp. Could you give more
information on what is not working or how you try to reuse
your existing code?

Regards,
Maarten Struys, eMVP
PTS Software bv

>-----Original Message-----
>Some ways to reuse C code i tried are not supported when

programming for CF
[..]
 #3  
10-08-03, 04:48 PM
Sagaert Johan
Using code from a DLL is impossible since the target is a smartdevice

I have a lot of (ansi-C) code and just want to used it in new c# project
targeting smartdevices (CF)


"Maarten Struys eMVP" <maarten.struys> wrote in message
news:280a
[..]
 #4  
10-08-03, 05:04 PM
Paul G. Tobey [eMVP]
You lost me with this comment. Why is it impossible? You can call DLL
functions from Smart Device Applications (have a look at OpenNetCF; there
are hundreds of P/Invokes in there).

If you really want to use the code as-is from your CF application, you'll
*have* to make it into a DLL.

Paul T.

"Sagaert Johan" <REMOVEsagaert_jREMOVE> wrote in message
news:1096
[..]
 #5  
10-11-03, 04:52 PM
Sagaert Johan
I am a bit confused.

If i add a cpp class lib project to my pocket pc solution it shows up as
having win32 platform attribute , while other projects in the solution are
Pocket PC .
So i doubt that this will work .
Or do i need to create my dll first in eVC4 ,and the use it in my pocket pc
solution ?



"Paul G. Tobey [eMVP]" <ptobey_no_spam> wrote in message
news:3256
[..]
 #6  
10-11-03, 06:38 PM
Maarten Struys, eMVP
Well yes, what you need to do is indeed create your DLL in eVC 4 (creating a
WCE Dynamic Link Library). Make sure that the functions you want to use from
within your CF application are exported as C functions (using extern "C") or
the function names inside your DLL will be mangled.
Similar Threads
The reuse of keywords in the C++ standard

Posted here because comp.std.c++ seems to have died an unexpected death. ------- I note with some dismay the proposal to create a new meaning for the C and C++ keyword...

reuse of standard HTML editor

Hello all, I'm trying to understand how to write packages and I found the sample how to create your own editor and implemented IVsEditorFactory following way: ===cut=== //...

Code Reuse

Hi, I am an IT person who uses .Net to support our infrastructure. Since I have been doing this for a while it would be a misnomer for classify myself as a newbie;...

code reuse and design reuse

Hi all guys, As an embeded programmer with five year C experience, I did read many great books related with design, coding, test,debug,algorithms, compiler, design, os, pm...

Code reuse, code behind, and can't inherit since already inheritsPage

I've noticed that C# can only inherit from a single class. At the same time, the CodeBehind in an aspx.cs file inherits from Page. So what do you all do to reuse code in...


All times are GMT. The time now is 04:22 AM. | Privacy Policy