This topic has not yet been rated - Rate this topic

SHSetThreadRef function

Applies to: desktop apps only

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

Syntax

HRESULT SHSetThreadRef(
  __in_opt  IUnknown *punk
);

Parameters

punk [in, optional]

Type: IUnknown*

A pointer to the IUnknown interface of the object you want to store a reference to. This value can be NULL.

Return value

Type: HRESULT

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

Remarks

Use SHGetThreadRef to retrieve the IUnknown pointer.

Requirements

Minimum supported client

Windows 2000 Professional, Windows XP

Minimum supported server

Windows 2000 Server

Header

Shlwapi.h

Library

Shlwapi.lib

DLL

Shlwapi.dll (version 5.0 or later)

See also

SHCreateThread
SHCreateThreadRef
SHGetThreadRef
SHReleaseThreadRef

 

 

Send comments about this topic to Microsoft

Build date: 3/7/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ