home *** CD-ROM | disk | FTP | other *** search
/ Team Palmtops 7 / Palmtops_numero07.iso / WinCE / SDKWindowsCE / HandHeldPCPro30 / sdk.exe / Jupiter SDK / data1.cab / MFC / src / wcethunk.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-02-19  |  12.0 KB  |  248 lines

  1. // This is a part of the Microsoft Foundation Classes C++ library.
  2. // Copyright (C) 1992-1998 Microsoft Corporation
  3. // All rights reserved.
  4. //
  5. // This source code is only intended as a supplement to the
  6. // Microsoft Foundation Classes Reference and related
  7. // electronic documentation provided with the library.
  8. // See these sources for detailed information regarding the
  9. // Microsoft Foundation Classes product.
  10.  
  11. #ifndef __WCETHUNK_H__
  12. #define __WCETHUNK_H__
  13.  
  14. #if defined(_WIN32_WCE_NO_DELAYLOAD)
  15. #pragma warning(disable: 4005)
  16.  
  17. #if !defined(_WIN32_WCE_NO_COMMDLG_THUNKS)
  18.  
  19. struct AFX_COMMDLG_CALL
  20. {
  21. #if !defined(_WIN32_WCE_NO_COLORDLG)
  22.     BOOL (APIENTRY* pfnChooseColor)(LPCHOOSECOLOR);
  23. #endif // _WIN32_WCE_NO_COLORDLG
  24. #if !defined(_WIN32_WCE_NO_PRINTING)
  25.     DWORD (APIENTRY* pfnCommDlgExtendedError)(VOID);
  26.     BOOL (APIENTRY* pfnPrintDlg)(LPPRINTDLG);
  27. WCE_DEL BOOL (APIENTRY* pfnPageSetupDlg)(LPPAGESETUPDLG);
  28. #endif // _WIN32_WCE_NO_PRINTING
  29. };
  30.  
  31. extern AFX_DATADEF AFX_COMMDLG_CALL _afxCommDlg;
  32. #if !defined(_WIN32_WCE_NO_COLORDLG)
  33. #define ChooseColor         _afxCommDlg.pfnChooseColor
  34. #endif // _WIN32_WCE_NO_COLORDLG
  35. #if !defined(_WIN32_WCE_NO_PRINTING)
  36. #define CommDlgExtendedError _afxCommDlg.pfnCommDlgExtendedError
  37. #define PrintDlg             _afxCommDlg.pfnPrintDlg
  38. WCE_DEL #define PageSetupDlg _afxCommDlg.pfnPageSetupDlg
  39. #endif // _WIN32_WCE_NO_PRINTING
  40.  
  41. #endif // _WIN32_WCE_NO_COMMDLG_THUNKS
  42.  
  43.  
  44.  
  45. #if !defined(_WIN32_WCE_NO_WINSOCK_THUNKS)
  46.  
  47. #include <winsock.h>
  48. struct AFX_WINSOCK_CALL
  49. {
  50.     SOCKET (WINSOCKAPI* pfnaccept)(SOCKET s, struct sockaddr FAR *addr, int FAR *addrlen);
  51.     u_short (WINSOCKAPI * pfnhtons)(u_short hostshort);
  52.     unsigned long (WINSOCKAPI * pfninet_addr)(const char FAR * cp);
  53.     int (WINSOCKAPI * pfnclosesocket)(SOCKET s);
  54.     int (WINSOCKAPI * pfngetsockname)(SOCKET s, struct sockaddr FAR *name, int FAR * namelen);
  55.     int (WINSOCKAPI * pfngetpeername)(SOCKET s, struct sockaddr FAR *name, int FAR * namelen);
  56.     u_short (WINSOCKAPI * pfnntohs)(u_short netshort);
  57.     char* (WINSOCKAPI * pfninet_ntoa)(struct in_addr in);
  58.     int (WINSOCKAPI * pfnWSAGetLastError)(void);
  59.     void (WINSOCKAPI * pfnWSASetLastError)(int iError);
  60.     u_long (WINSOCKAPI * pfnhtonl)(u_long hostlong);
  61.     SOCKET (WINSOCKAPI * pfnsocket)(int af, int type, int protocol);
  62.     struct hostent* (WINSOCKAPI * pfngethostbyname)(const char FAR * name);
  63.     int (WINSOCKAPI * pfnrecv)(SOCKET s, char FAR * buf, int len, int flags);
  64.     int (WINSOCKAPI * pfnsend)(SOCKET s, const char FAR * buf, int len, int flags);
  65.     int (WINSOCKAPI * pfnWSAAsyncSelect)(SOCKET s, HWND hWnd, u_int wMsg, long lEvent);
  66.     int (WINSOCKAPI * pfnrecvfrom)(SOCKET s, char FAR * buf, int len, int flags, struct sockaddr FAR *from, int FAR * fromlen);
  67.     int (WINSOCKAPI * pfnsendto)(SOCKET s, const char FAR * buf, int len, int flags, const struct sockaddr FAR *to, int tolen);
  68.     int (WINSOCKAPI * pfnconnect)(SOCKET s, const struct sockaddr FAR *name, int namelen);
  69.     int (WINSOCKAPI * pfnbind)(SOCKET s, const struct sockaddr FAR *addr, int namelen);
  70.     int (WINSOCKAPI * pfnsetsockopt)(SOCKET s, int level, int optname, const char FAR * optval, int optlen);
  71.     int (WINSOCKAPI * pfngetsockopt)(SOCKET s, int level, int optname, char FAR * optval, int FAR *optlen);
  72.     int (WINSOCKAPI * pfnioctlsocket)(SOCKET s, long cmd, u_long FAR *argp);
  73.     int (WINSOCKAPI * pfnlisten)(SOCKET s, int backlog);
  74.     int (WINSOCKAPI * pfnshutdown)(SOCKET s, int how);
  75. WCE_INS int (WINSOCKAPI * pfnselect)(int nfds, fd_set *readfds, fd_set *writefds,fd_set *exceptfds, const struct timeval *timeout);
  76. WCE_INS int (WINSOCKAPI * pfn__WSAFDIsSet)(SOCKET s, fd_set * set);
  77. };
  78.  
  79. extern AFX_DATADEF AFX_WINSOCK_CALL _afxWinSock;
  80. #define accept              _afxWinSock.pfnaccept
  81. #define htons               _afxWinSock.pfnhtons
  82. #define inet_addr           _afxWinSock.pfninet_addr
  83. #define closesocket         _afxWinSock.pfnclosesocket
  84. #define getsockname         _afxWinSock.pfngetsockname
  85. #define getpeername         _afxWinSock.pfngetpeername
  86. #define ntohs               _afxWinSock.pfnntohs
  87. #define inet_ntoa           _afxWinSock.pfninet_ntoa
  88. #define htonl               _afxWinSock.pfnhtonl
  89. #define socket              _afxWinSock.pfnsocket
  90. #define gethostbyname       _afxWinSock.pfngethostbyname
  91. #define recv                _afxWinSock.pfnrecv
  92. #define send                _afxWinSock.pfnsend
  93. #define recvfrom            _afxWinSock.pfnrecvfrom
  94. #define sendto              _afxWinSock.pfnsendto
  95. #define connect             _afxWinSock.pfnconnect
  96. #define bind                _afxWinSock.pfnbind
  97. #define setsockopt          _afxWinSock.pfnsetsockopt
  98. #define getsockopt          _afxWinSock.pfngetsockopt
  99. #define ioctlsocket         _afxWinSock.pfnioctlsocket
  100. #define listen              _afxWinSock.pfnlisten
  101. #define shutdown            _afxWinSock.pfnshutdown
  102. #define select                _afxWinSock.pfnselect
  103. #define    __WSAFDIsSet        _afxWinSock.pfn__WSAFDIsSet
  104. #endif // _WIN32_WCE_NO_WINSOCK_THUNKS
  105.  
  106.  
  107. #if !defined(_WIN32_WCE_NO_WININET_THUNKS)
  108.  
  109. struct AFX_WININET_CALL
  110. {
  111.     HINTERNET (WINAPI* pfnInternetOpen)(
  112.         LPCTSTR lpszAgent, DWORD dwAccessType,
  113.         LPCTSTR lpszProxy, LPCTSTR lpszProxyBypass, DWORD dwFlags);
  114.     HINTERNET (WINAPI* pfnInternetCloseHandle)(HINTERNET hInternet);
  115.     HINTERNET (WINAPI* pfnInternetOpenUrl)(HINTERNET hInternet,
  116.         LPCTSTR pstrUrl, LPCTSTR pstrHeaders, DWORD dwHeadersLength,
  117.         DWORD dwFlags, DWORD dwContext);
  118.     HINTERNET (WINAPI* pfnInternetReadFile)(HINTERNET hInternet,
  119.         LPVOID lpBuffer, DWORD dwNumberOfBytesToRead,
  120.         LPDWORD lpdwNumberOfBytesRead);
  121.     HINTERNET (WINAPI* pfnInternetWriteFile)(HINTERNET hInternet,
  122.         LPCVOID lpBuffer, DWORD dwNumberOfBytesToWrite,
  123.         LPDWORD lpdwNumberOfBytesWritten);
  124.     INTERNET_STATUS_CALLBACK (WINAPI* pfnInternetSetStatusCallback)(
  125.         HINTERNET hInternet, INTERNET_STATUS_CALLBACK lpfnInternetCallback);
  126.     BOOL (WINAPI* pfnInternetQueryOption)(HINTERNET hInternet,
  127.         DWORD dwOption, LPVOID lpBuffer, LPDWORD lpdwBufferLength);
  128.     BOOL (WINAPI* pfnInternetSetOption)(HINTERNET hInternet,
  129.         DWORD dwOption, LPVOID lpBuffer, DWORD dwBufferLength);
  130.     BOOL (WINAPI* pfnInternetSetOptionEx)(HINTERNET hInternet,
  131.         DWORD dwOption, LPVOID lpBuffer, DWORD dwBufferLength, DWORD dwFlags);
  132.     BOOL (WINAPI* pfnInternetGetLastResponseInfo)(LPDWORD lpdwError,
  133.         LPTSTR pstrBuffer, LPDWORD lpdwBufferLength);
  134.     BOOL (WINAPI* pfnInternetFindNextFile)(HINTERNET hFind,
  135.         LPVOID lpvFindData);
  136.     HINTERNET (WINAPI* pfnInternetConnect)(HINTERNET hInternet,
  137.         LPCTSTR pstrServerName, INTERNET_PORT nServerPort,
  138.         LPCTSTR pstrUsername, LPCTSTR pstrPassword, DWORD dwService,
  139.         DWORD dwFlags, DWORD dwContext);
  140.     DWORD (WINAPI* pfnInternetSetFilePointer)(HINTERNET hFile,
  141.         LONG lDistanceToMove, PVOID reserved, DWORD dwMoveMethod,
  142.         DWORD dwContext);
  143.     BOOL (WINAPI* pfnInternetQueryDataAvailable)(HINTERNET hFile,
  144.         LPDWORD lpdwNumberOfBytesAvailable, DWORD dwFlags, DWORD dwContext);
  145.  
  146. #if !defined(_WIN32_WCE_NO_FTP)
  147.     HINTERNET (WINAPI* pfnFtpFindFirstFile)(HINTERNET hFtpSession,
  148.         LPCTSTR pstrSearchFile, LPWIN32_FIND_DATA lpFindFileData,
  149.         DWORD dwFlags, DWORD dwContext);
  150.     BOOL (WINAPI* pfnFtpGetFile)(HINTERNET hFtpSession,
  151.         LPCTSTR pstrRemoteFile, LPCTSTR pstrNewFile, BOOL fFailIfExists,
  152.         DWORD dwFlagsAndAttributes, DWORD dwFlags, DWORD dwContext);
  153.     BOOL (WINAPI* pfnFtpPutFile)(HINTERNET hFtpSession,
  154.         LPCTSTR pstrLocalFile, LPCTSTR pstrNewRemoteFile, DWORD dwFlags,
  155.         DWORD dwContext);
  156.     BOOL (WINAPI* pfnFtpDeleteFile)(HINTERNET hFtpSession,
  157.         LPCTSTR pstrFileName);
  158.     BOOL (WINAPI* pfnFtpRenameFile)(HINTERNET hFtpSession,
  159.         LPCTSTR pstrExisting, LPCTSTR pstrNew);
  160.     BOOL (WINAPI* pfnFtpCreateDirectory)(HINTERNET hFtpSession,
  161.         LPCTSTR pstrDirectory);
  162.     BOOL (WINAPI* pfnFtpRemoveDirectory)(HINTERNET hFtpSession,
  163.         LPCTSTR pstrDirectory);
  164.     BOOL (WINAPI* pfnFtpSetCurrentDirectory)(HINTERNET hFtpSession,
  165.         LPCTSTR pstrDirectory);
  166.     BOOL (WINAPI* pfnFtpGetCurrentDirectory)(HINTERNET hFtpSession,
  167.         LPCTSTR pstrCurrentDirectory, LPDWORD lpdwCurrentDirectory);
  168.     BOOL (WINAPI* pfnFtpCommand)(HINTERNET hFtpSession,
  169.         BOOL fExpectResponse, DWORD dwFlags, LPCTSTR pstrCommand,
  170.         DWORD dwContext);
  171.     HINTERNET (WINAPI* pfnFtpOpenFile)(HINTERNET hFtpSession,
  172.         LPCTSTR pstrFileName, DWORD dwAccess, DWORD dwFlags, DWORD dwContext);
  173. #endif
  174.  
  175.     HINTERNET (WINAPI* pfnHttpOpenRequest)(HINTERNET hHttpSession,
  176.         LPCTSTR pstrVerb, LPCTSTR pstrObjectName, LPCTSTR pstrVersion,
  177.         LPCTSTR pstrReferrer, LPCTSTR FAR * lppstrAcceptTypes,
  178.         DWORD dwFlags, DWORD dwContext);
  179.     BOOL (WINAPI* pfnHttpAddRequestHeaders)(HINTERNET hHttpRequest,
  180.         LPCTSTR pstrHeaders, DWORD dwHeadersLength, DWORD dwModifiers);
  181.     BOOL (WINAPI* pfnHttpSendRequest)(HINTERNET hHttpRequest,
  182.         LPCTSTR pstrHeaders, DWORD dwHeadersLength, LPVOID lpOptional,
  183.         DWORD dwOptionalLength);
  184.     BOOL (WINAPI* pfnHttpQueryInfo)(HINTERNET hHttpRequest,
  185.         DWORD dwInfoLevel, LPVOID lpvBuffer, LPDWORD lpdwBufferLength,
  186.         LPDWORD dwIndex);
  187.     DWORD (WINAPI*pfnInternetErrorDlg)(HWND hWnd, HINTERNET hRequest,
  188.          DWORD dwError, DWORD dwFlags, LPVOID * lppvData);
  189.     BOOL (WINAPI*pfnInternetCrackUrl)(LPCTSTR lpszUrl, DWORD dwUrlLength,
  190.         DWORD dwFlags, LPURL_COMPONENTS lpUrlComponents);
  191.     BOOL (WINAPI*pfnInternetCanonicalizeUrl)(LPCTSTR lpszUrl, LPTSTR lpszBuffer, 
  192.         LPDWORD lpdwBufferLength, DWORD dwFlags);
  193. };
  194.  
  195. extern AFX_DATADEF AFX_WININET_CALL _afxWinInet;
  196. #undef  InternetOpen
  197. #define InternetOpen                _afxWinInet.pfnInternetOpen
  198. #define InternetCloseHandle         _afxWinInet.pfnInternetCloseHandle
  199. #undef  InternetOpenUrl
  200. #define InternetOpenUrl             _afxWinInet.pfnInternetOpenUrl
  201. #define InternetReadFile            _afxWinInet.pfnInternetReadFile
  202. #define InternetWriteFile           _afxWinInet.pfnInternetWriteFile
  203. #define InternetSetStatusCallback   _afxWinInet.pfnInternetSetStatusCallback
  204. #undef  InternetSetOption
  205. #define InternetSetOption           _afxWinInet.pfnInternetSetOption
  206. #undef  InternetSetOptionEx
  207. #define InternetSetOptionEx         _afxWinInet.pfnInternetSetOptionEx
  208. #undef  InternetQueryOption
  209. #define InternetQueryOption         _afxWinInet.pfnInternetQueryOption
  210. #undef  InternetGetLastResponseInfo
  211. #define InternetGetLastResponseInfo _afxWinInet.pfnInternetGetLastResponseInfo
  212. #undef  InternetFindNextFile
  213. #define InternetFindNextFile        _afxWinInet.pfnInternetFindNextFile
  214. #undef  InternetConnect
  215. #define InternetConnect             _afxWinInet.pfnInternetConnect
  216. #define InternetSetFilePointer      _afxWinInet.pfnInternetSetFilePointer
  217. #define InternetQueryDataAvailable  _afxWinInet.pfnInternetQueryDataAvailable
  218. #if !defined(_WIN32_WCE_NO_FTP)
  219. #define FtpFindFirstFile            _afxWinInet.pfnFtpFindFirstFile
  220. #define FtpGetFile                  _afxWinInet.pfnFtpGetFile
  221. #define FtpPutFile                  _afxWinInet.pfnFtpPutFile
  222. #define FtpDeleteFile               _afxWinInet.pfnFtpDeleteFile
  223. #define FtpRenameFile               _afxWinInet.pfnFtpRenameFile
  224. #define FtpCreateDirectory          _afxWinInet.pfnFtpCreateDirectory
  225. #define FtpRemoveDirectory          _afxWinInet.pfnFtpRemoveDirectory
  226. #define FtpGetCurrentDirectory      _afxWinInet.pfnFtpGetCurrentDirectory
  227. #define FtpSetCurrentDirectory      _afxWinInet.pfnFtpSetCurrentDirectory
  228. #define FtpCommand                  _afxWinInet.pfnFtpCommand
  229. #define FtpOpenFile                 _afxWinInet.pfnFtpOpenFile
  230. #endif // _WIN32_WCE_NO_FTP
  231. #undef  HttpOpenRequest
  232. #define HttpOpenRequest             _afxWinInet.pfnHttpOpenRequest
  233. #undef  HttpAddRequestHeaders
  234. #define HttpAddRequestHeaders       _afxWinInet.pfnHttpAddRequestHeaders
  235. #undef  HttpSendRequest
  236. #define HttpSendRequest             _afxWinInet.pfnHttpSendRequest
  237. #undef  HttpQueryInfo
  238. #define HttpQueryInfo               _afxWinInet.pfnHttpQueryInfo
  239. #define InternetErrorDlg            _afxWinInet.pfnInternetErrorDlg
  240. #undef  InternetCrackUrl
  241. #define InternetCrackUrl            _afxWinInet.pfnInternetCrackUrl
  242. #undef  InternetCanonicalizeUrl
  243. #define InternetCanonicalizeUrl     _afxWinInet.pfnInternetCanonicalizeUrl
  244. #endif // _WIN32_WCE_NO_WININET_THUNKS
  245.  
  246. #pragma warning(default: 4005)
  247. #endif // _WIN32_WCE_NO_DELAYLOAD
  248. #endif // __WCETHUNK_H__