devxlogo

Passing Arguments By Reference/Pointer in ASP

Passing Arguments By Reference/Pointer in ASP

Question:
I am using a COM object written in Visual C++ using MFC. One of the object methods has a signature like this:

void Function(BSTR, BSTR, long*)
Whenever I call this method I get a type mismatch on the last parameter. How can I pass a long* from an ASP script either using VBScript or JavaScript? (I am running Microsoft Personal Web Server.)

Answer:
Unfortunately, VBScript running in your ASP pages only deals with variant data types. One thing you could try is to pass it as

Clng(variable) 
and see if that works.

devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist