Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
bb1ca6e0
Commit
bb1ca6e0
authored
Apr 19, 2010
by
Detlef Riekenberg
Committed by
Alexandre Julliard
Apr 20, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shlwapi: Implement SHCreateThreadRef.
parent
f84f9394
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
89 additions
and
0 deletions
+89
-0
shlwapi.spec
dlls/shlwapi/shlwapi.spec
+1
-0
thread.c
dlls/shlwapi/thread.c
+87
-0
shlwapi.h
include/shlwapi.h
+1
-0
No files found.
dlls/shlwapi/shlwapi.spec
View file @
bb1ca6e0
...
...
@@ -683,6 +683,7 @@
@ stdcall SHCreateStreamOnFileEx(wstr long long long ptr ptr)
@ stdcall SHCreateStreamOnFileW(wstr long ptr)
@ stdcall SHCreateStreamWrapper(ptr ptr long ptr)
@ stdcall SHCreateThreadRef(ptr ptr)
@ stdcall SHDeleteEmptyKeyA(long ptr)
@ stdcall SHDeleteEmptyKeyW(long ptr)
@ stdcall SHDeleteKeyA(long str)
...
...
dlls/shlwapi/thread.c
View file @
bb1ca6e0
...
...
@@ -120,6 +120,93 @@ typedef struct tagSHLWAPI_THREAD_INFO
IUnknown
*
refIE
;
/* Reference to the IE process */
}
SHLWAPI_THREAD_INFO
,
*
LPSHLWAPI_THREAD_INFO
;
typedef
struct
{
const
IUnknownVtbl
*
lpVtbl
;
LONG
*
ref
;
}
threadref
;
static
HRESULT
WINAPI
threadref_QueryInterface
(
IUnknown
*
iface
,
REFIID
riid
,
LPVOID
*
ppvObj
)
{
threadref
*
This
=
(
threadref
*
)
iface
;
TRACE
(
"(%p, %s, %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppvObj
);
if
(
ppvObj
==
NULL
)
return
E_POINTER
;
if
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
))
{
TRACE
(
"(%p)->(IID_IUnknown %p)
\n
"
,
This
,
ppvObj
);
*
ppvObj
=
This
;
IUnknown_AddRef
((
IUnknown
*
)
*
ppvObj
);
return
S_OK
;
}
*
ppvObj
=
NULL
;
FIXME
(
"(%p, %s, %p) interface not supported
\n
"
,
This
,
debugstr_guid
(
riid
),
ppvObj
);
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
threadref_AddRef
(
IUnknown
*
iface
)
{
threadref
*
This
=
(
threadref
*
)
iface
;
TRACE
(
"(%p)
\n
"
,
This
);
return
InterlockedIncrement
(
This
->
ref
);
}
static
ULONG
WINAPI
threadref_Release
(
IUnknown
*
iface
)
{
LONG
refcount
;
threadref
*
This
=
(
threadref
*
)
iface
;
TRACE
(
"(%p)
\n
"
,
This
);
refcount
=
InterlockedDecrement
(
This
->
ref
);
if
(
!
refcount
)
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
refcount
;
}
/* VTable */
static
const
IUnknownVtbl
threadref_vt
=
{
threadref_QueryInterface
,
threadref_AddRef
,
threadref_Release
,
};
/*************************************************************************
* SHCreateThreadRef [SHLWAPI.@]
*
* Create a per-thread IUnknown object
*
* PARAMS
* lprefcount [I] Pointer to a LONG to be used as refcount
* lppUnknown [O] 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
*/
HRESULT
WINAPI
SHCreateThreadRef
(
LONG
*
lprefcount
,
IUnknown
**
lppUnknown
)
{
threadref
*
This
;
TRACE
(
"(%p, %p)
\n
"
,
lprefcount
,
lppUnknown
);
if
(
!
lprefcount
||
!
lppUnknown
)
return
E_INVALIDARG
;
This
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
threadref
));
This
->
lpVtbl
=
&
threadref_vt
;
This
->
ref
=
lprefcount
;
*
lprefcount
=
1
;
*
lppUnknown
=
(
IUnknown
*
)
This
;
TRACE
(
"=> returning S_OK with %p
\n
"
,
This
);
return
S_OK
;
}
/*************************************************************************
* SHGetThreadRef [SHLWAPI.@]
...
...
include/shlwapi.h
View file @
bb1ca6e0
...
...
@@ -974,6 +974,7 @@ HRESULT WINAPI SHCreateStreamWrapper(LPBYTE,DWORD,DWORD,struct IStream**);
HRESULT
WINAPI
SHAutoComplete
(
HWND
,
DWORD
);
/* Threads */
HRESULT
WINAPI
SHCreateThreadRef
(
LONG
*
,
IUnknown
**
);
HRESULT
WINAPI
SHGetThreadRef
(
IUnknown
**
);
HRESULT
WINAPI
SHSetThreadRef
(
IUnknown
*
);
HRESULT
WINAPI
SHReleaseThreadRef
(
void
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment