|
I have been trying (unsuccessfully) to pass an array of Variants to a C++ COM component from an ASP page. I wind up getting a 'Type Mismatch' error when the ASP tries to call the COM method.
Below is the ASP and the C++ declarations for what I have tried. Anybody see what I am doing wrong?
Thanks in advance!
Mike Baker
-------------------------
//ASP
Dim MyArray(2)
Dim MyString
Dim MyObj
Dim RC
MyString = "Hello"
MyArray(0) = "One"
MyArray(1) = 2
MyArray(2) = MyString
Set MyObj = Server.CreateObject(" ... ")
RC = MyObj.Method( MyArray )
//C++ #1
STDMETHOD(Method) ( /*[in,out]*/ SAFEARRAY ** pArray,
/*[out,retval]*/ long * pnReturnCode );
//C++ #2
STDMETHOD(Method) ( /*[in,out]*/ VARIANT * pArray,
/*[out,retval]*/ long * pnReturnCode );
|
|
|
|
|
I don't know if you already solved your problem.
I spent a long time with a C++ component called by a ASP page and I remember that the output parameter can only be a VARIANT* (you have long), perhaps the problem isn't in the input parameter but in the output.
Hope it helps.
Michela
|
|
|
|
|
Thanks for the reply. You are exactly correct. The problem is that all of the [out] parms need to be VARIANT*. Now it works fine. Thanks again!
Mike
|
|
|
|
|
Hello,
I recently posted this on the MSDN Newsgroups but with no joy:
"I would like to report that the last version of IE where
the Rich Edit Control as used in Hotmail worked properly
was version 5.01 SP2
Since that time (IE5.5+) when using Hotmail's Rich Text
Editor style page with an application using an IE web-
control, the return button does not move down a line,
neither does enter. Infact no keyboard method seems to
enable a carriage return to be performed. However using
IE itself (not as part of an application via the
webcontrol) the problem does not occur.
Using IE 4 / IE5.0 on a machine with the same application,
the rich-text control in hotmail can be used without any
problems.
If anyone knows any work around or solution to this
problem please email me / reply to this message."
Anyone here have any clues?
Many thanks,
Paul
//////////////////////////////
// Paul Evans, UK.
//////////////////////////////
|
|
|
|
|
Just a stab in the dark, but could it be that some part of the App is catching the enter keypress, and isn't passing it on to the web control?
--
Help me! I'm turning into a grapefruit!
|
|
|
|
|
Good effort, but I don't think so! It's the only control that is effected.
Has anyone else who has developed a IE Webcontrol based app come across similar problems?
Cheers
//////////////////////////////
// Paul Evans, UK.
//////////////////////////////
|
|
|
|
|
I've got an old VB6 app which uses the HTML editor component from dhtmled.ocx, and it works fine on IE5, IE5.5, IE6 and IE6 SP1.
I've also got an app which hosts the webbrowser control to display pages from the Internet, including some with the HTML editor component [clsid:2D360201-FFF5-11d1-8D03-00A0C959BC0A] embeded, and I've never had any problems with it.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
|
|
|
|
|
I thought the rich edit control as used on Hotmail was a scripted IFRAME
Technically speaking the dictionary would define Visual Basic users as programmers. But here again, a very generalized, liberal definition is being employed and it's wrong - just plain wrong - Tom Archer 5/12/02
|
|
|
|
|
I writing an ASP page to receive data from user, then save as Excel file and send back that Excel file to client.
Please show me the way to solve that problem.
(I intend to use the CGI technique but I start with nothing).
|
|
|
|
|
You have a few choices for this one:
1) Write the data as a .csv text file and stream that back using an Excel mime type. No formatting available this way. This is easy but not very pretty.
2) Automate Excel using Excel on the server. MS does not recommend this as Excel is single threaded and you could have scaling problems with many requests (each request would spawn its own copy of Excel on the server). This works but proceed at your own risk.
3) Use a third party component like SoftArtisans ExcelWriter.
I have done all three and think .csv or ExcelWriter are the best options.
|
|
|
|
|
Actually another sub-option to number 1 is to write an HTML table and stream that back using Excel mime type. Then you can do whatever formatting you like.
Jeremy
Jeremy Oldham
|
|
|
|
|
I have tried to use the option number 2 for a single request (not many requests at a time which cause many copys of Excel Server).
For example : Server.CreateObject("Excel.Application")
But I can handle that object (?) After having been created, it was closed immediately.
Another automation - Lotus123.Workbook.98 - the problem is I can not close the object once it is created (by all ways... but failed). The IIS will be down if you re-create that object at another time.
Many big problems to me. May you help me ?!
|
|
|
|
|
Hi, everyone!
I want to draw a curve like CPU/MEM monitor in
Windows in an Applet. Where can I find some sample
codes?
Cheers,
George
|
|
|
|
|
|
Thanks, Boctor pal!
Your PHP script gives me a lot of help!
Cheers,
George
|
|
|
|
|
|
Hi,
Anyone have webportal like Codeproject in ASP?
If you have, would you please share it with me?
Many thanks,
-BHKien
|
|
|
|
|
|
How can I get it?
-BHKien
|
|
|
|
|
|
That's a forum only!
-BHKien
|
|
|
|
|
you can try with http://coveryourasp.com/CYA.asp or http://www.2enetworx.com/dev/index.asp , you can download the entire site.
The first one is ASP+javascript, the second ASP+VBscript
Michela
|
|
|
|
|
Very cool! Thank you very much!
-BHKien
|
|
|
|
|
I would like to use a combo drop down, on a HTML created page, to populate a Listbox,from a CSV file. The Aim is that each time an item (categories of articles) is selected from the combo, it causes a listbox to fill with a selection of articles obtained from a file, of which each listbox item (article) once selected opens up a Adobe pdf file.
I have little html probramming experience. Any help is appreciated.
Thanks,
Colin.
|
|
|
|
|
Hi,
I created a word document from my asp Page and it works fine on my evelopment environment but doesn't on production site.
It was quite simple ..just giving the Response.ContentType = "application/vnd.ms-word".
Does it require a Word on server.
and secondly can I create header and footer for the word page from ASP.
Thanks a lot,
Anil
|
|
|
|