Share via


SimWritePhonebookEntryEx (Compact 2013)

3/26/2014

The SimWritePhonebookEntryEx function writes extended phone book entries on the SIM card. This function is part of the SIM Manager API set that enables access to information stored on the SIM or USIM card.

Syntax

HRESULT SimWritePhonebookEntryEx(
  HSIM hSim,
  DWORD dwLocation,
  DWORD dwIndex,
  LPSIMPHONEBOOKENTRYEX lpEntries
);

Parameters

  • hSim
    Points to a valid HSIM handle.
  • dwIndex
    Index number of the entry to write to the SIM. Set it to SIM_PBINDEX_FIRSTAVAILABLE (defined as 0xffffffff) if it does not matter to which index it is written. When this parameter is set to SIM_PBINDEX_FIRSTAVAILABLE, the resulting index value of the SIMCALLBACKEX function will be set to the actual index to where the entry was written.
  • lpPhonebookEntry
    Points to an extended phone book entry structure.

Return Value

HRESULT is S_OK for success, or one of the SIM_E error constants defined in the SIM Manager Error Constants table.

Remarks

SIM_NOTIFY_PBE_STORED is received when this function executes successfully. Callback functions registered with SimInitialize are called with SIM_NOTIFY_PBE_STORED.

If dwIndex input is SIM_PBINDEX_FIRSTAVAILABLE, the SIM_NOTIFY_PBE_STORED will return the correct storage index where the new entry is stored.

Requirements

Header

simmgr.h

Library

sim.lib

See Also

Reference

SIM Manager Functions
SIMPHONEBOOKENTRY
SIM Manager PhoneBook Storage Constants