xcal
2009-09-26 16:11:34 UTC
Hi group,
Only I want to do an experiment.
I tried to make a library in native C code,
and then using pinvoke,on C#,
such that altering calling conventions
everywhere as possible I could be able to do this
// function on native C code:
int f(int a,int b)
{
return a-b;
}
but using this by using pinvoke on C#
I want to obtain e.g.
f(2,0) = -2
is this possible ?, or I have a misconcept
about what calling conventions can control?
Perhaps not with C# I shall accomplish my goal,
but perhaps with some other language.
thanks very much in advance
Carlos.
Only I want to do an experiment.
I tried to make a library in native C code,
and then using pinvoke,on C#,
such that altering calling conventions
everywhere as possible I could be able to do this
// function on native C code:
int f(int a,int b)
{
return a-b;
}
but using this by using pinvoke on C#
I want to obtain e.g.
f(2,0) = -2
is this possible ?, or I have a misconcept
about what calling conventions can control?
Perhaps not with C# I shall accomplish my goal,
but perhaps with some other language.
thanks very much in advance
Carlos.