GetRegistryKeyPath (Compact 2013)

3/26/2014

This function returns a registry path with a radio identifier.

Syntax

bool GetRegistryKeyPath(
        const TCHAR* const ptsKeyPath,
        const TCHAR* const ptsRadioIdentifier,
        const TCHAR* const ptsKeyName,
        TCHAR* const ptsPathWithIdentifier,
        const size_t stBufferLength
);

Parameters

  • [in] ptsKeyPath
    [in] Pointer to a Key Path.
  • [in] ptsRadioIdentifier
    [in] Pointer to a Radio Identifier.
  • [in] ptsKeyName
    [in] Pointer to a Key Name.
  • [in,out] ptsPathWithIdentifier
    [in] Pointer to a storage location to place the output.

    [out] Completed registry key.

  • [in] stBufferLength
    [in] Size of the buffer allocated for ptsPathWithIdentifier.

Return Value

The function returns the following values:

Value

Description

TRUE

The path was successfully created. ptsPathWithIdentifier is valid.

FALSE

The path was not created. ptsPathWithIdentifier is not valid.

Example

bool  bResult;

const LPCTSTR ptsKeyPath = TEXT("Software\\Microsoft\\RIL");
const LPCTSTR ptsKeyName = TEXT("APIInfo\\");
TCHAR ptsRadioIdentifier   [ MAX_RADIO_IDENTIFIER_LENGTH ] = TEXT("RADIO2");
TCHAR ptsPathWithIdentifier[ MAX_PATH ];

bResult = GetRegistryKeyPath( 
    ptsKeyPath            // "Software\\Microsoft\\RIL"  ptsKeyPath
  , ptsRadioIdentifier    // "RADIO2"                    ptsRadioIdentifier
  , ptsKeyName            // "APIInfo\\"                 ptsKeyName
  , ptsPathWithIdentifier // ptsPathWithIdentifier
  , MAX_PATH              // stBufferLength
);

// ptsPathWithIdentifier now contains: "Software\\Microsoft\\RIL\\RADIO2\\APIInfo\\"

Remarks

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

This function is for use in dual mode.

Requirements

Header

toolbox.h

Library

Ril.lib

See Also

Reference

RIL Functions
RIL Registry Settings