comexception calling ocx from vb.net

M

marfi95

I'm trying to call a 3rd party ocx from my vb.net app. I've added the
ocx by customizing the toolbox so the interop references get added
automatically. However, when I make a call to the ocx, I get a
COMException: Type Mismatch error. As far as I know, I'm passing the
string as follows:

Dim str as string
dim rc as integer
rc = oread.getversion(str) <--- gets type mismatch

The method does expect a string passed BYREF. Am I doing something
wrong ?

Any ideas ?

Thanks,
Mark
 
C

Cor Ligthert

Marfi,

Please keep your questions in the original thread where Herfried has
answered you.
In this way everybody has to do this problem new.

Somebody would not even know that you had succesfully used the advice from
Herfried.
A simple "thanks that helps, however I have an extra question", made
Herfrieds answer even better because everybody who than search on Google,
knows that it works.

Now I saw it by accident because I found that answer from Herfried so nice
adequat, what I missed the last time sometimes from him.

Just my thought,

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top