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. #include <winuser.h>
  22. /* Resource definitions. */
  23. #define MAX_STRING_LEN 1024
  24. #define STRING_DXDIAG_TOOL 101
  25. #define STRING_USAGE 102
  26. /* Information collection definitions. */
  27. struct system_information
  28. {
  29. WCHAR *szTimeEnglish;
  30. WCHAR *szTimeLocalized;
  31. WCHAR *szMachineNameEnglish;
  32. WCHAR *szOSExLongEnglish;
  33. WCHAR *szOSExLocalized;
  34. WCHAR *szLanguagesEnglish;
  35. WCHAR *szLanguagesLocalized;
  36. WCHAR *szSystemManufacturerEnglish;
  37. WCHAR *szSystemModelEnglish;
  38. WCHAR *szBIOSEnglish;
  39. WCHAR *szProcessorEnglish;
  40. WCHAR *szPhysicalMemoryEnglish;
  41. WCHAR *szPageFileEnglish;
  42. WCHAR *szPageFileLocalized;
  43. WCHAR *szWindowsDir;
  44. WCHAR *szDirectXVersionLongEnglish;
  45. WCHAR *szSetupParamEnglish;
  46. WCHAR *szDxDiagVersion;
  47. BOOL win64;
  48. };
  49. struct dxdiag_information
  50. {
  51. struct system_information system_info;
  52. };
  53. struct dxdiag_information *collect_dxdiag_information(BOOL whql_check);
  54. void free_dxdiag_information(struct dxdiag_information *dxdiag_info);
  55. /* Output backend definitions. */
  56. enum output_type
  57. {
  58. OUTPUT_NONE,
  59. OUTPUT_TEXT,
  60. OUTPUT_XML,
  61. };
  62. static inline const char *debugstr_output_type(enum output_type type)
  63. {
  64. switch (type)
  65. {
  66. case OUTPUT_NONE:
  67. return "(none)";
  68. case OUTPUT_TEXT:
  69. return "Plain-text output";
  70. case OUTPUT_XML:
  71. return "XML output";
  72. default:
  73. return "(unknown)";
  74. }
  75. }
  76. const WCHAR *get_output_extension(enum output_type type);
  77. BOOL output_dxdiag_information(struct dxdiag_information *dxdiag_info, const WCHAR *filename, enum output_type type);