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. |
The SimReadRecordfunction reads a file from the SIM. This function is part of the SIM Manager API set that enables access to information stored on the SIM card.
Syntax
HRESULT SimReadRecord ( HSIM hSim, DWORD dwAddress, DWORD dwRecordType, DWORD dwIndex, LPBYTE lpData, DWORD dwBufferSize, LPDWORD lpdwBytesRead ); |
Parameters
- hSim
-
Points to a valid HSIM handle.
- dwAddress
-
A unique ID specifying the name of the SIM record.
- dwRecordType
-
A SIM_RECORDTYPE constant. See the Remarks section for a listing of all possible SIM_RECORDTYPEconstants.
- dwIndex
-
Applies only to the SIM_RECORDTYPE_CYCLIC and SIM_RECORDTYPE_LINEAR constants; this parameter is ignored in any other case.
- lpData
-
Data buffer.
- dwBufferSize
-
Size of the data buffer.
- lpdwBytesRead
-
Number of bytes read.
Return Value
HRESULTs are either S_OK for success, or one of the SIM_Eerror constants defined in the SIM Manager Error Constantstable.
Remarks
The following table contains a listing of all the SIM_RECORDTYPEconstants.
Constant | Value | Description |
---|---|---|
SIM_RECORDTYPE_UNKNOWN |
0x00000000 |
An unknown record type. |
SIM_RECORDTYPE_TRANSPARENT |
0x00000001 |
A single variable-length record. |
SIM_RECORDTYPE_CYCLIC |
0x00000002 |
A cyclic set of records, each of the same length. |
SIM_RECORDTYPE_LINEAR |
0x00000003 |
A linear set of records, each of the same length. |
SIM_RECORDTYPE_MASTER |
0x00000004 |
Every SIM has a single master record, effectively the head node. |
SIM_RECORDTYPE_DEDICATED |
0x00000005 |
Effectively, a directory record that is a parent of other records. |
The SIM record system contains several folders, some of which are for specific record types. Some records are stored at the root level, and must be accessed differently than those in folders. You are restricted to accessing records within the currently selected folder. To access records in folders other than the current folder, you must navigate through the folder structure first.
The SimReadRecordfunction can only be used to read the first 255 bytes from a transparent (binary) file.
Note: |
---|
This is a privileged API. |
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 |