次の方法で共有


SimWritePhonebookEntry (Compact 2013)

3/26/2014

The SimWritePhonebookEntry function writes a phone book entry to the SIM card. This function is part of the SIM Manager API set that enables access to information stored on the SIM card.

Syntax

HRESULT SimWritePhonebookEntry (
  HSIM hSim,
  DWORD dwLocation,
  DWORD dwIndex,
  LPSIMPHONEBOOKENTRY lpPhonebookEntry
);

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 SIMCALLBACK function will be set to the actual index to where the entry was written.
  • lpPhonebookEntry
    Points to a phonebook 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