FindActCtxSectionStringA function (winbase.h)

The FindActCtxSectionString function retrieves information on a specific string in the current activation context and returns a ACTCTX_SECTION_KEYED_DATA structure.

Syntax

BOOL FindActCtxSectionStringA(
  [in]  DWORD                      dwFlags,
  [in]  const GUID                 *lpExtensionGuid,
  [in]  ULONG                      ulSectionId,
  [in]  LPCSTR                     lpStringToFind,
  [out] PACTCTX_SECTION_KEYED_DATA ReturnedData
);

Parameters

[in] dwFlags

Flags that determine how this function is to operate. Only the following flag is currently defined.

Value Meaning
FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX
This function returns the activation context handle where the redirection data was found in the hActCtx member of the ACTCTX_SECTION_KEYED_DATA structure. The caller must use ReleaseActCtx to release this activation context.

[in] lpExtensionGuid

Reserved; must be null.

[in] ulSectionId

Identifier of the string section of the activation context in which to search for the specific string.

The following are valid string section identifiers:

  • ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION
  • ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION
  • ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION
  • ACTIVATION_CONTEXT_SECTION_COM_PROGID_REDIRECTION

[in] lpStringToFind

Pointer to a null-terminated string to be used as the search criteria.

[out] ReturnedData

Pointer to an ACTCTX_SECTION_KEYED_DATA structure to be filled out with the requested string information.

Return value

If the function succeeds, it returns TRUE. Otherwise, it returns FALSE.

This function sets errors that can be retrieved by calling GetLastError. For an example, see Retrieving the Last-Error Code. For a complete list of error codes, see System Error Codes.

Remarks

This function should only be called by the Side-by-side API functions or COM methods. Applications should not directly call this function.

Note

The winbase.h header defines FindActCtxSectionString as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header winbase.h (include Windows.h)
Library Kernel32.lib
DLL Kernel32.dll

See also

ACTCTX_SECTION_KEYED_DATA

FindActCtxSectionGuid