SimReadPhonebookTag (Compact 2013)
3/26/2014
The SimReadPhonebookTag reads the name value for a given index and tag.
Syntax
HRESULT SimReadPhonebookTag(
HSIM hSim,
DWORD dwTag,
DWORD dwIndex,
__out_ecount(cchNameSize) LPTSTR szName,
DWORD cchNameSize
);
Parameters
- hSim
Points to a valid HSIM handle.
- dwTag
A SIM Manager PhoneBook Tag Constants value.
- dwIndex
Index of the tag to read.
- szName
Returned name of tag.
- cchNameSize
Maximum size of the returned name in characters.
Return Value
HRESULT is S_OK for success, or one of the SIM_E error constants defined in the SIM Manager Error Constants table.
Example
HRESULT hr;
HSIM hSim;
DWORD dwIndex = 1;
hr = SimInitialize( SIM_INIT_NONE, NULL, 0, &hSim );
LPTSTR pszName = ( LPTSTR )LocalAlloc( LPTR, MAX_LENGTH_PHONEBOOKENTRYTEXT );
hr = SimReadPhonebookTag( hSim, SIM_PBTAG_GROUP, dwIndex, pszName, MAX_LENGTH_PHONEBOOKENTRYTEXT );
if( pszName ){
LocalFree( pszName );
}
// Finished using the SIM Manager
hr = SimDeinitialize( hSim );
Requirements
Header |
simmgr.h |
Library |
sim.lib |
See Also
Reference
SIM Manager Functions
SimWritePhonebookTag
SIM Manager Constants