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
ad587673
Commit
ad587673
authored
Apr 25, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winecfg: Add a couple of Unicode helper functions.
parent
86b0d5ec
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
1 deletion
+35
-1
winecfg.c
programs/winecfg/winecfg.c
+33
-0
winecfg.h
programs/winecfg/winecfg.h
+2
-1
No files found.
programs/winecfg/winecfg.c
View file @
ad587673
...
...
@@ -461,6 +461,11 @@ void set_reg_key_dword(HKEY root, const char *path, const char *name, DWORD valu
HeapFree
(
GetProcessHeap
(),
0
,
wname
);
}
void
set_reg_keyW
(
HKEY
root
,
const
WCHAR
*
path
,
const
WCHAR
*
name
,
const
WCHAR
*
value
)
{
set_reg_key_ex
(
root
,
path
,
name
,
value
,
REG_SZ
);
}
void
set_reg_key_dwordW
(
HKEY
root
,
const
WCHAR
*
path
,
const
WCHAR
*
name
,
DWORD
value
)
{
set_reg_key_ex
(
root
,
path
,
name
,
&
value
,
REG_DWORD
);
...
...
@@ -684,6 +689,34 @@ char *keypath(const char *section)
return
result
;
}
WCHAR
*
keypathW
(
const
WCHAR
*
section
)
{
static
const
WCHAR
appdefaultsW
[]
=
{
'A'
,
'p'
,
'p'
,
'D'
,
'e'
,
'f'
,
'a'
,
'u'
,
'l'
,
't'
,
's'
,
'\\'
,
0
};
static
WCHAR
*
result
=
NULL
;
HeapFree
(
GetProcessHeap
(),
0
,
result
);
if
(
current_app
)
{
DWORD
len
=
sizeof
(
appdefaultsW
)
+
(
lstrlenW
(
current_app
)
+
lstrlenW
(
section
)
+
1
)
*
sizeof
(
WCHAR
);
result
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
lstrcpyW
(
result
,
appdefaultsW
);
lstrcatW
(
result
,
current_app
);
if
(
section
[
0
])
{
len
=
lstrlenW
(
result
);
result
[
len
++
]
=
'\\'
;
lstrcpyW
(
result
+
len
,
section
);
}
}
else
{
result
=
strdupW
(
section
);
}
return
result
;
}
void
PRINTERROR
(
void
)
{
LPSTR
msg
;
...
...
programs/winecfg/winecfg.h
View file @
ad587673
...
...
@@ -71,7 +71,8 @@ WCHAR* load_string (UINT id);
no explicit free is needed of the string returned by this function
*/
char
*
keypath
(
const
char
*
section
);
char
*
keypath
(
const
char
*
section
);
WCHAR
*
keypathW
(
const
WCHAR
*
section
);
int
initialize
(
HINSTANCE
hInstance
);
extern
HKEY
config_key
;
...
...
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