Click here to Skip to main content
15,923,142 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalunable to include Excel Pin
act_x9-Sep-03 7:12
act_x9-Sep-03 7:12 
GeneralRe: unable to include Excel Pin
David Crow9-Sep-03 7:26
David Crow9-Sep-03 7:26 
GeneralRe: unable to include Excel Pin
act_x9-Sep-03 8:14
act_x9-Sep-03 8:14 
GeneralRe: unable to include Excel Pin
David Crow9-Sep-03 8:16
David Crow9-Sep-03 8:16 
GeneralRe: unable to include Excel Pin
act_x9-Sep-03 8:17
act_x9-Sep-03 8:17 
Generalchar * to VARIANT Pin
act_x9-Sep-03 6:29
act_x9-Sep-03 6:29 
GeneralRe: char * to VARIANT Pin
Miszou9-Sep-03 6:41
Miszou9-Sep-03 6:41 
QuestionHow to take the address of a smart pointer? Pin
Miszou9-Sep-03 6:16
Miszou9-Sep-03 6:16 
I need to pass a pointer to a _com_ptr_t object (as created by the #import directive), but I can't take the address of it, since the & operator is overriden by the class to return the underlying interface pointer.

eg:
void f( ADODB::_RecordsetPtr *pRs1, ADODB::_RecordsetPtr *pRs2 )
{
    if ( NULL != pRs1 )
    {
        // Create, open and do something with recordset
    }

    if ( NULL != pRs2 )
    {
        // Create, open and do something with recordset
    }
}
 
ADODB::_RecordsetPtr pRs;
f( &pRs, NULL ); // This line is rejected by compiler
Yes, I can pass it by reference, but I want a pointer since the object is allowed to be NULL if it is not required.

Any ideas?

Thanks!
AnswerRe: How to take the address of a smart pointer? Pin
antlers9-Sep-03 6:58
antlers9-Sep-03 6:58 
GeneralRe: How to take the address of a smart pointer? Pin
Miszou9-Sep-03 7:13
Miszou9-Sep-03 7:13 
GeneralTemplate function in a class Pin
ns9-Sep-03 5:50
ns9-Sep-03 5:50 
GeneralRe: Template function in a class Pin
geo_m9-Sep-03 7:02
geo_m9-Sep-03 7:02 
GeneralRe: Template function in a class Pin
Alvaro Mendez9-Sep-03 7:37
Alvaro Mendez9-Sep-03 7:37 
GeneralRe: Template function in a class Pin
ns9-Sep-03 8:37
ns9-Sep-03 8:37 
GeneralRe: Template function in a class Pin
antlers9-Sep-03 9:20
antlers9-Sep-03 9:20 
GeneralRe: Template function in a class Pin
ns9-Sep-03 10:19
ns9-Sep-03 10:19 
GeneralRe: Template function in a class Pin
ns9-Sep-03 10:09
ns9-Sep-03 10:09 
GeneralRe: Template function in a class Pin
Alvaro Mendez9-Sep-03 10:19
Alvaro Mendez9-Sep-03 10:19 
GeneralRe: Template function --thanks! Pin
ns10-Sep-03 4:06
ns10-Sep-03 4:06 
GeneralMicrosoft Visual C++ Runtime Error/Windows XP Please Help Pin
Diaweb9-Sep-03 5:50
Diaweb9-Sep-03 5:50 
GeneralSTL header files Pin
Anonymous9-Sep-03 5:20
Anonymous9-Sep-03 5:20 
GeneralRe: STL header files Pin
Alvaro Mendez9-Sep-03 5:39
Alvaro Mendez9-Sep-03 5:39 
Questionhow to login NT neighbor in program Pin
wheregone9-Sep-03 5:01
wheregone9-Sep-03 5:01 
AnswerRe: how to login NT neighbor in program Pin
David Crow9-Sep-03 6:00
David Crow9-Sep-03 6:00 
GeneralRe: how to login NT neighbor in program Pin
wheregone9-Sep-03 16:49
wheregone9-Sep-03 16:49 

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.