Share via


ISpSREngineSite::GetResource

Other versions of this page are also available for the following:

Windows Mobile Not SupportedWindows Embedded CE Supported

8/28/2008

This method gets a named resource from a CFG. Each rule in a CFG can contain one or more named strings containing arbitrary string data.

Syntax

HRESULT GetResource(
  SPRULEHANDLE hRule,
  WCHAR* pszResourceName,
  WCHAR** ppCoMemResource
);

Parameters

  • hRule
    [in] Handle to a rule.
  • pszResourceName
    [in] Pointer to the name of the resource.
  • ppCoMemResource
    [out] Address of a pointer to the resource associated with the rule. The engine calling this method must call CoTaskMemFree to free memory associated with this resource.

Return Value

The following table shows the possible return values.

Value Description

S_OK

Function completed successfully and the rule contained a resource of the correct name.

S_FALSE

Function completed successfully but no resource was found.

E_INVALIDARG

pszResourceName points to invalid string.

E_POINTER

ppCoMemResource invalid or bad.

E_NOTIMPL

Method is not implemented.

SPERR_INVALID_HANDLE

Invalid hRule handle.

FAILED(hr)

Appropriate error message.

Requirements

Header sapiddk.h, sapiddk.idl
Library sapilib.lib
Windows Embedded CE Windows CE .NET 4.1 and later

See Also

Reference

ISpSREngineSite
SAPI Interfaces