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
be59368d
Commit
be59368d
authored
Apr 17, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 17, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Move get_typeinfo to dispex.c.
parent
ed6a8acc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
58 deletions
+64
-58
dispex.c
dlls/mshtml/dispex.c
+55
-0
main.c
dlls/mshtml/main.c
+1
-51
mshtml_private.h
dlls/mshtml/mshtml_private.h
+8
-7
No files found.
dlls/mshtml/dispex.c
View file @
be59368d
...
@@ -31,6 +31,61 @@
...
@@ -31,6 +31,61 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
mshtml
);
WINE_DEFAULT_DEBUG_CHANNEL
(
mshtml
);
static
ITypeLib
*
typelib
;
static
ITypeInfo
*
typeinfos
[
LAST_tid
];
static
REFIID
tid_ids
[]
=
{
&
IID_IHTMLWindow2
,
};
HRESULT
get_typeinfo
(
tid_t
tid
,
ITypeInfo
**
typeinfo
)
{
HRESULT
hres
;
if
(
!
typelib
)
{
ITypeLib
*
tl
;
hres
=
LoadRegTypeLib
(
&
LIBID_MSHTML
,
4
,
0
,
LOCALE_SYSTEM_DEFAULT
,
&
tl
);
if
(
FAILED
(
hres
))
{
ERR
(
"LoadRegTypeLib failed: %08x
\n
"
,
hres
);
return
hres
;
}
if
(
InterlockedCompareExchangePointer
((
void
**
)
&
typelib
,
tl
,
NULL
))
ITypeLib_Release
(
tl
);
}
if
(
!
typeinfos
[
tid
])
{
ITypeInfo
*
typeinfo
;
hres
=
ITypeLib_GetTypeInfoOfGuid
(
typelib
,
tid_ids
[
tid
],
&
typeinfo
);
if
(
FAILED
(
hres
))
{
ERR
(
"GetTypeInfoOfGuid failed: %08x
\n
"
,
hres
);
return
hres
;
}
if
(
InterlockedCompareExchangePointer
((
void
**
)(
typeinfos
+
tid
),
typeinfo
,
NULL
))
ITypeInfo_Release
(
typeinfo
);
}
*
typeinfo
=
typeinfos
[
tid
];
return
S_OK
;
}
void
release_typelib
(
void
)
{
unsigned
i
;
if
(
!
typelib
)
return
;
for
(
i
=
0
;
i
<
sizeof
(
typeinfos
)
/
sizeof
(
*
typeinfos
);
i
++
)
if
(
typeinfos
[
i
])
ITypeInfo_Release
(
typeinfos
[
i
]);
ITypeLib_Release
(
typelib
);
}
#define DISPATCHEX_THIS(iface) DEFINE_THIS(DispatchEx, IDispatchEx, iface)
#define DISPATCHEX_THIS(iface) DEFINE_THIS(DispatchEx, IDispatchEx, iface)
static
HRESULT
WINAPI
DispatchEx_QueryInterface
(
IDispatchEx
*
iface
,
REFIID
riid
,
void
**
ppv
)
static
HRESULT
WINAPI
DispatchEx_QueryInterface
(
IDispatchEx
*
iface
,
REFIID
riid
,
void
**
ppv
)
...
...
dlls/mshtml/main.c
View file @
be59368d
...
@@ -49,47 +49,6 @@ DWORD mshtml_tls = 0;
...
@@ -49,47 +49,6 @@ DWORD mshtml_tls = 0;
static
HINSTANCE
shdoclc
=
NULL
;
static
HINSTANCE
shdoclc
=
NULL
;
static
ITypeLib
*
typelib
;
static
ITypeInfo
*
typeinfos
[
LAST_tid
];
static
REFIID
tid_ids
[]
=
{
&
IID_IHTMLWindow2
};
HRESULT
get_typeinfo
(
enum
tid_t
tid
,
ITypeInfo
**
typeinfo
)
{
HRESULT
hres
;
if
(
!
typelib
)
{
ITypeLib
*
tl
;
hres
=
LoadRegTypeLib
(
&
LIBID_MSHTML
,
4
,
0
,
LOCALE_SYSTEM_DEFAULT
,
&
tl
);
if
(
FAILED
(
hres
))
{
ERR
(
"LoadRegTypeLib failed: %08x
\n
"
,
hres
);
return
hres
;
}
if
(
InterlockedCompareExchangePointer
((
void
**
)
&
typelib
,
tl
,
NULL
))
ITypeLib_Release
(
tl
);
}
if
(
!
typeinfos
[
tid
])
{
ITypeInfo
*
typeinfo
;
hres
=
ITypeLib_GetTypeInfoOfGuid
(
typelib
,
tid_ids
[
tid
],
&
typeinfo
);
if
(
FAILED
(
hres
))
{
ERR
(
"GetTypeInfoOfGuid failed: %08x
\n
"
,
hres
);
return
hres
;
}
if
(
InterlockedCompareExchangePointer
((
void
**
)(
typeinfos
+
tid
),
typeinfo
,
NULL
))
ITypeInfo_Release
(
typeinfo
);
}
*
typeinfo
=
typeinfos
[
tid
];
return
S_OK
;
}
static
void
thread_detach
(
void
)
static
void
thread_detach
(
void
)
{
{
thread_data_t
*
thread_data
;
thread_data_t
*
thread_data
;
...
@@ -107,16 +66,7 @@ static void thread_detach(void)
...
@@ -107,16 +66,7 @@ static void thread_detach(void)
static
void
process_detach
(
void
)
static
void
process_detach
(
void
)
{
{
close_gecko
();
close_gecko
();
release_typelib
();
if
(
typelib
)
{
unsigned
i
;
for
(
i
=
0
;
i
<
sizeof
(
typeinfos
)
/
sizeof
(
*
typeinfos
);
i
++
)
if
(
typeinfos
[
i
])
ITypeInfo_Release
(
typeinfos
[
i
]);
ITypeLib_Release
(
typelib
);
}
if
(
shdoclc
)
if
(
shdoclc
)
FreeLibrary
(
shdoclc
);
FreeLibrary
(
shdoclc
);
...
...
dlls/mshtml/mshtml_private.h
View file @
be59368d
...
@@ -57,6 +57,12 @@ typedef struct ConnectionPoint ConnectionPoint;
...
@@ -57,6 +57,12 @@ typedef struct ConnectionPoint ConnectionPoint;
typedef
struct
BSCallback
BSCallback
;
typedef
struct
BSCallback
BSCallback
;
typedef
struct
nsChannelBSC
nsChannelBSC
;
typedef
struct
nsChannelBSC
nsChannelBSC
;
/* NOTE: make sure to keep in sync with dispex.c */
typedef
enum
{
IHTMLWindow2_tid
,
LAST_tid
}
tid_t
;
typedef
struct
{
typedef
struct
{
const
IDispatchExVtbl
*
lpIDispatchExVtbl
;
const
IDispatchExVtbl
*
lpIDispatchExVtbl
;
...
@@ -524,13 +530,8 @@ HWND get_thread_hwnd(void);
...
@@ -524,13 +530,8 @@ HWND get_thread_hwnd(void);
void
push_task
(
task_t
*
);
void
push_task
(
task_t
*
);
void
remove_doc_tasks
(
const
HTMLDocument
*
);
void
remove_doc_tasks
(
const
HTMLDocument
*
);
/* typelibs */
HRESULT
get_typeinfo
(
tid_t
,
ITypeInfo
**
);
enum
tid_t
{
void
release_typelib
(
void
);
IHTMLWindow2_tid
,
LAST_tid
};
HRESULT
get_typeinfo
(
enum
tid_t
,
ITypeInfo
**
);
DEFINE_GUID
(
CLSID_AboutProtocol
,
0x3050F406
,
0x98B5
,
0x11CF
,
0xBB
,
0x82
,
0x00
,
0xAA
,
0x00
,
0xBD
,
0xCE
,
0x0B
);
DEFINE_GUID
(
CLSID_AboutProtocol
,
0x3050F406
,
0x98B5
,
0x11CF
,
0xBB
,
0x82
,
0x00
,
0xAA
,
0x00
,
0xBD
,
0xCE
,
0x0B
);
DEFINE_GUID
(
CLSID_JSProtocol
,
0x3050F3B2
,
0x98B5
,
0x11CF
,
0xBB
,
0x82
,
0x00
,
0xAA
,
0x00
,
0xBD
,
0xCE
,
0x0B
);
DEFINE_GUID
(
CLSID_JSProtocol
,
0x3050F3B2
,
0x98B5
,
0x11CF
,
0xBB
,
0x82
,
0x00
,
0xAA
,
0x00
,
0xBD
,
0xCE
,
0x0B
);
...
...
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