mirror of
https://github.com/reactos/reactos.git
synced 2026-06-20 11:32:15 +08:00
[EXPLORER][BROWSEUI][SHELL32][NETSHELL] Fix wrong usage of CComPtr
This commit is contained in:
@@ -60,7 +60,7 @@ typedef struct IEThreadParamBlock
|
||||
UCHAR gap108[24];
|
||||
DWORD dword120;
|
||||
DWORD dword124;
|
||||
IUnknown* offsetF8; // 0x128 instance explorer
|
||||
IUnknown* pExplorerInstance; // 0x128 instance explorer
|
||||
UCHAR byteflags_130;
|
||||
} IE_THREAD_PARAM_BLOCK, * PIE_THREAD_PARAM_BLOCK;
|
||||
#else
|
||||
@@ -90,7 +90,7 @@ typedef struct IEThreadParamBlock
|
||||
char offsetA4[0xD8-0xA4]; // unknown contents -- 0xA4..0xD8
|
||||
LONG offsetD8;
|
||||
char offsetDC[0xF8-0xDC]; // unknown contents -- 0xDC..0xF8
|
||||
IUnknown * offsetF8; // instance explorer
|
||||
IUnknown * pExplorerInstance; // instance explorer
|
||||
LONG offsetFC; // unknown contents
|
||||
} IE_THREAD_PARAM_BLOCK, *PIE_THREAD_PARAM_BLOCK;
|
||||
#endif
|
||||
|
||||
@@ -226,7 +226,8 @@ void ReleaseCComPtrExpectZero(CComPtr<T>& cptr, BOOL forceRelease = FALSE)
|
||||
{
|
||||
if (cptr.p != NULL)
|
||||
{
|
||||
int nrc = cptr->Release();
|
||||
T *raw = cptr.Detach();
|
||||
int nrc = raw->Release();
|
||||
if (nrc > 0)
|
||||
{
|
||||
DbgPrint("WARNING: Unexpected RefCount > 0 (%d)!\n", nrc);
|
||||
@@ -234,11 +235,10 @@ void ReleaseCComPtrExpectZero(CComPtr<T>& cptr, BOOL forceRelease = FALSE)
|
||||
{
|
||||
while (nrc > 0)
|
||||
{
|
||||
nrc = cptr->Release();
|
||||
nrc = raw->Release();
|
||||
}
|
||||
}
|
||||
}
|
||||
cptr.Detach();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user