IExpressionStore::GetExprName

Ee784642.c++_off(en-US,CS.10).gifEe784642.vb_on(en-US,CS.10).gif

Use this method to translate the ID of an expression into its corresponding expression name.

Definition

HRESULT IExpressionStore::GetExprName(longnExprID,BSTR*pstrExprName);

Parameters

nExprID

[in] A long that contains a unique expression ID.

pstrExprName

[out, retval] A pointer to a BSTR that contains the name of the expression. On failure, the expression name is set to NULL.

Return Values

This method returns an HRESULT indicating whether or not it completed successfully. See the Error Values section for more details.

Error Values

This method returns S_OK (0x00000000) to indicate success and either standard or custom COM HRESULT error values to indicate failure. For more information about standard COM errors, see Standard COM Errors.

The following table shows the custom COM errors that this method can return.

Constant Value Description
E_EXPR_BADCONNECTION 0x8110001F Invalid connection
E_EXPR_BADEXPRID 0x8110000A Invalid expression ID specified, or expression ID not found in store
E_EXPR_NOCONNECTIONSTRING 0x8110000D No connection string specified

Additional information may be available using the global Err object, which can be accessed using the API function GetErrorInfo. In particular, the GetDescription method of the IErrorInfo interface may return a text description of the error.

Remarks

Use the GetExprID method to translate the name of an expression into its corresponding expression ID.

Call the Connect method before calling the GerExprName method.

For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.

The pstrExprName parameter contains valid data only if the method completes successfully.

See Also

ExpressionStore Object

IExpressionStore::Connect

IExpressionStore::GetExprID


All rights reserved.