次の方法で共有


GetRadioIdentifier (Compact 2013)

3/26/2014

This function returns the radio identifier for a given radio used in dual mode. The radio identifier is composed of the global variable g_tszRadioName and the radio number specified in the registry.

Syntax

bool GetRadioIdentifier(
        const DWORD dwIndex,
        TCHAR* const ptsRadioIdentifier,
        const size_t stBufferLength
);

Parameters

  • dwIndex
    Specifies the index of the RIL port to use, for example, 1 for RIL1.
  • ptsRadioIdentifier
    Pointer to a storage area that the Radio Identifier will be placed into.
  • stBufferLength
    The number of bytes in ptsRadioIdentifier.

Return Value

The function returns the following values:

Value

Description

TRUE

The radio index was successfully retrieved. ptsRadioIdentifier and stBufferLength are valid.

FALSE

The radio index is not available. ptsRadioIdentifier and stBufferLength are not valid.

Example

BOOL    bResult;
#define RIL_RADIO_NAME    TEXT("RADIO")
DWORD   dwIndex           = 2;
TCHAR   ptsRadioIdentifier[ MAXLENGTH_RADIO_IDENTIFIER ];

bResult = GetRadioIdentifier( dwIndex, ptsRadioIdentifier, MAXLENGTH_RADIO_IDENTIFIER );

// ptsRadioIdentifier now contains: "RADIO2"

Remarks

This function is synchronous. An asynchronous result callback is not returned.

g_tszRadioName is defined in toolbox.cpp with the value "RADIO." This function is for use in dual mode.

Requirements

Header

toolbox.h

Library

Ril.lib

See Also

Reference

RIL Functions
RIL Registry Settings