Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
970a8779
Commit
970a8779
authored
Nov 21, 2004
by
Alexander Yaworsky
Committed by
Alexandre Julliard
Nov 21, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move up SERV_* functions.
parent
2a389a69
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
37 deletions
+37
-37
service.c
dlls/advapi32/service.c
+37
-37
No files found.
dlls/advapi32/service.c
View file @
970a8779
...
...
@@ -155,6 +155,43 @@ static void init_service_handle( struct sc_handle* handle,
handle
->
u
.
service
.
sc_manager
=
sc_manager
;
}
static
inline
LPWSTR
SERV_dup
(
LPCSTR
str
)
{
UINT
len
;
LPWSTR
wstr
;
if
(
!
str
)
return
NULL
;
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
str
,
-
1
,
NULL
,
0
);
wstr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
);
MultiByteToWideChar
(
CP_ACP
,
0
,
str
,
-
1
,
wstr
,
len
);
return
wstr
;
}
static
inline
LPWSTR
SERV_dupmulti
(
LPCSTR
str
)
{
UINT
len
=
0
,
n
=
0
;
LPWSTR
wstr
;
if
(
!
str
)
return
NULL
;
do
{
len
+=
MultiByteToWideChar
(
CP_ACP
,
0
,
&
str
[
n
],
-
1
,
NULL
,
0
);
n
+=
(
strlen
(
&
str
[
n
]
)
+
1
);
}
while
(
str
[
n
]);
len
++
;
n
++
;
wstr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
);
MultiByteToWideChar
(
CP_ACP
,
0
,
str
,
n
,
wstr
,
len
);
return
wstr
;
}
static
inline
VOID
SERV_free
(
LPWSTR
wstr
)
{
HeapFree
(
GetProcessHeap
(),
0
,
wstr
);
}
/******************************************************************************
* EnumServicesStatusA [ADVAPI32.@]
*/
...
...
@@ -760,43 +797,6 @@ error:
}
static
inline
LPWSTR
SERV_dup
(
LPCSTR
str
)
{
UINT
len
;
LPWSTR
wstr
;
if
(
!
str
)
return
NULL
;
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
str
,
-
1
,
NULL
,
0
);
wstr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
);
MultiByteToWideChar
(
CP_ACP
,
0
,
str
,
-
1
,
wstr
,
len
);
return
wstr
;
}
static
inline
LPWSTR
SERV_dupmulti
(
LPCSTR
str
)
{
UINT
len
=
0
,
n
=
0
;
LPWSTR
wstr
;
if
(
!
str
)
return
NULL
;
do
{
len
+=
MultiByteToWideChar
(
CP_ACP
,
0
,
&
str
[
n
],
-
1
,
NULL
,
0
);
n
+=
(
strlen
(
&
str
[
n
]
)
+
1
);
}
while
(
str
[
n
]);
len
++
;
n
++
;
wstr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
);
MultiByteToWideChar
(
CP_ACP
,
0
,
str
,
n
,
wstr
,
len
);
return
wstr
;
}
static
inline
VOID
SERV_free
(
LPWSTR
wstr
)
{
HeapFree
(
GetProcessHeap
(),
0
,
wstr
);
}
/******************************************************************************
* CreateServiceA [ADVAPI32.@]
*/
...
...
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