Share via


IDictionary::get_Prefix, put_Prefix Property

The Prefix property is a read/write String that acts as a filter when the contents of the Dictionary object are saved (usually to a database). When the name of a name/value pair begins with the specified prefix, that name/value pair is not saved. By default, the prefix is "_", so that any keywords beginning with an underscore character are excluded.

HRESULT IDictionary::get_Prefix(
 BSTR* Prefix
);
HRESULT IDictionary::put_Prefix(
 BSTR Prefix
);

Property Prefix As String    

Parameters

  • Prefix
    [C++]

    [in] When putting the property, a BSTR that contains the prefix.[out, retval] When getting the property, a pointer to the BSTR that contains the prefix.

Return Value

[C++] These methods return an HRESULT indicating whether they completed successfully. See the Error Values section for more details.

[Visual Basic] None.

Error Values

[C++] These methods return S_OK (0x00000000) to indicate success and standard COM HRESULT error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. 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.

[Visual Basic] This property sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to standard COM error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.

Remarks

The Prefix parameter contains valid data only if the property is accessed successfully.

By default, the prefix is "_", so that any keywords beginning with an underscore character are excluded.

The pipeline component that saves receipts usually sets the prefix to "_cc_", so that all credit-card information is not saved in the database. The actual string used by the pipeline component is configurable.

See Also

Other Resources

Dictionary Object