Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.1 KiB

  1. #include "priv.h"
  2. #include "iface.h"
  3. // These have to come before dump.h otherwise dump.h won't declare
  4. // some of the prototypes. Failure to do this will cause the compiler
  5. // to decorate some of these functions with C++ mangling.
  6. #include "dump.h"
  7. // Define some things for debug.h
  8. //
  9. #define SZ_DEBUGINI "appwiz.ini"
  10. #define SZ_DEBUGSECTION "appwiz"
  11. #define SZ_MODULE "APPWIZ"
  12. #define DECLARE_DEBUG
  13. #include <debug.h>
  14. #ifdef DEBUG
  15. LPCTSTR Dbg_GetGuid(REFGUID rguid, LPTSTR pszBuf, int cch)
  16. {
  17. SHStringFromGUID(rguid, pszBuf, cch);
  18. return pszBuf;
  19. }
  20. LPCTSTR Dbg_GetBool(BOOL bVal)
  21. {
  22. return bVal ? TEXT("TRUE") : TEXT("FALSE");
  23. }
  24. LPCTSTR Dbg_GetAppCmd(APPCMD appcmd)
  25. {
  26. LPCTSTR pcsz = TEXT("<Unknown APPCMD>");
  27. switch (appcmd)
  28. {
  29. STRING_CASE(APPCMD_UNKNOWN);
  30. STRING_CASE(APPCMD_INSTALL);
  31. STRING_CASE(APPCMD_UNINSTALL);
  32. STRING_CASE(APPCMD_REPAIR);
  33. STRING_CASE(APPCMD_UPGRADE);
  34. STRING_CASE(APPCMD_MODIFY);
  35. STRING_CASE(APPCMD_GENERICINSTALL);
  36. }
  37. ASSERT(pcsz);
  38. return pcsz;
  39. }
  40. #endif // DEBUG