Govert, thanks a lot for your replies. Unfortunately you didn't
misunderstand, as indeed I want to use an XLL from a standalone
VB.NET
application. The problem I think is twofold: 1) connecting to the XLL
and calling any of the functions exported, and 2) passing VARIANT
structures in and out of the function.
Problem 1) is pretty simple to solve using the DllImport directive
and, e.g. for an integer return value, assigning it to a Int32. Works
just fine.
The tricky thing is problem 2, at least for me as I fear I don't have
enough expertise in these things. I guess I would have to build my own
marshaller (but I'm not sure), but I have never done that and so I'm a
bit at a loss how to do it. I do know the memory layout of the VARIANT
structure, but how do I "translate" that into a marshaller (if indeed
I do need to)? I have found your (rather impressive, I must say)
xlCustomMarshal12.cs source file. Once translated it into *.vb, would
that help me write that marshaller (again: if I really need to)?
In this context I was wondering: using the DllImport, will the VB app
and the XLL reside in the same address space?
Thanks!
-Msrio
> > > Regards,- Hide quoted text -
>
> - Show quoted text -