Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
c62f428d
Commit
c62f428d
authored
Aug 11, 2006
by
Francois Gouget
Committed by
Alexandre Julliard
Aug 11, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shdocvw: Set the CLSID_Internet shell folder's attributes.
parent
d7371fc4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
1 deletion
+59
-1
regsvr.c
dlls/shdocvw/regsvr.c
+59
-1
No files found.
dlls/shdocvw/regsvr.c
View file @
c62f428d
...
...
@@ -64,8 +64,17 @@ struct regsvr_coclass
LPCSTR
progid
;
/* can be NULL to omit */
LPCSTR
viprogid
;
/* can be NULL to omit */
LPCSTR
progid_extra
;
/* can be NULL to omit */
DWORD
flags
;
DWORD
dwAttributes
;
DWORD
dwCallForAttributes
;
};
/* flags for regsvr_coclass.flags */
#define SHELLEX_MAYCHANGEDEFAULTMENU 0x00000001
#define SHELLFOLDER_WANTSFORPARSING 0x00000002
#define SHELLFOLDER_ATTRIBUTES 0x00000004
#define SHELLFOLDER_CALLFORATTRIBUTES 0x00000008
static
HRESULT
register_coclasses
(
struct
regsvr_coclass
const
*
list
);
static
HRESULT
unregister_coclasses
(
struct
regsvr_coclass
const
*
list
);
...
...
@@ -101,7 +110,17 @@ static WCHAR const viprogid_keyname[25] = {
'V'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
'I'
,
'n'
,
'd'
,
'e'
,
'p'
,
'e'
,
'n'
,
'd'
,
'e'
,
'n'
,
't'
,
'P'
,
'r'
,
'o'
,
'g'
,
'I'
,
'D'
,
0
};
static
WCHAR
const
shellex_keyname
[
8
]
=
{
's'
,
'h'
,
'e'
,
'l'
,
'l'
,
'e'
,
'x'
,
0
};
static
WCHAR
const
shellfolder_keyname
[
12
]
=
{
'S'
,
'h'
,
'e'
,
'l'
,
'l'
,
'F'
,
'o'
,
'l'
,
'd'
,
'e'
,
'r'
,
0
};
static
WCHAR
const
mcdm_keyname
[
21
]
=
{
'M'
,
'a'
,
'y'
,
'C'
,
'h'
,
'a'
,
'n'
,
'g'
,
'e'
,
'D'
,
'e'
,
'f'
,
'a'
,
'u'
,
'l'
,
't'
,
'M'
,
'e'
,
'n'
,
'u'
,
0
};
static
char
const
tmodel_valuename
[]
=
"ThreadingModel"
;
static
char
const
wfparsing_valuename
[]
=
"WantsFORPARSING"
;
static
char
const
attributes_valuename
[]
=
"Attributes"
;
static
char
const
cfattributes_valuename
[]
=
"CallForAttributes"
;
static
WCHAR
const
lcs32_keyname
[]
=
{
'L'
,
'o'
,
'c'
,
'a'
,
'l'
,
'S'
,
'e'
,
'r'
,
'v'
,
'e'
,
'r'
,
'3'
,
'2'
,
0
};
static
const
WCHAR
szIERelPath
[]
=
{
...
...
@@ -270,6 +289,42 @@ static HRESULT register_coclasses(struct regsvr_coclass const *list)
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
}
if
(
list
->
flags
&
SHELLEX_MAYCHANGEDEFAULTMENU
)
{
HKEY
shellex_key
,
mcdm_key
;
res
=
RegCreateKeyExW
(
clsid_key
,
shellex_keyname
,
0
,
NULL
,
0
,
KEY_READ
|
KEY_WRITE
,
NULL
,
&
shellex_key
,
NULL
);
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
res
=
RegCreateKeyExW
(
shellex_key
,
mcdm_keyname
,
0
,
NULL
,
0
,
KEY_READ
|
KEY_WRITE
,
NULL
,
&
mcdm_key
,
NULL
);
RegCloseKey
(
shellex_key
);
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
RegCloseKey
(
mcdm_key
);
}
if
(
list
->
flags
&
(
SHELLFOLDER_WANTSFORPARSING
|
SHELLFOLDER_ATTRIBUTES
|
SHELLFOLDER_CALLFORATTRIBUTES
))
{
HKEY
shellfolder_key
;
res
=
RegCreateKeyExW
(
clsid_key
,
shellfolder_keyname
,
0
,
NULL
,
0
,
KEY_READ
|
KEY_WRITE
,
NULL
,
&
shellfolder_key
,
NULL
);
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
if
(
list
->
flags
&
SHELLFOLDER_WANTSFORPARSING
)
res
=
RegSetValueExA
(
shellfolder_key
,
wfparsing_valuename
,
0
,
REG_SZ
,
(
LPBYTE
)
""
,
1
);
if
(
list
->
flags
&
SHELLFOLDER_ATTRIBUTES
)
res
=
RegSetValueExA
(
shellfolder_key
,
attributes_valuename
,
0
,
REG_DWORD
,
(
LPBYTE
)
&
list
->
dwAttributes
,
sizeof
(
DWORD
));
if
(
list
->
flags
&
SHELLFOLDER_CALLFORATTRIBUTES
)
res
=
RegSetValueExA
(
shellfolder_key
,
cfattributes_valuename
,
0
,
REG_DWORD
,
(
LPBYTE
)
&
list
->
dwCallForAttributes
,
sizeof
(
DWORD
));
RegCloseKey
(
shellfolder_key
);
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
}
if
(
list
->
progid
)
{
res
=
register_key_defvalueA
(
clsid_key
,
progid_keyname
,
list
->
progid
);
...
...
@@ -618,7 +673,10 @@ static struct regsvr_coclass const coclass_list[] = {
"shdocvw.dll"
,
"Apartment"
,
NULL
,
NULL
NULL
,
NULL
,
SHELLFOLDER_ATTRIBUTES
,
SFGAO_CANDELETE
|
SFGAO_CANLINK
},
{
NULL
}
/* list terminator */
};
...
...
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