Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jason Beetham
wine
Commits
166cfd5a
Commit
166cfd5a
authored
25 years ago
by
Juergen Schmied
Committed by
Alexandre Julliard
25 years ago
Browse files
Options
Downloads
Patches
Plain Diff
New functions to access attributes in HCR.
parent
aeb5ff0c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/shell32/classes.c
+73
-1
73 additions, 1 deletion
dlls/shell32/classes.c
with
73 additions
and
1 deletion
dlls/shell32/classes.c
+
73
−
1
View file @
166cfd5a
...
...
@@ -15,12 +15,18 @@
DEFAULT_DEBUG_CHANNEL
(
shell
)
#define MAX_EXTENSION_LENGTH 20
BOOL
HCR_MapTypeToValue
(
LPCSTR
szExtension
,
LPSTR
szFileType
,
DWORD
len
)
{
HKEY
hkey
;
char
szTemp
[
MAX_EXTENSION_LENGTH
+
2
];
TRACE
(
"%s %p
\n
"
,
szExtension
,
szFileType
);
if
(
RegOpenKeyExA
(
HKEY_CLASSES_ROOT
,
szExtension
,
0
,
0x02000000
,
&
hkey
))
strcpy
(
szTemp
,
"."
);
strncat
(
szTemp
,
szExtension
,
MAX_EXTENSION_LENGTH
);
if
(
RegOpenKeyExA
(
HKEY_CLASSES_ROOT
,
szTemp
,
0
,
0x02000000
,
&
hkey
))
{
return
FALSE
;
}
...
...
@@ -92,6 +98,72 @@ BOOL HCR_GetDefaultIcon (LPCSTR szClass, LPSTR szDest, DWORD len, LPDWORD dwNr)
TRACE
(
"-- %s %li
\n
"
,
szDest
,
*
dwNr
);
return
TRUE
;
}
/***************************************************************************************
* HCR_GetClassName [internal]
*
* Gets the name of a registred class
*/
BOOL
HCR_GetClassName
(
REFIID
riid
,
LPSTR
szDest
,
DWORD
len
)
{
HKEY
hkey
;
char
xriid
[
50
];
strcpy
(
xriid
,
"CLSID
\\
"
);
WINE_StringFromCLSID
(
riid
,
&
xriid
[
strlen
(
xriid
)]);
TRACE
(
"%s
\n
"
,
xriid
);
if
(
RegOpenKeyExA
(
HKEY_CLASSES_ROOT
,
xriid
,
0
,
KEY_READ
,
&
hkey
))
{
return
FALSE
;
}
if
(
RegQueryValueExA
(
hkey
,
""
,
0
,
NULL
,
szDest
,
&
len
))
{
RegCloseKey
(
hkey
);
return
FALSE
;
}
RegCloseKey
(
hkey
);
TRACE
(
"-- %s
\n
"
,
szDest
);
return
TRUE
;
}
/***************************************************************************************
* HCR_GetFolderAttributes [internal]
*
* gets the folder attributes of a class
*/
BOOL
HCR_GetFolderAttributes
(
REFIID
riid
,
LPDWORD
szDest
)
{
HKEY
hkey
;
char
xriid
[
60
];
DWORD
attributes
;
DWORD
len
=
4
;
strcpy
(
xriid
,
"CLSID
\\
"
);
WINE_StringFromCLSID
(
riid
,
&
xriid
[
strlen
(
xriid
)]);
TRACE
(
"%s
\n
"
,
xriid
);
strcat
(
xriid
,
"
\\
ShellFolder"
);
if
(
RegOpenKeyExA
(
HKEY_CLASSES_ROOT
,
xriid
,
0
,
KEY_READ
,
&
hkey
))
{
return
FALSE
;
}
if
(
RegQueryValueExA
(
hkey
,
"Attributes"
,
0
,
NULL
,(
LPBYTE
)
&
attributes
,
&
len
))
{
RegCloseKey
(
hkey
);
return
FALSE
;
}
RegCloseKey
(
hkey
);
TRACE
(
"-- 0x%08lx
\n
"
,
attributes
);
*
szDest
=
attributes
;
return
TRUE
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment