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
Johnny Cai
wine
Commits
5674b830
Commit
5674b830
authored
21 years ago
by
Michael McCormack
Committed by
Alexandre Julliard
21 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Implemented ReadCabinetState and WriteCabinetState.
parent
b5d31846
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/shell32/shellord.c
+80
-9
80 additions, 9 deletions
dlls/shell32/shellord.c
dlls/shell32/undocshell.h
+25
-0
25 additions, 0 deletions
dlls/shell32/undocshell.h
with
105 additions
and
9 deletions
dlls/shell32/shellord.c
+
80
−
9
View file @
5674b830
...
...
@@ -1082,22 +1082,92 @@ BOOL WINAPI DAD_ShowDragImage(BOOL bShow)
FIXME
(
"0x%08x stub
\n
"
,
bShow
);
return
0
;
}
static
const
WCHAR
szwCabLocation
[]
=
{
'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'
,
'\\'
,
'C'
,
'a'
,
'b'
,
'i'
,
'n'
,
'e'
,
't'
,
'S'
,
't'
,
'a'
,
't'
,
'e'
,
0
};
static
const
WCHAR
szwSettings
[]
=
{
'S'
,
'e'
,
't'
,
't'
,
'i'
,
'n'
,
'g'
,
's'
,
0
};
/*************************************************************************
* ReadCabinetState [SHELL32.651] NT 4.0
*
*/
HRESULT
WINAPI
ReadCabinetState
(
DWORD
u
,
DWORD
v
)
{
FIXME
(
"0x%04lx 0x%04lx stub
\n
"
,
u
,
v
);
return
0
;
BOOL
WINAPI
ReadCabinetState
(
CABINETSTATE
*
cs
,
int
length
)
{
HKEY
hkey
=
0
;
DWORD
type
,
r
;
TRACE
(
"%p %d
\n
"
,
cs
,
length
);
if
(
(
cs
==
NULL
)
||
(
length
<
sizeof
*
cs
)
)
return
FALSE
;
r
=
RegOpenKeyW
(
HKEY_CURRENT_USER
,
szwCabLocation
,
&
hkey
);
if
(
r
==
ERROR_SUCCESS
)
{
type
=
REG_BINARY
;
r
=
RegQueryValueExW
(
hkey
,
szwSettings
,
NULL
,
&
type
,
(
LPBYTE
)
cs
,
(
LPDWORD
)
&
length
);
RegCloseKey
(
hkey
);
}
/* if we can't read from the registry, create default values */
if
(
(
r
!=
ERROR_SUCCESS
)
||
(
cs
->
cLength
<
sizeof
*
cs
)
||
(
cs
->
cLength
!=
length
)
)
{
ERR
(
"Initializing shell cabinet settings
\n
"
);
memset
(
cs
,
0
,
sizeof
*
cs
);
cs
->
cLength
=
sizeof
*
cs
;
cs
->
nVersion
=
2
;
cs
->
fFullPathTitle
=
FALSE
;
cs
->
fSaveLocalView
=
TRUE
;
cs
->
fNotShell
=
FALSE
;
cs
->
fSimpleDefault
=
TRUE
;
cs
->
fDontShowDescBar
=
FALSE
;
cs
->
fNewWindowMode
=
FALSE
;
cs
->
fShowCompColor
=
FALSE
;
cs
->
fDontPrettyNames
=
FALSE
;
cs
->
fAdminsCreateCommonGroups
=
TRUE
;
cs
->
fMenuEnumFilter
=
96
;
}
return
TRUE
;
}
/*************************************************************************
* WriteCabinetState [SHELL32.652] NT 4.0
*
*/
HRESULT
WINAPI
WriteCabinetState
(
DWORD
u
)
{
FIXME
(
"0x%04lx stub
\n
"
,
u
);
return
0
;
BOOL
WINAPI
WriteCabinetState
(
CABINETSTATE
*
cs
)
{
DWORD
r
;
HKEY
hkey
=
0
;
TRACE
(
"%p
\n
"
,
cs
);
if
(
cs
==
NULL
)
return
FALSE
;
r
=
RegCreateKeyExW
(
HKEY_CURRENT_USER
,
szwCabLocation
,
0
,
NULL
,
0
,
KEY_ALL_ACCESS
,
NULL
,
&
hkey
,
NULL
);
if
(
r
==
ERROR_SUCCESS
)
{
r
=
RegSetValueExW
(
hkey
,
szwSettings
,
0
,
REG_BINARY
,
(
LPBYTE
)
cs
,
cs
->
cLength
);
RegCloseKey
(
hkey
);
}
return
(
r
==
ERROR_SUCCESS
);
}
/*************************************************************************
* FileIconInit [SHELL32.660]
*
...
...
@@ -1257,9 +1327,10 @@ BOOL WINAPI SHWaitForFileToOpen(
* HCU\Software\Microsoft\Windows\CurrentVersion\Explorer\CabinetState
* I'm (js) guessing: this one is just ReadCabinetState ;-)
*/
HRESULT
WINAPI
shell32_654
(
DWORD
x
,
DWORD
y
)
{
FIXME
(
"0x%08lx 0x%08lx stub
\n
"
,
x
,
y
);
return
0
;
HRESULT
WINAPI
shell32_654
(
CABINETSTATE
*
cs
,
int
length
)
{
TRACE
(
"%p %d
\n
"
,
cs
,
length
);
return
ReadCabinetState
(
cs
,
length
);
}
/************************************************************************
...
...
This diff is collapsed.
Click to expand it.
dlls/shell32/undocshell.h
+
25
−
0
View file @
5674b830
...
...
@@ -913,6 +913,31 @@ DWORD WINAPI CheckEscapesW(LPWSTR string, DWORD len);
BOOL
WINAPI
SHInitRestricted
(
LPCVOID
unused
,
LPCVOID
inpRegKey
);
DWORD
WINAPI
SHRestricted
(
DWORD
policy
);
/* cabinet functions */
#include
"pshpack1.h"
typedef
struct
{
WORD
cLength
;
WORD
nVersion
;
BOOL
fFullPathTitle
:
1
;
BOOL
fSaveLocalView
:
1
;
BOOL
fNotShell
:
1
;
BOOL
fSimpleDefault
:
1
;
BOOL
fDontShowDescBar
:
1
;
BOOL
fNewWindowMode
:
1
;
BOOL
fShowCompColor
:
1
;
BOOL
fDontPrettyNames
:
1
;
BOOL
fAdminsCreateCommonGroups
:
1
;
UINT
fUnusedFlags
:
7
;
UINT
fMenuEnumFilter
;
}
CABINETSTATE
;
#include
"poppack.h"
BOOL
WINAPI
ReadCabinetState
(
CABINETSTATE
*
,
int
);
BOOL
WINAPI
WriteCabinetState
(
CABINETSTATE
*
);
#ifdef __cplusplus
}
/* extern "C" */
#endif
/* defined(__cplusplus) */
...
...
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