Source code of Windows XP (NT5)
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.

34 lines
915 B

  1. #include <tchar.h>
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4. #include <windows.h>
  5. #include <setupapi.h>
  6. LPSTR StripWhitespace(LPSTR pszString);
  7. LPWSTR MakeWideStrFromAnsi(UINT uiCodePage, LPSTR psz);
  8. BOOL IsFileExist(LPCTSTR szFile);
  9. void AddPath(LPTSTR szPath, LPCTSTR szName);
  10. int DoesThisSectionExist(IN HINF hFile, IN LPCTSTR szTheSection);
  11. void DoExpandEnvironmentStrings(LPTSTR szFile);
  12. #define DEBUG_FLAG
  13. #ifdef DEBUG_FLAG
  14. inline void _cdecl DebugTrace(LPTSTR lpszFormat, ...)
  15. {
  16. int nBuf;
  17. TCHAR szBuffer[512];
  18. va_list args;
  19. va_start(args, lpszFormat);
  20. nBuf = _vsntprintf(szBuffer, sizeof(szBuffer), lpszFormat, args);
  21. //ASSERT(nBuf < sizeof(szBuffer)); //Output truncated as it was > sizeof(szBuffer)
  22. OutputDebugString(szBuffer);
  23. va_end(args);
  24. }
  25. #else
  26. inline void _cdecl DebugTrace(LPTSTR , ...){}
  27. #endif
  28. #define IISDebugOutput DebugTrace