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
a131cff7
Commit
a131cff7
authored
Jul 16, 2018
by
Hugh McMaster
Committed by
Alexandre Julliard
Jul 16, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
regedit: Replace Hungarian notation used with struct edit_params members.
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
32f487bd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
edit.c
programs/regedit/edit.c
+18
-18
No files found.
programs/regedit/edit.c
View file @
a131cff7
...
...
@@ -38,10 +38,10 @@ static BOOL isDecimal;
struct
edit_params
{
HKEY
hK
ey
;
LPCWSTR
lpszValueN
ame
;
void
*
pD
ata
;
LONG
cbData
;
HKEY
hk
ey
;
const
WCHAR
*
value_n
ame
;
void
*
d
ata
;
DWORD
size
;
};
static
int
vmessagebox
(
HWND
hwnd
,
int
buttons
,
int
titleId
,
int
resId
,
__ms_va_list
va_args
)
...
...
@@ -136,31 +136,31 @@ static INT_PTR CALLBACK modify_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wParam, L
static
INT_PTR
CALLBACK
bin_modify_dlgproc
(
HWND
hwndDlg
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
struct
edit_params
*
params
;
LPBYTE
pD
ata
;
LONG
cbData
;
BYTE
*
d
ata
;
LONG
size
;
LONG
lRet
;
switch
(
uMsg
)
{
case
WM_INITDIALOG
:
params
=
(
struct
edit_params
*
)
lParam
;
SetWindowLongPtrW
(
hwndDlg
,
DWLP_USER
,
(
ULONG_PTR
)
params
);
if
(
params
->
lpszValueN
ame
)
SetDlgItemTextW
(
hwndDlg
,
IDC_VALUE_NAME
,
params
->
lpszValueN
ame
);
if
(
params
->
value_n
ame
)
SetDlgItemTextW
(
hwndDlg
,
IDC_VALUE_NAME
,
params
->
value_n
ame
);
else
SetDlgItemTextW
(
hwndDlg
,
IDC_VALUE_NAME
,
g_pszDefaultValueName
);
SendDlgItemMessageW
(
hwndDlg
,
IDC_VALUE_DATA
,
HEM_SETDATA
,
(
WPARAM
)
params
->
cbData
,
(
LPARAM
)
params
->
pD
ata
);
SendDlgItemMessageW
(
hwndDlg
,
IDC_VALUE_DATA
,
HEM_SETDATA
,
(
WPARAM
)
params
->
size
,
(
LPARAM
)
params
->
d
ata
);
SendDlgItemMessageW
(
hwndDlg
,
IDC_VALUE_DATA
,
WM_SETFONT
,
(
WPARAM
)
GetStockObject
(
ANSI_FIXED_FONT
),
TRUE
);
return
TRUE
;
case
WM_COMMAND
:
switch
(
LOWORD
(
wParam
))
{
case
IDOK
:
params
=
(
struct
edit_params
*
)
GetWindowLongPtrW
(
hwndDlg
,
DWLP_USER
);
cbData
=
SendDlgItemMessageW
(
hwndDlg
,
IDC_VALUE_DATA
,
HEM_GETDATA
,
0
,
0
);
pData
=
heap_xalloc
(
cbData
);
size
=
SendDlgItemMessageW
(
hwndDlg
,
IDC_VALUE_DATA
,
HEM_GETDATA
,
0
,
0
);
data
=
heap_xalloc
(
size
);
SendDlgItemMessageW
(
hwndDlg
,
IDC_VALUE_DATA
,
HEM_GETDATA
,
(
WPARAM
)
cbData
,
(
LPARAM
)
pD
ata
);
lRet
=
RegSetValueExW
(
params
->
h
Key
,
params
->
lpszValueName
,
0
,
REG_BINARY
,
pData
,
cbData
);
heap_free
(
pD
ata
);
SendDlgItemMessageW
(
hwndDlg
,
IDC_VALUE_DATA
,
HEM_GETDATA
,
(
WPARAM
)
size
,
(
LPARAM
)
d
ata
);
lRet
=
RegSetValueExW
(
params
->
h
key
,
params
->
value_name
,
0
,
REG_BINARY
,
data
,
size
);
heap_free
(
d
ata
);
if
(
lRet
==
ERROR_SUCCESS
)
EndDialog
(
hwndDlg
,
1
);
...
...
@@ -349,10 +349,10 @@ BOOL ModifyValue(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, LPCWSTR valueName)
{
struct
edit_params
params
;
params
.
h
K
ey
=
hKey
;
params
.
lpszValueN
ame
=
valueName
;
params
.
pD
ata
=
stringValueData
;
params
.
cbData
=
len
;
params
.
h
k
ey
=
hKey
;
params
.
value_n
ame
=
valueName
;
params
.
d
ata
=
stringValueData
;
params
.
size
=
len
;
result
=
DialogBoxParamW
(
NULL
,
MAKEINTRESOURCEW
(
IDD_EDIT_BINARY
),
hwnd
,
bin_modify_dlgproc
,
(
LPARAM
)
&
params
);
}
...
...
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