473,395 Members | 1,905 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,395 software developers and data experts.

Calling a VB Activex DLL method from C# (NET 1.1 - 2003)

When I build a project, I get this error:
Argument '1': cannot convert from 'double[]' to 'ref System.Array'

It is about a VB Activex DLL method that I am trying to call (using
System.Runtime.InteropServices).
Many arguments are arrays of double type, and for each one of them I get
that same error message.
I suppose I missed some pieces here.
Very grateful for some help.

Jun 6 '07 #1
2 1616
>When I build a project, I get this error:
Argument '1': cannot convert from 'double[]' to 'ref System.Array'
Call it like this

Array tmp = yourDoubleArray;
yourAxObj.SomeMethod(ref tmp);

You may want to use Tlbimp.exe to generate new interop assemblies with
strongly typed array parameters instead.
Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Jun 6 '07 #2
Thanks Mattias,
your suggestion worked just fine.
Thanks again
--
Carlot
"Mattias Sjögren" wrote:
>
When I build a project, I get this error:
Argument '1': cannot convert from 'double[]' to 'ref System.Array'

Call it like this

Array tmp = yourDoubleArray;
yourAxObj.SomeMethod(ref tmp);

You may want to use Tlbimp.exe to generate new interop assemblies with
strongly typed array parameters instead.
Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Jun 13 '07 #3

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

Similar topics

0
by: Gary | last post by:
sorry for not cross-posting originally (originally posted in the components subgroup) I seem to have run into two documented bugs whose workarounds are incompatible. What I have is an OCX...
1
by: rcb | last post by:
Hello, I have a 16-bit application which has to make COM calls to a .NET object. Previoulsy, when i was using VB6.0, the 16-bit application would successfully make COM calls to an ActiveX EXE. The...
5
by: Sagaert Johan | last post by:
hi I have the following problem: I have a C# application that uses an activeX . I installed the application and the NET 1.1 Runtimes on a clean pc When running the application i discover...
5
by: Nick Flandry | last post by:
I'm running into an Invalid Cast Exception on an ASP.NET application that runs fine in my development environment (Win2K server running IIS 5) and a test environment (also Win2K server running IIS...
2
by: Thomas Schoch | last post by:
I have a file with binary data and a dll where I have to pass a OLE_HANDLE which points to the data in the file. How do I read the data (i presume as binaryreader) and then pass the OLE_HANDLE...
3
by: Weston Fryatt | last post by:
Simple question I hope.... How do I send data to and from an ASP.Net (server side) web page to a ActiveX Control (client side) embedded in a web browser??? What I need to do, is I have image...
5
by: Michael Maes | last post by:
Hi, We have an ERP-Application that needs to interact with an "external accountancy program". This is acchieved through a "Connector" (ActiveX-dll) so kindly provided by the Accountancy-Program....
5
by: mikez | last post by:
Hi, We recently built a very basic file management system for a client in Access 2003 (to use with incoming tif scans). In it we used Microsoft's Document Imaging activex viewer (from Office...
3
by: lalekse | last post by:
Hi there. I've been searching for 2 days now a way to load a resource (byte) into a Flash Player 9 ActiveX Container. I've found a lot of discussions, talking about IBindHost, IManiker and so...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.