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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T21:00:20+00:00 2026-05-23T21:00:20+00:00

I have a VBScript app calling COM-registered C# objects. I am able to pass

  • 0

I have a VBScript app calling COM-registered C# objects. I am able to pass in a COM object to a COM call, as well as receive either a primitive or a COM object back, but I can’t do both at the same time! If I try retrieving any value back from the call while also passing in a COM object, I get the exception “Invalid procedure call or argument”

Dim foo
Set foo = Server.CreateObject("Foo")
foo.SetProperty(1)

Dim bar
Set bar = Server.CreateObject("Bar")
Dim return
Set return = bar.Do(foo)

If that last line is simply bar.Do(foo) it works fine.

Also, whether it is

Set return = bar.Do(foo)

or

return = bar.Do(foo)

causes the same error in this case.

My COM classes are classes with only methods exposed, and implementing an interface. I’m getting this error by dealing with only ints, longs, and Strings.

  • 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-23T21:00:21+00:00Added an answer on May 23, 2026 at 9:00 pm

    I’m a bit rusty in this area but if your method is returning an int or string shouldn’t your code then read:

    return = bar.Do(foo)
    

    instead of

    Set return = bar.Do(foo)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a VBScript COM Component where I'm using Msxml2.FreeThreadedDOMDocument.4.0 however is there /
What I need to do is have a C# 2005 GUI app call a
I have a vbscript using the InternetExplorer object to navigate to a few pages
I have a vbscript file A that will call another vbscript file B. File
I have the following VBScript code: Dim returnVal returnVal = You did not pass
Does VbScript have a native implementation for Regex? I need to validate e-mail addresses
Setup I have a VBScript for driving the stress testing of a web service.
Ok I have a vbscript string in a wsf file as below: Dim strTransData
Given a variant, does VBScript have an equivalent of C#'s DateTime.TryParse method?
We have an old process (VBScript) that reads a common mailbox and processes certain

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.