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
6004183e
Commit
6004183e
authored
Jul 07, 2006
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 10, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Register protocol handlers in DllMain.
parent
57bcaf4d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
5 deletions
+35
-5
urlmon_main.c
dlls/urlmon/urlmon_main.c
+35
-5
No files found.
dlls/urlmon/urlmon_main.c
View file @
6004183e
...
...
@@ -44,6 +44,8 @@ HINSTANCE URLMON_hInstance = 0;
DWORD
urlmon_tls
=
0
;
static
void
init_session
(
BOOL
);
/***********************************************************************
* DllMain (URLMON.init)
*/
...
...
@@ -55,11 +57,13 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
case
DLL_PROCESS_ATTACH
:
DisableThreadLibraryCalls
(
hinstDLL
);
URLMON_hInstance
=
hinstDLL
;
init_session
(
TRUE
);
break
;
case
DLL_PROCESS_DETACH
:
if
(
urlmon_tls
)
TlsFree
(
urlmon_tls
);
init_session
(
FALSE
);
URLMON_hInstance
=
0
;
break
;
}
...
...
@@ -186,17 +190,43 @@ struct object_creation_info
{
const
CLSID
*
clsid
;
IClassFactory
*
cf
;
LPCWSTR
protocol
;
};
static
const
WCHAR
wszFile
[]
=
{
'f'
,
'i'
,
'l'
,
'e'
,
0
};
static
const
WCHAR
wszFtp
[]
=
{
'f'
,
't'
,
'p'
,
0
};
static
const
WCHAR
wszHttp
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
0
};
static
const
struct
object_creation_info
object_creation
[]
=
{
{
&
CLSID_FileProtocol
,
CLASSFACTORY
(
&
FileProtocolCF
)
},
{
&
CLSID_FtpProtocol
,
CLASSFACTORY
(
&
FtpProtocolCF
)
},
{
&
CLSID_HttpProtocol
,
CLASSFACTORY
(
&
HttpProtocolCF
)
},
{
&
CLSID_InternetSecurityManager
,
CLASSFACTORY
(
&
SecurityManagerCF
)
},
{
&
CLSID_InternetZoneManager
,
CLASSFACTORY
(
&
ZoneManagerCF
)
}
{
&
CLSID_FileProtocol
,
CLASSFACTORY
(
&
FileProtocolCF
)
,
wszFile
},
{
&
CLSID_FtpProtocol
,
CLASSFACTORY
(
&
FtpProtocolCF
)
,
wszFtp
},
{
&
CLSID_HttpProtocol
,
CLASSFACTORY
(
&
HttpProtocolCF
)
,
wszHttp
},
{
&
CLSID_InternetSecurityManager
,
CLASSFACTORY
(
&
SecurityManagerCF
)
,
NULL
},
{
&
CLSID_InternetZoneManager
,
CLASSFACTORY
(
&
ZoneManagerCF
)
,
NULL
}
};
static
void
init_session
(
BOOL
init
)
{
IInternetSession
*
session
;
int
i
;
CoInternetGetSession
(
0
,
&
session
,
0
);
for
(
i
=
0
;
i
<
sizeof
(
object_creation
)
/
sizeof
(
object_creation
[
0
]);
i
++
)
{
if
(
object_creation
[
i
].
protocol
)
{
if
(
init
)
IInternetSession_RegisterNameSpace
(
session
,
object_creation
[
i
].
cf
,
object_creation
[
i
].
clsid
,
object_creation
[
i
].
protocol
,
0
,
NULL
,
0
);
else
IInternetSession_UnregisterNameSpace
(
session
,
object_creation
[
i
].
cf
,
object_creation
[
i
].
protocol
);
}
}
IInternetSession_Release
(
session
);
}
/*******************************************************************************
* DllGetClassObject [URLMON.@]
* Retrieves class object from a DLL object
...
...
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