parameter doesn't return value to ASP or VB 
Author Message
 parameter doesn't return value to ASP or VB

Hello, everybody.
I have very strange problem, please help me.

I use DLL component in ASP script wrotten in C++
one of the method is:
DoSomething([out] long* lVal1, [out] long* lVal2)

it work fine, if client wrotten in C++, but VB or ASP client doesn't receive
value back.
I tried to use retval attribute for lVal2 and it works, but I can't use this
attr for both arguments.

Code in ASP:

Dim  lVal1
Dim  lVal2
'initialize by anything:
lVal1=5
lVal2=10

Set obj= CreateObject("Myproj.MyInt.1")
obj.DoSomething(lVal1, lVal2)

I receive my initial values, although DoSomething in object of C++ write
other values.

May be it is stupid question, but I lost whole day playing with it, and
didn't successed
What problem of [out] in ASP or VB?

Any help appreciated.

Alexander Grudsky



Sat, 30 Nov 2002 03:00:00 GMT  
 parameter doesn't return value to ASP or VB
Change to [in, out]


Sat, 30 Nov 2002 03:00:00 GMT  
 parameter doesn't return value to ASP or VB
use variants if you  want to return values to VBScript.

Regards
Rahul


Quote:
> Hello, everybody.
> I have very strange problem, please help me.

> I use DLL component in ASP script wrotten in C++
> one of the method is:
> DoSomething([out] long* lVal1, [out] long* lVal2)

> it work fine, if client wrotten in C++, but VB or ASP client doesn't
receive
> value back.
> I tried to use retval attribute for lVal2 and it works, but I can't use
this
> attr for both arguments.

> Code in ASP:

> Dim  lVal1
> Dim  lVal2
> 'initialize by anything:
> lVal1=5
> lVal2=10

> Set obj= CreateObject("Myproj.MyInt.1")
> obj.DoSomething(lVal1, lVal2)

> I receive my initial values, although DoSomething in object of C++ write
> other values.

> May be it is stupid question, but I lost whole day playing with it, and
> didn't successed
> What problem of [out] in ASP or VB?

> Any help appreciated.

> Alexander Grudsky




Sat, 30 Nov 2002 03:00:00 GMT  
 parameter doesn't return value to ASP or VB
You can use get_Properties to return exactly one value from C++ code to
VBScript (let the Wizard generate the code).  If you need more than one
value returned, as Rahul says, define your parameters as [out] VARIANT *.
You have to work just a bit harder making sure you assign the proper type.

Charlie


Quote:
> use variants if you  want to return values to VBScript.

> Regards
> Rahul



> > Hello, everybody.
> > I have very strange problem, please help me.

> > I use DLL component in ASP script wrotten in C++
> > one of the method is:
> > DoSomething([out] long* lVal1, [out] long* lVal2)

> > it work fine, if client wrotten in C++, but VB or ASP client doesn't
> receive
> > value back.
> > I tried to use retval attribute for lVal2 and it works, but I can't use
> this
> > attr for both arguments.

> > Code in ASP:

> > Dim  lVal1
> > Dim  lVal2
> > 'initialize by anything:
> > lVal1=5
> > lVal2=10

> > Set obj= CreateObject("Myproj.MyInt.1")
> > obj.DoSomething(lVal1, lVal2)

> > I receive my initial values, although DoSomething in object of C++ write
> > other values.

> > May be it is stupid question, but I lost whole day playing with it, and
> > didn't successed
> > What problem of [out] in ASP or VB?

> > Any help appreciated.

> > Alexander Grudsky




Sat, 14 Dec 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. FUNCTION doesn't return parameter value

2. ASP Returning a DIB Image (I think) from SQL , Netscape doesn't display it

3. ASP Returning a DIB Image (I think) from SQL , Netscape doesn't display it

4. OL2000 Addressproperties. PR_COURTESY_TITLE doesn't return value

5. IIS4 doesn't like parameters witeh ASP ???

6. Can't pass return value or output parameter to ADO if storeproc updates

7. problem using component with asp page -- result of function not returned, instead original value returned

8. Passing parameters to VB application and get return value from it

9. Function doesn't return an array in vb (Script) in Outlook

10. ActiveX call (VB to Matlab) executed but doesn't return...sometimes

11. VB object return wrong value in ASP page

12. SmartViewerHTMLFrame.asp sorta works, SmartViewerActiveXPage.asp doesn't

 

 
Powered by phpBB® Forum Software