Michael Jung : shell32: Register 'LocalizedString'
values for shellfolder classes.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Feb 14 07:27:39 CST 2006
Module: wine
Branch: refs/heads/master
Commit: bbca134a3c0ff3cd62a2065bea0c2bb785eac0c3
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=bbca134a3c0ff3cd62a2065bea0c2bb785eac0c3
Author: Michael Jung <mjung at iss.tu-darmstadt.de>
Date: Tue Feb 14 10:41:33 2006 +0100
shell32: Register 'LocalizedString' values for shellfolder classes.
---
dlls/shell32/regsvr.c | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/dlls/shell32/regsvr.c b/dlls/shell32/regsvr.c
index f150bb8..ac8144c 100644
--- a/dlls/shell32/regsvr.c
+++ b/dlls/shell32/regsvr.c
@@ -32,6 +32,7 @@
#include "shlguid.h"
#include "shell32_main.h"
#include "shfldr.h"
+#include "shresdef.h"
#include "wine/debug.h"
@@ -62,6 +63,7 @@ struct regsvr_coclass
{
CLSID const *clsid; /* NULL for end of list */
LPCSTR name; /* can be NULL to omit */
+ UINT idName; /* can be 0 to omit */
LPCSTR ips; /* can be NULL to omit */
LPCSTR ips32; /* can be NULL to omit */
LPCSTR ips32_tmodel; /* can be NULL to omit */
@@ -128,6 +130,7 @@ static char const tmodel_valuename[] = "
static char const wfparsing_valuename[] = "WantsFORPARSING";
static char const attributes_valuename[] = "Attributes";
static char const cfattributes_valuename[] = "CallForAttributes";
+static char const localized_valuename[] = "LocalizedString";
/***********************************************************************
* static helper functions
@@ -264,6 +267,14 @@ static HRESULT register_coclasses(struct
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) {
res = register_key_defvalueA(clsid_key, ips_keyname, list->ips);
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[] = {
{ &CLSID_Desktop,
"Desktop",
+ IDS_DESKTOP,
NULL,
"shell32.dll",
"Apartment"
},
{ &CLSID_DragDropHelper,
"Shell Drag and Drop Helper",
+ 0,
NULL,
"shell32.dll",
"Apartment"
},
{ &CLSID_MyComputer,
"My Computer",
+ IDS_MYCOMPUTER,
NULL,
"shell32.dll",
"Apartment"
},
{ &CLSID_Shortcut,
"Shortcut",
+ 0,
NULL,
"shell32.dll",
"Apartment",
@@ -601,12 +616,14 @@ static struct regsvr_coclass const cocla
},
{ &CLSID_AutoComplete,
"AutoComplete",
+ 0,
NULL,
"shell32.dll",
"Apartment",
},
{ &CLSID_UnixFolder,
"/",
+ 0,
NULL,
"shell32.dll",
"Apartment",
@@ -614,6 +631,7 @@ static struct regsvr_coclass const cocla
},
{ &CLSID_UnixDosFolder,
"/",
+ 0,
NULL,
"shell32.dll",
"Apartment",
@@ -623,6 +641,7 @@ static struct regsvr_coclass const cocla
},
{ &CLSID_FolderShortcut,
"Foldershortcut",
+ 0,
NULL,
"shell32.dll",
"Apartment",
@@ -632,6 +651,7 @@ static struct regsvr_coclass const cocla
},
{ &CLSID_MyDocuments,
"My Documents",
+ IDS_PERSONAL,
NULL,
"shell32.dll",
"Apartment",
More information about the wine-cvs
mailing list