---
name: "SHCreateThreadRef"
section: "3w"
platform: "linux"
package: "libwine-dev"
version: "1.4.1-4"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/SHCreateThreadRef"
---

# SHCreateThreadRef(3w)

## NAME

**SHCreateThreadRef** (SHLWAPI.@)

## SYNOPSIS

HRESULT SHCreateThreadRef\
  (\
   LONG\*      *lprefcount*,\
   IUnknown\*\* *lppUnknown*\
  )

## DESCRIPTION

Create a per-thread **IUnknown** object.

## PARAMS

*lprefcount* **\[In\]**  Pointer to a **LONG** to be used as refcount.

*lppUnknown* **\[Out\]**  Destination to receive the created object reference.

## RETURNS

**Success:** **S\_OK**. *lppUnknown* is set to the object reference.

**Failure:** **E\_INVALIDARG**, if a parameter is **NULL**

## IMPLEMENTATION

Declared in **"shlwapi.h"**.

Implemented in **"dlls/shlwapi/thread.c"**.

Debug channel **"shell"**.
