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
ae8b795f
Commit
ae8b795f
authored
Oct 28, 2002
by
György 'Nog' Jeney
Committed by
Alexandre Julliard
Oct 28, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Separate out 16-bit registry functions.
parent
a215f6b2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
83 additions
and
83 deletions
+83
-83
shell.c
dlls/shell32/shell.c
+83
-0
shellreg.c
dlls/shell32/shellreg.c
+0
-83
No files found.
dlls/shell32/shell.c
View file @
ae8b795f
...
...
@@ -2,6 +2,7 @@
* Shell Library Functions
*
* Copyright 1998 Marcus Meissner
* Copyright 2000 Juergen Schmied
* Copyright 2002 Eric Pouech
*
* This library is free software; you can redistribute it and/or
...
...
@@ -541,3 +542,85 @@ UINT16 WINAPI DriveType16( UINT16 drive )
}
return
ret
;
}
/* 0 and 1 are valid rootkeys in win16 shell.dll and are used by
* some programs. Do not remove those cases. -MM
*/
static
inline
void
fix_win16_hkey
(
HKEY
*
hkey
)
{
if
(
*
hkey
==
0
||
*
hkey
==
(
HKEY
)
1
)
*
hkey
=
HKEY_CLASSES_ROOT
;
}
/******************************************************************************
* RegOpenKey [SHELL.1]
*/
DWORD
WINAPI
RegOpenKey16
(
HKEY
hkey
,
LPCSTR
name
,
PHKEY
retkey
)
{
fix_win16_hkey
(
&
hkey
);
return
RegOpenKeyA
(
hkey
,
name
,
retkey
);
}
/******************************************************************************
* RegCreateKey [SHELL.2]
*/
DWORD
WINAPI
RegCreateKey16
(
HKEY
hkey
,
LPCSTR
name
,
PHKEY
retkey
)
{
fix_win16_hkey
(
&
hkey
);
return
RegCreateKeyA
(
hkey
,
name
,
retkey
);
}
/******************************************************************************
* RegCloseKey [SHELL.3]
*/
DWORD
WINAPI
RegCloseKey16
(
HKEY
hkey
)
{
fix_win16_hkey
(
&
hkey
);
return
RegCloseKey
(
hkey
);
}
/******************************************************************************
* RegDeleteKey [SHELL.4]
*/
DWORD
WINAPI
RegDeleteKey16
(
HKEY
hkey
,
LPCSTR
name
)
{
fix_win16_hkey
(
&
hkey
);
return
RegDeleteKeyA
(
hkey
,
name
);
}
/******************************************************************************
* RegSetValue [SHELL.5]
*/
DWORD
WINAPI
RegSetValue16
(
HKEY
hkey
,
LPCSTR
name
,
DWORD
type
,
LPCSTR
data
,
DWORD
count
)
{
fix_win16_hkey
(
&
hkey
);
return
RegSetValueA
(
hkey
,
name
,
type
,
data
,
count
);
}
/******************************************************************************
* RegQueryValue [SHELL.6]
*
* NOTES
* Is this HACK still applicable?
*
* HACK
* The 16bit RegQueryValue doesn't handle selectorblocks anyway, so we just
* mask out the high 16 bit. This (not so much incidently) hopefully fixes
* Aldus FH4)
*/
DWORD
WINAPI
RegQueryValue16
(
HKEY
hkey
,
LPCSTR
name
,
LPSTR
data
,
LPDWORD
count
)
{
fix_win16_hkey
(
&
hkey
);
if
(
count
)
*
count
&=
0xffff
;
return
RegQueryValueA
(
hkey
,
name
,
data
,
count
);
}
/******************************************************************************
* RegEnumKey [SHELL.7]
*/
DWORD
WINAPI
RegEnumKey16
(
HKEY
hkey
,
DWORD
index
,
LPSTR
name
,
DWORD
name_len
)
{
fix_win16_hkey
(
&
hkey
);
return
RegEnumKeyA
(
hkey
,
index
,
name
,
name_len
);
}
dlls/shell32/shellreg.c
View file @
ae8b795f
...
...
@@ -147,86 +147,3 @@ HRESULT WINAPI SHRegCloseKey (HKEY hkey)
TRACE
(
"0x%04x
\n
"
,
hkey
);
return
RegCloseKey
(
hkey
);
}
/* 16-bit functions */
/* 0 and 1 are valid rootkeys in win16 shell.dll and are used by
* some programs. Do not remove those cases. -MM
*/
static
inline
void
fix_win16_hkey
(
HKEY
*
hkey
)
{
if
(
*
hkey
==
0
||
*
hkey
==
(
HKEY
)
1
)
*
hkey
=
HKEY_CLASSES_ROOT
;
}
/******************************************************************************
* RegOpenKey [SHELL.1]
*/
DWORD
WINAPI
RegOpenKey16
(
HKEY
hkey
,
LPCSTR
name
,
PHKEY
retkey
)
{
fix_win16_hkey
(
&
hkey
);
return
RegOpenKeyA
(
hkey
,
name
,
retkey
);
}
/******************************************************************************
* RegCreateKey [SHELL.2]
*/
DWORD
WINAPI
RegCreateKey16
(
HKEY
hkey
,
LPCSTR
name
,
PHKEY
retkey
)
{
fix_win16_hkey
(
&
hkey
);
return
RegCreateKeyA
(
hkey
,
name
,
retkey
);
}
/******************************************************************************
* RegCloseKey [SHELL.3]
*/
DWORD
WINAPI
RegCloseKey16
(
HKEY
hkey
)
{
fix_win16_hkey
(
&
hkey
);
return
RegCloseKey
(
hkey
);
}
/******************************************************************************
* RegDeleteKey [SHELL.4]
*/
DWORD
WINAPI
RegDeleteKey16
(
HKEY
hkey
,
LPCSTR
name
)
{
fix_win16_hkey
(
&
hkey
);
return
RegDeleteKeyA
(
hkey
,
name
);
}
/******************************************************************************
* RegSetValue [SHELL.5]
*/
DWORD
WINAPI
RegSetValue16
(
HKEY
hkey
,
LPCSTR
name
,
DWORD
type
,
LPCSTR
data
,
DWORD
count
)
{
fix_win16_hkey
(
&
hkey
);
return
RegSetValueA
(
hkey
,
name
,
type
,
data
,
count
);
}
/******************************************************************************
* RegQueryValue [SHELL.6]
*
* NOTES
* Is this HACK still applicable?
*
* HACK
* The 16bit RegQueryValue doesn't handle selectorblocks anyway, so we just
* mask out the high 16 bit. This (not so much incidently) hopefully fixes
* Aldus FH4)
*/
DWORD
WINAPI
RegQueryValue16
(
HKEY
hkey
,
LPCSTR
name
,
LPSTR
data
,
LPDWORD
count
)
{
fix_win16_hkey
(
&
hkey
);
if
(
count
)
*
count
&=
0xffff
;
return
RegQueryValueA
(
hkey
,
name
,
data
,
count
);
}
/******************************************************************************
* RegEnumKey [SHELL.7]
*/
DWORD
WINAPI
RegEnumKey16
(
HKEY
hkey
,
DWORD
index
,
LPSTR
name
,
DWORD
name_len
)
{
fix_win16_hkey
(
&
hkey
);
return
RegEnumKeyA
(
hkey
,
index
,
name
,
name_len
);
}
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