Passing Data from ASP to VC++ component

Posted on 2006-03-29
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
    LVL 12

    Expert Comment

    Add a method Test to your interface
    STDMETHOD(Test)(VARIANT object);
    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

    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

    find a post in
    Title: pass 2-dimension string array from vbscript to COM


    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Suggested Solutions

    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++ ( I described how to encrypt text and recommended that the encrypted text be stored as a series of hexadecimal digits -- because cyphertext may…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    728 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

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now