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
a851aaa4
Commit
a851aaa4
authored
Mar 25, 2015
by
Pierre Schweitzer
Committed by
Alexandre Julliard
Mar 27, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi: Implement SetupLogErrorA(), SetupLogErrorW().
parent
799dfa6a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
73 additions
and
10 deletions
+73
-10
misc.c
dlls/setupapi/misc.c
+72
-0
setupapi.spec
dlls/setupapi/setupapi.spec
+1
-1
stubs.c
dlls/setupapi/stubs.c
+0
-9
No files found.
dlls/setupapi/misc.c
View file @
a851aaa4
...
...
@@ -1679,3 +1679,75 @@ BOOL WINAPI SetupOpenLog(BOOL reserved)
return
TRUE
;
}
/***********************************************************************
* SetupLogErrorA(SETUPAPI.@)
*/
BOOL
WINAPI
SetupLogErrorA
(
LPCSTR
message
,
LogSeverity
severity
)
{
static
const
char
null
[]
=
"(null)"
;
BOOL
ret
;
DWORD
written
;
DWORD
len
;
EnterCriticalSection
(
&
setupapi_cs
);
if
(
setupact
==
INVALID_HANDLE_VALUE
||
setuperr
==
INVALID_HANDLE_VALUE
)
{
SetLastError
(
ERROR_FILE_INVALID
);
ret
=
FALSE
;
goto
done
;
}
if
(
message
==
NULL
)
message
=
null
;
len
=
lstrlenA
(
message
);
ret
=
WriteFile
(
setupact
,
message
,
len
,
&
written
,
NULL
);
if
(
!
ret
)
goto
done
;
if
(
severity
>=
LogSevMaximum
)
{
ret
=
FALSE
;
goto
done
;
}
if
(
severity
>
LogSevInformation
)
ret
=
WriteFile
(
setuperr
,
message
,
len
,
&
written
,
NULL
);
done:
LeaveCriticalSection
(
&
setupapi_cs
);
return
ret
;
}
/***********************************************************************
* SetupLogErrorW(SETUPAPI.@)
*/
BOOL
WINAPI
SetupLogErrorW
(
LPCWSTR
message
,
LogSeverity
severity
)
{
LPSTR
msg
=
NULL
;
DWORD
len
;
BOOL
ret
;
if
(
message
)
{
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
message
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
msg
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
if
(
msg
==
NULL
)
{
SetLastError
(
ERROR_NOT_ENOUGH_MEMORY
);
return
FALSE
;
}
WideCharToMultiByte
(
CP_ACP
,
0
,
message
,
-
1
,
msg
,
len
,
NULL
,
NULL
);
}
/* This is the normal way to proceed. The log files are ASCII files
* and W is to be converted.
*/
ret
=
SetupLogErrorA
(
msg
,
severity
);
HeapFree
(
GetProcessHeap
(),
0
,
msg
);
return
ret
;
}
dlls/setupapi/setupapi.spec
View file @
a851aaa4
...
...
@@ -459,7 +459,7 @@
@ stdcall SetupInstallServicesFromInfSectionW(long wstr long)
@ stdcall SetupIterateCabinetA(str long ptr ptr)
@ stdcall SetupIterateCabinetW(wstr long ptr ptr)
@ st
ub SetupLogErrorA
@ st
dcall SetupLogErrorA(str long)
@ stdcall SetupLogErrorW(wstr long)
@ stdcall SetupLogFileA(ptr str str str long str str str long)
@ stdcall SetupLogFileW(ptr wstr wstr wstr long wstr wstr wstr long)
...
...
dlls/setupapi/stubs.c
View file @
a851aaa4
...
...
@@ -189,15 +189,6 @@ BOOL WINAPI RegistryDelnode(DWORD x, DWORD y)
}
/***********************************************************************
* SetupLogErrorW(SETUPAPI.@)
*/
BOOL
WINAPI
SetupLogErrorW
(
LPCWSTR
MessageString
,
LogSeverity
Severity
)
{
FIXME
(
"(%s, %d) stub
\n
"
,
debugstr_w
(
MessageString
),
Severity
);
return
TRUE
;
}
/***********************************************************************
* SetupPromptReboot(SETUPAPI.@)
*/
INT
WINAPI
SetupPromptReboot
(
HSPFILEQ
file_queue
,
HWND
owner
,
BOOL
scan_only
)
...
...
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