dxdiag_private.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*
  2. * Private definitions for the DirectX Diagnostic Tool
  3. *
  4. * Copyright 2011 Andrew Nguyen
  5. *
  6. * This library is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 2.1 of the License, or (at your option) any later version.
  10. *
  11. * This library is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public
  17. * License along with this library; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  19. */
  20. #include <windef.h>
  21. /* Resource definitions. */
  22. #define MAX_STRING_LEN 1024
  23. #define STRING_DXDIAG_TOOL 101
  24. #define STRING_USAGE 102
  25. /* Information collection definitions. */
  26. struct system_information
  27. {
  28. WCHAR *szTimeEnglish;
  29. WCHAR *szTimeLocalized;
  30. WCHAR *szMachineNameEnglish;
  31. WCHAR *szOSExLongEnglish;
  32. WCHAR *szOSExLocalized;
  33. WCHAR *szLanguagesEnglish;
  34. WCHAR *szLanguagesLocalized;
  35. WCHAR *szSystemManufacturerEnglish;
  36. WCHAR *szSystemModelEnglish;
  37. WCHAR *szBIOSEnglish;
  38. WCHAR *szProcessorEnglish;
  39. WCHAR *szPhysicalMemoryEnglish;
  40. WCHAR *szPageFileEnglish;
  41. WCHAR *szPageFileLocalized;
  42. WCHAR *szWindowsDir;
  43. WCHAR *szDirectXVersionLongEnglish;
  44. WCHAR *szSetupParamEnglish;
  45. WCHAR *szDxDiagVersion;
  46. BOOL win64;
  47. };
  48. struct dxdiag_information
  49. {
  50. struct system_information system_info;
  51. };
  52. struct dxdiag_information *collect_dxdiag_information(BOOL whql_check);
  53. void free_dxdiag_information(struct dxdiag_information *dxdiag_info);
  54. /* Output backend definitions. */
  55. enum output_type
  56. {
  57. OUTPUT_NONE,
  58. OUTPUT_TEXT,
  59. OUTPUT_XML,
  60. };
  61. static inline const char *debugstr_output_type(enum output_type type)
  62. {
  63. switch (type)
  64. {
  65. case OUTPUT_NONE:
  66. return "(none)";
  67. case OUTPUT_TEXT:
  68. return "Plain-text output";
  69. case OUTPUT_XML:
  70. return "XML output";
  71. default:
  72. return "(unknown)";
  73. }
  74. }
  75. const WCHAR *get_output_extension(enum output_type type);
  76. BOOL output_dxdiag_information(struct dxdiag_information *dxdiag_info, const WCHAR *filename, enum output_type type);