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 402331
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T17:06:55+00:00 2026-05-12T17:06:55+00:00

How do I make instances of and calls to COM components that have been

  • 0

How do I make instances of and calls to COM components that have been extended?

I have used a third-party COM component (XRawFile2.dll from Finnigan/ Thermo Scientific) for many years in a mass spectrometry-related application written in .NET (mixed VB.NET and C#) for accessing raw spectrum data. This has worked well.

However, this COM component has been extended by way of interface inheritance. Expressed in IDL (extracted using the OLE/COM Object Viewer [OleView.Exe]):

interface IXRawfile3 : IXRawfile2 {
.
.

interface IXRawfile2 : IXRawfile {
.
.

interface IXRawfile : IDispatch {
.
.

coclass XRawfile {
    [default] interface IXRawfile;
};

The full extracted IDL for XRawFile2.dll is available (HTML page with <pre>).

I want to use a function available in the new interface (IXRawfile3),

GetMassListRangeFromScanNum()

instead of

GetMassListFromScanNum()

in the original interface (IXRawfile).

I have no trouble creating an instance of XRawFile and calling GetMassListFromScanNum().

But I can’t get it to work with GetMassListRangeFromScanNum(). For instance, using GetMassListRangeFromScanNum() for an instance of XRawFile gives this compile error:

    Error 1 'XRAWFILE2Lib.XRawfile' does not contain a
    definition for 'GetMassListRangeFromScanNum' and no
    extension method 'GetMassListRangeFromScanNum' accepting a
    first argument of type 'XRAWFILE2Lib.XRawfile' could be
    found (are you missing a using directive or an assembly
    reference?)

The tryout C# source code is also available.

Platform: Windows XP 64 bit SP2. Visual Studio 2008. The interop file for XRawFile2.dll was created by Visual Studio 2008 in the normal manner.

  • 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-05-12T17:06:56+00:00Added an answer on May 12, 2026 at 5:06 pm

    Try casting your instance of XRawFile to IXRawfile3

    e.g.

    ( (IXRawfile3) myRawFile ).GetMassListRangeFromScanNum()
    

    This should do a query interface on the COM object, asking it for the IXRawfile3 interface. (Assuming the typelib you have imported does match the implementation of XRawfile)

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

Sidebar

Related Questions

Say we have an existing process (or application) that calls a COM object from
I have an APEX class that is used to send an email out each
I have successfully created an ASP.net website to make calls to a Soap Web
I have written an iOS app that calls NSUrlConnection multiple times to download image
I have a VB6 COM component which I need to call from my .Net
How can I make a cross-platform emacs command that opens another instance of emacs
We're implementing a new solution in our classic ASP environment that's using COM interop
What i have here is a simple webview activity that when loaded it auto
I have seen the following links before posting this question http://www.devx.com/wireless/Article/40792/1954 Saving Android Activity
I'm trying to make modal frame in Java Applet such like shown here: http://www.java2s.com/Tutorial/Java/0240__Swing/Showthegivenframeasmodaltothespecifiedowner.htm

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.