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
166cfd5a
Commit
166cfd5a
authored
Jul 25, 1999
by
Juergen Schmied
Committed by
Alexandre Julliard
Jul 25, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New functions to access attributes in HCR.
parent
aeb5ff0c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
73 additions
and
1 deletion
+73
-1
classes.c
dlls/shell32/classes.c
+73
-1
No files found.
dlls/shell32/classes.c
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
;
}
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