diff --git a/programs/dxdiag/Makefile.in b/programs/dxdiag/Makefile.in index 6a43982d497..3a691b0ceef 100644 --- a/programs/dxdiag/Makefile.in +++ b/programs/dxdiag/Makefile.in @@ -4,6 +4,7 @@ APPMODE = -mwindows -municode IMPORTS = user32 C_SRCS = \ + information.c \ main.c \ output.c diff --git a/programs/dxdiag/dxdiag_private.h b/programs/dxdiag/dxdiag_private.h index 6026a9d8a41..cbd9f5d38e7 100644 --- a/programs/dxdiag/dxdiag_private.h +++ b/programs/dxdiag/dxdiag_private.h @@ -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); diff --git a/programs/dxdiag/information.c b/programs/dxdiag/information.c new file mode 100644 index 00000000000..ecdaa9240f2 --- /dev/null +++ b/programs/dxdiag/information.c @@ -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; +} diff --git a/programs/dxdiag/main.c b/programs/dxdiag/main.c index 5380548fbe8..f286db6366d 100644 --- a/programs/dxdiag/main.c +++ b/programs/dxdiag/main.c @@ -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; } diff --git a/programs/dxdiag/output.c b/programs/dxdiag/output.c index c7b30602cc0..effe2a2ad02 100644 --- a/programs/dxdiag/output.c +++ b/programs/dxdiag/output.c @@ -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;