mirror of
https://github.com/reactos/wine.git
synced 2024-11-26 05:00:30 +00:00
1285c2f9e9
Mon May 6 12:56:26 1996 Alexandre Julliard <julliard@lrc.epfl.ch> * [DEVELOPERS-HINTS] Added paragraph on naming conventions for Win16/Win32/Winelib. * [controls/menu.c] Create a default system menu that is the same for all windows instead of making a copy every time. * [include/wintypes.h] Added WINELIB_NAME and DECL_WINELIB_TYPE macros. Added xx16 and xx32 definitions for most types. General clean-up. * [memory/global.c] [memory/local.c] [*/*] Renamed Global and Local heap functions to xxx16. Added all xxx32 versions of the same functions. * [memory/selector.c] Mask out lower bits of selector in FreeSelector(). * [misc/lstr.c] Fixed wvsprintf(). * [windows/class.c] Changed the class structure to make Win32 support easier. * [windows/defwnd.c] Added handling of WM_INITMENUPOPUP for system menu to gray out invalid options. * [windows/winpos.c] Bug fix: the WINDOSPOS structure pointer in WM_NCCALCSIZE must be a SEGPTR. Sun May 5 03:51:26 1996 Huw D. M. Davies <h.davies1@physics.oxford.ac.uk> * [memory/local.c] Implementation of moveable and (rudimentary) support for discardable local memory, plus several bug fixes. Sat May 4 18:33:35 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [include/windows.h] [windows/win.c] [if1632/user.spec] FindWindowEx() implemented (someone reported it was missing for FrameMaker 4.1). * [if1632/kernel32.spec] [if1632/user32.spec] [win32/memory.c] [win32/resource.c] Misc small stubs/small functions which bring win95 binaries further down the road. (IsBadCodePtr, LocalReAlloc,GetCursorPos) Small fix in WIN32_LoadAcceleratorsA. Fri May 3 19:43:12 1996 Frans van Dorsselaer <dorssel@rulhm1.LeidenUniv.nl> * [controls/edit.c] [controls/EDIT.TODO] Changed / fixed some types and typecasts. Fixed the scrollbar reset after WM_SETHANDLE / WM_SETTEXT. Added heap initialization in WM_CREATE. Fri May 3 19:30:02 1996 Greg Kreider <kreider@natlab.research.philips.com> * [controls/combo.c] [controls/listbox.c] Pass WM_[HV]SCROLL to listbox, but not combo. Don't try to redraw non-existant scroll bars (changes dwStyle flags). Combo box gets border. Combo box includes button (otherwise button won't trigger dropdown). Proper border around RectButton. Check size consistancy of combo, listbox, and button after resizing or before painting. These routines still aren't completely correct. Localize size checks in separate routines. Listboxes are white. Thu May 2 19:21:23 1996 Albrecht Kleine <kleine@ak.sax.de> * [controls/combo.c][include/commdlg.h][include/commdlg.c] [resources/sysres_De.rc][resources/sysres_En.rc] Introduced ChooseFont dialog, but needed some patches in handling of comboboxes with edit controls. Tue Apr 30 00:33:27 1996 Ulrich Schmid <uschmid@mail.hh.provi.de> * [programs/winhelp/*] Added a help viewer and a simple `.hlp' to `.sgml' converter. Mon Apr 29 14:17:57 1996 Tristan Tarrant <tst@sthinc.demon.co.uk> * [resources/sysres_*.rc] [misc/shell.c] Modified size of "About" dialog boxes. Sat Apr 27 18:10:11 Martin von Loewis <loewis@informatik.hu-berlin.de> * [if1632/Makefile.in][loader/builtin.c] crtdll.spec, ntdll.spec, wsock32.spec: new files. * [loader/pe_image.c] Fix error message if import by ordinal failed.
271 lines
8.9 KiB
C
271 lines
8.9 KiB
C
/* WINSOCK.H--definitions to be used with the WINSOCK.DLL
|
|
*
|
|
* This header file corresponds to version 1.1 of the Windows Sockets
|
|
* specification.
|
|
*/
|
|
|
|
#ifndef _WINSOCKAPI_
|
|
#define _WINSOCKAPI_
|
|
|
|
#include <netinet/in.h>
|
|
#include <arpa/inet.h>
|
|
#include <sys/types.h>
|
|
#include <sys/time.h>
|
|
#include <fcntl.h>
|
|
#include <netdb.h>
|
|
#include <sys/socket.h>
|
|
#include "windows.h"
|
|
|
|
/*
|
|
* The new type to be used in all
|
|
* instances which refer to sockets.
|
|
*/
|
|
typedef u_int SOCKET;
|
|
|
|
extern int __WSAFDIsSet(SOCKET, fd_set *);
|
|
|
|
/*
|
|
* Internet address (old style... should be updated)
|
|
*/
|
|
#ifdef WS_USE_OLD_STYLE
|
|
#define s_addr S_un.S_addr /* can be used for most tcp & ip code */
|
|
#define s_host S_un.S_un_b.s_b2 /* host on imp */
|
|
#define s_net S_un.S_un_b.s_b1 /* network */
|
|
#define s_imp S_un.S_un_w.s_w2 /* imp */
|
|
#define s_impno S_un.S_un_b.s_b4 /* imp # */
|
|
#define s_lh S_un.S_un_b.s_b3 /* logical host */
|
|
#endif
|
|
|
|
#define WSADESCRIPTION_LEN 256
|
|
#define WSASYS_STATUS_LEN 128
|
|
|
|
typedef struct WSAData {
|
|
WORD wVersion;
|
|
WORD wHighVersion;
|
|
char szDescription[WSADESCRIPTION_LEN+1];
|
|
char szSystemStatus[WSASYS_STATUS_LEN+1];
|
|
unsigned short iMaxSockets;
|
|
unsigned short iMaxUdpDg;
|
|
char *lpVendorInfo;
|
|
} WSADATA, *LPWSADATA;
|
|
|
|
/*
|
|
* This is used instead of -1, since the
|
|
* SOCKET type is unsigned.
|
|
*/
|
|
#define INVALID_SOCKET (SOCKET)(~0)
|
|
#define SOCKET_ERROR (-1)
|
|
|
|
/*
|
|
* Option flags per-socket.
|
|
*/
|
|
#ifndef SO_DONTLINGER
|
|
#define SO_DONTLINGER (u_int)(~SO_LINGER)
|
|
#endif
|
|
|
|
/*
|
|
* Maximum queue length specifiable by listen.
|
|
*/
|
|
#ifdef SOMAXCONN
|
|
#undef SOMAXCONN
|
|
#endif
|
|
#define SOMAXCONN 5
|
|
|
|
#ifndef MSG_DONTROUTE
|
|
#define MSG_DONTROUTE 0x4 /* send without using routing tables */
|
|
#endif
|
|
#define MSG_MAXIOVLEN 16
|
|
|
|
/*
|
|
* Define constant based on rfc883, used by gethostbyxxxx() calls.
|
|
*/
|
|
#define MAXGETHOSTSTRUCT 1024
|
|
|
|
/*
|
|
* Define flags to be used with the WSAAsyncSelect() call.
|
|
*/
|
|
#define FD_READ 0x01
|
|
#define FD_WRITE 0x02
|
|
#define FD_OOB 0x04
|
|
#define FD_ACCEPT 0x08
|
|
#define FD_CONNECT 0x10
|
|
#define FD_CLOSE 0x20
|
|
|
|
/*
|
|
* All Windows Sockets error constants are biased by WSABASEERR from
|
|
* the "normal"
|
|
*/
|
|
#define WSABASEERR 10000
|
|
/*
|
|
* Windows Sockets definitions of regular Microsoft C error constants
|
|
*/
|
|
#define WSAEINTR (WSABASEERR+4)
|
|
#define WSAEBADF (WSABASEERR+9)
|
|
#define WSAEACCES (WSABASEERR+13)
|
|
#define WSAEFAULT (WSABASEERR+14)
|
|
#define WSAEINVAL (WSABASEERR+22)
|
|
#define WSAEMFILE (WSABASEERR+24)
|
|
|
|
/*
|
|
* Windows Sockets definitions of regular Berkeley error constants
|
|
*/
|
|
#define WSAEWOULDBLOCK (WSABASEERR+35)
|
|
#define WSAEINPROGRESS (WSABASEERR+36)
|
|
#define WSAEALREADY (WSABASEERR+37)
|
|
#define WSAENOTSOCK (WSABASEERR+38)
|
|
#define WSAEDESTADDRREQ (WSABASEERR+39)
|
|
#define WSAEMSGSIZE (WSABASEERR+40)
|
|
#define WSAEPROTOTYPE (WSABASEERR+41)
|
|
#define WSAENOPROTOOPT (WSABASEERR+42)
|
|
#define WSAEPROTONOSUPPORT (WSABASEERR+43)
|
|
#define WSAESOCKTNOSUPPORT (WSABASEERR+44)
|
|
#define WSAEOPNOTSUPP (WSABASEERR+45)
|
|
#define WSAEPFNOSUPPORT (WSABASEERR+46)
|
|
#define WSAEAFNOSUPPORT (WSABASEERR+47)
|
|
#define WSAEADDRINUSE (WSABASEERR+48)
|
|
#define WSAEADDRNOTAVAIL (WSABASEERR+49)
|
|
#define WSAENETDOWN (WSABASEERR+50)
|
|
#define WSAENETUNREACH (WSABASEERR+51)
|
|
#define WSAENETRESET (WSABASEERR+52)
|
|
#define WSAECONNABORTED (WSABASEERR+53)
|
|
#define WSAECONNRESET (WSABASEERR+54)
|
|
#define WSAENOBUFS (WSABASEERR+55)
|
|
#define WSAEISCONN (WSABASEERR+56)
|
|
#define WSAENOTCONN (WSABASEERR+57)
|
|
#define WSAESHUTDOWN (WSABASEERR+58)
|
|
#define WSAETOOMANYREFS (WSABASEERR+59)
|
|
#define WSAETIMEDOUT (WSABASEERR+60)
|
|
#define WSAECONNREFUSED (WSABASEERR+61)
|
|
#define WSAELOOP (WSABASEERR+62)
|
|
#define WSAENAMETOOLONG (WSABASEERR+63)
|
|
#define WSAEHOSTDOWN (WSABASEERR+64)
|
|
#define WSAEHOSTUNREACH (WSABASEERR+65)
|
|
#define WSAENOTEMPTY (WSABASEERR+66)
|
|
#define WSAEPROCLIM (WSABASEERR+67)
|
|
#define WSAEUSERS (WSABASEERR+68)
|
|
#define WSAEDQUOT (WSABASEERR+69)
|
|
#define WSAESTALE (WSABASEERR+70)
|
|
#define WSAEREMOTE (WSABASEERR+71)
|
|
|
|
/*
|
|
* Extended Windows Sockets error constant definitions
|
|
*/
|
|
#define WSASYSNOTREADY (WSABASEERR+91)
|
|
#define WSAVERNOTSUPPORTED (WSABASEERR+92)
|
|
#define WSANOTINITIALISED (WSABASEERR+93)
|
|
|
|
/*
|
|
* Error return codes from gethostbyname() and gethostbyaddr()
|
|
* (when using the resolver). Note that these errors are
|
|
* retrieved via WSAGetLastError() and must therefore follow
|
|
* the rules for avoiding clashes with error numbers from
|
|
* specific implementations or language run-time systems.
|
|
* For this reason the codes are based at WSABASEERR+1001.
|
|
* Note also that [WSA]NO_ADDRESS is defined only for
|
|
* compatibility purposes.
|
|
*/
|
|
|
|
/* #define h_errno WSAGetLastError() */
|
|
|
|
/* Authoritative Answer: Host not found */
|
|
#define WSAHOST_NOT_FOUND (WSABASEERR+1001)
|
|
|
|
/* Non-Authoritative: Host not found, or SERVERFAIL */
|
|
#define WSATRY_AGAIN (WSABASEERR+1002)
|
|
|
|
/* Non recoverable errors, FORMERR, REFUSED, NOTIMP */
|
|
#define WSANO_RECOVERY (WSABASEERR+1003)
|
|
|
|
/* Valid name, no data record of requested type */
|
|
#define WSANO_DATA (WSABASEERR+1004)
|
|
|
|
/* no address, look for MX record */
|
|
#define WSANO_ADDRESS WSANO_DATA
|
|
|
|
/* Socket function prototypes */
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/* Microsoft Windows Extension function prototypes */
|
|
|
|
INT WSAStartup(WORD wVersionRequired, LPWSADATA lpWSAData);
|
|
INT WSACleanup(void);
|
|
void WSASetLastError(INT iError);
|
|
INT WSAGetLastError(void);
|
|
BOOL WSAIsBlocking(void);
|
|
INT WSAUnhookBlockingHook(void);
|
|
FARPROC WSASetBlockingHook(FARPROC lpBlockFunc);
|
|
INT WSACancelBlockingCall(void);
|
|
HANDLE WSAAsyncGetServByName(HWND hWnd, u_int wMsg,
|
|
LPCSTR name, LPCSTR proto,
|
|
LPSTR buf, INT buflen);
|
|
HANDLE WSAAsyncGetServByPort(HWND hWnd, u_int wMsg, INT port,
|
|
LPCSTR proto, LPSTR buf, INT buflen);
|
|
HANDLE WSAAsyncGetProtoByName(HWND hWnd, u_int wMsg,
|
|
LPCSTR name, LPSTR buf, INT buflen);
|
|
HANDLE WSAAsyncGetProtoByNumber(HWND hWnd, u_int wMsg,
|
|
INT number, LPSTR buf, INT buflen);
|
|
HANDLE WSAAsyncGetHostByName(HWND hWnd, u_int wMsg,
|
|
LPCSTR name, LPSTR buf, INT buflen);
|
|
HANDLE WSAAsyncGetHostByAddr(HWND hWnd, u_int wMsg, LPCSTR addr, INT len,
|
|
INT type, LPSTR buf, INT buflen);
|
|
INT WSACancelAsyncRequest(HANDLE hAsyncTaskHandle);
|
|
INT WSAAsyncSelect(SOCKET s, HWND hWnd, u_int wMsg, long lEvent);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
/* Microsoft Windows Extended data types */
|
|
typedef struct sockaddr SOCKADDR, *PSOCKADDR, *LPSOCKADDR;
|
|
typedef struct sockaddr_in SOCKADDR_IN, *PSOCKADDR_IN, *LPSOCKADDR_IN;
|
|
typedef struct linger LINGER, *PLINGER, *LPLINGER;
|
|
typedef struct in_addr IN_ADDR, *PIN_ADDR, *LPIN_ADDR;
|
|
typedef struct fd_set FD_SET, *PFD_SET, *LPFD_SET;
|
|
typedef struct hostent HOSTENT, *PHOSTENT, *LPHOSTENT;
|
|
typedef struct servent SERVENT, *PSERVENT, *LPSERVENT;
|
|
typedef struct protoent PROTOENT, *PPROTOENT, *LPPROTOENT;
|
|
typedef struct timeval TIMEVAL, *PTIMEVAL, *LPTIMEVAL;
|
|
|
|
/*
|
|
* Windows message parameter composition and decomposition
|
|
* macros.
|
|
*
|
|
* WSAMAKEASYNCREPLY is intended for use by the Windows Sockets implementation
|
|
* when constructing the response to a WSAAsyncGetXByY() routine.
|
|
*/
|
|
#define WSAMAKEASYNCREPLY(buflen,error) MAKELONG(buflen,error)
|
|
/*
|
|
* WSAMAKESELECTREPLY is intended for use by the Windows Sockets implementation
|
|
* when constructing the response to WSAAsyncSelect().
|
|
*/
|
|
#define WSAMAKESELECTREPLY(event,error) MAKELONG(event,error)
|
|
/*
|
|
* WSAGETASYNCBUFLEN is intended for use by the Windows Sockets application
|
|
* to extract the buffer length from the lParam in the response
|
|
* to a WSAGetXByY().
|
|
*/
|
|
#define WSAGETASYNCBUFLEN(lParam) LOWORD(lParam)
|
|
/*
|
|
* WSAGETASYNCERROR is intended for use by the Windows Sockets application
|
|
* to extract the error code from the lParam in the response
|
|
* to a WSAGetXByY().
|
|
*/
|
|
#define WSAGETASYNCERROR(lParam) HIWORD(lParam)
|
|
/*
|
|
* WSAGETSELECTEVENT is intended for use by the Windows Sockets application
|
|
* to extract the event code from the lParam in the response
|
|
* to a WSAAsyncSelect().
|
|
*/
|
|
#define WSAGETSELECTEVENT(lParam) LOWORD(lParam)
|
|
/*
|
|
* WSAGETSELECTERROR is intended for use by the Windows Sockets application
|
|
* to extract the error code from the lParam in the response
|
|
* to a WSAAsyncSelect().
|
|
*/
|
|
#define WSAGETSELECTERROR(lParam) HIWORD(lParam)
|
|
|
|
#endif /* _WINSOCKAPI_ */
|