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
cb2f2447
Commit
cb2f2447
authored
Apr 28, 2010
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Apr 28, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineconsole: Use the explicit W-form of the registry functions.
parent
11b8ffc2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
32 deletions
+32
-32
registry.c
programs/wineconsole/registry.c
+32
-32
No files found.
programs/wineconsole/registry.c
View file @
cb2f2447
...
@@ -88,64 +88,64 @@ static void WINECON_RegLoadHelper(HKEY hConKey, struct config_data* cfg)
...
@@ -88,64 +88,64 @@ static void WINECON_RegLoadHelper(HKEY hConKey, struct config_data* cfg)
DWORD
val
;
DWORD
val
;
count
=
sizeof
(
val
);
count
=
sizeof
(
val
);
if
(
!
RegQueryValueEx
(
hConKey
,
wszCursorSize
,
0
,
&
type
,
(
LPBYTE
)
&
val
,
&
count
))
if
(
!
RegQueryValueEx
W
(
hConKey
,
wszCursorSize
,
0
,
&
type
,
(
LPBYTE
)
&
val
,
&
count
))
cfg
->
cursor_size
=
val
;
cfg
->
cursor_size
=
val
;
count
=
sizeof
(
val
);
count
=
sizeof
(
val
);
if
(
!
RegQueryValueEx
(
hConKey
,
wszCursorVisible
,
0
,
&
type
,
(
LPBYTE
)
&
val
,
&
count
))
if
(
!
RegQueryValueEx
W
(
hConKey
,
wszCursorVisible
,
0
,
&
type
,
(
LPBYTE
)
&
val
,
&
count
))
cfg
->
cursor_visible
=
val
;
cfg
->
cursor_visible
=
val
;
count
=
sizeof
(
val
);
count
=
sizeof
(
val
);
if
(
!
RegQueryValueEx
(
hConKey
,
wszEditionMode
,
0
,
&
type
,
(
LPBYTE
)
&
val
,
&
count
))
if
(
!
RegQueryValueEx
W
(
hConKey
,
wszEditionMode
,
0
,
&
type
,
(
LPBYTE
)
&
val
,
&
count
))
cfg
->
edition_mode
=
val
;
cfg
->
edition_mode
=
val
;
count
=
sizeof
(
val
);
count
=
sizeof
(
val
);
if
(
!
RegQueryValueEx
(
hConKey
,
wszExitOnDie
,
0
,
&
type
,
(
LPBYTE
)
&
val
,
&
count
))
if
(
!
RegQueryValueEx
W
(
hConKey
,
wszExitOnDie
,
0
,
&
type
,
(
LPBYTE
)
&
val
,
&
count
))
cfg
->
exit_on_die
=
val
;
cfg
->
exit_on_die
=
val
;
count
=
sizeof
(
cfg
->
face_name
);
count
=
sizeof
(
cfg
->
face_name
);
RegQueryValueEx
(
hConKey
,
wszFaceName
,
0
,
&
type
,
(
LPBYTE
)
&
cfg
->
face_name
,
&
count
);
RegQueryValueEx
W
(
hConKey
,
wszFaceName
,
0
,
&
type
,
(
LPBYTE
)
&
cfg
->
face_name
,
&
count
);
count
=
sizeof
(
val
);
count
=
sizeof
(
val
);
if
(
!
RegQueryValueEx
(
hConKey
,
wszFontSize
,
0
,
&
type
,
(
LPBYTE
)
&
val
,
&
count
))
if
(
!
RegQueryValueEx
W
(
hConKey
,
wszFontSize
,
0
,
&
type
,
(
LPBYTE
)
&
val
,
&
count
))
{
{
cfg
->
cell_height
=
HIWORD
(
val
);
cfg
->
cell_height
=
HIWORD
(
val
);
cfg
->
cell_width
=
LOWORD
(
val
);
cfg
->
cell_width
=
LOWORD
(
val
);
}
}
count
=
sizeof
(
val
);
count
=
sizeof
(
val
);
if
(
!
RegQueryValueEx
(
hConKey
,
wszFontWeight
,
0
,
&
type
,
(
LPBYTE
)
&
val
,
&
count
))
if
(
!
RegQueryValueEx
W
(
hConKey
,
wszFontWeight
,
0
,
&
type
,
(
LPBYTE
)
&
val
,
&
count
))
cfg
->
font_weight
=
val
;
cfg
->
font_weight
=
val
;
count
=
sizeof
(
val
);
count
=
sizeof
(
val
);
if
(
!
RegQueryValueEx
(
hConKey
,
wszHistoryBufferSize
,
0
,
&
type
,
(
LPBYTE
)
&
val
,
&
count
))
if
(
!
RegQueryValueEx
W
(
hConKey
,
wszHistoryBufferSize
,
0
,
&
type
,
(
LPBYTE
)
&
val
,
&
count
))
cfg
->
history_size
=
val
;
cfg
->
history_size
=
val
;
count
=
sizeof
(
val
);
count
=
sizeof
(
val
);
if
(
!
RegQueryValueEx
(
hConKey
,
wszHistoryNoDup
,
0
,
&
type
,
(
LPBYTE
)
&
val
,
&
count
))
if
(
!
RegQueryValueEx
W
(
hConKey
,
wszHistoryNoDup
,
0
,
&
type
,
(
LPBYTE
)
&
val
,
&
count
))
cfg
->
history_nodup
=
val
;
cfg
->
history_nodup
=
val
;
count
=
sizeof
(
val
);
count
=
sizeof
(
val
);
if
(
!
RegQueryValueEx
(
hConKey
,
wszMenuMask
,
0
,
&
type
,
(
LPBYTE
)
&
val
,
&
count
))
if
(
!
RegQueryValueEx
W
(
hConKey
,
wszMenuMask
,
0
,
&
type
,
(
LPBYTE
)
&
val
,
&
count
))
cfg
->
menu_mask
=
val
;
cfg
->
menu_mask
=
val
;
count
=
sizeof
(
val
);
count
=
sizeof
(
val
);
if
(
!
RegQueryValueEx
(
hConKey
,
wszQuickEdit
,
0
,
&
type
,
(
LPBYTE
)
&
val
,
&
count
))
if
(
!
RegQueryValueEx
W
(
hConKey
,
wszQuickEdit
,
0
,
&
type
,
(
LPBYTE
)
&
val
,
&
count
))
cfg
->
quick_edit
=
val
;
cfg
->
quick_edit
=
val
;
count
=
sizeof
(
val
);
count
=
sizeof
(
val
);
if
(
!
RegQueryValueEx
(
hConKey
,
wszScreenBufferSize
,
0
,
&
type
,
(
LPBYTE
)
&
val
,
&
count
))
if
(
!
RegQueryValueEx
W
(
hConKey
,
wszScreenBufferSize
,
0
,
&
type
,
(
LPBYTE
)
&
val
,
&
count
))
{
{
cfg
->
sb_height
=
HIWORD
(
val
);
cfg
->
sb_height
=
HIWORD
(
val
);
cfg
->
sb_width
=
LOWORD
(
val
);
cfg
->
sb_width
=
LOWORD
(
val
);
}
}
count
=
sizeof
(
val
);
count
=
sizeof
(
val
);
if
(
!
RegQueryValueEx
(
hConKey
,
wszScreenColors
,
0
,
&
type
,
(
LPBYTE
)
&
val
,
&
count
))
if
(
!
RegQueryValueEx
W
(
hConKey
,
wszScreenColors
,
0
,
&
type
,
(
LPBYTE
)
&
val
,
&
count
))
cfg
->
def_attr
=
val
;
cfg
->
def_attr
=
val
;
count
=
sizeof
(
val
);
count
=
sizeof
(
val
);
if
(
!
RegQueryValueEx
(
hConKey
,
wszWindowSize
,
0
,
&
type
,
(
LPBYTE
)
&
val
,
&
count
))
if
(
!
RegQueryValueEx
W
(
hConKey
,
wszWindowSize
,
0
,
&
type
,
(
LPBYTE
)
&
val
,
&
count
))
{
{
cfg
->
win_height
=
HIWORD
(
val
);
cfg
->
win_height
=
HIWORD
(
val
);
cfg
->
win_width
=
LOWORD
(
val
);
cfg
->
win_width
=
LOWORD
(
val
);
...
@@ -188,7 +188,7 @@ void WINECON_RegLoad(const WCHAR* appname, struct config_data* cfg)
...
@@ -188,7 +188,7 @@ void WINECON_RegLoad(const WCHAR* appname, struct config_data* cfg)
cfg
->
registry
=
NULL
;
cfg
->
registry
=
NULL
;
/* then read global settings */
/* then read global settings */
if
(
!
RegOpenKey
(
HKEY_CURRENT_USER
,
wszConsole
,
&
hConKey
))
if
(
!
RegOpenKey
W
(
HKEY_CURRENT_USER
,
wszConsole
,
&
hConKey
))
{
{
WINECON_RegLoadHelper
(
hConKey
,
cfg
);
WINECON_RegLoadHelper
(
hConKey
,
cfg
);
/* if requested, load part related to console title */
/* if requested, load part related to console title */
...
@@ -197,7 +197,7 @@ void WINECON_RegLoad(const WCHAR* appname, struct config_data* cfg)
...
@@ -197,7 +197,7 @@ void WINECON_RegLoad(const WCHAR* appname, struct config_data* cfg)
HKEY
hAppKey
;
HKEY
hAppKey
;
cfg
->
registry
=
WINECON_CreateKeyName
(
appname
);
cfg
->
registry
=
WINECON_CreateKeyName
(
appname
);
if
(
!
RegOpenKey
(
hConKey
,
cfg
->
registry
,
&
hAppKey
))
if
(
!
RegOpenKey
W
(
hConKey
,
cfg
->
registry
,
&
hAppKey
))
{
{
WINECON_RegLoadHelper
(
hAppKey
,
cfg
);
WINECON_RegLoadHelper
(
hAppKey
,
cfg
);
RegCloseKey
(
hAppKey
);
RegCloseKey
(
hAppKey
);
...
@@ -220,45 +220,45 @@ static void WINECON_RegSaveHelper(HKEY hConKey, const struct config_data* cfg)
...
@@ -220,45 +220,45 @@ static void WINECON_RegSaveHelper(HKEY hConKey, const struct config_data* cfg)
WINECON_DumpConfig
(
"save"
,
cfg
);
WINECON_DumpConfig
(
"save"
,
cfg
);
val
=
cfg
->
cursor_size
;
val
=
cfg
->
cursor_size
;
RegSetValueEx
(
hConKey
,
wszCursorSize
,
0
,
REG_DWORD
,
(
LPBYTE
)
&
val
,
sizeof
(
val
));
RegSetValueEx
W
(
hConKey
,
wszCursorSize
,
0
,
REG_DWORD
,
(
LPBYTE
)
&
val
,
sizeof
(
val
));
val
=
cfg
->
cursor_visible
;
val
=
cfg
->
cursor_visible
;
RegSetValueEx
(
hConKey
,
wszCursorVisible
,
0
,
REG_DWORD
,
(
LPBYTE
)
&
val
,
sizeof
(
val
));
RegSetValueEx
W
(
hConKey
,
wszCursorVisible
,
0
,
REG_DWORD
,
(
LPBYTE
)
&
val
,
sizeof
(
val
));
val
=
cfg
->
edition_mode
;
val
=
cfg
->
edition_mode
;
RegSetValueEx
(
hConKey
,
wszEditionMode
,
0
,
REG_DWORD
,
(
LPBYTE
)
&
val
,
sizeof
(
val
));
RegSetValueEx
W
(
hConKey
,
wszEditionMode
,
0
,
REG_DWORD
,
(
LPBYTE
)
&
val
,
sizeof
(
val
));
val
=
cfg
->
exit_on_die
;
val
=
cfg
->
exit_on_die
;
RegSetValueEx
(
hConKey
,
wszExitOnDie
,
0
,
REG_DWORD
,
(
LPBYTE
)
&
val
,
sizeof
(
val
));
RegSetValueEx
W
(
hConKey
,
wszExitOnDie
,
0
,
REG_DWORD
,
(
LPBYTE
)
&
val
,
sizeof
(
val
));
RegSetValueEx
(
hConKey
,
wszFaceName
,
0
,
REG_SZ
,
(
LPBYTE
)
&
cfg
->
face_name
,
sizeof
(
cfg
->
face_name
));
RegSetValueEx
W
(
hConKey
,
wszFaceName
,
0
,
REG_SZ
,
(
LPBYTE
)
&
cfg
->
face_name
,
sizeof
(
cfg
->
face_name
));
val
=
MAKELONG
(
cfg
->
cell_width
,
cfg
->
cell_height
);
val
=
MAKELONG
(
cfg
->
cell_width
,
cfg
->
cell_height
);
RegSetValueEx
(
hConKey
,
wszFontSize
,
0
,
REG_DWORD
,
(
LPBYTE
)
&
val
,
sizeof
(
val
));
RegSetValueEx
W
(
hConKey
,
wszFontSize
,
0
,
REG_DWORD
,
(
LPBYTE
)
&
val
,
sizeof
(
val
));
val
=
cfg
->
font_weight
;
val
=
cfg
->
font_weight
;
RegSetValueEx
(
hConKey
,
wszFontWeight
,
0
,
REG_DWORD
,
(
LPBYTE
)
&
val
,
sizeof
(
val
));
RegSetValueEx
W
(
hConKey
,
wszFontWeight
,
0
,
REG_DWORD
,
(
LPBYTE
)
&
val
,
sizeof
(
val
));
val
=
cfg
->
history_size
;
val
=
cfg
->
history_size
;
RegSetValueEx
(
hConKey
,
wszHistoryBufferSize
,
0
,
REG_DWORD
,
(
LPBYTE
)
&
val
,
sizeof
(
val
));
RegSetValueEx
W
(
hConKey
,
wszHistoryBufferSize
,
0
,
REG_DWORD
,
(
LPBYTE
)
&
val
,
sizeof
(
val
));
val
=
cfg
->
history_nodup
;
val
=
cfg
->
history_nodup
;
RegSetValueEx
(
hConKey
,
wszHistoryNoDup
,
0
,
REG_DWORD
,
(
LPBYTE
)
&
val
,
sizeof
(
val
));
RegSetValueEx
W
(
hConKey
,
wszHistoryNoDup
,
0
,
REG_DWORD
,
(
LPBYTE
)
&
val
,
sizeof
(
val
));
val
=
cfg
->
menu_mask
;
val
=
cfg
->
menu_mask
;
RegSetValueEx
(
hConKey
,
wszMenuMask
,
0
,
REG_DWORD
,
(
LPBYTE
)
&
val
,
sizeof
(
val
));
RegSetValueEx
W
(
hConKey
,
wszMenuMask
,
0
,
REG_DWORD
,
(
LPBYTE
)
&
val
,
sizeof
(
val
));
val
=
cfg
->
quick_edit
;
val
=
cfg
->
quick_edit
;
RegSetValueEx
(
hConKey
,
wszQuickEdit
,
0
,
REG_DWORD
,
(
LPBYTE
)
&
val
,
sizeof
(
val
));
RegSetValueEx
W
(
hConKey
,
wszQuickEdit
,
0
,
REG_DWORD
,
(
LPBYTE
)
&
val
,
sizeof
(
val
));
val
=
MAKELONG
(
cfg
->
sb_width
,
cfg
->
sb_height
);
val
=
MAKELONG
(
cfg
->
sb_width
,
cfg
->
sb_height
);
RegSetValueEx
(
hConKey
,
wszScreenBufferSize
,
0
,
REG_DWORD
,
(
LPBYTE
)
&
val
,
sizeof
(
val
));
RegSetValueEx
W
(
hConKey
,
wszScreenBufferSize
,
0
,
REG_DWORD
,
(
LPBYTE
)
&
val
,
sizeof
(
val
));
val
=
cfg
->
def_attr
;
val
=
cfg
->
def_attr
;
RegSetValueEx
(
hConKey
,
wszScreenColors
,
0
,
REG_DWORD
,
(
LPBYTE
)
&
val
,
sizeof
(
val
));
RegSetValueEx
W
(
hConKey
,
wszScreenColors
,
0
,
REG_DWORD
,
(
LPBYTE
)
&
val
,
sizeof
(
val
));
val
=
MAKELONG
(
cfg
->
win_width
,
cfg
->
win_height
);
val
=
MAKELONG
(
cfg
->
win_width
,
cfg
->
win_height
);
RegSetValueEx
(
hConKey
,
wszWindowSize
,
0
,
REG_DWORD
,
(
LPBYTE
)
&
val
,
sizeof
(
val
));
RegSetValueEx
W
(
hConKey
,
wszWindowSize
,
0
,
REG_DWORD
,
(
LPBYTE
)
&
val
,
sizeof
(
val
));
}
}
/******************************************************************
/******************************************************************
...
@@ -271,7 +271,7 @@ void WINECON_RegSave(const struct config_data* cfg)
...
@@ -271,7 +271,7 @@ void WINECON_RegSave(const struct config_data* cfg)
HKEY
hConKey
;
HKEY
hConKey
;
WINE_TRACE
(
"saving registry settings.
\n
"
);
WINE_TRACE
(
"saving registry settings.
\n
"
);
if
(
RegCreateKey
(
HKEY_CURRENT_USER
,
wszConsole
,
&
hConKey
))
if
(
RegCreateKey
W
(
HKEY_CURRENT_USER
,
wszConsole
,
&
hConKey
))
{
{
WINE_ERR
(
"Can't open registry for saving
\n
"
);
WINE_ERR
(
"Can't open registry for saving
\n
"
);
}
}
...
@@ -281,7 +281,7 @@ void WINECON_RegSave(const struct config_data* cfg)
...
@@ -281,7 +281,7 @@ void WINECON_RegSave(const struct config_data* cfg)
{
{
HKEY
hAppKey
;
HKEY
hAppKey
;
if
(
RegCreateKey
(
hConKey
,
cfg
->
registry
,
&
hAppKey
))
if
(
RegCreateKey
W
(
hConKey
,
cfg
->
registry
,
&
hAppKey
))
{
{
WINE_ERR
(
"Can't open registry for saving
\n
"
);
WINE_ERR
(
"Can't open registry for saving
\n
"
);
}
}
...
...
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