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

  • SEARCH
  • Home
  • 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 3282574
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T19:56:35+00:00 2026-05-17T19:56:35+00:00

i am working on an application which calls the COM component of a partner’s

  • 0

i am working on an application which calls the COM component of a partner’s application. Ours is .Net, theirs isn’t. I don’t know much about COM; I know that the component we’re calling is late-bound i.e.

obj As Object = CreateObject("THIRDPARTY.ThirdPartyObject")

We then call a method on this COM object (Option Strict Off in the head of the VB file):

obj.AMethod(ByVal Arg1 As Integer, ByVal Arg2 As Integer, ByVal Arg3 as Boolean)

I am a bit nonplussed that even though this call works, this overload doesn’t exist in the COM interop .dll that is created if I instead add a reference to the COM server using Add Reference. The only available call to this method that it says is available is AMethod().

However, this in itself is not what bothers me. What bothers me is that this call works for a while, THEN throws a TargetParameterCountException after a few dozen calls have executed successfully.

I ask thee thus, StackOverflow:

What. The. Hell.

The only thing I can guess at is that the documentation for the COM component states that this method is executed synchronously – so therefore maybe whatever’s responsible for throwing that exception is being blocked until some indeterminate point in time? Other than that, I’m completely stumped at this bizarre, and more importantly inconsistent behaviour.

edit #1:

More significant information that I’ve just remembered – from time to time the call throws an ExecutionEngineException instead. It only took one glance at the documentation to realise that this is VERY BAD. Doing a little bit of digging suggests to me that the late-binding call is causing stack corruption, crashing the entire CLR. Presumably this means that the runtime is shooting down bad calls (with TargetParameterCountException) some of the time and missing them (ExecutionEngineException) others.

edit #2:

Answering David Lively’s questions:

  • The call with zero arguments that’s currently in the code has been there for a long time. I haven’t been able to get hold of a manual for the third party’s COM implementation past two major revisions ago, so it’s possible that they’ve withdrawn that signature from service
  • There is only one location that this method is called from
  • This is one desktop app calling another, on the same machine. Nothing fancy
  • The object is persisted throughout the scope of the user’s interaction with the application, so there’s never a new one created.

Unfortunately, it seems likely that there is indeed a bug in the implementation, as you suggest. The trouble with this vendor is that, when we report a bug, their response tends to follow the general form: i) deny there’s a problem; ii) deny it’s their problem; iii) refuse to fix it. These three steps tend to span a frustratingly long period of time.

  • 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-17T19:56:36+00:00Added an answer on May 17, 2026 at 7:56 pm

    OK, basically – false alarm. I’ve done it wrong – I’ve copied some code over from somewhere improperly and the thing I’m calling was never supposed to support that overload. What I find interesting is that the component didn’t reject that late-bound call out of hand, but did everything it was supposed to do, at least initially.

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

Sidebar

Related Questions

I'm currently working on desktop application which calls third party API. After authorizing against
I'm working with a COM component which exposes a lot of Variant properties, but
The context I'm working with a Winforms application (.NET 3.5 SP1) which has the
i am working on an application in which i needs to call safari when
I am working on application which needs to be authenticated in different domain. To
I am working on an application which draws a simple dot grid. I would
I am working on an application which starts as a service but only if
I'm working on an application which stores data in tables, similar to an RDBMS.
I'm working on an application which has data imported from a foreign (and wholly
I am working on an application which sends an AJAX POST request (I'm using

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.