Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8911695
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:00:48+00:00 2026-06-15T04:00:48+00:00

I’ve written a small library in C#. In this library there are two classes

  • 0

I’ve written a small library in C#.

In this library there are two classes that are ComVisible.

The first one has a method that provide a array of custom objects (declared in the second class).

I tested the library with a small c# application and everything work.
Then I do the same thing VB6. The problem occurs when I call the method I descibed before. I get a Type Mismatch error.

Here’s the BV6 code:

   Private Sub Command1_Click()
       Dim Flussi As FMDriver.FMDriver  
       Set Flussi = New FMDriver.FMDriver
       [...]
       Dim temp() As FMDriver.FM
       temp = Flussi.GetElabData(station, codpar, data, tabella, nfunz, tiponfunz)
       [...]

This is the custom class FM

[ComVisible(true)]
public partial class FM
{
    public FM() { }

    [ComVisible(true)]
    public double Value { get; set; }

    [ComVisible(true)]
    public double IDisp { get; set; } 
}

Any idea? If from the response I extract only one element it works.

EDIT:

Another strange thing…

Dim pippo As FM
Set pippo = CreateObject("fmdriver.fm")
pippo.Value = 100
pippo.IDisp = 43    
pippo = Flussi.GetElabData( [..cut..] )(4)

In Pippo.Value there’s the correct value that GetElabData return on the 4th position of the array but in Pippo.IDisp the value doesn’t change, it remains 43instead of getting the new value.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T04:00:49+00:00Added an answer on June 15, 2026 at 4:00 am

    In the end I created all my beautifull methods that returns custom obj (for .NET apps) and a couple of methods, dedicated to VB6, with the [ComVisible(true)] tag, that returns more siple arrays of values (part of the result of the other methods).
    So I think that returning custom Obj to VB6 it’s not very reliable and sometimes it doesn’t work at all.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I know there's a lot of other questions out there that deal with this
I've got a string that has curly quotes in it. I'd like to replace
I have a small JavaScript validation script that validates inputs based on Regex. I
I have an array which has BIG numbers and small numbers in it. I
I'm making a simple page using Google Maps API 3. My first. One marker
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into
In my XML file chapters tag has more chapter tag.i need to display chapters

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.