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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:10:14+00:00 2026-05-23T16:10:14+00:00

I calling a third-party COM function in my VBScript. The method signature is as

  • 0

I calling a third-party COM function in my VBScript. The method signature is as follows:

HRESULT  ParseXML ([in] BSTR *textIn,[in] VARIANT_BOOL *aValidateIn,[out, retval] MSXML2.IXMLDOMDocument2 **aXMLDocOut)

In my VBScript the following call gives back a type mismatch:

Dim someText
someText = "Hello"
Dim response
response = ParseXml(someText, False)

But passing in the string literal works fine:

Dim response
response = ParseXml("Hello", False)

Any ideas what I need to do on the VBScript side?

  • 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-23T16:10:15+00:00Added an answer on May 23, 2026 at 4:10 pm

    BSTR is already a pointer.
    BSTR* is therefore a pointer to pointer.

    That is, you are passing a string by reference (ByRef textIn As String).

    When you pass a variable by reference, the types must match. someText is VARIANT.

    If you were to pass just BSTR (ByVal textIn As String), VB would handle the conversion for you.

    Any ideas what I need to do on the VBScript side?

    If you are sure it’s the script you want to fix, not the library, then trick VB into using a temp variable which will be passed by ref:

    response = ParseXml((someText), False)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am calling third party com object from an ASP.NET that invoke an executable
I am calling a third party API which creates a socket, does a connect
I'm calling a third party stored procedure in Oracle from VB that is not
Say I am calling a third-party API which returns a Post, and I want
On a web page, I am calling a third party who does not allow
As part of a large automation process, we are calling a third-party API that
I have wrote a wrapper through FFI for a shared library function(third party function).
I'm calling a third party web service that returns a large amount of XML
I am calling a third party service and they send the response as Xml.
Calling Validate() on an XmlDocument requires passing in a ValidationEventHandler delegate. That event function

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.