Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Passing Data from ASP to VC++ component

Posted on 2006-03-29
Medium Priority
Last Modified: 2012-05-05


Facing some proble in passing data to COM component.

The user enters some strings through WEB and these to be passed to a COM DLL. Please note that number of rows and cols are not limited.

Sample data:


Current approach was merge all data into a single string using field seperators and in COM it is accessed as a BSTR. So the above data is passed like


Here the '#' is field seprator for columns and ',' for rows.

The new problem is that the user input may contain anything including special characters. So I cannot use field seprators like '#'.

Please let me know your suggestions.

Thanks in advance.


Question by:mnopix
  • 2
LVL 12

Expert Comment

ID: 16329383
Add a method Test to your interface
in Test(), handle object.vt = VT_BYREF | VT_VARIANT

Call the method in the following way:
dim vbsarray(2)
vbsarray(1) = "aa"
vbsarray(2) = "bb"

IXXX.Test vbsarray  

Author Comment

ID: 16332822
Need to handle multi- dimensional arrays!

dim vbsarray(3,3)
vbsarray(0,0) = "StringA1"
vbsarray(0,1) = "StringA2"
vbsarray(0,2) = "StringA3"
vbsarray(1,0) = "StringB1"
vbsarray(2,0) = "StringC1"
vbsarray(2,1) = "StringC2"

How these values could be retrieved inside a COM object?
LVL 12

Accepted Solution

OnegaZhang earned 375 total points
ID: 16334449
find a post in http://spaces.msn.com/onegazhang/
Title: pass 2-dimension string array from vbscript to COM


Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The following diagram presents a diamond class hierarchy: As depicted, diamond inheritance denotes when two classes (e.g., CDerived1 and CDerived2), separately extending a common base class (e.g., CBase), are sub classed simultaneously by a fourt…
In Easy String Encryption Using CryptoAPI in C++ (http://www.experts-exchange.com/viewArticle.jsp?aid=1193) I described how to encrypt text and recommended that the encrypted text be stored as a series of hexadecimal digits -- because cyphertext may…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question