#include <stdarg.h>
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "winnls.h"
#include "winuser.h"
#include "shlwapi.h"
#include "shlobj.h"
#include "wine/debug.h"
Go to the source code of this file.
|
| WINE_DEFAULT_DEBUG_CHANNEL (shell) |
|
INT WINAPI | SHStringFromGUIDA (REFGUID, LPSTR, INT) |
|
LPSECURITY_ATTRIBUTES WINAPI | CreateAllAccessSecurityAttributes (LPSECURITY_ATTRIBUTES lpAttr, PSECURITY_DESCRIPTOR lpSec, DWORD p3) |
|
HRESULT WINAPI | _SHGetInstanceExplorer (IUnknown **lppUnknown) |
|
static threadref * | impl_from_IUnknown (IUnknown *iface) |
|
static HRESULT WINAPI | threadref_QueryInterface (IUnknown *iface, REFIID riid, LPVOID *ppvObj) |
|
static ULONG WINAPI | threadref_AddRef (IUnknown *iface) |
|
static ULONG WINAPI | threadref_Release (IUnknown *iface) |
|
HRESULT WINAPI | SHCreateThreadRef (LONG *lprefcount, IUnknown **lppUnknown) |
|
HRESULT WINAPI | SHGetThreadRef (IUnknown **lppUnknown) |
|
HRESULT WINAPI | SHSetThreadRef (IUnknown *lpUnknown) |
|
HRESULT WINAPI | SHReleaseThreadRef (void) |
|
static DWORD WINAPI | SHLWAPI_ThreadWrapper (PVOID pTi) |
|
BOOL WINAPI | SHCreateThread (LPTHREAD_START_ROUTINE pfnThreadProc, VOID *pData, DWORD dwFlags, LPTHREAD_START_ROUTINE pfnCallback) |
|
LONG WINAPI | SHGlobalCounterGetValue (HANDLE hSem) |
|
LONG WINAPI | SHGlobalCounterIncrement (HANDLE hSem) |
|
DWORD WINAPI | SHGlobalCounterDecrement (HANDLE hSem) |
|
HANDLE WINAPI | SHGlobalCounterCreateNamedW (LPCWSTR lpszName, DWORD iInitial) |
|
HANDLE WINAPI | SHGlobalCounterCreateNamedA (LPCSTR lpszName, DWORD iInitial) |
|
HANDLE WINAPI | SHGlobalCounterCreate (REFGUID guid) |
|
◆ COBJMACROS
◆ NO_SHLWAPI_GDI
◆ NO_SHLWAPI_PATH
◆ NO_SHLWAPI_REG
◆ NO_SHLWAPI_STREAM
◆ NO_SHLWAPI_USER
◆ LPSHLWAPI_THREAD_INFO
◆ SHLWAPI_THREAD_INFO
◆ _SHGetInstanceExplorer()
Definition at line 104 of file thread.c.
105{
106
107
109}
HRESULT WINAPI SHGetInstanceExplorer(IUnknown **lpUnknown)
Referenced by SHCreateThread().
◆ CreateAllAccessSecurityAttributes()
Definition at line 63 of file thread.c.
67{
68
69
70
71 TRACE(
"(%p,%p,%08x)\n", lpAttr, lpSec, p3);
72
74 {
75 if (!lpSec || !lpAttr)
77
79 {
81 {
85 return lpAttr;
86 }
87 }
88 }
90}
BOOL WINAPI InitializeSecurityDescriptor(PSECURITY_DESCRIPTOR pSecurityDescriptor, DWORD dwRevision)
struct _SECURITY_ATTRIBUTES SECURITY_ATTRIBUTES
DWORD WINAPI GetVersion()
BOOL WINAPI SetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR pSecurityDescriptor, BOOL bDaclPresent, PACL pDacl, BOOL bDaclDefaulted)
LPVOID lpSecurityDescriptor
Referenced by SHGlobalCounterCreateNamedW().
◆ impl_from_IUnknown()
◆ SHCreateThread()
Definition at line 356 of file thread.c.
358{
361
363
364
370
371
374 else
376
379 else
381
382
384 {
387
389
391 {
392
396 }
398 }
399
400 if (!bCalled)
401 {
403 {
404
405 pfnThreadProc(
pData);
407 }
408 else
409 {
410
413
415 IUnknown_Release(ti.
refIE);
416 }
417 }
418 return bCalled;
419}
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
static DWORD WINAPI SHLWAPI_ThreadWrapper(PVOID pTi)
HRESULT WINAPI _SHGetInstanceExplorer(IUnknown **lppUnknown)
HRESULT WINAPI SHGetThreadRef(IUnknown **lppUnknown)
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Referenced by CRecyclerDropTarget::_DoDeleteAsync(), CFSDropTarget::Drop(), CFileDefExt::InitFileAttr(), SH_ShowDriveProperties(), SHELL32_ShowPropertiesDialog(), ShowFolderOptionsDialog(), CFindFolder::StartSearch(), and UIDlgProc().
◆ SHCreateThreadRef()
Definition at line 198 of file thread.c.
199{
201 TRACE(
"(%p, %p)\n", lprefcount, lppUnknown);
202
203 if (!lprefcount || !lppUnknown)
205
208 This->ref = lprefcount;
209
210 *lprefcount = 1;
211 *lppUnknown = &
This->IUnknown_iface;
212 TRACE(
"=> returning S_OK with %p\n",
This);
214}
static const IUnknownVtbl threadref_vt
Referenced by SHCreateFromDesktop().
◆ SHGetThreadRef()
Definition at line 228 of file thread.c.
229{
230 TRACE(
"(%p)\n", lppUnknown);
231
234
236 if (!*lppUnknown)
238
239
240 IUnknown_AddRef(*lppUnknown);
242}
LPVOID WINAPI TlsGetValue(IN DWORD Index)
DWORD SHLWAPI_ThreadRef_index
#define TLS_OUT_OF_INDEXES
Referenced by SHCreateThread().
◆ SHGlobalCounterCreate()
Definition at line 551 of file thread.c.
552{
554
556
557
560}
INT WINAPI SHStringFromGUIDA(REFGUID, LPSTR, INT)
HANDLE WINAPI SHGlobalCounterCreateNamedA(LPCSTR lpszName, DWORD iInitial)
static const WCHAR szName[]
Referenced by SHELL_GetCachedGlobalCounter().
◆ SHGlobalCounterCreateNamedA()
Definition at line 526 of file thread.c.
527{
529
531
532 if (lpszName)
535}
#define MultiByteToWideChar
HANDLE WINAPI SHGlobalCounterCreateNamedW(LPCWSTR lpszName, DWORD iInitial)
Referenced by SHGlobalCounterCreate().
◆ SHGlobalCounterCreateNamedW()
Definition at line 489 of file thread.c.
490{
491 static const WCHAR szPrefix[] = {
's',
'h',
'e',
'l',
'l',
'.',
'\0' };
492 const int iPrefixLen = 6;
494 const int iBuffLen =
sizeof(szBuff)/
sizeof(
WCHAR);
498
500
501
502 memcpy(szBuff, szPrefix, (iPrefixLen + 1) *
sizeof(
WCHAR));
503 if (lpszName)
504 StrCpyNW(szBuff + iPrefixLen, lpszName, iBuffLen - iPrefixLen);
505
506
508
511 return hRet;
512}
LPWSTR WINAPI StrCpyNW(LPWSTR dst, LPCWSTR src, int count)
LPSECURITY_ATTRIBUTES WINAPI CreateAllAccessSecurityAttributes(LPSECURITY_ATTRIBUTES lpAttr, PSECURITY_DESCRIPTOR lpSec, DWORD p3)
#define memcpy(s1, s2, n)
HANDLE WINAPI DECLSPEC_HOTPATCH OpenSemaphoreW(IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN LPCWSTR lpName)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateSemaphoreW(IN LPSECURITY_ATTRIBUTES lpSemaphoreAttributes OPTIONAL, IN LONG lInitialCount, IN LONG lMaximumCount, IN LPCWSTR lpName OPTIONAL)
#define SEMAPHORE_MODIFY_STATE
Referenced by SHGlobalCounterCreateNamedA().
◆ SHGlobalCounterDecrement()
Definition at line 473 of file thread.c.
474{
475 DWORD dwOldCount = 0;
476
477 TRACE(
"(%p)\n", hSem);
478
481 return dwOldCount - 1;
482}
LONG WINAPI SHGlobalCounterGetValue(HANDLE hSem)
◆ SHGlobalCounterGetValue()
◆ SHGlobalCounterIncrement()
◆ SHLWAPI_ThreadWrapper()
Definition at line 290 of file thread.c.
291{
295
296 TRACE(
"(%p)\n", pTi);
297
298
299
300
301
303
304
306 {
308
311 }
312
313
316
317
319
320
322
323
326
328 IUnknown_Release(ti.
refIE);
329
332
333
334 return dwRet;
335}
HRESULT WINAPI DECLSPEC_HOTPATCH CoInitializeEx(LPVOID lpReserved, DWORD dwCoInit)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
@ COINIT_APARTMENTTHREADED
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
Referenced by SHCreateThread().
◆ SHReleaseThreadRef()
◆ SHSetThreadRef()
Definition at line 256 of file thread.c.
257{
258 TRACE(
"(%p)\n", lpUnknown);
259
262
265}
BOOL WINAPI TlsSetValue(IN DWORD Index, IN LPVOID Value)
◆ SHStringFromGUIDA()
Definition at line 51 of file shimtest.c.
52{
54
56 {
58 }
59 else
60 {
63 }
64
67 return 0;
68}
#define SHIM_INFO(fmt,...)
INT(WINAPI * tSHStringFromGUIDA)(REFGUID guid, LPSTR lpszDest, INT cchMax)
STRSAFEAPI StringCchCatA(STRSAFE_LPSTR pszDest, size_t cchDest, STRSAFE_LPCSTR pszSrc)
STRSAFEAPI StringCchCopyA(STRSAFE_LPSTR pszDest, size_t cchDest, STRSAFE_LPCSTR pszSrc)
Referenced by SHGlobalCounterCreate().
◆ threadref_AddRef()
Definition at line 155 of file thread.c.
156{
158
161}
#define InterlockedIncrement
static threadref * impl_from_IUnknown(IUnknown *iface)
◆ threadref_QueryInterface()
Definition at line 134 of file thread.c.
135{
137
139
142
144 TRACE(
"(%p)->(IID_IUnknown %p)\n",
This, ppvObj);
146 IUnknown_AddRef((
IUnknown*)*ppvObj);
148 }
149
153}
#define IsEqualGUID(rguid1, rguid2)
◆ threadref_Release()
Definition at line 163 of file thread.c.
164{
167
169
171 if (!refcount)
173
174 return refcount;
175}
#define InterlockedDecrement
#define HeapFree(x, y, z)
◆ WINE_DEFAULT_DEBUG_CHANNEL()
WINE_DEFAULT_DEBUG_CHANNEL |
( |
shell |
| ) |
|
◆ SHLWAPI_ThreadRef_index
DWORD SHLWAPI_ThreadRef_index |
|
extern |
◆ threadref_vt
const IUnknownVtbl threadref_vt |
|
static |
Initial value:=
{
}
static ULONG WINAPI threadref_Release(IUnknown *iface)
static ULONG WINAPI threadref_AddRef(IUnknown *iface)
static HRESULT WINAPI threadref_QueryInterface(IUnknown *iface, REFIID riid, LPVOID *ppvObj)
Definition at line 178 of file thread.c.
Referenced by init_threadref(), and SHCreateThreadRef().