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.

71 lines
2.6 KiB

  1. ////////////////////////////////////////////////////////////////////////////////////
  2. //
  3. // File: globals.h
  4. //
  5. // History: 17-Nov-00 markder Created.
  6. //
  7. // Desc: This file contains extern declarations of all global variables.
  8. //
  9. ////////////////////////////////////////////////////////////////////////////////////
  10. #ifndef __GLOBALS_H__
  11. #define __GLOBALS_H__
  12. class SdbDatabase;
  13. extern BOOL g_bQuiet;
  14. extern BOOL g_bStrict;
  15. extern CStringArray g_rgErrors;
  16. BOOL ReadDatabase(SdbInputFile* pInputFile, SdbDatabase* pDatabase);
  17. BOOL WriteDatabase(SdbOutputFile* pOutputFile, SdbDatabase* pDatabase);
  18. BOOL StringToMask(LPDWORD pdwMask, LPCTSTR lpszVal);
  19. DWORD StringToDword(CString cs);
  20. ULONG StringToULong(LPCTSTR lpszVal);
  21. ULONGLONG StringToQword(CString cs);
  22. BOOL VersionToQword(LPCTSTR lpszVersion, ULONGLONG* pullRet);
  23. BOOL VersionQwordToString(
  24. OUT CString& rString,
  25. ULONGLONG ullVersion
  26. );
  27. BOOL MakeUTCTime(CString& cs, time_t* pt);
  28. CString TrimParagraph(CString csInput);
  29. VOID ReplaceStringNoCase(CString& strText, LPCTSTR lpszFindThis, LPCTSTR lpszReplaceWithThis);
  30. VOID ExpandEnvStrings(CString* pcs);
  31. CString MakeFullPath(CString cs);
  32. DWORD GetBytesFromString(CString csBytes, BYTE* pBuffer, DWORD dwBufferSize);
  33. DWORD GetByteStringSize(CString csBytes);
  34. typedef DWORD (*PFNGETSTRINGMASK)(LPCTSTR szOSSKUType);
  35. DWORD GetOSSKUType(LPCTSTR szOSSKUType);
  36. DWORD GetOSPlatform(LPCTSTR szOSPlatform);
  37. DWORD GetRuntimePlatformType(LPCTSTR szPlatformType);
  38. DWORD GetFilter(LPCTSTR szFilter);
  39. CString GetGUID(REFGUID guid);
  40. BOOL DecodeString(LPCTSTR pszStr, LPDWORD pdwMask, PFNGETSTRINGMASK pfnGetStringMask);
  41. BOOL DecodeRuntimePlatformString(LPCTSTR pszPlatform, LPDWORD pdwRuntimePlatform);
  42. DWORD DecodeOutputFlags(CString csFlags);
  43. BOOL FilterOSVersion(DOUBLE flOSVersion, CString csOSVersionSpec, LPDWORD lpdwSPMask);
  44. BOOL ParseLanguageID(LPCTSTR pszLanguage, DWORD* pdwLanguageID);
  45. BOOL ParseLanguagesString(CString csLanguages, CStringArray* prgLanguages);
  46. CString ProcessShimCmdLine(CString& csCommandLine, GUID& guidDB, TAGID tiShimRef);
  47. SdbOutputType GetOutputType(LPCTSTR szOutputType);
  48. BOOL ReadName( IXMLDOMNode* pNode, CString* pcsName);
  49. BOOL ReadLangID(IXMLDOMNode* pNode, SdbDatabase* pDB, CString* pcsLangID);
  50. void _cdecl Print(LPCTSTR pszFmt, ...);
  51. void _cdecl PrintError(LPCTSTR pszFmt, ...);
  52. void PrintErrorStack();
  53. #endif // __GLOBALS_H__