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
2afe205e
Commit
2afe205e
authored
Jan 19, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Convert dll registration to the IRegistrar mechanism.
parent
6dcf94b2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
287 additions
and
1 deletion
+287
-1
Makefile.in
dlls/shell32/Makefile.in
+2
-1
regsvr.c
dlls/shell32/regsvr.c
+0
-0
shell32.rc
dlls/shell32/shell32.rc
+3
-0
shell32.rgs
dlls/shell32/shell32.rgs
+51
-0
shell32_classes.idl
dlls/shell32/shell32_classes.idl
+137
-0
shell32_main.c
dlls/shell32/shell32_main.c
+21
-0
shellpath.c
dlls/shell32/shellpath.c
+73
-0
No files found.
dlls/shell32/Makefile.in
View file @
2afe205e
...
...
@@ -25,7 +25,6 @@ C_SRCS = \
iconcache.c
\
pidl.c
\
recyclebin.c
\
regsvr.c
\
shell32_main.c
\
shelldispatch.c
\
shellitem.c
\
...
...
@@ -91,6 +90,8 @@ PO_SRCS = shell32.rc
IDL_TLB_SRCS
=
shell32_tlb.idl
IDL_R_SRCS
=
shell32_classes.idl
SVG_SRCS
=
\
cdrom.svg
\
control.svg
\
...
...
dlls/shell32/regsvr.c
deleted
100644 → 0
View file @
6dcf94b2
This diff is collapsed.
Click to expand it.
dlls/shell32/shell32.rc
View file @
2afe205e
...
...
@@ -263,6 +263,9 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
/* @makedep: shell32_tlb.tlb */
1 TYPELIB shell32_tlb.tlb
/* @makedep: shell32.rgs */
1 WINE_REGISTRY shell32.rgs
shv_accel ACCELERATORS
BEGIN
VK_F5, FCIDM_SHVIEW_REFRESH, VIRTKEY
...
...
dlls/shell32/shell32.rgs
0 → 100644
View file @
2afe205e
HKCR
{
NoRemove CLSID
{
'{00021400-0000-0000-C000-000000000046}' { val LocalizedString = s '@%MODULE%,-20' }
'{20D04FE0-3AEA-1069-A2D8-08002B30309D}' { val LocalizedString = s '@%MODULE%,-21' }
'{21EC2020-3AEA-1069-A2DD-08002B30309D}' { val LocalizedString = s '@%MODULE%,-22' }
'{450D8FBA-AD25-11D0-98A8-0800361B1103}' { val LocalizedString = s '@%MODULE%,-46' }
'{645FF040-5081-101B-9F08-00AA002F954E}'
{
val LocalizedString = s '@%MODULE%,-8964'
DefaultIcon = s '@%MODULE%,-33'
}
'{00021401-0000-0000-C000-000000000046}' { shellex { MayChangeDefaultMenu } }
}
}
HKLM
{
NoRemove Software
{
NoRemove Microsoft
{
NoRemove Windows
{
NoRemove CurrentVersion
{
NoRemove Explorer
{
NoRemove Desktop
{
NoRemove Namespace
{
'{450D8FBA-AD25-11D0-98A8-0800361B1103}' = s 'My Documents'
'{645FF040-5081-101B-9F08-00AA002F954E}' = s 'Trash'
'{9D20AAE8-0625-44B0-9CA7-71889C2254D9}' = s '/'
}
}
NoRemove MyComputer
{
NoRemove Namespace
{
'{21EC2020-3AEA-1069-A2DD-08002B30309D}' = s 'Control Panel'
}
}
}
}
}
}
}
}
dlls/shell32/shell32_classes.idl
0 → 100644
View file @
2afe205e
/*
*
Coclasses
for
shell32
*
*
Copyright
2011
Alexandre
Julliard
*
*
This
library
is
free
software
; you can redistribute it and/or
*
modify
it
under
the
terms
of
the
GNU
Lesser
General
Public
*
License
as
published
by
the
Free
Software
Foundation
; either
*
version
2.1
of
the
License
,
or
(
at
your
option
)
any
later
version
.
*
*
This
library
is
distributed
in
the
hope
that
it
will
be
useful
,
*
but
WITHOUT
ANY
WARRANTY
; without even the implied warranty of
*
MERCHANTABILITY
or
FITNESS
FOR
A
PARTICULAR
PURPOSE
.
See
the
GNU
*
Lesser
General
Public
License
for
more
details
.
*
*
You
should
have
received
a
copy
of
the
GNU
Lesser
General
Public
*
License
along
with
this
library
; if not, write to the Free Software
*
Foundation
,
Inc
.
,
51
Franklin
St
,
Fifth
Floor
,
Boston
,
MA
02110
-
1301
,
USA
*/
[
helpstring
(
"Shell Automation Service"
),
progid
(
"Shell.Application.1"
),
vi_progid
(
"Shell.Application"
),
threading
(
apartment
),
uuid
(
13709620
-
c279
-
11
ce
-
a49e
-
444553540000
)
]
coclass
Shell
{
interface
IShellDispatch
; }
[
helpstring
(
"Printers and Faxes"
),
threading
(
apartment
),
uuid
(
2227
a280
-
3
aea
-
1069
-
a2de
-
08002b30309
d
)
]
coclass
Printers
{
interface
IShellFolder2
; }
[
helpstring
(
"Explorer Browser"
),
threading
(
apartment
),
uuid
(
71
f96385
-
ddd6
-
48
d3
-
a0c1
-
ae06e8b055fb
)
]
coclass
ExplorerBrowser
{
interface
IExplorerBrowser
; }
[
helpstring
(
"Known Folder Manager"
),
threading
(
apartment
),
uuid
(
4
df0c730
-
df9d
-
4
ae3
-
9153
-
aa6b82e9795a
)
]
coclass
KnownFolderManager
{
interface
IKnownFolderManager
; }
[
helpstring
(
"Microsoft Shell Folder View Router"
),
threading
(
apartment
),
uuid
(
9b
a05971
-
f6a8
-
11
cf
-
a442
-
00
a0c90a8f39
)
]
coclass
ShellFolderViewOC
{
}
[
helpstring
(
"Query file associations"
),
threading
(
apartment
),
uuid
(
a07034fd
-
6
caa
-
4954
-
ac3f
-
97
a27216f98a
)
]
coclass
QueryAssociations
{
interface
IQueryAssociations
; }
[
helpstring
(
"Shell Drag and Drop Helper"
),
threading
(
apartment
),
uuid
(
4657278
a
-
411b
-
11
d2
-
839
a
-
00
c04fd918d0
)
]
coclass
DragDropHelper
{
interface
IDropTargetHelper
; }
[
threading
(
apartment
),
uuid
(
00b
b2763
-
6
a77
-
11
d0
-
a535
-
00
c04fd7d062
)
]
coclass
AutoComplete
{
interface
IAutoComplete2
; }
[
helpstring
(
"Shell File System Folder"
),
threading
(
apartment
),
uuid
(
f3364ba0
-
65b9
-
11
ce
-
a9ba
-
00
aa004ae837
)
]
coclass
ShellFSFolder
{
interface
IShellFolder2
; }
[
helpstring
(
"My Network Places"
),
threading
(
apartment
),
uuid
(
208
d2c60
-
3
aea
-
1069
-
a2d7
-
08002b30309
d
)
]
coclass
NetworkPlaces
{
interface
IShellFolder2
; }
[
helpstring
(
"Desktop"
),
threading
(
apartment
),
uuid
(
00021400
-
0000
-
0000
-
c000
-
000000000046
)
]
coclass
ShellDesktop
{
interface
IShellFolder2
; }
[
helpstring
(
"Shortcut"
),
threading
(
apartment
),
uuid
(
00021401
-
0000
-
0000
-
c000
-
000000000046
)
]
coclass
ShellLink
{
interface
IShellLinkW
; }
[
helpstring
(
"My Computer"
),
threading
(
apartment
),
uuid
(
20
d04fe0
-
3
aea
-
1069
-
a2d8
-
08002b30309
d
)
]
coclass
MyComputer
{
interface
IShellFolder2
; }
[
threading
(
apartment
),
uuid
(
0
afaced1
-
e828
-
11
d1
-
9187
-
b532f1e9575d
)
]
coclass
FolderShortcut
{
interface
IShellFolder2
; }
[
helpstring
(
"/"
),
threading
(
apartment
),
uuid
(
cc702eb2
-
7
dc5
-
11
d9
-
c687
-
0004238
a01cd
)
]
coclass
UnixFolder
{
interface
IShellFolder2
; }
[
helpstring
(
"/"
),
threading
(
apartment
),
uuid
(
9
d20aae8
-
0625
-
44b0
-
9
ca7
-
71889
c2254d9
)
]
coclass
UnixDosFolder
{
interface
IShellFolder2
; }
[
helpstring
(
"My Documents"
),
threading
(
apartment
),
uuid
(
450
d8fba
-
ad25
-
11
d0
-
98
a8
-
0800361b1103
)
]
coclass
MyDocuments
{
interface
IShellFolder2
; }
[
helpstring
(
"Trash"
),
threading
(
apartment
),
uuid
(
645
ff040
-
5081
-
101b
-
9
f08
-
00
aa002f954e
)
]
coclass
RecycleBin
{
interface
IShellFolder2
; }
[
helpstring
(
"Control Panel"
),
threading
(
apartment
),
uuid
(
21
ec2020
-
3
aea
-
1069
-
a2dd
-
08002b30309
d
)
]
coclass
ControlPanel
{
interface
IShellFolder2
; }
dlls/shell32/shell32_main.c
View file @
2afe205e
...
...
@@ -37,6 +37,7 @@
#include "winuser.h"
#include "wingdi.h"
#include "shlobj.h"
#include "rpcproxy.h"
#include "shlwapi.h"
#include "propsys.h"
...
...
@@ -45,6 +46,8 @@
#include "shell32_main.h"
#include "version.h"
#include "shresdef.h"
#include "initguid.h"
#include "shfldr.h"
#include "wine/debug.h"
#include "wine/unicode.h"
...
...
@@ -1231,6 +1234,24 @@ HRESULT WINAPI DllCanUnloadNow(void)
}
/***********************************************************************
* DllRegisterServer (SHELL32.@)
*/
HRESULT
WINAPI
DllRegisterServer
(
void
)
{
HRESULT
hr
=
__wine_register_resources
(
shell32_hInstance
,
NULL
);
if
(
SUCCEEDED
(
hr
))
hr
=
SHELL_RegisterShellFolders
();
return
hr
;
}
/***********************************************************************
* DllUnregisterServer (SHELL32.@)
*/
HRESULT
WINAPI
DllUnregisterServer
(
void
)
{
return
__wine_unregister_resources
(
shell32_hInstance
,
NULL
);
}
/***********************************************************************
* ExtractVersionResource16W (SHELL32.@)
*/
BOOL
WINAPI
ExtractVersionResource16W
(
LPWSTR
s
,
DWORD
d
)
...
...
dlls/shell32/shellpath.c
View file @
2afe205e
...
...
@@ -2726,6 +2726,77 @@ static HRESULT create_extra_folders(void)
}
/******************************************************************************
* set_folder_attributes
*
* Set the various folder attributes registry keys.
*/
static
HRESULT
set_folder_attributes
(
void
)
{
static
const
WCHAR
clsidW
[]
=
{
'C'
,
'L'
,
'S'
,
'I'
,
'D'
,
'\\'
,
0
};
static
const
WCHAR
shellfolderW
[]
=
{
'\\'
,
'S'
,
'h'
,
'e'
,
'l'
,
'l'
,
'F'
,
'o'
,
'l'
,
'd'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
wfparsingW
[]
=
{
'W'
,
'a'
,
'n'
,
't'
,
's'
,
'F'
,
'O'
,
'R'
,
'P'
,
'A'
,
'R'
,
'S'
,
'I'
,
'N'
,
'G'
,
0
};
static
const
WCHAR
wfdisplayW
[]
=
{
'W'
,
'a'
,
'n'
,
't'
,
's'
,
'F'
,
'O'
,
'R'
,
'D'
,
'I'
,
'S'
,
'P'
,
'L'
,
'A'
,
'Y'
,
0
};
static
const
WCHAR
hideasdeleteW
[]
=
{
'H'
,
'i'
,
'd'
,
'e'
,
'A'
,
's'
,
'D'
,
'e'
,
'l'
,
'e'
,
't'
,
'e'
,
'P'
,
'e'
,
'r'
,
'U'
,
's'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
attributesW
[]
=
{
'A'
,
't'
,
't'
,
'r'
,
'i'
,
'b'
,
'u'
,
't'
,
'e'
,
's'
,
0
};
static
const
WCHAR
cfattributesW
[]
=
{
'C'
,
'a'
,
'l'
,
'l'
,
'F'
,
'o'
,
'r'
,
'A'
,
't'
,
't'
,
'r'
,
'i'
,
'b'
,
'u'
,
't'
,
'e'
,
's'
,
0
};
static
const
WCHAR
emptyW
[]
=
{
0
};
static
const
struct
{
const
CLSID
*
clsid
;
BOOL
wfparsing
:
1
;
BOOL
wfdisplay
:
1
;
BOOL
hideasdel
:
1
;
DWORD
attr
;
DWORD
call_for_attr
;
}
folders
[]
=
{
{
&
CLSID_UnixFolder
,
TRUE
,
FALSE
,
FALSE
},
{
&
CLSID_UnixDosFolder
,
TRUE
,
FALSE
,
FALSE
,
SFGAO_FILESYSANCESTOR
|
SFGAO_FOLDER
|
SFGAO_HASSUBFOLDER
,
SFGAO_FILESYSTEM
},
{
&
CLSID_FolderShortcut
,
FALSE
,
FALSE
,
FALSE
,
SFGAO_FILESYSTEM
|
SFGAO_FOLDER
|
SFGAO_LINK
,
SFGAO_HASSUBFOLDER
|
SFGAO_FILESYSTEM
|
SFGAO_FOLDER
|
SFGAO_FILESYSANCESTOR
},
{
&
CLSID_MyDocuments
,
TRUE
,
FALSE
,
FALSE
,
SFGAO_FILESYSANCESTOR
|
SFGAO_FOLDER
|
SFGAO_HASSUBFOLDER
,
SFGAO_FILESYSTEM
},
{
&
CLSID_RecycleBin
,
FALSE
,
FALSE
,
FALSE
,
SFGAO_FOLDER
|
SFGAO_DROPTARGET
|
SFGAO_HASPROPSHEET
},
{
&
CLSID_ControlPanel
,
FALSE
,
TRUE
,
TRUE
,
SFGAO_FOLDER
|
SFGAO_HASSUBFOLDER
}
};
unsigned
int
i
;
WCHAR
buffer
[
39
+
(
sizeof
(
clsidW
)
+
sizeof
(
shellfolderW
))
/
sizeof
(
WCHAR
)];
LONG
res
;
HKEY
hkey
;
for
(
i
=
0
;
i
<
sizeof
(
folders
)
/
sizeof
(
folders
[
0
]);
i
++
)
{
strcpyW
(
buffer
,
clsidW
);
StringFromGUID2
(
folders
[
i
].
clsid
,
buffer
+
strlenW
(
buffer
),
39
);
strcatW
(
buffer
,
shellfolderW
);
res
=
RegCreateKeyExW
(
HKEY_CLASSES_ROOT
,
buffer
,
0
,
NULL
,
0
,
KEY_READ
|
KEY_WRITE
,
NULL
,
&
hkey
,
NULL
);
if
(
res
)
return
HRESULT_FROM_WIN32
(
res
);
if
(
folders
[
i
].
wfparsing
)
res
=
RegSetValueExW
(
hkey
,
wfparsingW
,
0
,
REG_SZ
,
(
const
BYTE
*
)
emptyW
,
sizeof
(
emptyW
)
);
if
(
folders
[
i
].
wfdisplay
)
res
=
RegSetValueExW
(
hkey
,
wfdisplayW
,
0
,
REG_SZ
,
(
const
BYTE
*
)
emptyW
,
sizeof
(
emptyW
)
);
if
(
folders
[
i
].
hideasdel
)
res
=
RegSetValueExW
(
hkey
,
hideasdeleteW
,
0
,
REG_SZ
,
(
const
BYTE
*
)
emptyW
,
sizeof
(
emptyW
)
);
if
(
folders
[
i
].
attr
)
res
=
RegSetValueExW
(
hkey
,
attributesW
,
0
,
REG_DWORD
,
(
const
BYTE
*
)
&
folders
[
i
].
attr
,
sizeof
(
DWORD
));
if
(
folders
[
i
].
call_for_attr
)
res
=
RegSetValueExW
(
hkey
,
cfattributesW
,
0
,
REG_DWORD
,
(
const
BYTE
*
)
&
folders
[
i
].
call_for_attr
,
sizeof
(
DWORD
));
RegCloseKey
(
hkey
);
}
return
S_OK
;
}
/* Register the default values in the registry, as some apps seem to depend
* on their presence. The set registered was taken from Windows XP.
*/
...
...
@@ -2746,6 +2817,8 @@ HRESULT SHELL_RegisterShellFolders(void)
hr
=
_SHRegisterCommonShellFolders
();
if
(
SUCCEEDED
(
hr
))
hr
=
create_extra_folders
();
if
(
SUCCEEDED
(
hr
))
hr
=
set_folder_attributes
();
return
hr
;
}
...
...
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