ShlwApiSHCreateThreadRef Method

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

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 SHCreateThreadRef(
	ref int refRef,
	out Object refPunk
)

Parameters

refRef  Int32
A pointer to a value, usually a local variable in the thread's ThreadProc, that is used by the interface in refPunk as a reference counter.
refPunk  Object
The address of a pointer to an IUnknown interface.

If successful, this parameter holds the thread's IUnknown pointer on return.

Your application is responsible for freeing the pointer when it is finished.

Return Value

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

Remarks

See Also