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
2a1da89f
Commit
2a1da89f
authored
Jun 04, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dxdiagn: Build with msvcrt.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
351ffd93
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
34 deletions
+32
-34
Makefile.in
dlls/dxdiagn/Makefile.in
+2
-0
container.c
dlls/dxdiagn/container.c
+5
-7
dxdiag_main.c
dlls/dxdiagn/dxdiag_main.c
+0
-1
provider.c
dlls/dxdiagn/provider.c
+25
-26
No files found.
dlls/dxdiagn/Makefile.in
View file @
2a1da89f
MODULE
=
dxdiagn.dll
MODULE
=
dxdiagn.dll
IMPORTS
=
strmiids dxguid uuid d3d9 ddraw version ole32 oleaut32 user32 advapi32
IMPORTS
=
strmiids dxguid uuid d3d9 ddraw version ole32 oleaut32 user32 advapi32
EXTRADLLFLAGS
=
-mno-cygwin
C_SRCS
=
\
C_SRCS
=
\
container.c
\
container.c
\
dxdiag_main.c
\
dxdiag_main.c
\
...
...
dlls/dxdiagn/container.c
View file @
2a1da89f
...
@@ -19,12 +19,10 @@
...
@@ -19,12 +19,10 @@
*
*
*/
*/
#include "config.h"
#define COBJMACROS
#define COBJMACROS
#include "dxdiag_private.h"
#include "dxdiag_private.h"
#include "wine/debug.h"
#include "wine/debug.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
dxdiag
);
WINE_DEFAULT_DEBUG_CHANNEL
(
dxdiag
);
...
@@ -114,7 +112,7 @@ static HRESULT WINAPI IDxDiagContainerImpl_EnumChildContainerNames(IDxDiagContai
...
@@ -114,7 +112,7 @@ static HRESULT WINAPI IDxDiagContainerImpl_EnumChildContainerNames(IDxDiagContai
if
(
dwIndex
==
i
)
{
if
(
dwIndex
==
i
)
{
TRACE
(
"Found container name %s, copying string
\n
"
,
debugstr_w
(
p
->
contName
));
TRACE
(
"Found container name %s, copying string
\n
"
,
debugstr_w
(
p
->
contName
));
lstrcpynW
(
pwszContainer
,
p
->
contName
,
cchContainer
);
lstrcpynW
(
pwszContainer
,
p
->
contName
,
cchContainer
);
return
(
cchContainer
<=
strlenW
(
p
->
contName
))
?
return
(
cchContainer
<=
l
strlenW
(
p
->
contName
))
?
DXDIAG_E_INSUFFICIENT_BUFFER
:
S_OK
;
DXDIAG_E_INSUFFICIENT_BUFFER
:
S_OK
;
}
}
++
i
;
++
i
;
...
@@ -157,12 +155,12 @@ static HRESULT WINAPI IDxDiagContainerImpl_GetChildContainer(IDxDiagContainer *i
...
@@ -157,12 +155,12 @@ static HRESULT WINAPI IDxDiagContainerImpl_GetChildContainer(IDxDiagContainer *i
*
ppInstance
=
NULL
;
*
ppInstance
=
NULL
;
tmp_len
=
strlenW
(
pwszContainer
)
+
1
;
tmp_len
=
l
strlenW
(
pwszContainer
)
+
1
;
orig_tmp
=
tmp
=
HeapAlloc
(
GetProcessHeap
(),
0
,
tmp_len
*
sizeof
(
WCHAR
));
orig_tmp
=
tmp
=
HeapAlloc
(
GetProcessHeap
(),
0
,
tmp_len
*
sizeof
(
WCHAR
));
if
(
NULL
==
tmp
)
return
E_FAIL
;
if
(
NULL
==
tmp
)
return
E_FAIL
;
lstrcpynW
(
tmp
,
pwszContainer
,
tmp_len
);
lstrcpynW
(
tmp
,
pwszContainer
,
tmp_len
);
cur
=
strchrW
(
tmp
,
'.'
);
cur
=
wcschr
(
tmp
,
'.'
);
while
(
NULL
!=
cur
)
{
while
(
NULL
!=
cur
)
{
*
cur
=
'\0'
;
/* cut tmp string to '.' */
*
cur
=
'\0'
;
/* cut tmp string to '.' */
if
(
!*
(
cur
+
1
))
break
;
/* Account for a lone terminating period, as in "cont1.cont2.". */
if
(
!*
(
cur
+
1
))
break
;
/* Account for a lone terminating period, as in "cont1.cont2.". */
...
@@ -172,7 +170,7 @@ static HRESULT WINAPI IDxDiagContainerImpl_GetChildContainer(IDxDiagContainer *i
...
@@ -172,7 +170,7 @@ static HRESULT WINAPI IDxDiagContainerImpl_GetChildContainer(IDxDiagContainer *i
goto
on_error
;
goto
on_error
;
cur
++
;
/* go after '.' (just replaced by \0) */
cur
++
;
/* go after '.' (just replaced by \0) */
tmp
=
cur
;
tmp
=
cur
;
cur
=
strchrW
(
tmp
,
'.'
);
cur
=
wcschr
(
tmp
,
'.'
);
}
}
TRACE
(
"Trying to get container %s
\n
"
,
debugstr_w
(
tmp
));
TRACE
(
"Trying to get container %s
\n
"
,
debugstr_w
(
tmp
));
...
@@ -219,7 +217,7 @@ static HRESULT WINAPI IDxDiagContainerImpl_EnumPropNames(IDxDiagContainer *iface
...
@@ -219,7 +217,7 @@ static HRESULT WINAPI IDxDiagContainerImpl_EnumPropNames(IDxDiagContainer *iface
if
(
dwIndex
==
i
)
{
if
(
dwIndex
==
i
)
{
TRACE
(
"Found property name %s, copying string
\n
"
,
debugstr_w
(
p
->
propName
));
TRACE
(
"Found property name %s, copying string
\n
"
,
debugstr_w
(
p
->
propName
));
lstrcpynW
(
pwszPropName
,
p
->
propName
,
cchPropName
);
lstrcpynW
(
pwszPropName
,
p
->
propName
,
cchPropName
);
return
(
cchPropName
<=
strlenW
(
p
->
propName
))
?
return
(
cchPropName
<=
l
strlenW
(
p
->
propName
))
?
DXDIAG_E_INSUFFICIENT_BUFFER
:
S_OK
;
DXDIAG_E_INSUFFICIENT_BUFFER
:
S_OK
;
}
}
++
i
;
++
i
;
...
...
dlls/dxdiagn/dxdiag_main.c
View file @
2a1da89f
...
@@ -21,7 +21,6 @@
...
@@ -21,7 +21,6 @@
#define COBJMACROS
#define COBJMACROS
#include "config.h"
#include <stdarg.h>
#include <stdarg.h>
#include "windef.h"
#include "windef.h"
...
...
dlls/dxdiagn/provider.c
View file @
2a1da89f
...
@@ -20,13 +20,11 @@
...
@@ -20,13 +20,11 @@
*
*
*/
*/
#include "config.h"
#define COBJMACROS
#define COBJMACROS
#define NONAMELESSUNION
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#define NONAMELESSSTRUCT
#include "dxdiag_private.h"
#include "dxdiag_private.h"
#include "wine/unicode.h"
#include "winver.h"
#include "winver.h"
#include "objidl.h"
#include "objidl.h"
#include "uuids.h"
#include "uuids.h"
...
@@ -270,13 +268,13 @@ static IDxDiagContainerImpl_Container *allocate_information_node(const WCHAR *na
...
@@ -270,13 +268,13 @@ static IDxDiagContainerImpl_Container *allocate_information_node(const WCHAR *na
if
(
name
)
if
(
name
)
{
{
ret
->
contName
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
strlenW
(
name
)
+
1
)
*
sizeof
(
*
name
));
ret
->
contName
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
l
strlenW
(
name
)
+
1
)
*
sizeof
(
*
name
));
if
(
!
ret
->
contName
)
if
(
!
ret
->
contName
)
{
{
HeapFree
(
GetProcessHeap
(),
0
,
ret
);
HeapFree
(
GetProcessHeap
(),
0
,
ret
);
return
NULL
;
return
NULL
;
}
}
strcpyW
(
ret
->
contName
,
name
);
l
strcpyW
(
ret
->
contName
,
name
);
}
}
list_init
(
&
ret
->
subContainers
);
list_init
(
&
ret
->
subContainers
);
...
@@ -293,13 +291,13 @@ static IDxDiagContainerImpl_Property *allocate_property_information(const WCHAR
...
@@ -293,13 +291,13 @@ static IDxDiagContainerImpl_Property *allocate_property_information(const WCHAR
if
(
!
ret
)
if
(
!
ret
)
return
NULL
;
return
NULL
;
ret
->
propName
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
strlenW
(
name
)
+
1
)
*
sizeof
(
*
name
));
ret
->
propName
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
l
strlenW
(
name
)
+
1
)
*
sizeof
(
*
name
));
if
(
!
ret
->
propName
)
if
(
!
ret
->
propName
)
{
{
HeapFree
(
GetProcessHeap
(),
0
,
ret
);
HeapFree
(
GetProcessHeap
(),
0
,
ret
);
return
NULL
;
return
NULL
;
}
}
strcpyW
(
ret
->
propName
,
name
);
l
strcpyW
(
ret
->
propName
,
name
);
return
ret
;
return
ret
;
}
}
...
@@ -522,7 +520,7 @@ static HRESULT fill_language_information(IDxDiagContainerImpl_Container *node)
...
@@ -522,7 +520,7 @@ static HRESULT fill_language_information(IDxDiagContainerImpl_Container *node)
LoadStringW
(
dxdiagn_instance
,
IDS_REGIONAL_SETTING
,
regional_setting
,
ARRAY_SIZE
(
regional_setting
));
LoadStringW
(
dxdiagn_instance
,
IDS_REGIONAL_SETTING
,
regional_setting
,
ARRAY_SIZE
(
regional_setting
));
GetLocaleInfoW
(
LOCALE_USER_DEFAULT
,
LOCALE_SNATIVELANGNAME
,
user_lang
,
ARRAY_SIZE
(
user_lang
));
GetLocaleInfoW
(
LOCALE_USER_DEFAULT
,
LOCALE_SNATIVELANGNAME
,
user_lang
,
ARRAY_SIZE
(
user_lang
));
s
nprintfW
(
language_str
,
ARRAY_SIZE
(
language_str
),
languages_fmtW
,
system_lang
,
regional_setting
,
s
wprintf
(
language_str
,
ARRAY_SIZE
(
language_str
),
languages_fmtW
,
system_lang
,
regional_setting
,
user_lang
);
user_lang
);
hr
=
add_bstr_property
(
node
,
szLanguagesLocalized
,
language_str
);
hr
=
add_bstr_property
(
node
,
szLanguagesLocalized
,
language_str
);
...
@@ -533,7 +531,7 @@ static HRESULT fill_language_information(IDxDiagContainerImpl_Container *node)
...
@@ -533,7 +531,7 @@ static HRESULT fill_language_information(IDxDiagContainerImpl_Container *node)
GetLocaleInfoW
(
LOCALE_SYSTEM_DEFAULT
,
LOCALE_SENGLANGUAGE
,
system_lang
,
ARRAY_SIZE
(
system_lang
));
GetLocaleInfoW
(
LOCALE_SYSTEM_DEFAULT
,
LOCALE_SENGLANGUAGE
,
system_lang
,
ARRAY_SIZE
(
system_lang
));
GetLocaleInfoW
(
LOCALE_USER_DEFAULT
,
LOCALE_SENGLANGUAGE
,
user_lang
,
ARRAY_SIZE
(
user_lang
));
GetLocaleInfoW
(
LOCALE_USER_DEFAULT
,
LOCALE_SENGLANGUAGE
,
user_lang
,
ARRAY_SIZE
(
user_lang
));
s
nprintfW
(
language_str
,
ARRAY_SIZE
(
language_str
),
languages_fmtW
,
system_lang
,
s
wprintf
(
language_str
,
ARRAY_SIZE
(
language_str
),
languages_fmtW
,
system_lang
,
regional_setting_engW
,
user_lang
);
regional_setting_engW
,
user_lang
);
hr
=
add_bstr_property
(
node
,
szLanguagesEnglish
,
language_str
);
hr
=
add_bstr_property
(
node
,
szLanguagesEnglish
,
language_str
);
...
@@ -562,7 +560,7 @@ static HRESULT fill_datetime_information(IDxDiagContainerImpl_Container *node)
...
@@ -562,7 +560,7 @@ static HRESULT fill_datetime_information(IDxDiagContainerImpl_Container *node)
/* szTimeLocalized */
/* szTimeLocalized */
GetDateFormatW
(
LOCALE_USER_DEFAULT
,
DATE_LONGDATE
,
&
curtime
,
NULL
,
date_str
,
ARRAY_SIZE
(
date_str
));
GetDateFormatW
(
LOCALE_USER_DEFAULT
,
DATE_LONGDATE
,
&
curtime
,
NULL
,
date_str
,
ARRAY_SIZE
(
date_str
));
s
nprintfW
(
datetime_str
,
ARRAY_SIZE
(
datetime_str
),
datetime_fmtW
,
date_str
,
time_str
);
s
wprintf
(
datetime_str
,
ARRAY_SIZE
(
datetime_str
),
datetime_fmtW
,
date_str
,
time_str
);
hr
=
add_bstr_property
(
node
,
szTimeLocalized
,
datetime_str
);
hr
=
add_bstr_property
(
node
,
szTimeLocalized
,
datetime_str
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
...
@@ -571,7 +569,7 @@ static HRESULT fill_datetime_information(IDxDiagContainerImpl_Container *node)
...
@@ -571,7 +569,7 @@ static HRESULT fill_datetime_information(IDxDiagContainerImpl_Container *node)
/* szTimeEnglish */
/* szTimeEnglish */
GetDateFormatW
(
LOCALE_NEUTRAL
,
0
,
&
curtime
,
date_fmtW
,
date_str
,
ARRAY_SIZE
(
date_str
));
GetDateFormatW
(
LOCALE_NEUTRAL
,
0
,
&
curtime
,
date_fmtW
,
date_str
,
ARRAY_SIZE
(
date_str
));
s
nprintfW
(
datetime_str
,
ARRAY_SIZE
(
datetime_str
),
datetime_fmtW
,
date_str
,
time_str
);
s
wprintf
(
datetime_str
,
ARRAY_SIZE
(
datetime_str
),
datetime_fmtW
,
date_str
,
time_str
);
hr
=
add_bstr_property
(
node
,
szTimeEnglish
,
datetime_str
);
hr
=
add_bstr_property
(
node
,
szTimeEnglish
,
datetime_str
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
...
@@ -676,7 +674,8 @@ static HRESULT fill_processor_information(IDxDiagContainerImpl_Container *node)
...
@@ -676,7 +674,8 @@ static HRESULT fill_processor_information(IDxDiagContainerImpl_Container *node)
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
return
hr
;
return
hr
;
sprintfW
(
print_buf
,
processor_fmtW
,
V_BSTR
(
&
cpu_name
),
V_I4
(
&
cpu_no
),
V_I4
(
&
clock_speed
));
swprintf
(
print_buf
,
ARRAY_SIZE
(
print_buf
),
processor_fmtW
,
V_BSTR
(
&
cpu_name
),
V_I4
(
&
cpu_no
),
V_I4
(
&
clock_speed
));
VariantClear
(
&
cpu_name
);
VariantClear
(
&
cpu_name
);
VariantClear
(
&
cpu_no
);
VariantClear
(
&
cpu_no
);
VariantClear
(
&
clock_speed
);
VariantClear
(
&
clock_speed
);
...
@@ -800,7 +799,7 @@ static HRESULT build_systeminfo_tree(IDxDiagContainerImpl_Container *node)
...
@@ -800,7 +799,7 @@ static HRESULT build_systeminfo_tree(IDxDiagContainerImpl_Container *node)
return
hr
;
return
hr
;
/* FIXME: Roundoff should not be done with truncated division. */
/* FIXME: Roundoff should not be done with truncated division. */
s
nprintfW
(
print_buf
,
ARRAY_SIZE
(
print_buf
),
physmem_fmtW
,
s
wprintf
(
print_buf
,
ARRAY_SIZE
(
print_buf
),
physmem_fmtW
,
(
DWORD
)(
msex
.
ullTotalPhys
/
(
1024
*
1024
)));
(
DWORD
)(
msex
.
ullTotalPhys
/
(
1024
*
1024
)));
hr
=
add_bstr_property
(
node
,
szPhysicalMemoryEnglish
,
print_buf
);
hr
=
add_bstr_property
(
node
,
szPhysicalMemoryEnglish
,
print_buf
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
...
@@ -819,7 +818,7 @@ static HRESULT build_systeminfo_tree(IDxDiagContainerImpl_Container *node)
...
@@ -819,7 +818,7 @@ static HRESULT build_systeminfo_tree(IDxDiagContainerImpl_Container *node)
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
return
hr
;
return
hr
;
s
nprintfW
(
print_buf
,
ARRAY_SIZE
(
print_buf
),
pagefile_fmtW
,
usedpage_mb
,
availpage_mb
);
s
wprintf
(
print_buf
,
ARRAY_SIZE
(
print_buf
),
pagefile_fmtW
,
usedpage_mb
,
availpage_mb
);
hr
=
add_bstr_property
(
node
,
szPageFileEnglish
,
print_buf
);
hr
=
add_bstr_property
(
node
,
szPageFileEnglish
,
print_buf
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
...
@@ -993,7 +992,7 @@ static HRESULT fill_display_information_d3d(IDxDiagContainerImpl_Container *node
...
@@ -993,7 +992,7 @@ static HRESULT fill_display_information_d3d(IDxDiagContainerImpl_Container *node
DWORD
available_mem
=
0
;
DWORD
available_mem
=
0
;
BOOL
hardware_accel
;
BOOL
hardware_accel
;
s
nprintfW
(
buffer
,
ARRAY_SIZE
(
buffer
),
adapterid_fmtW
,
index
);
s
wprintf
(
buffer
,
ARRAY_SIZE
(
buffer
),
adapterid_fmtW
,
index
);
display_adapter
=
allocate_information_node
(
buffer
);
display_adapter
=
allocate_information_node
(
buffer
);
if
(
!
display_adapter
)
if
(
!
display_adapter
)
{
{
...
@@ -1028,7 +1027,7 @@ static HRESULT fill_display_information_d3d(IDxDiagContainerImpl_Container *node
...
@@ -1028,7 +1027,7 @@ static HRESULT fill_display_information_d3d(IDxDiagContainerImpl_Container *node
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
goto
cleanup
;
goto
cleanup
;
s
nprintfW
(
buffer
,
ARRAY_SIZE
(
buffer
),
driverversion_fmtW
,
s
wprintf
(
buffer
,
ARRAY_SIZE
(
buffer
),
driverversion_fmtW
,
HIWORD
(
adapter_info
.
DriverVersion
.
u
.
HighPart
),
LOWORD
(
adapter_info
.
DriverVersion
.
u
.
HighPart
),
HIWORD
(
adapter_info
.
DriverVersion
.
u
.
HighPart
),
LOWORD
(
adapter_info
.
DriverVersion
.
u
.
HighPart
),
HIWORD
(
adapter_info
.
DriverVersion
.
u
.
LowPart
),
LOWORD
(
adapter_info
.
DriverVersion
.
u
.
LowPart
));
HIWORD
(
adapter_info
.
DriverVersion
.
u
.
LowPart
),
LOWORD
(
adapter_info
.
DriverVersion
.
u
.
LowPart
));
...
@@ -1036,22 +1035,22 @@ static HRESULT fill_display_information_d3d(IDxDiagContainerImpl_Container *node
...
@@ -1036,22 +1035,22 @@ static HRESULT fill_display_information_d3d(IDxDiagContainerImpl_Container *node
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
goto
cleanup
;
goto
cleanup
;
s
nprintfW
(
buffer
,
ARRAY_SIZE
(
buffer
),
id_fmtW
,
adapter_info
.
VendorId
);
s
wprintf
(
buffer
,
ARRAY_SIZE
(
buffer
),
id_fmtW
,
adapter_info
.
VendorId
);
hr
=
add_bstr_property
(
display_adapter
,
szVendorId
,
buffer
);
hr
=
add_bstr_property
(
display_adapter
,
szVendorId
,
buffer
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
goto
cleanup
;
goto
cleanup
;
s
nprintfW
(
buffer
,
ARRAY_SIZE
(
buffer
),
id_fmtW
,
adapter_info
.
DeviceId
);
s
wprintf
(
buffer
,
ARRAY_SIZE
(
buffer
),
id_fmtW
,
adapter_info
.
DeviceId
);
hr
=
add_bstr_property
(
display_adapter
,
szDeviceId
,
buffer
);
hr
=
add_bstr_property
(
display_adapter
,
szDeviceId
,
buffer
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
goto
cleanup
;
goto
cleanup
;
s
nprintfW
(
buffer
,
ARRAY_SIZE
(
buffer
),
subsysid_fmtW
,
adapter_info
.
SubSysId
);
s
wprintf
(
buffer
,
ARRAY_SIZE
(
buffer
),
subsysid_fmtW
,
adapter_info
.
SubSysId
);
hr
=
add_bstr_property
(
display_adapter
,
szSubSysId
,
buffer
);
hr
=
add_bstr_property
(
display_adapter
,
szSubSysId
,
buffer
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
goto
cleanup
;
goto
cleanup
;
s
nprintfW
(
buffer
,
ARRAY_SIZE
(
buffer
),
id_fmtW
,
adapter_info
.
Revision
);
s
wprintf
(
buffer
,
ARRAY_SIZE
(
buffer
),
id_fmtW
,
adapter_info
.
Revision
);
hr
=
add_bstr_property
(
display_adapter
,
szRevisionId
,
buffer
);
hr
=
add_bstr_property
(
display_adapter
,
szRevisionId
,
buffer
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
goto
cleanup
;
goto
cleanup
;
...
@@ -1085,7 +1084,7 @@ static HRESULT fill_display_information_d3d(IDxDiagContainerImpl_Container *node
...
@@ -1085,7 +1084,7 @@ static HRESULT fill_display_information_d3d(IDxDiagContainerImpl_Container *node
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
goto
cleanup
;
goto
cleanup
;
s
nprintfW
(
buffer
,
ARRAY_SIZE
(
buffer
),
mode_fmtW
,
adapter_mode
.
Width
,
adapter_mode
.
Height
,
s
wprintf
(
buffer
,
ARRAY_SIZE
(
buffer
),
mode_fmtW
,
adapter_mode
.
Width
,
adapter_mode
.
Height
,
depth_for_pixelformat
(
adapter_mode
.
Format
),
adapter_mode
.
RefreshRate
);
depth_for_pixelformat
(
adapter_mode
.
Format
),
adapter_mode
.
RefreshRate
);
hr
=
add_bstr_property
(
display_adapter
,
szDisplayModeLocalized
,
buffer
);
hr
=
add_bstr_property
(
display_adapter
,
szDisplayModeLocalized
,
buffer
);
...
@@ -1120,7 +1119,7 @@ static HRESULT fill_display_information_d3d(IDxDiagContainerImpl_Container *node
...
@@ -1120,7 +1119,7 @@ static HRESULT fill_display_information_d3d(IDxDiagContainerImpl_Container *node
if
(
!
get_texture_memory
(
&
adapter_info
.
DeviceIdentifier
,
&
available_mem
))
if
(
!
get_texture_memory
(
&
adapter_info
.
DeviceIdentifier
,
&
available_mem
))
WARN
(
"get_texture_memory helper failed
\n
"
);
WARN
(
"get_texture_memory helper failed
\n
"
);
s
nprintfW
(
buffer
,
ARRAY_SIZE
(
buffer
),
mem_fmt
,
available_mem
/
1000000
.
0
f
);
s
wprintf
(
buffer
,
ARRAY_SIZE
(
buffer
),
mem_fmt
,
available_mem
/
1000000
.
0
f
);
hr
=
add_bstr_property
(
display_adapter
,
szDisplayMemoryLocalized
,
buffer
);
hr
=
add_bstr_property
(
display_adapter
,
szDisplayMemoryLocalized
,
buffer
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
...
@@ -1299,7 +1298,7 @@ static HRESULT fill_display_information_fallback(IDxDiagContainerImpl_Container
...
@@ -1299,7 +1298,7 @@ static HRESULT fill_display_information_fallback(IDxDiagContainerImpl_Container
{
{
static
const
WCHAR
mem_fmt
[]
=
{
'%'
,
'.'
,
'1'
,
'f'
,
' '
,
'M'
,
'B'
,
0
};
static
const
WCHAR
mem_fmt
[]
=
{
'%'
,
'.'
,
'1'
,
'f'
,
' '
,
'M'
,
'B'
,
0
};
s
nprintfW
(
buffer
,
ARRAY_SIZE
(
buffer
),
mem_fmt
,
tmp
/
1000000
.
0
f
);
s
wprintf
(
buffer
,
ARRAY_SIZE
(
buffer
),
mem_fmt
,
tmp
/
1000000
.
0
f
);
hr
=
add_bstr_property
(
display_adapter
,
szDisplayMemoryLocalized
,
buffer
);
hr
=
add_bstr_property
(
display_adapter
,
szDisplayMemoryLocalized
,
buffer
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
...
@@ -1476,7 +1475,7 @@ static HRESULT fill_file_description(IDxDiagContainerImpl_Container *node, const
...
@@ -1476,7 +1475,7 @@ static HRESULT fill_file_description(IDxDiagContainerImpl_Container *node, const
if
(
boolret
)
if
(
boolret
)
{
{
s
nprintfW
(
szVersion_v
,
ARRAY_SIZE
(
szVersion_v
),
szVersionFormat
,
s
wprintf
(
szVersion_v
,
ARRAY_SIZE
(
szVersion_v
),
szVersionFormat
,
HIWORD
(
pFileInfo
->
dwFileVersionMS
),
LOWORD
(
pFileInfo
->
dwFileVersionMS
),
HIWORD
(
pFileInfo
->
dwFileVersionMS
),
LOWORD
(
pFileInfo
->
dwFileVersionMS
),
HIWORD
(
pFileInfo
->
dwFileVersionLS
),
LOWORD
(
pFileInfo
->
dwFileVersionLS
));
HIWORD
(
pFileInfo
->
dwFileVersionLS
),
LOWORD
(
pFileInfo
->
dwFileVersionLS
));
...
@@ -1557,7 +1556,7 @@ static HRESULT build_directxfiles_tree(IDxDiagContainerImpl_Container *node)
...
@@ -1557,7 +1556,7 @@ static HRESULT build_directxfiles_tree(IDxDiagContainerImpl_Container *node)
WCHAR
szFileID
[
5
];
WCHAR
szFileID
[
5
];
IDxDiagContainerImpl_Container
*
file_container
;
IDxDiagContainerImpl_Container
*
file_container
;
s
nprintfW
(
szFileID
,
ARRAY_SIZE
(
szFileID
),
szFormat
,
i
);
s
wprintf
(
szFileID
,
ARRAY_SIZE
(
szFileID
),
szFormat
,
i
);
file_container
=
allocate_information_node
(
szFileID
);
file_container
=
allocate_information_node
(
szFileID
);
if
(
!
file_container
)
if
(
!
file_container
)
...
@@ -1632,7 +1631,7 @@ static HRESULT fill_filter_data_information(IDxDiagContainerImpl_Container *subc
...
@@ -1632,7 +1631,7 @@ static HRESULT fill_filter_data_information(IDxDiagContainerImpl_Container *subc
goto
cleanup
;
goto
cleanup
;
pRF
=
((
REGFILTER2
**
)
ppRF
)[
0
];
pRF
=
((
REGFILTER2
**
)
ppRF
)[
0
];
s
nprintfW
(
bufferW
,
ARRAY_SIZE
(
bufferW
),
szVersionFormat
,
pRF
->
dwVersion
);
s
wprintf
(
bufferW
,
ARRAY_SIZE
(
bufferW
),
szVersionFormat
,
pRF
->
dwVersion
);
hr
=
add_bstr_property
(
subcont
,
szVersionW
,
bufferW
);
hr
=
add_bstr_property
(
subcont
,
szVersionW
,
bufferW
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
goto
cleanup
;
goto
cleanup
;
...
@@ -1804,7 +1803,7 @@ static HRESULT build_directshowfilters_tree(IDxDiagContainerImpl_Container *node
...
@@ -1804,7 +1803,7 @@ static HRESULT build_directshowfilters_tree(IDxDiagContainerImpl_Container *node
WCHAR
bufferW
[
10
];
WCHAR
bufferW
[
10
];
IDxDiagContainerImpl_Container
*
subcont
;
IDxDiagContainerImpl_Container
*
subcont
;
s
nprintfW
(
bufferW
,
ARRAY_SIZE
(
bufferW
),
szIdFormat
,
i
);
s
wprintf
(
bufferW
,
ARRAY_SIZE
(
bufferW
),
szIdFormat
,
i
);
subcont
=
allocate_information_node
(
bufferW
);
subcont
=
allocate_information_node
(
bufferW
);
if
(
!
subcont
)
if
(
!
subcont
)
{
{
...
...
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