Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

The SimWriteRecordfunction writes a file to the SIM. This function is part of the SIM Manager API set that enables access to information stored on the SIM card.

Syntax

HRESULT SimWriteRecord (
  HSIM 
hSim,
  DWORD 
dwAddress,
  DWORD 
dwRecordType,
  DWORD 
dwIndex,
  LPBYTE 
lpData,
  DWORD 
dwByteCount
);

Parameters

hSim

Points to a valid HSIM handle.

dwAddress

SIM address.

dwRecordType

A SIM_RECORDTYPE constant.

Value Description

SIM_RECORDTYPE_UNKNOWN

An unknown file type.

SIM_RECORDTYPE_TRANSPARENT

A single variable-length record.

SIM_RECORDTYPE_CYCLIC

A cyclic set of records, each of the same length.

SIM_RECORDTYPE_LINEAR

A linear set of records, each of the same length.

SIM_RECORDTYPE_MASTER

Every SIM has a single master record, effectively the head node.

SIM_RECORDTYPE_DEDICATED

Effectively a "directory" file that is a parent of other records.

dwIndex

Applies only to the SIM_RECORDTYPE_CYCLIC and SIM_RECORDTYPE_LINEAR constants; this parameter is ignored in any other case.

lpData

Data to write.

dwByteCount

Number of bytes to write.

Return Value

HRESULTs are either S_OK for success, or one of the SIM_Eerror constants defined in the SIM Manager Error Constantstable.

Remarks

This is a privileged function.

Requirements

Header simmgr.h
Library cellcore.lib
Windows Embedded CE Windows Embedded CE 6.0 and later
Windows Mobile Pocket PC 2002 and later, Smartphone 2002 and later

See Also

Reference

SIMRECORDINFO