Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
5674b830
Commit
5674b830
authored
May 19, 2003
by
Mike McCormack
Committed by
Alexandre Julliard
May 19, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented ReadCabinetState and WriteCabinetState.
parent
b5d31846
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
105 additions
and
9 deletions
+105
-9
shellord.c
dlls/shell32/shellord.c
+80
-9
undocshell.h
dlls/shell32/undocshell.h
+25
-0
No files found.
dlls/shell32/shellord.c
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
);
}
/************************************************************************
...
...
dlls/shell32/undocshell.h
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) */
...
...
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