Re: question about Component Object Model(COM)

Discussion in 'C++' started by John Harrison, Jun 28, 2003.

  1. "Nick" <> wrote in message news:473hg9$...
    >
    > excuse me! may i ask a problem of COM here?


    Not really, this group is for standard C++ only, But it doesn't look like a
    COM question to me.

    >
    > if i define a interface below:
    >
    > HRESULT functionName([out,retval] bool* retval);
    >
    > how do i get return value in main program
    >
    > case 1
    > bool variable;
    > functionName(&variable) //return value in variable


    This is right.

    >
    > case 2 bool T_F = finctionName(); //return value in T_F


    This is wrong and won't compile.

    >
    > which case is right or another way?



    Both examples miss out the interface pointer.

    MyInterface* itf;

    // get the interface pointer somehow

    bool variable;
    itf->functionName(&variable);

    john
     
    John Harrison, Jun 28, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?UGF1bA==?=

    General question about component object model COM

    =?Utf-8?B?UGF1bA==?=, Oct 12, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    347
    =?Utf-8?B?UGF1bA==?=
    Oct 12, 2005
  2. Replies:
    1
    Views:
    453
    Chris Smith
    Dec 17, 2003
  3. Replies:
    1
    Views:
    498
    Andreas Wollschlaeger
    Oct 6, 2006
  4. pek
    Replies:
    3
    Views:
    452
    Roedy Green
    Jul 24, 2007
  5. blackbiscuit
    Replies:
    12
    Views:
    1,997
    Phlip
    May 17, 2009
Loading...

Share This Page