Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
1309731b
Commit
1309731b
authored
Oct 03, 2010
by
Vincent Povirk
Committed by
Alexandre Julliard
Nov 10, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mscoree: Add a proper implementation of DllCanUnloadNow.
parent
e5d3294b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
1 deletion
+26
-1
corruntimehost.c
dlls/mscoree/corruntimehost.c
+8
-0
metahost.c
dlls/mscoree/metahost.c
+8
-0
mscoree_main.c
dlls/mscoree/mscoree_main.c
+6
-1
mscoree_private.h
dlls/mscoree/mscoree_private.h
+4
-0
No files found.
dlls/mscoree/corruntimehost.c
View file @
1309731b
...
...
@@ -108,6 +108,8 @@ static HRESULT RuntimeHost_AddDomain(RuntimeHost *This, MonoDomain **result)
list_add_tail
(
&
This
->
domains
,
&
entry
->
entry
);
MSCOREE_LockModule
();
*
result
=
entry
->
domain
;
end:
...
...
@@ -149,6 +151,7 @@ static void RuntimeHost_DeleteDomain(RuntimeHost *This, MonoDomain *domain)
if
(
This
->
default_domain
==
domain
)
This
->
default_domain
=
NULL
;
HeapFree
(
GetProcessHeap
(),
0
,
entry
);
MSCOREE_UnlockModule
();
break
;
}
}
...
...
@@ -193,6 +196,9 @@ static HRESULT WINAPI corruntimehost_QueryInterface(ICorRuntimeHost* iface,
static
ULONG
WINAPI
corruntimehost_AddRef
(
ICorRuntimeHost
*
iface
)
{
RuntimeHost
*
This
=
impl_from_ICorRuntimeHost
(
iface
);
MSCOREE_LockModule
();
return
InterlockedIncrement
(
&
This
->
ref
);
}
...
...
@@ -201,6 +207,8 @@ static ULONG WINAPI corruntimehost_Release(ICorRuntimeHost* iface)
RuntimeHost
*
This
=
impl_from_ICorRuntimeHost
(
iface
);
ULONG
ref
;
MSCOREE_UnlockModule
();
ref
=
InterlockedDecrement
(
&
This
->
ref
);
return
ref
;
...
...
dlls/mscoree/metahost.c
View file @
1309731b
...
...
@@ -225,11 +225,13 @@ static HRESULT WINAPI CLRRuntimeInfo_QueryInterface(ICLRRuntimeInfo* iface,
static
ULONG
WINAPI
CLRRuntimeInfo_AddRef
(
ICLRRuntimeInfo
*
iface
)
{
MSCOREE_LockModule
();
return
2
;
}
static
ULONG
WINAPI
CLRRuntimeInfo_Release
(
ICLRRuntimeInfo
*
iface
)
{
MSCOREE_UnlockModule
();
return
1
;
}
...
...
@@ -668,6 +670,8 @@ static ULONG WINAPI InstalledRuntimeEnum_AddRef(IEnumUnknown* iface)
struct
InstalledRuntimeEnum
*
This
=
(
struct
InstalledRuntimeEnum
*
)
iface
;
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
MSCOREE_LockModule
();
TRACE
(
"(%p) refcount=%u
\n
"
,
iface
,
ref
);
return
ref
;
...
...
@@ -678,6 +682,8 @@ static ULONG WINAPI InstalledRuntimeEnum_Release(IEnumUnknown* iface)
struct
InstalledRuntimeEnum
*
This
=
(
struct
InstalledRuntimeEnum
*
)
iface
;
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
MSCOREE_UnlockModule
();
TRACE
(
"(%p) refcount=%u
\n
"
,
iface
,
ref
);
if
(
ref
==
0
)
...
...
@@ -818,11 +824,13 @@ static HRESULT WINAPI CLRMetaHost_QueryInterface(ICLRMetaHost* iface,
static
ULONG
WINAPI
CLRMetaHost_AddRef
(
ICLRMetaHost
*
iface
)
{
MSCOREE_LockModule
();
return
2
;
}
static
ULONG
WINAPI
CLRMetaHost_Release
(
ICLRMetaHost
*
iface
)
{
MSCOREE_UnlockModule
();
return
1
;
}
...
...
dlls/mscoree/mscoree_main.c
View file @
1309731b
...
...
@@ -44,6 +44,8 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
mscoree
);
LONG
dll_refs
=
0
;
static
BOOL
get_install_root
(
LPWSTR
install_dir
)
{
const
WCHAR
dotnet_key
[]
=
{
'S'
,
'O'
,
'F'
,
'T'
,
'W'
,
'A'
,
'R'
,
'E'
,
'\\'
,
'M'
,
'i'
,
'c'
,
'r'
,
'o'
,
's'
,
'o'
,
'f'
,
't'
,
'\\'
,
'.'
,
'N'
,
'E'
,
'T'
,
'F'
,
'r'
,
'a'
,
'm'
,
'e'
,
'w'
,
'o'
,
'r'
,
'k'
,
'\\'
,
0
};
...
...
@@ -398,7 +400,10 @@ HRESULT WINAPI DllUnregisterServer(void)
HRESULT
WINAPI
DllCanUnloadNow
(
VOID
)
{
return
S_OK
;
if
(
dll_refs
)
return
S_FALSE
;
else
return
S_OK
;
}
INT
WINAPI
ND_RU1
(
const
void
*
ptr
,
INT
offset
)
...
...
dlls/mscoree/mscoree_private.h
View file @
1309731b
...
...
@@ -20,6 +20,10 @@
#ifndef __MSCOREE_PRIVATE__
#define __MSCOREE_PRIVATE__
extern
LONG
dll_refs
;
static
inline
void
MSCOREE_LockModule
(
void
)
{
InterlockedIncrement
(
&
dll_refs
);
}
static
inline
void
MSCOREE_UnlockModule
(
void
)
{
InterlockedDecrement
(
&
dll_refs
);
}
extern
HRESULT
CLRMetaHost_CreateInstance
(
REFIID
riid
,
void
**
ppobj
);
typedef
struct
tagASSEMBLY
ASSEMBLY
;
...
...
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