dotgnu-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [DotGNU]Calling C


From: Gopal V
Subject: Re: [DotGNU]Calling C
Date: Wed, 30 Apr 2003 00:15:53 +0530
User-agent: Mutt/1.2.5i

If memory serves me right, Chris Smith wrote:
> So what is the most appropriate mechanism for doing this with pnet
> PInvoke or that internalCall technique Gopal was talking about?
> I'm concerned with cross-platform-ness here (assuming gpgme is cross platform 
> too).

Pinvoke == invoking off shared objects
internalCall == linking the gpgme into the engine itself

You might be better off with Pinvoke as it a more general method ...
ie you can call the same functions for all VMs from the same .so .

internal call would be used if & only if you have to do something 
which needs to be bound to the engine ... So for example , security
checks would be better as internal calls than PInvoke .. Also icalls
can throw exceptions etc , while Pinvoke relies totally on return
values for detecting errors (IIRC).

In all , I think you should use Pinvoke here .... for sake of simplicity
and all that...

> Also, I need to allow certain webservices access to the goldwater API - which 
> means swiging them for python/perl, and the same mechanism above for pnet..

swig them for C# as well ...

> So what's concensus? Pinvoke my libs or internalCall - internalCall is more 
> efficient isn't it?

Pinvoke it !. Think of it as rapid prototyping :-)

Gopal
-- 
The difference between insanity and genius is measured by success


reply via email to

[Prev in Thread] Current Thread [Next in Thread]