This topic has not yet been rated - Rate this topic

FindActCtxSectionString function

Applies to: desktop apps only

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

Syntax

BOOL FindActCtxSectionString(
  __in   DWORD dwFlags,
  __in   const GUID *lpExtensionGuid,
  __in   ULONG ulSectionId,
  __in   LPCTSTR lpStringToFind,
  __out  PACTCTX_SECTION_KEYED_DATA ReturnedData
);

Parameters

dwFlags [in]

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

ValueMeaning
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.

 

lpExtensionGuid [in]

Reserved; must be null.

ulSectionId [in]

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
lpStringToFind [in]

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

ReturnedData [out]

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.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows Server 2003

Header

Winbase.h (include Windows.h)

Library

Kernel32.lib

DLL

Kernel32.dll

Unicode and ANSI names

FindActCtxSectionStringW (Unicode) and FindActCtxSectionStringA (ANSI)

See also

FindActCtxSectionGuid
ACTCTX_SECTION_KEYED_DATA

 

 

Send comments about this topic to Microsoft

Build date: 2/3/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
Last parameter seams to be inout and not only out

See Docu of ACTCTX_SECTION_KEYED_DATA Structure


Quote:
Callers should initialize the ACTCTX_SECTION_KEYED_DATA structure as such:"ACTCTX_SECTION_KEYED_DATA askd = { sizeof(askd) };"which initializes all members to zero/null except the size field which is set correctly.