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.

89 lines
3.4 KiB

  1. //////////////////////////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Libinc.h
  4. //
  5. // This file contains most commonly used string operation. ALl the setup project should link here
  6. // or add the common utility here to avoid duplicating code everywhere or using CRT runtime.
  7. //
  8. // Created 4\15\997 inateeg
  9. //
  10. ///////////////////////////////////////////////////////////////////////////////////////////////////
  11. #ifndef _SDSUTILS_H_
  12. #define _SDSUTILS_H_
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif /* __cplusplus */
  16. #define IsSpace(c) ((c) == ' ' || (c) == '\t' || (c) == '\r' || (c) == '\n' || (c) == '\v' || (c) == '\f')
  17. #define IsDigit(c) ((c) >= '0' && (c) <= '9')
  18. #define IsAlpha(c) ( ((c) >= 'A' && (c) <= 'Z') || ((c) >= 'a' && (c) <= 'z'))
  19. // flags for import proxy function
  20. #define IMPTPROXY_CALLAFTIE4 0x00000001
  21. #define NS_NAVI4 0x00040000
  22. #define NS_NAVI3ORLESS 0x00030000
  23. // define constance used by multiple setup binaries
  24. extern const char c_gszPre_DEFAULTBROWSER[];
  25. extern const char c_gszNavigator3[];
  26. extern const char c_gszNavigator4[];
  27. extern const char c_gszInternetExplorer[];
  28. BOOL ChrCmpA_inline(WORD w1, WORD wMatch);
  29. LPSTR FAR ANSIStrChr(LPCSTR lpStart, WORD wMatch);
  30. LPSTR FAR ANSIStrRChr(LPCSTR lpStart, WORD wMatch);
  31. LPSTR FAR ANSIStrChrI(LPCSTR lpStart, WORD wMatch);
  32. long AtoL(const char *nptr);
  33. PSTR ULtoA( unsigned long val, char *buf, int radix );
  34. //DWORD FileSize( PCSTR pszFile );
  35. BOOL FileExists( PCSTR pszFilename );
  36. VOID AddPath(LPSTR szPath, LPCSTR szName );
  37. unsigned long StrToUL (const char *nptr, char **endptr,int ibase);
  38. LPSTR GetNextToken( PSTR *ppstr, char Delim );
  39. BOOL GetParentDir( LPSTR szFolder );
  40. PSTR ANSIStrStr(LPCSTR lpFirst, LPCSTR lpSrch);
  41. PSTR ANSIStrStrI(LPCSTR lpFirst, LPCSTR lpSrch);
  42. void DoPatchLoadBalancingForNetware(BOOL fRunningOnWin9X);
  43. void MyGetVersionFromFile(LPSTR lpszFilename, LPDWORD pdwMSVer, LPDWORD pdwLSVer, BOOL bVersion);
  44. void ImportNetscapeProxySettings(DWORD);
  45. BOOL IsIEDefaultBrowser();
  46. DWORD GetNetScapeVersion();
  47. LONG RegDeleteKeyRecursively(HKEY hkRootKey, PCSTR pcszSubKey);
  48. void ConvertVersionString(LPCSTR pszVer, WORD rwVer[], CHAR ch);
  49. DWORD GetSpace( LPTSTR szPath );
  50. DWORD GetDriveSize( LPTSTR szPath );
  51. DWORD GetDrvFreeSpaceAndClusterSize( LPSTR szPath, LPDWORD lpdwClustSize );
  52. BOOL NeedToRunGrpconv();
  53. extern const char c_szUNINSTALLDAT[]; // "ie5bak.dat"
  54. extern const char c_szUNINSTALLINI[]; // "ie5bak.ini"
  55. extern const char c_szIE4SECTIONNAME[]; // "backup"
  56. extern const char c_szIE4_OPTIONS[]; // "Software\\Microsoft\\IE Setup\\Options"
  57. extern const char c_szIE4_UNINSTALLDIR[]; // "UninstallDir"
  58. BOOL FileVerGreaterOrEqual(LPSTR lpszFileName, DWORD dwReqMSVer, DWORD dwReqLSVer);
  59. void BuildPath( char *szPath, const char *szDirPath, const char *szFileName );
  60. ULONG FileSize( LPSTR lpFile );
  61. BOOL ValidateUninstallFiles(LPSTR lpszPath);
  62. BOOL GetUninstallDirFromReg(LPSTR lpszUninstallDir);
  63. BOOL FileBackupEntryExists(LPCSTR lpcszFileName);
  64. BOOL FSP4LevelCryptoInstalled();
  65. void MakeLFNPath(LPSTR lpszSFNPath, LPSTR lpszLFNPath, BOOL fNoExist);
  66. BOOL MyPathIsUNC(LPCSTR pszPath);
  67. BOOL RunningOnMillennium();
  68. BOOL RunningOnWin95BiDiLoc();
  69. BOOL IsBiDiLocalizedBinary(HINSTANCE hinst, LPCTSTR lpszType, LPCTSTR lpszName);
  70. #ifdef __cplusplus
  71. }
  72. #endif /* __cplusplus */
  73. #endif // _SDSUTILS_H_