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.

37 lines
997 B

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