shell32: Register 'LocalizedString' values for shellfolder classes.
This commit is contained in:
parent
bbeeb4b5ad
commit
bbca134a3c
|
@ -32,6 +32,7 @@
|
||||||
#include "shlguid.h"
|
#include "shlguid.h"
|
||||||
#include "shell32_main.h"
|
#include "shell32_main.h"
|
||||||
#include "shfldr.h"
|
#include "shfldr.h"
|
||||||
|
#include "shresdef.h"
|
||||||
|
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
|
|
||||||
|
@ -62,6 +63,7 @@ struct regsvr_coclass
|
||||||
{
|
{
|
||||||
CLSID const *clsid; /* NULL for end of list */
|
CLSID const *clsid; /* NULL for end of list */
|
||||||
LPCSTR name; /* can be NULL to omit */
|
LPCSTR name; /* can be NULL to omit */
|
||||||
|
UINT idName; /* can be 0 to omit */
|
||||||
LPCSTR ips; /* can be NULL to omit */
|
LPCSTR ips; /* can be NULL to omit */
|
||||||
LPCSTR ips32; /* can be NULL to omit */
|
LPCSTR ips32; /* can be NULL to omit */
|
||||||
LPCSTR ips32_tmodel; /* can be NULL to omit */
|
LPCSTR ips32_tmodel; /* can be NULL to omit */
|
||||||
|
@ -128,6 +130,7 @@ static char const tmodel_valuename[] = "ThreadingModel";
|
||||||
static char const wfparsing_valuename[] = "WantsFORPARSING";
|
static char const wfparsing_valuename[] = "WantsFORPARSING";
|
||||||
static char const attributes_valuename[] = "Attributes";
|
static char const attributes_valuename[] = "Attributes";
|
||||||
static char const cfattributes_valuename[] = "CallForAttributes";
|
static char const cfattributes_valuename[] = "CallForAttributes";
|
||||||
|
static char const localized_valuename[] = "LocalizedString";
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* static helper functions
|
* static helper functions
|
||||||
|
@ -264,6 +267,14 @@ static HRESULT register_coclasses(struct regsvr_coclass const *list)
|
||||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (list->idName) {
|
||||||
|
char buffer[64] = "@%SYSTEMROOT%\\system32\\shell32.dll,-";
|
||||||
|
sprintf(buffer+strlen(buffer), "%u", list->idName);
|
||||||
|
res = RegSetValueExA(clsid_key, localized_valuename, 0, REG_EXPAND_SZ,
|
||||||
|
(CONST BYTE*)(buffer), strlen(buffer)+1);
|
||||||
|
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||||
|
}
|
||||||
|
|
||||||
if (list->ips) {
|
if (list->ips) {
|
||||||
res = register_key_defvalueA(clsid_key, ips_keyname, list->ips);
|
res = register_key_defvalueA(clsid_key, ips_keyname, list->ips);
|
||||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||||
|
@ -576,24 +587,28 @@ static GUID const CLSID_Shortcut = {
|
||||||
static struct regsvr_coclass const coclass_list[] = {
|
static struct regsvr_coclass const coclass_list[] = {
|
||||||
{ &CLSID_Desktop,
|
{ &CLSID_Desktop,
|
||||||
"Desktop",
|
"Desktop",
|
||||||
|
IDS_DESKTOP,
|
||||||
NULL,
|
NULL,
|
||||||
"shell32.dll",
|
"shell32.dll",
|
||||||
"Apartment"
|
"Apartment"
|
||||||
},
|
},
|
||||||
{ &CLSID_DragDropHelper,
|
{ &CLSID_DragDropHelper,
|
||||||
"Shell Drag and Drop Helper",
|
"Shell Drag and Drop Helper",
|
||||||
|
0,
|
||||||
NULL,
|
NULL,
|
||||||
"shell32.dll",
|
"shell32.dll",
|
||||||
"Apartment"
|
"Apartment"
|
||||||
},
|
},
|
||||||
{ &CLSID_MyComputer,
|
{ &CLSID_MyComputer,
|
||||||
"My Computer",
|
"My Computer",
|
||||||
|
IDS_MYCOMPUTER,
|
||||||
NULL,
|
NULL,
|
||||||
"shell32.dll",
|
"shell32.dll",
|
||||||
"Apartment"
|
"Apartment"
|
||||||
},
|
},
|
||||||
{ &CLSID_Shortcut,
|
{ &CLSID_Shortcut,
|
||||||
"Shortcut",
|
"Shortcut",
|
||||||
|
0,
|
||||||
NULL,
|
NULL,
|
||||||
"shell32.dll",
|
"shell32.dll",
|
||||||
"Apartment",
|
"Apartment",
|
||||||
|
@ -601,12 +616,14 @@ static struct regsvr_coclass const coclass_list[] = {
|
||||||
},
|
},
|
||||||
{ &CLSID_AutoComplete,
|
{ &CLSID_AutoComplete,
|
||||||
"AutoComplete",
|
"AutoComplete",
|
||||||
|
0,
|
||||||
NULL,
|
NULL,
|
||||||
"shell32.dll",
|
"shell32.dll",
|
||||||
"Apartment",
|
"Apartment",
|
||||||
},
|
},
|
||||||
{ &CLSID_UnixFolder,
|
{ &CLSID_UnixFolder,
|
||||||
"/",
|
"/",
|
||||||
|
0,
|
||||||
NULL,
|
NULL,
|
||||||
"shell32.dll",
|
"shell32.dll",
|
||||||
"Apartment",
|
"Apartment",
|
||||||
|
@ -614,6 +631,7 @@ static struct regsvr_coclass const coclass_list[] = {
|
||||||
},
|
},
|
||||||
{ &CLSID_UnixDosFolder,
|
{ &CLSID_UnixDosFolder,
|
||||||
"/",
|
"/",
|
||||||
|
0,
|
||||||
NULL,
|
NULL,
|
||||||
"shell32.dll",
|
"shell32.dll",
|
||||||
"Apartment",
|
"Apartment",
|
||||||
|
@ -623,6 +641,7 @@ static struct regsvr_coclass const coclass_list[] = {
|
||||||
},
|
},
|
||||||
{ &CLSID_FolderShortcut,
|
{ &CLSID_FolderShortcut,
|
||||||
"Foldershortcut",
|
"Foldershortcut",
|
||||||
|
0,
|
||||||
NULL,
|
NULL,
|
||||||
"shell32.dll",
|
"shell32.dll",
|
||||||
"Apartment",
|
"Apartment",
|
||||||
|
@ -632,6 +651,7 @@ static struct regsvr_coclass const coclass_list[] = {
|
||||||
},
|
},
|
||||||
{ &CLSID_MyDocuments,
|
{ &CLSID_MyDocuments,
|
||||||
"My Documents",
|
"My Documents",
|
||||||
|
IDS_PERSONAL,
|
||||||
NULL,
|
NULL,
|
||||||
"shell32.dll",
|
"shell32.dll",
|
||||||
"Apartment",
|
"Apartment",
|
||||||
|
|
Loading…
Reference in New Issue