hmm, I successfully managed to pass a string and return it.
look at this piece of IL-code...
I changed the row that says...
IL_0005: ldarg.1
to
IL_0005: ldarg.0
The question is why the VB.NET DLL(or the IL-assembler) tries to get the stringparameter from position 1
[Swedish]
Vad dumt det känns att prata engelska med någon som man vet är svensk. :)
[/Swedish]
look at this piece of IL-code...
.method public instance string SayHi(string Name) cil managed
{
// Code size 16 (0x10)
.maxstack 2
.locals init (string V_0)
.vtentry 1:1
.export [1] as SayHi
IL_0000: ldstr "Hej "
IL_0005: ldarg.1
IL_0006: call string [mscorlib]System.String::Concat(string,
string)
IL_000b: stloc.0
IL_000c: br.s IL_000e
IL_000e: ldloc.0
IL_000f: ret
} // end of method Foo::SayHi
} // end of class Foo
I changed the row that says...
IL_0005: ldarg.1
to
IL_0005: ldarg.0
The question is why the VB.NET DLL(or the IL-assembler) tries to get the stringparameter from position 1
[Swedish]
Vad dumt det känns att prata engelska med någon som man vet är svensk. :)
[/Swedish]