CreateActCtx Function

The CreateActCtx function creates an activation context.

Syntax

C++
HANDLE CreateActCtx(
  __inout  PACTCTX pActCtx
);

Parameters

pActCtx [in, out]

Pointer to an ACTCTX structure that contains information about the activation context to be created.

Return Value

If the function succeeds, it returns a handle to the returned activation context. Otherwise, it returns INVALID_HANDLE_VALUE.

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

Set any undefined bits in dwFlags of ACTCTX to 0. If any undefined bits are not set to 0, the call to CreateActCtx that creates the activation context fails and returns an invalid parameter error code. The handle returned from CreateActCtx is passed in a call to ActivateActCtx to activate the context for the current thread.

Requirements

Minimum supported clientWindows XP
Minimum supported serverWindows Server 2003
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
Unicode and ANSI namesCreateActCtxW (Unicode) and CreateActCtxA (ANSI)

See Also

ACTCTX

Send comments about this topic to Microsoft

Build date: 11/12/2009

Tags :


Community Content

dmex
vb.net syntax
<DllImport("kernel32.dll")> Public Shared Function CreateActCtx(ByRef actctx As ACTCTX) As IntPtr
End Function
Tags :

dmex
C# syntax
[DllImport("kernel32.dll")]
private static extern IntPtr CreateActCtx(ref ACTCTX actctx);
Tags :

Page view tracker