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.

64 lines
2.1 KiB

  1. #ifndef _IEDETECT_H
  2. #define _IEDETECT_H
  3. #include <inseng.h>
  4. extern HINSTANCE g_hInstance;
  5. extern HANDLE g_hHeap;
  6. // from inseng, cifcomp.h
  7. #define ISINSTALLED_YES 1
  8. #define ISINSTALLED_NO 0
  9. #define COMPONENT_KEY "Software\\Microsoft\\Active Setup\\Installed Components"
  10. #define IEXPLORE_APPPATH_KEY REGSTR_PATH_APPPATHS "\\iexplore.exe"
  11. #define IE_KEY "Software\\Microsoft\\Internet Explorer"
  12. #define DEFAULT_LOCALE "en"
  13. #define ISINSTALLED_KEY "IsInstalled"
  14. #define LOCALE_KEY "Locale"
  15. #define VERSION_KEY "Version"
  16. #define BUILD_KEY "Build"
  17. #define QFE_VERSION_KEY "QFEVersion"
  18. #define IE_3_MS_VERSION 0x00040046
  19. #define IE_4_MS_VERSION 0x00040047
  20. // Build number 1712.0 (IE4.0 RTW)
  21. #define IE_4_LS_VERSION 0x06B00000
  22. // Version numver 5.0
  23. #define IE_5_MS_VERSION 0x00050000
  24. #define IE_5_LS_VERSION 0x00000000
  25. // Version numver 6.0
  26. #define IE_6_MS_VERSION 0x00060000
  27. #define IE_6_LS_VERSION 0x00000000
  28. // Note: for now we only allow 10 characters in the cPath part of the structure.
  29. // If more characters are needed change the amount below.
  30. typedef struct _DETECT_FILES
  31. {
  32. char cPath[10];
  33. char szFilename[13];
  34. DWORD dwMSVer;
  35. DWORD dwLSVer;
  36. } DETECT_FILES;
  37. // From utils.cpp
  38. int CompareLocales(LPCSTR pcszLoc1, LPCSTR pcszLoc2);
  39. void ConvertVersionStrToDwords(LPSTR pszVer, char cDelimiter, LPDWORD pdwVer, LPDWORD pdwBuild);
  40. DWORD GetStringField(LPSTR szStr, UINT uField, char cDelimiter, LPSTR szBuf, UINT cBufSize);
  41. DWORD GetIntField(LPSTR szStr, char cDelimiter, UINT uField, DWORD dwDefault);
  42. LPSTR FindChar(LPSTR pszStr, char ch);
  43. BOOL FRunningOnNT(void);
  44. DWORD CompareVersions(DWORD dwAskVer, DWORD dwAskBuild, DWORD dwInstalledVer, DWORD dwInstalledBuild);
  45. BOOL GetVersionFromGuid(LPSTR pszGuid, LPDWORD pdwVer, LPDWORD pdwBuild);
  46. BOOL CompareLocal(LPCSTR pszGuid, LPCSTR pszLocal);
  47. VOID ReadFromWininitOrPFRO(PCSTR pcszKey, PSTR pszValue);
  48. DWORD CheckFile(DETECT_FILES Detect_Files);
  49. DWORD WINAPI DetectFile(DETECTION_STRUCT *pDet, LPSTR pszFilename);
  50. #endif