Share via


CMapStringToOb::LookupKey

Returns a reference to the key associated with the specified key value.

BOOL LookupKey( 
   LPCTSTR key, 
   LPCTSTR& rKey 
) const;

Parameters

  • key
    Specifies the string key that identifies the element to be looked up.

  • rKey
    The reference to the associated key.

Return Value

Nonzero if the key was found; otherwise 0.

Remarks

Using a reference to a key is unsafe if used after the associated element was removed from the map or after the map was destroyed.

The following table shows other member functions that are similar to CMapStringToOb:: LookupKey.

Class

Member Function

CMapStringToPtr

BOOL LookupKey( LPCTSTR key, LPCTSTR&rKey ) const;

CMapStringToString

BOOL LookupKey( LPCTSTR key, LPCTSTR&rKey ) const;

Requirements

Header: afxcoll.h

See Also

Reference

CMapStringToOb Class

Hierarchy Chart