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
7110f827
Commit
7110f827
authored
Jun 30, 2005
by
Michael Jung
Committed by
Alexandre Julliard
Jun 30, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Register unixfs at desktop level in DllRegisterServer.
parent
c0995c2c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
91 additions
and
0 deletions
+91
-0
regsvr.c
dlls/shell32/regsvr.c
+91
-0
No files found.
dlls/shell32/regsvr.c
View file @
7110f827
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
#include <stdarg.h>
#include <stdarg.h>
#include <string.h>
#include <string.h>
#include <stdio.h>
#include "windef.h"
#include "windef.h"
#include "winbase.h"
#include "winbase.h"
...
@@ -30,6 +31,7 @@
...
@@ -30,6 +31,7 @@
#include "ole2.h"
#include "ole2.h"
#include "shlguid.h"
#include "shlguid.h"
#include "shell32_main.h"
#include "shell32_main.h"
#include "shfldr.h"
#include "wine/debug.h"
#include "wine/debug.h"
...
@@ -79,6 +81,16 @@ struct regsvr_coclass
...
@@ -79,6 +81,16 @@ struct regsvr_coclass
static
HRESULT
register_coclasses
(
struct
regsvr_coclass
const
*
list
);
static
HRESULT
register_coclasses
(
struct
regsvr_coclass
const
*
list
);
static
HRESULT
unregister_coclasses
(
struct
regsvr_coclass
const
*
list
);
static
HRESULT
unregister_coclasses
(
struct
regsvr_coclass
const
*
list
);
struct
regsvr_namespace
{
CLSID
const
*
clsid
;
/* CLSID of the namespace extension. NULL for end of list */
LPCWSTR
parent
;
/* Mount point (MyComputer, Desktop, ..). */
LPCWSTR
value
;
/* Display name of the extension. */
};
static
HRESULT
register_namespace_extensions
(
struct
regsvr_namespace
const
*
list
);
static
HRESULT
unregister_namespace_extensions
(
struct
regsvr_namespace
const
*
list
);
/***********************************************************************
/***********************************************************************
* static string constants
* static string constants
*/
*/
...
@@ -377,6 +389,66 @@ error_return:
...
@@ -377,6 +389,66 @@ error_return:
return
res
!=
ERROR_SUCCESS
?
HRESULT_FROM_WIN32
(
res
)
:
S_OK
;
return
res
!=
ERROR_SUCCESS
?
HRESULT_FROM_WIN32
(
res
)
:
S_OK
;
}
}
/**********************************************************************
* register_namespace_extensions
*/
static
WCHAR
*
get_namespace_key
(
struct
regsvr_namespace
const
*
list
)
{
static
const
WCHAR
wszExplorerKey
[]
=
{
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
'M'
,
'i'
,
'c'
,
'r'
,
'o'
,
's'
,
'o'
,
'f'
,
't'
,
'\\'
,
'W'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
's'
,
'\\'
,
'C'
,
'u'
,
'r'
,
'r'
,
'e'
,
'n'
,
't'
,
'V'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
'\\'
,
'E'
,
'x'
,
'p'
,
'l'
,
'o'
,
'r'
,
'e'
,
'r'
,
'\\'
,
0
};
static
const
WCHAR
wszNamespace
[]
=
{
'\\'
,
'N'
,
'a'
,
'm'
,
'e'
,
's'
,
'p'
,
'a'
,
'c'
,
'e'
,
'\\'
,
0
};
WCHAR
*
pwszKey
,
*
pwszCLSID
;
pwszKey
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
wszExplorerKey
)
+
sizeof
(
wszNamespace
)
+
sizeof
(
WCHAR
)
*
(
lstrlenW
(
list
->
parent
)
+
CHARS_IN_GUID
));
if
(
!
pwszKey
)
return
NULL
;
lstrcpyW
(
pwszKey
,
wszExplorerKey
);
lstrcatW
(
pwszKey
,
list
->
parent
);
lstrcatW
(
pwszKey
,
wszNamespace
);
if
(
FAILED
(
StringFromCLSID
(
list
->
clsid
,
&
pwszCLSID
)))
{
HeapFree
(
GetProcessHeap
(),
0
,
pwszKey
);
return
NULL
;
}
lstrcatW
(
pwszKey
,
pwszCLSID
);
CoTaskMemFree
(
pwszCLSID
);
return
pwszKey
;
}
static
HRESULT
register_namespace_extensions
(
struct
regsvr_namespace
const
*
list
)
{
WCHAR
*
pwszKey
;
HKEY
hKey
;
for
(;
list
->
clsid
;
list
++
)
{
pwszKey
=
get_namespace_key
(
list
);
/* Create the key and set the value. */
if
(
pwszKey
&&
ERROR_SUCCESS
==
RegCreateKeyExW
(
HKEY_LOCAL_MACHINE
,
pwszKey
,
0
,
NULL
,
0
,
KEY_WRITE
,
NULL
,
&
hKey
,
NULL
))
{
RegSetValueExW
(
hKey
,
NULL
,
0
,
REG_SZ
,
(
LPBYTE
)
list
->
value
,
sizeof
(
WCHAR
)
*
(
lstrlenW
(
list
->
value
)
+
1
));
RegCloseKey
(
hKey
);
}
HeapFree
(
GetProcessHeap
(),
0
,
pwszKey
);
}
return
S_OK
;
}
static
HRESULT
unregister_namespace_extensions
(
struct
regsvr_namespace
const
*
list
)
{
WCHAR
*
pwszKey
;
for
(;
list
->
clsid
;
list
++
)
{
pwszKey
=
get_namespace_key
(
list
);
RegDeleteKeyW
(
HKEY_LOCAL_MACHINE
,
pwszKey
);
HeapFree
(
GetProcessHeap
(),
0
,
pwszKey
);
}
return
S_OK
;
}
/***********************************************************************
/***********************************************************************
* regsvr_key_guid
* regsvr_key_guid
*/
*/
...
@@ -561,6 +633,21 @@ static struct regsvr_interface const interface_list[] = {
...
@@ -561,6 +633,21 @@ static struct regsvr_interface const interface_list[] = {
};
};
/***********************************************************************
/***********************************************************************
* namespace extensions list
*/
static
const
WCHAR
wszDesktop
[]
=
{
'D'
,
'e'
,
's'
,
'k'
,
't'
,
'o'
,
'p'
,
0
};
static
const
WCHAR
wszSlash
[]
=
{
'/'
,
0
};
static
struct
regsvr_namespace
const
namespace_extensions_list
[]
=
{
{
&
CLSID_UnixDosFolder
,
wszDesktop
,
wszSlash
},
{
NULL
}
};
/***********************************************************************
* DllRegisterServer (SHELL32.@)
* DllRegisterServer (SHELL32.@)
*/
*/
HRESULT
WINAPI
SHELL32_DllRegisterServer
()
HRESULT
WINAPI
SHELL32_DllRegisterServer
()
...
@@ -574,6 +661,8 @@ HRESULT WINAPI SHELL32_DllRegisterServer()
...
@@ -574,6 +661,8 @@ HRESULT WINAPI SHELL32_DllRegisterServer()
hr
=
register_interfaces
(
interface_list
);
hr
=
register_interfaces
(
interface_list
);
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
hr
=
SHELL_RegisterShellFolders
();
hr
=
SHELL_RegisterShellFolders
();
if
(
SUCCEEDED
(
hr
))
hr
=
register_namespace_extensions
(
namespace_extensions_list
);
return
hr
;
return
hr
;
}
}
...
@@ -589,5 +678,7 @@ HRESULT WINAPI SHELL32_DllUnregisterServer()
...
@@ -589,5 +678,7 @@ HRESULT WINAPI SHELL32_DllUnregisterServer()
hr
=
unregister_coclasses
(
coclass_list
);
hr
=
unregister_coclasses
(
coclass_list
);
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
hr
=
unregister_interfaces
(
interface_list
);
hr
=
unregister_interfaces
(
interface_list
);
if
(
SUCCEEDED
(
hr
))
hr
=
unregister_namespace_extensions
(
namespace_extensions_list
);
return
hr
;
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