Passing by reference through ATL? 
Author Message
 Passing by reference through ATL?

Learning ATL:
I have a ATL method that I need to pass back a string.  So I would like to
do it by reference.
HRESULT xx::getString( BSTR sValue, long nValue )
  if( nValue == 0 )
      sValue = "Return 0 for false";
      sValue = "Return as true";
      return S_OK;


I know how I'm handling and returning string back to VB wrong as the code
shown above.

In VB i would do the following:

Dim sValue as String
   Call oTest.getString( sValue, 1 )
   MsgBox "This is the solutin: " & sValue

If someone can help me in the ATL C++ section on how to handle return by


Tue, 22 Jan 2002 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Passing by reference to an ATL COM component

2. Trouble with interface reference: vb 5 driving C++ 5 atl dll

3. Passing ATL controls from VB 7

4. Passing a Variant 2D array of Double to C from Basic via ATL

5. Passing variant array from VBScript to ATL

6. URGENT : Passing SAFEARRAY of UDT from ATL DLL to VB

7. passing com/atl object in vb

8. Passing an object reference by reference where the object has a default property

9. Using DAO to create pass thru queries in access 2000 - references problem

10. Passing By Reference myfunc(ByRef <x>)

11. HELP: Recordset Type mismatch for object reference passing

12. Pass Class reference of unkown class


Powered by phpBB® Forum Software