[quoted text, click to view] > Can you be a bit more specific regarding which parameters were
> imported incorrectly? Perhaps we can help you fix them.
That would be great.
Ok, one of the Functions (COMFindRecipes) should take a String with the path
to a file, and two Arrays of Singles and some more Parameters.
But when using Add Reference -> Com ...
It changed the two arrays to simple Singles.
So I used tlbimp.exe and ildasm to make an Il File of the Dll.
Than changed the following from:
.method public hidebysig newslot virtual abstract
instance void COMFindRecipes([in] string& marshal( bstr)
ActiveFileName,
[in] float32& TargetRflValues,
[in] float32& SubstrateRflValues,
[in] float32 GlossValue,
[in][out] int32& NoOfRecipesReady,
[in][out] int32& RetValue) runtime
managed internalcall
To: (replaced & with [])
.method public hidebysig newslot virtual abstract
instance void COMFindRecipes([in] string& marshal( bstr)
ActiveFileName,
[in] float32[] TargetRflValues,
[in] float32[] SubstrateRflValues,
[in] float32 GlossValue,
[in][out] int32& NoOfRecipesReady,
[in][out] int32& RetValue) runtime
managed internalcall
and did the same again a few lines down lower in the IL Code.
That seemed to help, the new Dll want's two arrays now. But when I try to
use the Dll, I get a msgbox telling me that there is no file at the position
of: "ActiveFileName" (1st Parameter). I read somewere (don't know were, been
trying to solve this for a few days) that my kind of String is not the type
of String the Dll wants. So that's where I gave up on this approch and tried
to useing Dllimport so I could tell It what kind of string, or use
stringbuilder.
I have an C++ example on how to talk to the Dll if that helps.
Thank you for any help,
this is driving me nuts! And I don't have a clue on what to do.
Johannes Hammersen
[quoted text, click to view] > Mattias
>
> --
> Mattias Sjögren [MVP] mattias @ mvps.org
>
http://www.msjogren.net/dotnet/ > Please reply only to the newsgroup.