C/C++ User's Journal STLSoft - ... Robust, Lightweight, Cross-platform, Template Software ... ATLSTL - where the Standard Template Library meets the Active Template Library COMSTL - where the Standard Template Library meets the Component Object Model
Synesis Software InetSTL - where the Standard Template Library meets the Internet UNIXSTL - Template Software for the UNIX Operating System WinSTL - where the Standard Template Library meets the Win32 API

H:/freelibs/recls/current/src/recls_wininet_dl.h

Go to the documentation of this file.
00001 /* /////////////////////////////////////////////////////////////////////////////
00002  * File:        recls_wininet_dl.h
00003  *
00004  * Purpose:     Delay-loading functionality for the recls library.
00005  *
00006  * Created:     9th September 2004
00007  * Updated:     5th October 2006
00008  *
00009  * Home:        http://recls.org/
00010  *
00011  * Copyright (c) 2004-2006, Matthew Wilson and Synesis Software
00012  * All rights reserved.
00013  *
00014  * Redistribution and use in source and binary forms, with or without 
00015  * modification, are permitted provided that the following conditions are met:
00016  *
00017  * - Redistributions of source code must retain the above copyright notice, this
00018  *   list of conditions and the following disclaimer. 
00019  * - Redistributions in binary form must reproduce the above copyright notice,
00020  *   this list of conditions and the following disclaimer in the documentation
00021  *   and/or other materials provided with the distribution.
00022  * - Neither the name(s) of Matthew Wilson and Synesis Software nor the names of
00023  *   any contributors may be used to endorse or promote products derived from
00024  *   this software without specific prior written permission.
00025  *
00026  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00027  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00028  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00029  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
00030  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
00031  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
00032  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00033  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
00034  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
00035  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00036  * POSSIBILITY OF SUCH DAMAGE.
00037  *
00038  * ////////////////////////////////////////////////////////////////////////// */
00039 
00040 
00041 /* File version */
00042 #ifndef RECLS_DOCUMENTATION_SKIP_SECTION
00043 # define RECLS_VER_H_RECLS_WININET_DL_MAJOR     2
00044 # define RECLS_VER_H_RECLS_WININET_DL_MINOR     0
00045 # define RECLS_VER_H_RECLS_WININET_DL_REVISION  1
00046 # define RECLS_VER_H_RECLS_WININET_DL_EDIT      8
00047 #endif /* !RECLS_DOCUMENTATION_SKIP_SECTION */
00048 
00051 #if !defined(RECLS_DELAY_LOAD_WININET)
00052 # error Cannot include recls_wininet_dl.h unless RECLS_DELAY_LOAD_WININET is defined
00053 #endif /* RECLS_DELAY_LOAD_WININET */
00054 
00055 /* /////////////////////////////////////////////////////////////////////////////
00056  * Includes
00057  */
00058 
00059 #include <recls/recls.h>
00060 #include <wininet.h>
00061 
00062 /* /////////////////////////////////////////////////////////////////////////////
00063  * Macros, definitions and typedefs
00064  */
00065 
00066 #ifndef INTERNETAPI_
00067 # define INTERNETAPI_(type)     EXTERN_C type STDAPICALLTYPE
00068 #endif /* !INTERNETAPI_ */
00069 
00070 #ifndef BOOLAPI
00071 # define BOOLAPI                INTERNETAPI_(BOOL)
00072 #endif /* !BOOLAPI */
00073 
00074 #if defined(RECLS_COMPILER_IS_DMC) || \
00075     (   defined(RECLS_COMPILER_IS_MSVC) && \
00076         _MSC_VER < 1300)
00077 typedef unsigned long           DWORD_PTR_;
00078 # define DWORD_PTR              DWORD_PTR_
00079 #endif /* compiler */
00080 
00081 /* /////////////////////////////////////////////////////////////////////////////
00082  * Functions
00083  */
00084 
00085 BOOLAPI recls_dl_FtpGetCurrentDirectoryA(
00086     IN HINTERNET hConnect,
00087     OUT LPSTR lpszCurrentDirectory,
00088     IN OUT LPDWORD lpdwCurrentDirectory
00089     );
00090 BOOLAPI recls_dl_FtpGetCurrentDirectoryW(
00091     IN HINTERNET hConnect,
00092     OUT LPWSTR lpszCurrentDirectory,
00093     IN OUT LPDWORD lpdwCurrentDirectory
00094     );
00095 
00096 INTERNETAPI_(HINTERNET) recls_dl_InternetOpenA(
00097     IN LPCSTR lpszAgent,
00098     IN DWORD dwAccessType,
00099     IN LPCSTR lpszProxy OPTIONAL,
00100     IN LPCSTR lpszProxyBypass OPTIONAL,
00101     IN DWORD dwFlags
00102     );
00103 INTERNETAPI_(HINTERNET) recls_dl_InternetOpenW(
00104     IN LPCWSTR lpszAgent,
00105     IN DWORD dwAccessType,
00106     IN LPCWSTR lpszProxy OPTIONAL,
00107     IN LPCWSTR lpszProxyBypass OPTIONAL,
00108     IN DWORD dwFlags
00109     );
00110 
00111 INTERNETAPI_(HINTERNET) recls_dl_InternetConnectA(
00112     IN HINTERNET hInternet,
00113     IN LPCSTR lpszServerName,
00114     IN INTERNET_PORT nServerPort,
00115     IN LPCSTR lpszUserName OPTIONAL,
00116     IN LPCSTR lpszPassword OPTIONAL,
00117     IN DWORD dwService,
00118     IN DWORD dwFlags,
00119     IN DWORD_PTR dwContext
00120     );
00121 INTERNETAPI_(HINTERNET) recls_dl_InternetConnectW(
00122     IN HINTERNET hInternet,
00123     IN LPCWSTR lpszServerName,
00124     IN INTERNET_PORT nServerPort,
00125     IN LPCWSTR lpszUserName OPTIONAL,
00126     IN LPCWSTR lpszPassword OPTIONAL,
00127     IN DWORD dwService,
00128     IN DWORD dwFlags,
00129     IN DWORD_PTR dwContext
00130     );
00131 
00132 BOOLAPI recls_dl_InternetCloseHandle(
00133     IN HINTERNET hInternet
00134     );
00135 
00136 BOOLAPI recls_dl_InternetFindNextFileA(
00137     IN HINTERNET hFind,
00138     OUT LPVOID lpvFindData
00139     );
00140 BOOLAPI recls_dl_InternetFindNextFileW(
00141     IN HINTERNET hFind,
00142     OUT LPVOID lpvFindData
00143     );
00144 
00145 INTERNETAPI_(HINTERNET) recls_dl_FtpFindFirstFileA(
00146     IN HINTERNET hConnect,
00147     IN LPCSTR lpszSearchFile OPTIONAL,
00148     OUT LPWIN32_FIND_DATAA lpFindFileData OPTIONAL,
00149     IN DWORD dwFlags,
00150     IN DWORD_PTR dwContext
00151     );
00152 INTERNETAPI_(HINTERNET) recls_dl_FtpFindFirstFileW(
00153     IN HINTERNET hConnect,
00154     IN LPCWSTR lpszSearchFile OPTIONAL,
00155     OUT LPWIN32_FIND_DATAW lpFindFileData OPTIONAL,
00156     IN DWORD dwFlags,
00157     IN DWORD_PTR dwContext
00158     );
00159 
00160 #define FtpGetCurrentDirectoryA recls_dl_FtpGetCurrentDirectoryA
00161 #define FtpGetCurrentDirectoryW recls_dl_FtpGetCurrentDirectoryW
00162 #define InternetOpenA           recls_dl_InternetOpenA
00163 #define InternetOpenW           recls_dl_InternetOpenW
00164 #define InternetConnectA        recls_dl_InternetConnectA
00165 #define InternetConnectW        recls_dl_InternetConnectW
00166 #define InternetFindNextFileA   recls_dl_InternetFindNextFileA
00167 #define InternetFindNextFileW   recls_dl_InternetFindNextFileW
00168 #define FtpFindFirstFileA       recls_dl_FtpFindFirstFileA
00169 #define FtpFindFirstFileW       recls_dl_FtpFindFirstFileW
00170 #define InternetCloseHandle     recls_dl_InternetCloseHandle
00171 
00172 /* ////////////////////////////////////////////////////////////////////////// */

recls Library documentation © Synesis Software Pty Ltd, 2001-2006