"Nick" <nick.bbs@ntust.org> wrote in message news:473hg9$NX4@ntust.org...
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
.