Passing Data from ASP to VC++ component


Hi,

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:

"StringA1","StringA2","StringA3"
"StringB1"
"StringC1","StringC2"

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

"StringA1#StringA2#StringA3,StringB1,StringC1#StringC2"

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.

-Shinto




mnopixAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

OnegaZhangCommented:
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  
0
mnopixAuthor Commented:
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?
0
OnegaZhangCommented:
find a post in http://spaces.msn.com/onegazhang/
Title: pass 2-dimension string array from vbscript to COM

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual C++.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.