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.

41 lines
1.2 KiB

  1. // File: pfnwininet.h
  2. #ifndef _PFNWININET_H_
  3. #define _PFNWININET_H_
  4. #include <wininet.h>
  5. #define HINTERNETKILL( hInternet ) if( hInternet ) { WININET::InternetCloseHandle( hInternet ); hInternet = NULL; }
  6. typedef HINTERNET (*PFN_IOPEN)( LPCSTR, DWORD, LPCSTR, LPCSTR, DWORD);
  7. typedef INTERNET_STATUS_CALLBACK (*PFN_ISETCALLBACK)( HINTERNET, INTERNET_STATUS_CALLBACK);
  8. typedef HINTERNET (*PFN_IOPENURL)( HINTERNET, LPCSTR, LPCSTR, DWORD, DWORD, DWORD );
  9. typedef BOOL (*PFN_IREADFILE)(HINTERNET, LPVOID, DWORD, LPDWORD );
  10. typedef BOOL (*PFN_IQUERYDATA)( HINTERNET, LPDWORD, DWORD, DWORD );
  11. typedef BOOL (*PFN_ICLOSEHAN)( HINTERNET );
  12. //typedef BOOL (*PFN_IREADFILEEX)(HINTERNET, LPINTERNET_BUFFERS, DWORD, DWORD);
  13. class WININET
  14. {
  15. private:
  16. static HINSTANCE m_hInstance;
  17. protected:
  18. WININET() {};
  19. ~WININET() {};
  20. public:
  21. static HRESULT Init(void);
  22. static void DeInit(void);
  23. static PFN_IOPEN InternetOpen;
  24. static PFN_ISETCALLBACK InternetSetStatusCallback;
  25. static PFN_IOPENURL InternetOpenUrl;
  26. static PFN_IREADFILE InternetReadFile;
  27. static PFN_IQUERYDATA InternetQueryDataAvailable;
  28. static PFN_ICLOSEHAN InternetCloseHandle;
  29. // static PFN_IREADFILEEX InternetReadFileEx;
  30. };
  31. #endif /* _PFNWININET_H_ */