ShlwApiSHSetThreadRef Method

Stores a per-thread reference to a Component Object Model (COM) object.

This allows the caller to control the thread's lifetime so that it can ensure that Windows won't shut down the thread before the caller is ready.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("ShlwApi.dll", ExactSpelling = true)]
public static HResult SHSetThreadRef(
	Object punk
)

Parameters

punk  Object
A pointer to the IUnknown of the object for which you want to store a reference. This value can be NULL.

Return Value

HResult
If this function succeeds, it returns S_OK. Otherwise, it returns an HResult error code.

Remarks

See Also