opomba,
Dostop do te strani zahteva pooblastilo. Poskusite se vpisati alispremeniti imenike.
Dostop do te strani zahteva pooblastilo. Poskusite lahko spremeniti imenike.
Microsoft-specific
Extract the encapsulated COM interface pointer.
Syntax
operator Interface*( ) const throw( );
operator Interface&( ) const;
Interface& operator*( ) const;
Interface* operator->( ) const;
Interface** operator&( ) throw( );
operator bool( ) const throw( );
Remarks
operator Interface*Returns the encapsulated interface pointer, which may be NULL.operator Interface&Returns a reference to the encapsulated interface pointer, and issues an error if the pointer is NULL.operator*Allows a smart pointer object to act as though it were the actual encapsulated interface when dereferenced.operator->Allows a smart pointer object to act as though it were the actual encapsulated interface when dereferenced.operator&Releases any encapsulated interface pointer, replacing it with NULL, and returns the address of the encapsulated pointer. This operator allows you to pass the smart pointer by address to a function that has an out parameter through which it returns an interface pointer.operator boolAllows a smart pointer object to be used in a conditional expression. This operator returnstrueif the pointer isn't NULL.Note
Because
operator boolis not declared asexplicit,_com_ptr_tis implicitly convertible tobool, which is convertible to any scalar type. This can have unexpected consequences in your code. Enable Compiler Warning (level 4) C4800 to prevent unintentional use of this conversion.