SimEnumModules (Compact 2013)
3/26/2014
This function counts, and optionally lists, the SIM modules in the system.
Syntax
HRESULT SimEnumModules(
DWORD dwEnumCond,
DWORD dwCondParam,
DWORD* lpdwNumSim,
DWORD* lpdwSimIndexArray
);
Parameters
[in] dwEnumCond
A SIM Manager Enumerate Conditions Constants value that specifies a condition that limits the list of SIM indexes returned.The value of this parameter controls the meaning of the dwCondParam parameter.
SIM_ENUM_COND_TECHNOLOGY: This function will return a list of SIM modules that support the technology indicated in the dwCondParam, which must contain a SIM Manager Conditions Technology Constants value.
SIM_ENUM_COND_RADIOINDEX: This function populates the lpdwSimIndexArray array with the SIM modules that belong to the radio with the index of the dwCondParam parameter, which must contain a positive integer that is a valid radio index.
SIM_ENUM_COND_ALL: This function will return a list of ALL SIM modules in the system. dwCondParam is ignored.
- [in] dwCondParam
Limits returned SIM list based on dwEnumCond.
[in,out] lpdwNumSim
INPUT: the number of elements in lpdwSimIndexArray;OUTPUT: the number of SIM modules found
[in,out] lpdwSimIndexArray
An array of SIM module indexes.If NULL, no array of SIM indexes is requested.
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
For an example see: SimInitializeEx.
To count the number of SIM modules in the system, set lpdwSimIndexArray to NULL.
To list the SIM modules in the system, you must:
- obtain the count,
- allocate memory for the lpdwSimIndexArray array, and
- call this function a second time with a pointer to the array in lpdwSimIndexArray.
This table describes the effects that the combination of the dwEnumCond and dwCondParam parameters has on the count in lpdwNumSim and the output in the lpdwSimIndexArray array. Note that lpdwSimIndexArray will be null on output, if it was null on input.
[in] dwEnumCond |
[in] dwCondParam |
[out] lpdwNumSim and [out] lpdwSimIndexArray |
---|---|---|
SIM_ENUM_COND_TECHNOLOGY |
SIM_CONDPARAM_TECH_CELLULAR or other SIM Manager Conditions Technology Constants value. |
lpdwNumSim = the count of all SIM modules in the system that support the specified technology. lpdwSimIndexArray contains the array of SIM module indices that support the specified technology. |
SIM_ENUM_COND_RADIOINDEX |
A valid Radio Index. |
lpdwNumSim = the count of all SIM modules in the specified radio. lpdwSimIndexArray contains the array of SIM module indices for the specified radio. |
SIM_ENUM_COND_ALL |
ignored |
lpdwNumSim = the count of all SIM modules in the system. lpdwSimIndexArray contains the array of SIM module indices for all SIM modules in the system. |
A radio may have multiple SIM modules that each support different technologies. For example, a radio may have a Cellular SIM and a non-Cellular SIM, in which case specifying SIM_CONDPARAM_TECH_CELLULAR would cause only the Cellular SIM to be processed.
For devices without SIM modules, this function completes successfully and returns lpdwNumSim = 0 or SIME_E_NOSIM when an error occurs. An example is CDMA devices.
Requirements
Header |
simmgr.h |
Library |
sim.lib |
See Also
Reference
SIM Manager Functions
SIM Manager Enumerate Conditions Constants
SIM Manager Conditions Technology Constants
SIM Manager Structures