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
44ab294e
Commit
44ab294e
authored
Apr 16, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi: Move strdupW and strdupWtoA to the setupapi_private.h header.
parent
d5aea7d0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
23 deletions
+23
-23
queue.c
dlls/setupapi/queue.c
+0
-23
setupapi_private.h
dlls/setupapi/setupapi_private.h
+23
-0
No files found.
dlls/setupapi/queue.c
View file @
44ab294e
...
...
@@ -73,29 +73,6 @@ struct file_queue
};
static
inline
WCHAR
*
strdupW
(
const
WCHAR
*
str
)
{
WCHAR
*
ret
=
NULL
;
if
(
str
)
{
int
len
=
(
strlenW
(
str
)
+
1
)
*
sizeof
(
WCHAR
);
if
((
ret
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
)))
memcpy
(
ret
,
str
,
len
);
}
return
ret
;
}
static
inline
char
*
strdupWtoA
(
const
WCHAR
*
str
)
{
char
*
ret
=
NULL
;
if
(
str
)
{
DWORD
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
str
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
if
((
ret
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
)))
WideCharToMultiByte
(
CP_ACP
,
0
,
str
,
-
1
,
ret
,
len
,
NULL
,
NULL
);
}
return
ret
;
}
/* append a file operation to a queue */
static
inline
void
queue_file_op
(
struct
file_op_queue
*
queue
,
struct
file_op
*
op
)
{
...
...
dlls/setupapi/setupapi_private.h
View file @
44ab294e
...
...
@@ -29,6 +29,29 @@
#define REGPART_RENAME "\\Rename"
#define REG_VERSIONCONFLICT "Software\\Microsoft\\VersionConflictManager"
static
inline
WCHAR
*
strdupW
(
const
WCHAR
*
str
)
{
WCHAR
*
ret
=
NULL
;
if
(
str
)
{
int
len
=
(
lstrlenW
(
str
)
+
1
)
*
sizeof
(
WCHAR
);
if
((
ret
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
)))
memcpy
(
ret
,
str
,
len
);
}
return
ret
;
}
static
inline
char
*
strdupWtoA
(
const
WCHAR
*
str
)
{
char
*
ret
=
NULL
;
if
(
str
)
{
DWORD
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
str
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
if
((
ret
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
)))
WideCharToMultiByte
(
CP_ACP
,
0
,
str
,
-
1
,
ret
,
len
,
NULL
,
NULL
);
}
return
ret
;
}
static
inline
WCHAR
*
strdupAtoW
(
const
char
*
str
)
{
WCHAR
*
ret
=
NULL
;
...
...
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