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.

41 lines
756 B

  1. #ifndef _AutoConf_h_
  2. #define _AutoConf_h_
  3. #define AUTOCONF_CONTEXT_OPENURL 1
  4. #define AUTOCONF_CONTEXT_READFILEX 2
  5. class CAutoConf
  6. {
  7. public:
  8. static void DoIt();
  9. private:
  10. LPTSTR m_szServer;
  11. HINTERNET m_hInternet;
  12. HINTERNET m_hOpenUrl;
  13. HANDLE m_hFile;
  14. HINF m_hInf;
  15. TCHAR m_szFile[ MAX_PATH ];
  16. HANDLE m_hEvent;
  17. DWORD m_dwTimeOut;
  18. DWORD m_dwGrab;
  19. private:
  20. CAutoConf( LPTSTR szServer );
  21. ~CAutoConf();
  22. private:
  23. BOOL OpenConnection();
  24. BOOL ParseFile();
  25. BOOL GetFile();
  26. void CloseInternet();
  27. BOOL GrabData();
  28. BOOL QueryData();
  29. private:
  30. static VOID CALLBACK InetCallback( HINTERNET hInternet, DWORD dwContext, DWORD dwInternetStatus,
  31. LPVOID lpvStatusInformation, DWORD dwStatusInformationLength );
  32. };
  33. #endif // _AutoConf_h_