SimWritePhonebookTag (Compact 2013)

3/26/2014

The SimWritePhonebookTag function writes the name value for a given index and tag. This function is part of the SIM Manager API set that enables access to information stored on the USIM card.

Syntax

HRESULT SimWritePhonebookTag(
    HSIM hSim,
    DWORD dwTag,
    DWORD dwIndex,
    LPTSTR szName
);

Parameters

  • hSim
    A pointer to a valid HSIM handle.
  • dwIndex
    Index of the tag.
  • szName
    Name for the index.

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 );

hr = SimWritePhonebookTag( hSim, SIM_PBTAG_GROUP, dwIndex, _T( "MyTestGroupName" ) ); 

// Finished using the SIM Manager
hr = SimDeinitialize( hSim );

Remarks

If szName is an empty string, the phonebook tag is deleted.

Requirements

Header

simmgr.h

Library

sim.lib

See Also

Reference

SIM Manager Functions
SimReadPhonebookTag
SIM Manager Constants