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
799dfa6a
Commit
799dfa6a
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 SetupOpenLog(), SetupCloseLog().
parent
d2751ebc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
80 additions
and
17 deletions
+80
-17
misc.c
dlls/setupapi/misc.c
+79
-0
setupcab.c
dlls/setupapi/setupcab.c
+1
-0
stubs.c
dlls/setupapi/stubs.c
+0
-17
No files found.
dlls/setupapi/misc.c
View file @
799dfa6a
...
...
@@ -42,6 +42,18 @@ WINE_DEFAULT_DEBUG_CHANNEL(setupapi);
/* arbitrary limit not related to what native actually uses */
#define OEM_INDEX_LIMIT 999
/* Handles and critical sections for the SetupLog API */
static
HANDLE
setupact
=
INVALID_HANDLE_VALUE
;
static
HANDLE
setuperr
=
INVALID_HANDLE_VALUE
;
static
CRITICAL_SECTION
setupapi_cs
;
static
CRITICAL_SECTION_DEBUG
critsect_debug
=
{
0
,
0
,
&
setupapi_cs
,
{
&
critsect_debug
.
ProcessLocksList
,
&
critsect_debug
.
ProcessLocksList
},
0
,
0
,
{
(
DWORD_PTR
)(
__FILE__
": setupapi_cs"
)
}
};
static
CRITICAL_SECTION
setupapi_cs
=
{
&
critsect_debug
,
-
1
,
0
,
0
,
0
,
0
};
/**************************************************************************
* MyFree [SETUPAPI.@]
*
...
...
@@ -1600,3 +1612,70 @@ BOOL WINAPI SetupSetNonInteractiveMode( BOOL flag )
non_interactive_mode
=
flag
;
return
ret
;
}
/***********************************************************************
* SetupCloseLog(SETUPAPI.@)
*/
void
WINAPI
SetupCloseLog
(
void
)
{
EnterCriticalSection
(
&
setupapi_cs
);
CloseHandle
(
setupact
);
setupact
=
INVALID_HANDLE_VALUE
;
CloseHandle
(
setuperr
);
setuperr
=
INVALID_HANDLE_VALUE
;
LeaveCriticalSection
(
&
setupapi_cs
);
}
/***********************************************************************
* SetupOpenLog(SETUPAPI.@)
*/
BOOL
WINAPI
SetupOpenLog
(
BOOL
reserved
)
{
WCHAR
path
[
MAX_PATH
];
static
const
WCHAR
setupactlog
[]
=
{
'\\'
,
's'
,
'e'
,
't'
,
'u'
,
'p'
,
'a'
,
'c'
,
't'
,
'.'
,
'l'
,
'o'
,
'g'
,
0
};
static
const
WCHAR
setuperrlog
[]
=
{
'\\'
,
's'
,
'e'
,
't'
,
'u'
,
'p'
,
'e'
,
'r'
,
'r'
,
'.'
,
'l'
,
'o'
,
'g'
,
0
};
EnterCriticalSection
(
&
setupapi_cs
);
if
(
setupact
!=
INVALID_HANDLE_VALUE
&&
setuperr
!=
INVALID_HANDLE_VALUE
)
{
LeaveCriticalSection
(
&
setupapi_cs
);
return
TRUE
;
}
GetWindowsDirectoryW
(
path
,
MAX_PATH
);
lstrcatW
(
path
,
setupactlog
);
setupact
=
CreateFileW
(
path
,
FILE_GENERIC_WRITE
,
FILE_SHARE_WRITE
|
FILE_SHARE_READ
,
NULL
,
OPEN_ALWAYS
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
if
(
setupact
==
INVALID_HANDLE_VALUE
)
{
LeaveCriticalSection
(
&
setupapi_cs
);
return
FALSE
;
}
SetFilePointer
(
setupact
,
0
,
NULL
,
FILE_END
);
GetWindowsDirectoryW
(
path
,
MAX_PATH
);
lstrcatW
(
path
,
setuperrlog
);
setuperr
=
CreateFileW
(
path
,
FILE_GENERIC_WRITE
,
FILE_SHARE_WRITE
|
FILE_SHARE_READ
,
NULL
,
OPEN_ALWAYS
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
if
(
setuperr
==
INVALID_HANDLE_VALUE
)
{
CloseHandle
(
setupact
);
setupact
=
INVALID_HANDLE_VALUE
;
LeaveCriticalSection
(
&
setupapi_cs
);
return
FALSE
;
}
SetFilePointer
(
setuperr
,
0
,
NULL
,
FILE_END
);
LeaveCriticalSection
(
&
setupapi_cs
);
return
TRUE
;
}
dlls/setupapi/setupcab.c
View file @
799dfa6a
...
...
@@ -694,6 +694,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
break
;
case
DLL_PROCESS_DETACH
:
if
(
lpvReserved
)
break
;
SetupCloseLog
();
if
(
CABINET_hInstance
)
FreeLibrary
(
CABINET_hInstance
);
break
;
}
...
...
dlls/setupapi/stubs.c
View file @
799dfa6a
...
...
@@ -189,14 +189,6 @@ BOOL WINAPI RegistryDelnode(DWORD x, DWORD y)
}
/***********************************************************************
* SetupCloseLog(SETUPAPI.@)
*/
void
WINAPI
SetupCloseLog
(
void
)
{
FIXME
(
"() stub
\n
"
);
}
/***********************************************************************
* SetupLogErrorW(SETUPAPI.@)
*/
BOOL
WINAPI
SetupLogErrorW
(
LPCWSTR
MessageString
,
LogSeverity
Severity
)
...
...
@@ -206,15 +198,6 @@ BOOL WINAPI SetupLogErrorW(LPCWSTR MessageString, LogSeverity Severity)
}
/***********************************************************************
* SetupOpenLog(SETUPAPI.@)
*/
BOOL
WINAPI
SetupOpenLog
(
BOOL
Reserved
)
{
FIXME
(
"(%d) stub
\n
"
,
Reserved
);
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