dxdiag: Introduce the information collection infrastructure.

oldstable
Andrew Nguyen 2011-06-14 08:01:51 -05:00 committed by Alexandre Julliard
parent 4122cf2df9
commit c349a34e16
5 changed files with 56 additions and 3 deletions

View File

@ -4,6 +4,7 @@ APPMODE = -mwindows -municode
IMPORTS = user32
C_SRCS = \
information.c \
main.c \
output.c

View File

@ -26,6 +26,12 @@
#define STRING_DXDIAG_TOOL 101
#define STRING_USAGE 102
/* Information collection definitions. */
struct dxdiag_information;
struct dxdiag_information *collect_dxdiag_information(BOOL whql_check);
void free_dxdiag_information(struct dxdiag_information *dxdiag_info);
/* Output backend definitions. */
enum output_type
{
@ -50,4 +56,4 @@ static inline const char *debugstr_output_type(enum output_type type)
}
const WCHAR *get_output_extension(enum output_type type);
BOOL output_dxdiag_information(const WCHAR *filename, enum output_type type);
BOOL output_dxdiag_information(struct dxdiag_information *dxdiag_info, const WCHAR *filename, enum output_type type);

View File

@ -0,0 +1,36 @@
/*
* DxDiag information collection
*
* Copyright 2011 Andrew Nguyen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "wine/debug.h"
#include "dxdiag_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(dxdiag);
void free_dxdiag_information(struct dxdiag_information *system_info)
{
/* Do nothing for now. */
}
struct dxdiag_information *collect_dxdiag_information(BOOL whql_check)
{
WINE_FIXME("DxDiag information collection is not implemented\n");
return NULL;
}

View File

@ -174,6 +174,7 @@ static BOOL process_command_line(const WCHAR *cmdline, struct command_line_info
int WINAPI wWinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPWSTR cmdline, int cmdshow)
{
struct command_line_info info;
struct dxdiag_information *dxdiag_info;
hInstance = hInst;
@ -185,10 +186,19 @@ int WINAPI wWinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPWSTR cmdline, int cm
if (info.output_type != OUTPUT_NONE)
WINE_TRACE("Output filename: %s\n", debugstr_output_type(info.output_type));
dxdiag_info = collect_dxdiag_information(info.whql_check);
if (!dxdiag_info)
{
WINE_ERR("DxDiag information collection failed\n");
return 1;
}
if (info.output_type != OUTPUT_NONE)
output_dxdiag_information(info.outfile, info.output_type);
output_dxdiag_information(dxdiag_info, info.outfile, info.output_type);
else
WINE_FIXME("Information dialog is not implemented\n");
free_dxdiag_information(dxdiag_info);
return 0;
}

View File

@ -48,7 +48,7 @@ const WCHAR *get_output_extension(enum output_type type)
return output_backends[type - 1].filename_ext;
}
BOOL output_dxdiag_information(const WCHAR *filename, enum output_type type)
BOOL output_dxdiag_information(struct dxdiag_information *dxdiag_info, const WCHAR *filename, enum output_type type)
{
WINE_FIXME("File information output is not implemented\n");
return FALSE;