473,322 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

comexception calling ocx from vb.net

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

Nov 21 '05 #1
1 1150
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
Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Damaji Jambhale | last post by:
COMException: Catostrphic failure When I added a "dll" reference in the web project. I was able to instantiate the class OK. But when I tried to set the properties, it failed with...
1
by: Steven | last post by:
Hi there, I am trying to export a chart using the Excel11 object from C#. I can properly open workbooks and read cells, but calling Export() on the Chart object throws a COMException ...
2
by: Jim Lacenski | last post by:
I have a VB class that uses .NET and ADODB to write into an Excel spreadsheet (via Jet) on a server as part of a web application. ADODB is used instead of ADO.NET because it greatly simplifies the...
0
by: Balint Toth | last post by:
Dear all, I am trying to call SAPI methods (which works fine in case of a client application), but calling .Speak the following exception is thrown: Additional information:...
3
by: Jay A. Moritz | last post by:
I have an application that loads IE and iterates through web pages to retrieve information from the page then activates specific controls to retrieve the next page and iterate through that page for...
2
by: msielski | last post by:
I am posting this here since I don't see an Outlook programming group specific to .net but only VBA. Please let me know if I'll have better luck posting elsewhere. I am writing a VB.NET...
4
by: dynastar | last post by:
I'm trying to send custom COMExceptions from my C# server. My test client in C# has no problem reading the HRESULT I send (say, 0x80040002). Needless to say, the MFC client in C++ allows this...
2
by: ortega23 | last post by:
Hi, I am trying to obtain the column number of the parent of a cell, if the cell is a linked cell (i.e. its value depends on another cells value). I try to read "Precedents"(parent cells) of...
1
by: TheFid | last post by:
In case someone knows off the top.... I am accessing a COM-interface-exposing C# dll in VC++ 6. The C# disp method can throw a COMException. Do I catch a _com_error ? It's not obvious from the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.