Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
2f93763e
Commit
2f93763e
authored
19 years ago
by
Jacek Caban
Committed by
Alexandre Julliard
19 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Added DllCanUnloadNow implementation.
parent
7840becd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
dlls/mshtml/htmldoc.c
+7
-1
7 additions, 1 deletion
dlls/mshtml/htmldoc.c
dlls/mshtml/main.c
+16
-5
16 additions, 5 deletions
dlls/mshtml/main.c
dlls/mshtml/mshtml_private.h
+4
-0
4 additions, 0 deletions
dlls/mshtml/mshtml_private.h
dlls/mshtml/protocol.c
+23
-9
23 additions, 9 deletions
dlls/mshtml/protocol.c
with
50 additions
and
15 deletions
dlls/mshtml/htmldoc.c
+
7
−
1
View file @
2f93763e
...
...
@@ -140,6 +140,8 @@ static ULONG WINAPI HTMLDocument_Release(IHTMLDocument2 *iface)
if
(
This
->
nscontainer
)
HTMLDocument_NSContainer_Destroy
(
This
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
UNLOCK_MODULE
();
}
return
ref
;
...
...
@@ -974,8 +976,12 @@ HRESULT HTMLDocument_Create(IUnknown *pUnkOuter, REFIID riid, void** ppvObject)
ret
->
ref
=
0
;
hres
=
IHTMLDocument_QueryInterface
(
HTMLDOC
(
ret
),
riid
,
ppvObject
);
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
{
HeapFree
(
GetProcessHeap
(),
0
,
ret
);
return
hres
;
}
LOCK_MODULE
();
HTMLDocument_Persist_Init
(
ret
);
HTMLDocument_OleObj_Init
(
ret
);
...
...
This diff is collapsed.
Click to expand it.
dlls/mshtml/main.c
+
16
−
5
View file @
2f93763e
...
...
@@ -48,6 +48,7 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
mshtml
);
HINSTANCE
hInst
;
LONG
module_ref
=
0
;
BOOL
WINAPI
DllMain
(
HINSTANCE
hInstDLL
,
DWORD
fdwReason
,
LPVOID
lpv
)
{
...
...
@@ -100,8 +101,10 @@ static ULONG WINAPI ClassFactory_Release(IClassFactory *iface)
TRACE
(
"(%p) ref = %lu
\n
"
,
This
,
ref
);
if
(
!
ref
)
if
(
!
ref
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
UNLOCK_MODULE
();
}
return
ref
;
}
...
...
@@ -115,7 +118,13 @@ static HRESULT WINAPI ClassFactory_CreateInstance(IClassFactory *iface, IUnknown
static
HRESULT
WINAPI
ClassFactory_LockServer
(
IClassFactory
*
iface
,
BOOL
dolock
)
{
FIXME
(
"(%p)->(%x) stub
\n
"
,
iface
,
dolock
);
TRACE
(
"(%p)->(%x)
\n
"
,
iface
,
dolock
);
if
(
dolock
)
LOCK_MODULE
();
else
UNLOCK_MODULE
();
return
S_OK
;
}
...
...
@@ -137,7 +146,9 @@ static HRESULT ClassFactory_Create(REFIID riid, void **ppv, CreateInstanceFunc f
ret
->
fnCreateInstance
=
fnCreateInstance
;
hres
=
IClassFactory_QueryInterface
((
IClassFactory
*
)
ret
,
riid
,
ppv
);
if
(
FAILED
(
hres
))
{
if
(
SUCCEEDED
(
hres
))
{
LOCK_MODULE
();
}
else
{
HeapFree
(
GetProcessHeap
(),
0
,
ret
);
*
ppv
=
NULL
;
}
...
...
@@ -172,8 +183,8 @@ HRESULT WINAPI MSHTML_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *pp
HRESULT
WINAPI
MSHTML_DllCanUnloadNow
(
void
)
{
FIXM
E
(
"()
\n
"
);
return
S_FALSE
;
TRAC
E
(
"()
ref=%ld
\n
"
,
module_ref
);
return
module_ref
?
S_FALSE
:
S_OK
;
}
/***********************************************************************
...
...
This diff is collapsed.
Click to expand it.
dlls/mshtml/mshtml_private.h
+
4
−
0
View file @
2f93763e
...
...
@@ -108,4 +108,8 @@ DEFINE_GUID(CLSID_MailtoProtocol, 0x3050F3DA, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0x
DEFINE_GUID
(
CLSID_ResProtocol
,
0x3050F3BC
,
0x98B5
,
0x11CF
,
0xBB
,
0x82
,
0x00
,
0xAA
,
0x00
,
0xBD
,
0xCE
,
0x0B
);
DEFINE_GUID
(
CLSID_SysimageProtocol
,
0x76E67A63
,
0x06E9
,
0x11D2
,
0xA8
,
0x40
,
0x00
,
0x60
,
0x08
,
0x05
,
0x93
,
0x82
);
extern
LONG
module_ref
;
#define LOCK_MODULE() InterlockedIncrement(&module_ref)
#define UNLOCK_MODULE() InterlockedDecrement(&module_ref)
extern
HINSTANCE
hInst
;
This diff is collapsed.
Click to expand it.
dlls/mshtml/protocol.c
+
23
−
9
View file @
2f93763e
...
...
@@ -51,8 +51,7 @@ typedef struct {
const
IClassFactoryVtbl
*
lpClassFactoryVtbl
;
}
ProtocolFactory
;
#define PROTOCOLINFO_THIS(iface) \
(ProtocolFactory*)((char*)(iface)-offsetof(ProtocolFactory,lpInternetProtocolInfoVtbl))
#define PROTOCOLINFO_THIS(iface) DEFINE_THIS(ProtocolFactory, InternetProtocolInfo, iface)
static
HRESULT
WINAPI
InternetProtocolInfo_QueryInterface
(
IInternetProtocolInfo
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
...
...
@@ -83,6 +82,7 @@ static ULONG WINAPI InternetProtocolInfo_AddRef(IInternetProtocolInfo *iface)
{
ProtocolFactory
*
This
=
PROTOCOLINFO_THIS
(
iface
);
TRACE
(
"(%p)
\n
"
,
This
);
LOCK_MODULE
();
return
2
;
}
...
...
@@ -90,13 +90,13 @@ static ULONG WINAPI InternetProtocolInfo_Release(IInternetProtocolInfo *iface)
{
ProtocolFactory
*
This
=
PROTOCOLINFO_THIS
(
iface
);
TRACE
(
"(%p)
\n
"
,
This
);
UNLOCK_MODULE
();
return
1
;
}
#undef PROTOCOLINFO_THIS
#define CLASSFACTORY_THIS(iface) \
(ProtocolFactory*)((char*)(iface)-offsetof(ProtocolFactory,lpClassFactoryVtbl))
#define CLASSFACTORY_THIS(iface) DEFINE_THIS(ProtocolFactory, ClassFactory, iface)
static
HRESULT
WINAPI
ClassFactory_QueryInterface
(
IClassFactory
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
...
...
@@ -119,7 +119,14 @@ static ULONG WINAPI ClassFactory_Release(IClassFactory *iface)
static
HRESULT
WINAPI
ClassFactory_LockServer
(
IClassFactory
*
iface
,
BOOL
dolock
)
{
ProtocolFactory
*
This
=
CLASSFACTORY_THIS
(
iface
);
FIXME
(
"(%p)->(%x)
\n
"
,
This
,
dolock
);
TRACE
(
"(%p)->(%x)
\n
"
,
This
,
dolock
);
if
(
dolock
)
LOCK_MODULE
();
else
UNLOCK_MODULE
();
return
S_OK
;
}
...
...
@@ -176,8 +183,10 @@ static ULONG WINAPI AboutProtocol_Release(IInternetProtocol *iface)
TRACE
(
"(%p) ref=%lx
\n
"
,
iface
,
ref
);
if
(
!
ref
)
if
(
!
ref
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
UNLOCK_MODULE
();
}
return
ref
;
}
...
...
@@ -287,7 +296,9 @@ static HRESULT WINAPI AboutProtocolFactory_CreateInstance(IClassFactory *iface,
hres
=
IUnknown_QueryInterface
((
IUnknown
*
)
ret
,
riid
,
ppv
);
if
(
FAILED
(
hres
))
if
(
SUCCEEDED
(
hres
))
LOCK_MODULE
();
else
HeapFree
(
GetProcessHeap
(),
0
,
ret
);
return
hres
;
...
...
@@ -408,6 +419,7 @@ static ULONG WINAPI ResProtocol_Release(IInternetProtocol *iface)
if
(
!
ref
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
->
data
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
UNLOCK_MODULE
();
}
return
ref
;
...
...
@@ -612,7 +624,9 @@ static HRESULT WINAPI ResProtocolFactory_CreateInstance(IClassFactory *iface, IU
hres
=
IUnknown_QueryInterface
((
IUnknown
*
)
ret
,
riid
,
ppv
);
if
(
FAILED
(
hres
))
if
(
SUCCEEDED
(
hres
))
LOCK_MODULE
();
else
HeapFree
(
GetProcessHeap
(),
0
,
ret
);
return
hres
;
...
...
@@ -688,6 +702,6 @@ HRESULT ProtocolFactory_Create(REFCLSID rclsid, REFIID riid, void **ppv)
FIXME
(
"not implemented protocol %s
\n
"
,
debugstr_guid
(
rclsid
));
return
CLASS_E_CLASSNOTAVAILABLE
;
}
return
IUnknown_QueryInterface
((
IUnknown
*
)
cf
,
riid
,
ppv
);
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment