Click here to Skip to main content
15,925,723 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralMS Access and datetime picker Pin
Steve Messer9-Sep-03 7:57
Steve Messer9-Sep-03 7:57 
GeneralRe: MS Access and datetime picker Pin
Steve Messer9-Sep-03 22:11
Steve Messer9-Sep-03 22:11 
GeneralWeird Problem! Please Help Pin
Binayak9-Sep-03 7:47
Binayak9-Sep-03 7:47 
GeneralRe: Weird Problem! Please Help Pin
igor19609-Sep-03 9:23
igor19609-Sep-03 9:23 
GeneralRe: Weird Problem! Please Help Pin
Binayak9-Sep-03 10:15
Binayak9-Sep-03 10:15 
GeneralRe: Weird Problem! Please Help Pin
igor19609-Sep-03 11:52
igor19609-Sep-03 11:52 
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 

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.