Click here to Skip to main content
15,915,800 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: Unsorted Map and Multimap :: STL Pin
Christian Graus21-Dec-02 12:46
protectorChristian Graus21-Dec-02 12:46 
GeneralRe: Unsorted Map and Multimap :: STL Pin
valikac21-Dec-02 12:50
valikac21-Dec-02 12:50 
GeneralPackaging a VC++ Software Pin
xxhimanshu21-Dec-02 1:46
xxhimanshu21-Dec-02 1:46 
GeneralRe: Packaging a VC++ Software Pin
Anatoly Ivasyuk24-Dec-02 5:57
Anatoly Ivasyuk24-Dec-02 5:57 
Generalserialize using stream. - binary Pin
magicast20-Dec-02 2:48
magicast20-Dec-02 2:48 
GeneralRe: serialize using stream. - binary Pin
AlexO20-Dec-02 4:04
AlexO20-Dec-02 4:04 
GeneralRe: serialize using stream. - binary Pin
Ben Burnett5-Jan-03 13:17
Ben Burnett5-Jan-03 13:17 
GeneralNeed help using SafeArray/VARIANT from ASP/VBScript client Pin
bahruddina19-Dec-02 16:20
bahruddina19-Dec-02 16:20 
hi,

I'm developing ATL ActiveX DLL that used by ASP/VBScript client.
This server uses VARIANT as a parameter input :
//idl<br />
HRESULT UseThis([in] VARIANT StringParam, [out, retval] long *ret);<br />
<br />
//cpp<br />
STDMETHODIMP CObj::UseThis(VARIANT StringParam, long *ret)<br />
{<br />
	//mark as NOT OK<br />
	*ret = 1;<br />
<br />
	// Be sure we have an array of strings.<br />
	if((StringParam.vt & VT_ARRAY) && (StringParam.vt & VT_BSTR))<br />
	{		<br />
		SAFEARRAY *pString = StringParam.parray;<br />
		BSTR *bstrArray;<br />
		CComBSTR bstrRet;<br />
		// Lock it down.<br />
		SafeArrayAccessData(pString, (void**)&bstrArray);<br />
		<br />
		// Read each item.<br />
		for(ULONG i = 0; i < pString->rgsabound->cElements; i++)<br />
		{<br />
			bstrRet = bstrArray[i];	<br />
		 }<br />
		// Unlock it.<br />
		SafeArrayUnaccessData(pString);<br />
		SafeArrayDestroy(pString);<br />
<br />
		//mark as OK<br />
		*ret = 0;<br />
	}<br />
<br />
	return S_OK;<br />
}


When I try to use the function from VB client it OK, but when used from ASP/VBScript client it just FAILED ! Confused | :confused:

VBscript client running on IIS:
Dim obj<br />
Dim ret<br />
Dim strParam(2)<br />
<br />
    Set obj = Server.CreateObject("MyATL.Obj")    <br />
    <br />
    strParam(0) = "We"<br />
    strParam(1) = "love"<br />
    strParam(2) = "COM"    <br />
    <br />
    ret = obj.UseThis(strParam)<br />
    <br />
    Response.Write "Result is : " & ret<br />
    <br />
    Set obj = Nothing


Thank u very very much in advance . Any advice, help and suggestions strongly aprreciated.

Regards.
GeneralRe: Need help using SafeArray/VARIANT from ASP/VBScript client Pin
Barry Lapthorn19-Dec-02 20:40
protectorBarry Lapthorn19-Dec-02 20:40 
GeneralRe: Need help using SafeArray/VARIANT from ASP/VBScript client Pin
AlexO20-Dec-02 3:33
AlexO20-Dec-02 3:33 
GeneralRe: Need help using SafeArray/VARIANT from ASP/VBScript client Pin
Barry Lapthorn20-Dec-02 5:59
protectorBarry Lapthorn20-Dec-02 5:59 
GeneralRe: Need help using SafeArray/VARIANT from ASP/VBScript client Pin
AlexO20-Dec-02 7:17
AlexO20-Dec-02 7:17 
GeneralRe: Need help using SafeArray/VARIANT from ASP/VBScript client Pin
Barry Lapthorn22-Dec-02 0:44
protectorBarry Lapthorn22-Dec-02 0:44 
GeneralRe: Need help using SafeArray/VARIANT from ASP/VBScript client Pin
Anonymous20-Dec-02 3:42
Anonymous20-Dec-02 3:42 
GeneralRe: Need help using SafeArray/VARIANT from ASP/VBScript client Pin
AlexO20-Dec-02 4:05
AlexO20-Dec-02 4:05 
GeneralExecutable as server type Pin
jmodia19-Dec-02 3:58
jmodia19-Dec-02 3:58 
GeneralATL Server include issue.... Pin
nw6031218-Dec-02 18:25
nw6031218-Dec-02 18:25 
GeneralATL and GDI+ Pin
Jonathan de Halleux18-Dec-02 2:26
Jonathan de Halleux18-Dec-02 2:26 
GeneralRe: ATL and GDI+ Pin
Jörgen Sigvardsson21-Dec-02 10:21
Jörgen Sigvardsson21-Dec-02 10:21 
GeneralRe: ATL and GDI+ Pin
pba_23-Dec-02 12:54
pba_23-Dec-02 12:54 
GeneralRe: ATL and GDI+ Pin
Jonathan de Halleux24-Dec-02 2:58
Jonathan de Halleux24-Dec-02 2:58 
GeneralAttributed ATL and interfaces Pin
Chad Busche16-Dec-02 6:44
Chad Busche16-Dec-02 6:44 
GeneralRe: Attributed ATL and interfaces Pin
Jörgen Sigvardsson16-Dec-02 10:40
Jörgen Sigvardsson16-Dec-02 10:40 
GeneralRegular methods on the class object Pin
Mehdi Mousavi14-Dec-02 3:48
Mehdi Mousavi14-Dec-02 3:48 
GeneralRe: Regular methods on the class object Pin
AlexO19-Dec-02 4:25
AlexO19-Dec-02 4:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.