Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
/*
|
|
|
|
* based on Windows Sockets 1.1 specs
|
2002-06-01 01:06:46 +02:00
|
|
|
*
|
2002-03-10 00:29:33 +01:00
|
|
|
* Copyright (C) 1993,1994,1996,1997 John Brezak, Erik Bos, Alex Korobka.
|
2013-09-04 03:51:58 +02:00
|
|
|
* Copyright (C) 2001 Stefan Leichter
|
|
|
|
* Copyright (C) 2004 Hans Leidekker
|
2005-11-16 12:21:57 +01:00
|
|
|
* Copyright (C) 2005 Marcus Meissner
|
2008-04-24 13:45:10 +02:00
|
|
|
* Copyright (C) 2006-2008 Kai Blin
|
2002-03-10 00:29:33 +01:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
1997-06-16 19:43:53 +02:00
|
|
|
*
|
2002-06-01 01:06:46 +02:00
|
|
|
* NOTE: If you make any changes to fix a particular app, make sure
|
|
|
|
* they don't break something else like Netscape or telnet and ftp
|
Release 980201
Sun Feb 1 13:24:54 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [files/drive.c]
Added Device= parameter to drive configuration.
* [if1632/relay.c]
Throw() and Catch() now use the correct CATCHBUF layout (untested).
* [tools/build.c] [include/stackframe.h] [loader/task.c]
Moved 16-bit stack pointer into thread database.
Save current %fs while running 16-bit code.
Fri Jan 30 09:25:49 1998 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [graphics/mapping.c]
Made DPtoLP32 and LPtoDP32 respect world transforms.
* [graphics/path.c] [graphics/painting.c] [if1632/gdi.spec]
[include/path.h]
More path support.
* [include/gdi.h] [include/windows.h] [objects/dc.c]
[relay/gdi32.spec]
Support for Get/SetArcDirection and Get/SetWorldTransform
* [windows/hook.c]
Fixed a bug in HOOK_Map16To32Common.
Thu Jan 29 23:43:18 1998 Douglas Ridgway <ridgway@taiga.gmcl.com>
* [graphics/metafiledrv/init.c] [objects/metafile.c]
Documentation for metafile related API calls. Fixed a bug to avoid
documenting it.
* [include/windows.h]
Declaration for LoadImage.
Thu Jan 29 21:44:45 1998 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/win16drv/*]
Changes to printing code to enable use of printer fonts with the
win3.1 postscript driver. Remember to add printer=on to [wine]
section of wine.conf . You will also need to disable truetype
fonts from control panel. Winword 6.0 and Write seem to be happy
with this...
* [include/bitmap.h]
Fix Widthbytes for 15bpp displays.
Tue Jan 27 20:54:08 1998 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [tsx11/*] [include/ts*] [tools/make_X11wrappers]
Implemented thread-safe X11 wrappers.
Tue Jan 27 13:54:09 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu>
* [windows/queue.c]
Forgot to convert thdb to thread_id.
* [misc/registry.c]
Sped up Windows 95 registry reading. Changed code to traverse
registry as a tree rather than read in all possible keys
(including dead ones).
Tue Jan 27 12:46:09 1998 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [loader/pe_image.c][Makefile.in][scheduler/thread.c]
[libtest/hello5.c]
Don't exit() on failed to load referenced dlls.
Fixed static tls allocation for multiple threads.
WINELIB should now be able to load PE dlls. A sample
winelib program, that dynamically loads a internal dll
is included.
* [graphics/ddraw.c][include/ddraw.h][include/d3d.h]
Cleaned up and enhanced further. Added several DirectX5
interface definitions and DirectSurface3 implementation.
Stubs for D3D (NOT coming soon, just there so it fails safely).
* [multimedia/dsound.c][include/dsound.h]
Actually works now for a lot of cases. Some DirectX5 stuff
added. Still lacking several features.
* [windows/dinput.c][include/dinput.h]
Started implementing DirectInput. Doesn't work yet, don't
know why.
* [if1632/thunk.c][misc/callbacks.c]
[win32/kernel.c][include/callbacks.h]
Added WOWCallback16Ex, WOWHandle32.
* [misc/cpu.c]
Fixed GetSystemInfo, IsProcessorFeaturePresent.
* [multimedia/joystick.c][multimedia/time.c]
Several fixes. Small hack to get timerevents in timeGetTime() loops.
Tue Jan 20 11:26:27 1998 Slaven Rezic <eserte@cs.tu-berlin.de>
* [configure.in]
Fixed check for union semun on FreeBSD systems.
Sun Jan 18 23:05:04 1998 Karl Backstrm <karl_b@geocities.com>
* [misc/ole2nls.c] [programs/progman/Sw.rc] [programs/winhelp/Sw.rc]
[resources/sysres_Sw.rc]
Added/updated Swedish language support.
Sun Jan 18 18:49:01 1998 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [misc/winsock.c] [misc/winsock_dns.c] [windows/event.c]
[windows/win.c] [windows/dce.c] [windows/winpos.c]
Bug fixes.
Sun Jan 18 12:45:23 1997 Andreas Mohr <100.30936@germany.net>
* [msdos/int25.c] [msdos/int26.c]
Implemented "native" absolute disk read/write access.
* [msdos/int13.c] [msdos/ioports.c]
Enhanced GET DRIVE PARAMETERS (int13 AH=08).
* [graphics/win16drv/prtdrv.c] [if1632/gdi.spec]
Fixed typos, implemented dmEnumDFonts,
Started implementation of dmRealizeObject.
* [if1632/compobj.spec] [ole/compobj.c] [relay32/ole32.spec]
Stubs CoCreateInstance, CoFreeUnusedLibraries, implemented
CoFileTimeNow.
* [if1632/kernel.spec] [include/windows.h] [memory/global.c]
[memory/string.c] [misc/kernel.c] [misc/Makefile.in]
[misc/toolhelp.c] [msdos/int21.c]
Implemented GlobalHandleNoRIP, GetFreeMemInfo, DebugFillBuffer,
stubs GetSetKernelDOSProc, DiagQuery, DiagOutput, ToolHelpHook
(Undocumented Windows).
* [if1632/user.spec] [if1632/win32s16.spec] [misc/win32s16.c]
Misc stubs.
* [if1632/winaspi.spec] [misc/aspi.c]
Implemented GetASPIDLLVersion.
* [if1632/wprocs.spec] [msdos/int20.c] [msdos/Makefile.in]
Added handler for Int 0x20 (terminate program, _very_ old-fashioned).
* [misc/w32scomb.c]
Implemented Get16DLLAddress() partially
(big thanks to Marcus and Alexandre).
* [relay32/Makefile.in] [relay32/builtin32.c] [relay32/dplay.spec]
Added built-in DPLAY.DLL.
* [relay32/winmm.spec] [multimedia/joystick.c]
Added joySetThreshold.
* [misc/windebug.c]
Added WinNotify.
* [win32/console.c]
Stubs CreateConsoleScreenBuffer, SetConsoleActiveScreenBuffer,
WriteConsoleOutput32A.
* [windows/user.c]
Stub SetEventHook.
Sat Jan 17 19:30:35 1998 Matthew Toseland <Paul.Toseland@btinternet.com>
* [windows/painting.c]
Fixed broken restore-to-maximized.
Mon Jan 12 21:25:32 1998 Perceval - Marc Huguet Puig <mhp@tinet.fut.es>
* [documentation/wine.man] [include/options.h]
[misc/main.c] [ole/ole2nls.c] [resources/sysres.c]
[resources/sysres_Ca.rc] [resources/Makefile.in]
Added language catalan. (Afegit l'idioma catal).
1998-02-01 19:33:27 +01:00
|
|
|
* clients and servers (www.winsite.com got a lot of those).
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
*/
|
2001-11-14 22:26:23 +01:00
|
|
|
|
2001-11-06 21:57:11 +01:00
|
|
|
#include "config.h"
|
2001-10-14 18:25:47 +02:00
|
|
|
#include "wine/port.h"
|
1998-04-13 14:21:30 +02:00
|
|
|
|
2003-09-06 01:08:26 +02:00
|
|
|
#include <stdarg.h>
|
2000-11-25 02:31:17 +01:00
|
|
|
#include <stdio.h>
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
#include <string.h>
|
|
|
|
#include <sys/types.h>
|
2015-05-01 08:45:11 +02:00
|
|
|
#include <limits.h>
|
1999-10-31 03:07:54 +01:00
|
|
|
#ifdef HAVE_SYS_IPC_H
|
|
|
|
# include <sys/ipc.h>
|
|
|
|
#endif
|
2002-05-22 03:55:18 +02:00
|
|
|
#ifdef HAVE_SYS_IOCTL_H
|
|
|
|
# include <sys/ioctl.h>
|
|
|
|
#endif
|
1998-04-13 14:21:30 +02:00
|
|
|
#ifdef HAVE_SYS_FILIO_H
|
|
|
|
# include <sys/filio.h>
|
|
|
|
#endif
|
1999-10-31 03:07:54 +01:00
|
|
|
#ifdef HAVE_SYS_SOCKIO_H
|
|
|
|
# include <sys/sockio.h>
|
|
|
|
#endif
|
1998-04-13 14:21:30 +02:00
|
|
|
|
Release 970120
Sun Jan 19 11:46:48 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [loader/module.c]
Fixed LoadModule() to always call the DLL initialization code.
* [windows/event.c]
Moved all the keyboard stuff to windows/keyboard.c
* [tools/build.c]
Fixed Win32 register functions.
Sat Jan 18 22:24:41 1997 David Makepeace <D.Makepeace@mailbox.uq.oz.au>
* [tools/makedep.c]
Fixed bug which causes SEGV on Solaris x86.
Fri Jan 17 18:32:27 1997 Frans van Dorsselaer <dorssel@rulhmpc49.LeidenUniv.nl>
* [controls/edit.c]
Implemented WM_UNDO, WM_CONTEXTMENU (temporary using WM_RBUTTONUP),
WM_COMMAND, WM_INITPOPUPMENU, WM_SYSKEYDOWN.
Fixed EM_SETSEL and some minor bugs (features).
Hence: fully functional undo and a win95 menu with the right mouse
button.
* [include/resources.h] [resources/TODO] [resources/sysres_??.rc]
Added a context menu for the edit control.
Translations, please ...
Fri Jan 17 08:29:52 1997 David Faure <david.faure@ifhamy.insa-lyon.fr>
* [windows/event.c]
Move EVENT_ToAscii to windows/keyboard.c (where name ToAscii)
Fixed Keypad keys 0-9 and . in EVENT_event_to_vkey.
Added 3-state handling of toggle keys (CapsLock, NumLock) in order
to make them work with any X server.
Toggle keys now generate WM_KEYDOWN and WM_KEYUP on each pressing.
* [include/keyboard.h]
Totally replaced the file (formerly containing the vkcase definitions)
by the declaration of 'extern' variables contained by event.c and used
by keyboard.c
* [windows/keyboard.c]
Started to rewrite VkKeyScan and MapVirtualKey, to make them use the
table keyc2vkey or X functions only.
ToAscii : added keypad 0-9 and . special case.
Changed toggle keys active mask from 0x80 to 0x1.
* [misc/keyboard.c]
File deleted. Contents moved to windows/keyboard.c.
* [misc/main.c]
Added putenv XKB_DISABLE to disable XKB extension (which, when
present, causes AltGr to change keyboard group instead of being a
modifier).
Tue Jan 14 22:56:43 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [windows/event.c]
Do not assume NumLockMask is Mod2Mask, but compute it by scanning
output of XGetModifierMapping for XK_Num_Lock.
Tue Jan 14 15:49:49 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [loader/pe_*.c] [include/peexe.h] [include/resource32.h]
[debugger/*.c]
General clean up.
Changed defines/structures to match Windows NT SDK.
* [loader/main.c]
Don't crash on empty command-line.
* [windows/winpos.c]
winpos.c made win32 clean.
* [misc/ntdll.c]
Some string conversion additions.
* [files/file.c]
GetFileAttributes/GetTempFileName fixed.
* [misc/ver.c]
VerInstallFile implemented.
Mon Jan 13 15:03:11 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [tools/build.c]: Use PREFIX also in stabs messages.
Mon Jan 13 10:40:33 1997 John Harvey <john@division.co.uk>
* [graphics/win16drv/*] [include/win16drv.h]
Many fixes and some new features.
* [graphics/x11drv/font.c] [graphics/x11drv/init.c]
[include/x11drv.h] [objects/font.c]
GetTextMetrics() moved to graphics driver.
* [if1632/gdi.spec] [misc/fontengine.c] [misc/Makefile.in]
New dummy EngineEnumerateFont, EngineRealizeFont functions.
* [include/windows.h]
TEXTFORM16 and FONTINFO16 structure definitions moved here from
include/win16drv.h
1997-01-20 20:43:45 +01:00
|
|
|
#if defined(__EMX__)
|
1998-04-13 14:21:30 +02:00
|
|
|
# include <sys/so_ioctl.h>
|
Release 970120
Sun Jan 19 11:46:48 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [loader/module.c]
Fixed LoadModule() to always call the DLL initialization code.
* [windows/event.c]
Moved all the keyboard stuff to windows/keyboard.c
* [tools/build.c]
Fixed Win32 register functions.
Sat Jan 18 22:24:41 1997 David Makepeace <D.Makepeace@mailbox.uq.oz.au>
* [tools/makedep.c]
Fixed bug which causes SEGV on Solaris x86.
Fri Jan 17 18:32:27 1997 Frans van Dorsselaer <dorssel@rulhmpc49.LeidenUniv.nl>
* [controls/edit.c]
Implemented WM_UNDO, WM_CONTEXTMENU (temporary using WM_RBUTTONUP),
WM_COMMAND, WM_INITPOPUPMENU, WM_SYSKEYDOWN.
Fixed EM_SETSEL and some minor bugs (features).
Hence: fully functional undo and a win95 menu with the right mouse
button.
* [include/resources.h] [resources/TODO] [resources/sysres_??.rc]
Added a context menu for the edit control.
Translations, please ...
Fri Jan 17 08:29:52 1997 David Faure <david.faure@ifhamy.insa-lyon.fr>
* [windows/event.c]
Move EVENT_ToAscii to windows/keyboard.c (where name ToAscii)
Fixed Keypad keys 0-9 and . in EVENT_event_to_vkey.
Added 3-state handling of toggle keys (CapsLock, NumLock) in order
to make them work with any X server.
Toggle keys now generate WM_KEYDOWN and WM_KEYUP on each pressing.
* [include/keyboard.h]
Totally replaced the file (formerly containing the vkcase definitions)
by the declaration of 'extern' variables contained by event.c and used
by keyboard.c
* [windows/keyboard.c]
Started to rewrite VkKeyScan and MapVirtualKey, to make them use the
table keyc2vkey or X functions only.
ToAscii : added keypad 0-9 and . special case.
Changed toggle keys active mask from 0x80 to 0x1.
* [misc/keyboard.c]
File deleted. Contents moved to windows/keyboard.c.
* [misc/main.c]
Added putenv XKB_DISABLE to disable XKB extension (which, when
present, causes AltGr to change keyboard group instead of being a
modifier).
Tue Jan 14 22:56:43 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [windows/event.c]
Do not assume NumLockMask is Mod2Mask, but compute it by scanning
output of XGetModifierMapping for XK_Num_Lock.
Tue Jan 14 15:49:49 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [loader/pe_*.c] [include/peexe.h] [include/resource32.h]
[debugger/*.c]
General clean up.
Changed defines/structures to match Windows NT SDK.
* [loader/main.c]
Don't crash on empty command-line.
* [windows/winpos.c]
winpos.c made win32 clean.
* [misc/ntdll.c]
Some string conversion additions.
* [files/file.c]
GetFileAttributes/GetTempFileName fixed.
* [misc/ver.c]
VerInstallFile implemented.
Mon Jan 13 15:03:11 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [tools/build.c]: Use PREFIX also in stabs messages.
Mon Jan 13 10:40:33 1997 John Harvey <john@division.co.uk>
* [graphics/win16drv/*] [include/win16drv.h]
Many fixes and some new features.
* [graphics/x11drv/font.c] [graphics/x11drv/init.c]
[include/x11drv.h] [objects/font.c]
GetTextMetrics() moved to graphics driver.
* [if1632/gdi.spec] [misc/fontengine.c] [misc/Makefile.in]
New dummy EngineEnumerateFont, EngineRealizeFont functions.
* [include/windows.h]
TEXTFORM16 and FONTINFO16 structure definitions moved here from
include/win16drv.h
1997-01-20 20:43:45 +01:00
|
|
|
#endif
|
1998-04-13 14:21:30 +02:00
|
|
|
|
|
|
|
#ifdef HAVE_SYS_PARAM_H
|
|
|
|
# include <sys/param.h>
|
|
|
|
#endif
|
|
|
|
|
1999-10-31 03:07:54 +01:00
|
|
|
#ifdef HAVE_SYS_MSG_H
|
|
|
|
# include <sys/msg.h>
|
|
|
|
#endif
|
|
|
|
#ifdef HAVE_SYS_WAIT_H
|
|
|
|
# include <sys/wait.h>
|
|
|
|
#endif
|
2002-11-11 20:55:33 +01:00
|
|
|
#ifdef HAVE_SYS_UIO_H
|
|
|
|
# include <sys/uio.h>
|
|
|
|
#endif
|
1999-10-31 03:07:54 +01:00
|
|
|
#ifdef HAVE_SYS_SOCKET_H
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
#include <sys/socket.h>
|
1999-10-31 03:07:54 +01:00
|
|
|
#endif
|
|
|
|
#ifdef HAVE_NETINET_IN_H
|
|
|
|
# include <netinet/in.h>
|
|
|
|
#endif
|
|
|
|
#ifdef HAVE_NETINET_TCP_H
|
|
|
|
# include <netinet/tcp.h>
|
|
|
|
#endif
|
|
|
|
#ifdef HAVE_ARPA_INET_H
|
|
|
|
# include <arpa/inet.h>
|
|
|
|
#endif
|
Release 980201
Sun Feb 1 13:24:54 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [files/drive.c]
Added Device= parameter to drive configuration.
* [if1632/relay.c]
Throw() and Catch() now use the correct CATCHBUF layout (untested).
* [tools/build.c] [include/stackframe.h] [loader/task.c]
Moved 16-bit stack pointer into thread database.
Save current %fs while running 16-bit code.
Fri Jan 30 09:25:49 1998 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [graphics/mapping.c]
Made DPtoLP32 and LPtoDP32 respect world transforms.
* [graphics/path.c] [graphics/painting.c] [if1632/gdi.spec]
[include/path.h]
More path support.
* [include/gdi.h] [include/windows.h] [objects/dc.c]
[relay/gdi32.spec]
Support for Get/SetArcDirection and Get/SetWorldTransform
* [windows/hook.c]
Fixed a bug in HOOK_Map16To32Common.
Thu Jan 29 23:43:18 1998 Douglas Ridgway <ridgway@taiga.gmcl.com>
* [graphics/metafiledrv/init.c] [objects/metafile.c]
Documentation for metafile related API calls. Fixed a bug to avoid
documenting it.
* [include/windows.h]
Declaration for LoadImage.
Thu Jan 29 21:44:45 1998 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/win16drv/*]
Changes to printing code to enable use of printer fonts with the
win3.1 postscript driver. Remember to add printer=on to [wine]
section of wine.conf . You will also need to disable truetype
fonts from control panel. Winword 6.0 and Write seem to be happy
with this...
* [include/bitmap.h]
Fix Widthbytes for 15bpp displays.
Tue Jan 27 20:54:08 1998 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [tsx11/*] [include/ts*] [tools/make_X11wrappers]
Implemented thread-safe X11 wrappers.
Tue Jan 27 13:54:09 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu>
* [windows/queue.c]
Forgot to convert thdb to thread_id.
* [misc/registry.c]
Sped up Windows 95 registry reading. Changed code to traverse
registry as a tree rather than read in all possible keys
(including dead ones).
Tue Jan 27 12:46:09 1998 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [loader/pe_image.c][Makefile.in][scheduler/thread.c]
[libtest/hello5.c]
Don't exit() on failed to load referenced dlls.
Fixed static tls allocation for multiple threads.
WINELIB should now be able to load PE dlls. A sample
winelib program, that dynamically loads a internal dll
is included.
* [graphics/ddraw.c][include/ddraw.h][include/d3d.h]
Cleaned up and enhanced further. Added several DirectX5
interface definitions and DirectSurface3 implementation.
Stubs for D3D (NOT coming soon, just there so it fails safely).
* [multimedia/dsound.c][include/dsound.h]
Actually works now for a lot of cases. Some DirectX5 stuff
added. Still lacking several features.
* [windows/dinput.c][include/dinput.h]
Started implementing DirectInput. Doesn't work yet, don't
know why.
* [if1632/thunk.c][misc/callbacks.c]
[win32/kernel.c][include/callbacks.h]
Added WOWCallback16Ex, WOWHandle32.
* [misc/cpu.c]
Fixed GetSystemInfo, IsProcessorFeaturePresent.
* [multimedia/joystick.c][multimedia/time.c]
Several fixes. Small hack to get timerevents in timeGetTime() loops.
Tue Jan 20 11:26:27 1998 Slaven Rezic <eserte@cs.tu-berlin.de>
* [configure.in]
Fixed check for union semun on FreeBSD systems.
Sun Jan 18 23:05:04 1998 Karl Backstrm <karl_b@geocities.com>
* [misc/ole2nls.c] [programs/progman/Sw.rc] [programs/winhelp/Sw.rc]
[resources/sysres_Sw.rc]
Added/updated Swedish language support.
Sun Jan 18 18:49:01 1998 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [misc/winsock.c] [misc/winsock_dns.c] [windows/event.c]
[windows/win.c] [windows/dce.c] [windows/winpos.c]
Bug fixes.
Sun Jan 18 12:45:23 1997 Andreas Mohr <100.30936@germany.net>
* [msdos/int25.c] [msdos/int26.c]
Implemented "native" absolute disk read/write access.
* [msdos/int13.c] [msdos/ioports.c]
Enhanced GET DRIVE PARAMETERS (int13 AH=08).
* [graphics/win16drv/prtdrv.c] [if1632/gdi.spec]
Fixed typos, implemented dmEnumDFonts,
Started implementation of dmRealizeObject.
* [if1632/compobj.spec] [ole/compobj.c] [relay32/ole32.spec]
Stubs CoCreateInstance, CoFreeUnusedLibraries, implemented
CoFileTimeNow.
* [if1632/kernel.spec] [include/windows.h] [memory/global.c]
[memory/string.c] [misc/kernel.c] [misc/Makefile.in]
[misc/toolhelp.c] [msdos/int21.c]
Implemented GlobalHandleNoRIP, GetFreeMemInfo, DebugFillBuffer,
stubs GetSetKernelDOSProc, DiagQuery, DiagOutput, ToolHelpHook
(Undocumented Windows).
* [if1632/user.spec] [if1632/win32s16.spec] [misc/win32s16.c]
Misc stubs.
* [if1632/winaspi.spec] [misc/aspi.c]
Implemented GetASPIDLLVersion.
* [if1632/wprocs.spec] [msdos/int20.c] [msdos/Makefile.in]
Added handler for Int 0x20 (terminate program, _very_ old-fashioned).
* [misc/w32scomb.c]
Implemented Get16DLLAddress() partially
(big thanks to Marcus and Alexandre).
* [relay32/Makefile.in] [relay32/builtin32.c] [relay32/dplay.spec]
Added built-in DPLAY.DLL.
* [relay32/winmm.spec] [multimedia/joystick.c]
Added joySetThreshold.
* [misc/windebug.c]
Added WinNotify.
* [win32/console.c]
Stubs CreateConsoleScreenBuffer, SetConsoleActiveScreenBuffer,
WriteConsoleOutput32A.
* [windows/user.c]
Stub SetEventHook.
Sat Jan 17 19:30:35 1998 Matthew Toseland <Paul.Toseland@btinternet.com>
* [windows/painting.c]
Fixed broken restore-to-maximized.
Mon Jan 12 21:25:32 1998 Perceval - Marc Huguet Puig <mhp@tinet.fut.es>
* [documentation/wine.man] [include/options.h]
[misc/main.c] [ole/ole2nls.c] [resources/sysres.c]
[resources/sysres_Ca.rc] [resources/Makefile.in]
Added language catalan. (Afegit l'idioma catal).
1998-02-01 19:33:27 +01:00
|
|
|
#include <ctype.h>
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
#include <fcntl.h>
|
|
|
|
#include <errno.h>
|
2000-11-26 05:00:53 +01:00
|
|
|
#ifdef HAVE_NETDB_H
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
#include <netdb.h>
|
2000-11-26 05:00:53 +01:00
|
|
|
#endif
|
2002-08-17 02:43:16 +02:00
|
|
|
#ifdef HAVE_UNISTD_H
|
|
|
|
# include <unistd.h>
|
|
|
|
#endif
|
1999-01-01 19:57:33 +01:00
|
|
|
#include <stdlib.h>
|
1999-02-28 12:23:44 +01:00
|
|
|
#ifdef HAVE_ARPA_NAMESER_H
|
|
|
|
# include <arpa/nameser.h>
|
|
|
|
#endif
|
1999-02-20 17:46:39 +01:00
|
|
|
#ifdef HAVE_RESOLV_H
|
|
|
|
# include <resolv.h>
|
|
|
|
#endif
|
2000-07-23 21:28:24 +02:00
|
|
|
#ifdef HAVE_NET_IF_H
|
|
|
|
# include <net/if.h>
|
|
|
|
#endif
|
2012-09-27 00:38:29 +02:00
|
|
|
#ifdef HAVE_LINUX_FILTER_H
|
|
|
|
# include <linux/filter.h>
|
|
|
|
#endif
|
2005-08-03 21:21:04 +02:00
|
|
|
|
|
|
|
#ifdef HAVE_NETIPX_IPX_H
|
2000-09-27 00:20:14 +02:00
|
|
|
# include <netipx/ipx.h>
|
2005-08-03 21:21:04 +02:00
|
|
|
#elif defined(HAVE_LINUX_IPX_H)
|
2005-05-06 18:22:54 +02:00
|
|
|
# ifdef HAVE_ASM_TYPES_H
|
|
|
|
# include <asm/types.h>
|
|
|
|
# endif
|
2008-12-28 10:35:02 +01:00
|
|
|
# ifdef HAVE_LINUX_TYPES_H
|
|
|
|
# include <linux/types.h>
|
|
|
|
# endif
|
2000-09-27 00:20:14 +02:00
|
|
|
# include <linux/ipx.h>
|
2014-07-03 06:01:53 +02:00
|
|
|
#endif
|
|
|
|
#if defined(SOL_IPX) || defined(SO_DEFAULT_HEADERS)
|
2013-06-17 21:56:52 +02:00
|
|
|
# define HAS_IPX
|
2000-09-27 00:20:14 +02:00
|
|
|
#endif
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
|
2009-08-12 18:14:27 +02:00
|
|
|
#ifdef HAVE_LINUX_IRDA_H
|
|
|
|
# ifdef HAVE_LINUX_TYPES_H
|
|
|
|
# include <linux/types.h>
|
|
|
|
# endif
|
|
|
|
# include <linux/irda.h>
|
2013-06-17 21:56:52 +02:00
|
|
|
# define HAS_IRDA
|
2009-08-12 18:14:27 +02:00
|
|
|
#endif
|
|
|
|
|
2005-03-04 13:38:36 +01:00
|
|
|
#ifdef HAVE_POLL_H
|
|
|
|
#include <poll.h>
|
|
|
|
#endif
|
2003-08-08 23:10:28 +02:00
|
|
|
#ifdef HAVE_SYS_POLL_H
|
|
|
|
# include <sys/poll.h>
|
|
|
|
#endif
|
2002-03-25 21:51:48 +01:00
|
|
|
#ifdef HAVE_SYS_TIME_H
|
|
|
|
# include <sys/time.h>
|
|
|
|
#endif
|
|
|
|
|
2003-06-26 04:08:17 +02:00
|
|
|
#define NONAMELESSUNION
|
|
|
|
#define NONAMELESSSTRUCT
|
2005-11-28 17:32:54 +01:00
|
|
|
#include "ntstatus.h"
|
|
|
|
#define WIN32_NO_STATUS
|
2003-09-06 01:08:26 +02:00
|
|
|
#include "windef.h"
|
|
|
|
#include "winbase.h"
|
2000-03-08 19:26:56 +01:00
|
|
|
#include "wingdi.h"
|
|
|
|
#include "winuser.h"
|
2002-04-25 23:34:24 +02:00
|
|
|
#include "winerror.h"
|
2004-09-14 01:18:19 +02:00
|
|
|
#include "winnls.h"
|
1999-10-23 18:53:34 +02:00
|
|
|
#include "winsock2.h"
|
2004-02-28 02:49:37 +01:00
|
|
|
#include "mswsock.h"
|
2001-11-14 22:26:23 +01:00
|
|
|
#include "ws2tcpip.h"
|
2005-06-25 20:34:32 +02:00
|
|
|
#include "ws2spi.h"
|
2001-10-08 22:36:03 +02:00
|
|
|
#include "wsipx.h"
|
2015-04-04 04:55:32 +02:00
|
|
|
#include "wsnwlink.h"
|
2013-09-04 03:51:58 +02:00
|
|
|
#include "wshisotp.h"
|
2008-12-08 14:27:24 +01:00
|
|
|
#include "mstcpip.h"
|
2009-08-12 18:14:41 +02:00
|
|
|
#include "af_irda.h"
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
#include "winnt.h"
|
2011-12-12 23:53:07 +01:00
|
|
|
#define USE_WC_PREFIX /* For CMSG_DATA */
|
2003-05-13 06:43:44 +02:00
|
|
|
#include "iphlpapi.h"
|
2001-07-19 02:39:09 +02:00
|
|
|
#include "wine/server.h"
|
2002-03-10 00:29:33 +01:00
|
|
|
#include "wine/debug.h"
|
2010-02-03 08:18:40 +01:00
|
|
|
#include "wine/exception.h"
|
2004-11-04 22:05:48 +01:00
|
|
|
#include "wine/unicode.h"
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
|
2012-10-27 12:39:59 +02:00
|
|
|
#if defined(linux) && !defined(IP_UNICAST_IF)
|
|
|
|
#define IP_UNICAST_IF 50
|
|
|
|
#endif
|
2004-09-07 22:47:03 +02:00
|
|
|
|
2011-06-30 04:38:17 +02:00
|
|
|
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
|
2003-01-23 22:20:36 +01:00
|
|
|
# define sipx_network sipx_addr.x_net
|
2003-01-28 02:07:09 +01:00
|
|
|
# define sipx_node sipx_addr.x_host.c_host
|
2003-01-23 22:20:36 +01:00
|
|
|
#endif /* __FreeBSD__ */
|
2000-07-23 21:28:24 +02:00
|
|
|
|
2005-05-07 14:18:10 +02:00
|
|
|
#ifndef INADDR_NONE
|
|
|
|
#define INADDR_NONE ~0UL
|
|
|
|
#endif
|
|
|
|
|
2015-08-03 01:54:42 +02:00
|
|
|
#if !defined(TCP_KEEPIDLE) && defined(TCP_KEEPALIVE)
|
|
|
|
/* TCP_KEEPALIVE is the Mac OS name for TCP_KEEPIDLE */
|
|
|
|
#define TCP_KEEPIDLE TCP_KEEPALIVE
|
|
|
|
#endif
|
|
|
|
|
2015-10-07 20:19:42 +02:00
|
|
|
#define FILE_USE_FILE_POINTER_POSITION ((LONGLONG)-2)
|
|
|
|
|
2002-03-10 00:29:33 +01:00
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(winsock);
|
2009-12-08 14:09:05 +01:00
|
|
|
WINE_DECLARE_DEBUG_CHANNEL(winediag);
|
1999-04-19 16:56:29 +02:00
|
|
|
|
2013-09-04 03:51:58 +02:00
|
|
|
/* names of the protocols */
|
|
|
|
static const WCHAR NameIpxW[] = {'I', 'P', 'X', '\0'};
|
|
|
|
static const WCHAR NameSpxW[] = {'S', 'P', 'X', '\0'};
|
|
|
|
static const WCHAR NameSpxIIW[] = {'S', 'P', 'X', ' ', 'I', 'I', '\0'};
|
|
|
|
static const WCHAR NameTcpW[] = {'T', 'C', 'P', '/', 'I', 'P', '\0'};
|
|
|
|
static const WCHAR NameUdpW[] = {'U', 'D', 'P', '/', 'I', 'P', '\0'};
|
|
|
|
|
|
|
|
/* Taken from Win2k */
|
|
|
|
static const GUID ProviderIdIP = { 0xe70f1aa0, 0xab8b, 0x11cf,
|
|
|
|
{ 0x8c, 0xa3, 0x00, 0x80, 0x5f, 0x48, 0xa1, 0x92 } };
|
|
|
|
static const GUID ProviderIdIPX = { 0x11058240, 0xbe47, 0x11cf,
|
|
|
|
{ 0x95, 0xc8, 0x00, 0x80, 0x5f, 0x48, 0xa1, 0x92 } };
|
|
|
|
static const GUID ProviderIdSPX = { 0x11058241, 0xbe47, 0x11cf,
|
|
|
|
{ 0x95, 0xc8, 0x00, 0x80, 0x5f, 0x48, 0xa1, 0x92 } };
|
|
|
|
|
2013-09-05 14:56:19 +02:00
|
|
|
static const INT valid_protocols[] =
|
|
|
|
{
|
|
|
|
WS_IPPROTO_TCP,
|
|
|
|
WS_IPPROTO_UDP,
|
2013-12-27 16:48:40 +01:00
|
|
|
WS_NSPROTO_IPX,
|
|
|
|
WS_NSPROTO_SPX,
|
|
|
|
WS_NSPROTO_SPXII,
|
2013-09-05 14:56:19 +02:00
|
|
|
0
|
|
|
|
};
|
|
|
|
|
2013-12-31 01:25:09 +01:00
|
|
|
#define IS_IPX_PROTO(X) ((X) >= WS_NSPROTO_IPX && (X) <= WS_NSPROTO_IPX + 255)
|
|
|
|
|
2012-09-27 00:38:29 +02:00
|
|
|
#if defined(IP_UNICAST_IF) && defined(SO_ATTACH_FILTER)
|
|
|
|
# define LINUX_BOUND_IF
|
|
|
|
struct interface_filter {
|
|
|
|
struct sock_filter iface_memaddr;
|
|
|
|
struct sock_filter iface_rule;
|
2013-06-24 04:19:16 +02:00
|
|
|
struct sock_filter ip_memaddr;
|
|
|
|
struct sock_filter ip_rule;
|
2012-09-27 00:38:29 +02:00
|
|
|
struct sock_filter return_keep;
|
|
|
|
struct sock_filter return_dump;
|
|
|
|
};
|
|
|
|
# define FILTER_JUMP_DUMP(here) (u_char)(offsetof(struct interface_filter, return_dump) \
|
|
|
|
-offsetof(struct interface_filter, here)-sizeof(struct sock_filter)) \
|
|
|
|
/sizeof(struct sock_filter)
|
|
|
|
# define FILTER_JUMP_KEEP(here) (u_char)(offsetof(struct interface_filter, return_keep) \
|
|
|
|
-offsetof(struct interface_filter, here)-sizeof(struct sock_filter)) \
|
|
|
|
/sizeof(struct sock_filter)
|
2013-06-24 04:19:16 +02:00
|
|
|
# define FILTER_JUMP_NEXT() (u_char)(0)
|
|
|
|
# define SKF_NET_DESTIP 16 /* offset in the network header to the destination IP */
|
2012-09-27 00:38:29 +02:00
|
|
|
static struct interface_filter generic_interface_filter = {
|
2013-06-24 04:19:16 +02:00
|
|
|
/* This filter rule allows incoming packets on the specified interface, which works for all
|
|
|
|
* remotely generated packets and for locally generated broadcast packets. */
|
2012-09-27 00:38:29 +02:00
|
|
|
BPF_STMT(BPF_LD+BPF_W+BPF_ABS, SKF_AD_OFF+SKF_AD_IFINDEX),
|
2013-06-24 04:19:16 +02:00
|
|
|
BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, 0xdeadbeef, FILTER_JUMP_KEEP(iface_rule), FILTER_JUMP_NEXT()),
|
|
|
|
/* This rule allows locally generated packets targeted at the specific IP address of the chosen
|
|
|
|
* adapter (local packets not destined for the broadcast address do not have IFINDEX set) */
|
|
|
|
BPF_STMT(BPF_LD+BPF_W+BPF_ABS, SKF_NET_OFF+SKF_NET_DESTIP),
|
|
|
|
BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, 0xdeadbeef, FILTER_JUMP_KEEP(ip_rule), FILTER_JUMP_DUMP(ip_rule)),
|
2012-09-27 00:38:29 +02:00
|
|
|
BPF_STMT(BPF_RET+BPF_K, (u_int)-1), /* keep packet */
|
|
|
|
BPF_STMT(BPF_RET+BPF_K, 0) /* dump packet */
|
|
|
|
};
|
|
|
|
#endif /* LINUX_BOUND_IF */
|
2010-07-18 02:53:06 +02:00
|
|
|
|
|
|
|
/*
|
2010-12-06 01:08:54 +01:00
|
|
|
* The actual definition of WSASendTo, wrapped in a different function name
|
|
|
|
* so that internal calls from ws2_32 itself will not trigger programs like
|
|
|
|
* Garena, which hooks WSASendTo/WSARecvFrom calls.
|
2010-07-18 02:53:06 +02:00
|
|
|
*/
|
|
|
|
static int WS2_sendto( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount,
|
|
|
|
LPDWORD lpNumberOfBytesSent, DWORD dwFlags,
|
|
|
|
const struct WS_sockaddr *to, int tolen,
|
|
|
|
LPWSAOVERLAPPED lpOverlapped,
|
|
|
|
LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine );
|
|
|
|
|
2010-12-06 01:08:54 +01:00
|
|
|
/*
|
|
|
|
* Internal fundamental receive function, essentially WSARecvFrom with an
|
|
|
|
* additional parameter to support message control headers.
|
|
|
|
*/
|
|
|
|
static int WS2_recv_base( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount,
|
|
|
|
LPDWORD lpNumberOfBytesRecvd, LPDWORD lpFlags,
|
|
|
|
struct WS_sockaddr *lpFrom,
|
|
|
|
LPINT lpFromlen, LPWSAOVERLAPPED lpOverlapped,
|
|
|
|
LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine,
|
|
|
|
LPWSABUF lpControlBuffer );
|
2010-07-18 02:53:06 +02:00
|
|
|
|
2008-01-03 18:04:28 +01:00
|
|
|
/* critical section to protect some non-reentrant net function */
|
2009-09-29 19:32:43 +02:00
|
|
|
static CRITICAL_SECTION csWSgetXXXbyYYY;
|
|
|
|
static CRITICAL_SECTION_DEBUG critsect_debug =
|
|
|
|
{
|
|
|
|
0, 0, &csWSgetXXXbyYYY,
|
|
|
|
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
|
|
|
|
0, 0, { (DWORD_PTR)(__FILE__ ": csWSgetXXXbyYYY") }
|
|
|
|
};
|
|
|
|
static CRITICAL_SECTION csWSgetXXXbyYYY = { &critsect_debug, -1, 0, 0, 0, 0 };
|
2000-09-24 21:41:57 +02:00
|
|
|
|
2007-05-30 20:11:58 +02:00
|
|
|
union generic_unix_sockaddr
|
|
|
|
{
|
|
|
|
struct sockaddr addr;
|
|
|
|
char data[128]; /* should be big enough for all families */
|
|
|
|
};
|
|
|
|
|
2007-03-23 16:11:35 +01:00
|
|
|
static inline const char *debugstr_sockaddr( const struct WS_sockaddr *a )
|
2003-11-29 00:14:02 +01:00
|
|
|
{
|
|
|
|
if (!a) return "(nil)";
|
2009-08-03 18:33:02 +02:00
|
|
|
switch (a->sa_family)
|
|
|
|
{
|
|
|
|
case WS_AF_INET:
|
2015-08-10 16:08:44 +02:00
|
|
|
{
|
|
|
|
char buf[16];
|
|
|
|
const char *p;
|
|
|
|
struct WS_sockaddr_in *sin = (struct WS_sockaddr_in *)a;
|
|
|
|
|
|
|
|
p = WS_inet_ntop( WS_AF_INET, &sin->sin_addr, buf, sizeof(buf) );
|
|
|
|
if (!p)
|
|
|
|
p = "(unknown IPv4 address)";
|
|
|
|
|
2009-08-03 18:33:02 +02:00
|
|
|
return wine_dbg_sprintf("{ family AF_INET, address %s, port %d }",
|
2015-08-10 16:08:44 +02:00
|
|
|
p, ntohs(sin->sin_port));
|
|
|
|
}
|
2009-08-03 18:33:02 +02:00
|
|
|
case WS_AF_INET6:
|
|
|
|
{
|
|
|
|
char buf[46];
|
|
|
|
const char *p;
|
|
|
|
struct WS_sockaddr_in6 *sin = (struct WS_sockaddr_in6 *)a;
|
|
|
|
|
|
|
|
p = WS_inet_ntop( WS_AF_INET6, &sin->sin6_addr, buf, sizeof(buf) );
|
|
|
|
if (!p)
|
|
|
|
p = "(unknown IPv6 address)";
|
|
|
|
return wine_dbg_sprintf("{ family AF_INET6, address %s, port %d }",
|
|
|
|
p, ntohs(sin->sin6_port));
|
|
|
|
}
|
2013-12-27 21:28:05 +01:00
|
|
|
case WS_AF_IPX:
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
char netnum[16], nodenum[16];
|
|
|
|
struct WS_sockaddr_ipx *sin = (struct WS_sockaddr_ipx *)a;
|
|
|
|
|
|
|
|
for (i = 0;i < 4; i++) sprintf(netnum + i * 2, "%02X", (unsigned char) sin->sa_netnum[i]);
|
|
|
|
for (i = 0;i < 6; i++) sprintf(nodenum + i * 2, "%02X", (unsigned char) sin->sa_nodenum[i]);
|
|
|
|
|
|
|
|
return wine_dbg_sprintf("{ family AF_IPX, address %s.%s, ipx socket %d }",
|
|
|
|
netnum, nodenum, sin->sa_socket);
|
|
|
|
}
|
2009-08-12 18:15:17 +02:00
|
|
|
case WS_AF_IRDA:
|
|
|
|
{
|
|
|
|
DWORD addr;
|
|
|
|
|
|
|
|
memcpy( &addr, ((const SOCKADDR_IRDA *)a)->irdaDeviceID, sizeof(addr) );
|
|
|
|
addr = ntohl( addr );
|
|
|
|
return wine_dbg_sprintf("{ family AF_IRDA, addr %08x, name %s }",
|
|
|
|
addr,
|
|
|
|
((const SOCKADDR_IRDA *)a)->irdaServiceName);
|
|
|
|
}
|
2009-08-03 18:33:02 +02:00
|
|
|
default:
|
|
|
|
return wine_dbg_sprintf("{ family %d }", a->sa_family);
|
|
|
|
}
|
2003-11-29 00:14:02 +01:00
|
|
|
}
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
|
2015-04-02 05:17:39 +02:00
|
|
|
static inline const char *debugstr_sockopt(int level, int optname)
|
|
|
|
{
|
|
|
|
const char *stropt = NULL, *strlevel = NULL;
|
|
|
|
|
|
|
|
#define DEBUG_SOCKLEVEL(x) case (x): strlevel = #x
|
|
|
|
#define DEBUG_SOCKOPT(x) case (x): stropt = #x; break
|
|
|
|
|
|
|
|
switch(level)
|
|
|
|
{
|
|
|
|
DEBUG_SOCKLEVEL(WS_SOL_SOCKET);
|
|
|
|
switch(optname)
|
|
|
|
{
|
|
|
|
DEBUG_SOCKOPT(WS_SO_ACCEPTCONN);
|
|
|
|
DEBUG_SOCKOPT(WS_SO_BROADCAST);
|
|
|
|
DEBUG_SOCKOPT(WS_SO_BSP_STATE);
|
|
|
|
DEBUG_SOCKOPT(WS_SO_CONDITIONAL_ACCEPT);
|
|
|
|
DEBUG_SOCKOPT(WS_SO_CONNECT_TIME);
|
|
|
|
DEBUG_SOCKOPT(WS_SO_DEBUG);
|
|
|
|
DEBUG_SOCKOPT(WS_SO_DONTLINGER);
|
|
|
|
DEBUG_SOCKOPT(WS_SO_DONTROUTE);
|
|
|
|
DEBUG_SOCKOPT(WS_SO_ERROR);
|
|
|
|
DEBUG_SOCKOPT(WS_SO_EXCLUSIVEADDRUSE);
|
|
|
|
DEBUG_SOCKOPT(WS_SO_GROUP_ID);
|
|
|
|
DEBUG_SOCKOPT(WS_SO_GROUP_PRIORITY);
|
|
|
|
DEBUG_SOCKOPT(WS_SO_KEEPALIVE);
|
|
|
|
DEBUG_SOCKOPT(WS_SO_LINGER);
|
|
|
|
DEBUG_SOCKOPT(WS_SO_MAX_MSG_SIZE);
|
|
|
|
DEBUG_SOCKOPT(WS_SO_OOBINLINE);
|
|
|
|
DEBUG_SOCKOPT(WS_SO_OPENTYPE);
|
|
|
|
DEBUG_SOCKOPT(WS_SO_PROTOCOL_INFOA);
|
|
|
|
DEBUG_SOCKOPT(WS_SO_PROTOCOL_INFOW);
|
|
|
|
DEBUG_SOCKOPT(WS_SO_RCVBUF);
|
|
|
|
DEBUG_SOCKOPT(WS_SO_RCVTIMEO);
|
|
|
|
DEBUG_SOCKOPT(WS_SO_REUSEADDR);
|
|
|
|
DEBUG_SOCKOPT(WS_SO_SNDBUF);
|
|
|
|
DEBUG_SOCKOPT(WS_SO_SNDTIMEO);
|
|
|
|
DEBUG_SOCKOPT(WS_SO_TYPE);
|
2015-11-23 13:15:33 +01:00
|
|
|
DEBUG_SOCKOPT(WS_SO_UPDATE_CONNECT_CONTEXT);
|
2015-04-02 05:17:39 +02:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
DEBUG_SOCKLEVEL(WS_NSPROTO_IPX);
|
|
|
|
switch(optname)
|
|
|
|
{
|
|
|
|
DEBUG_SOCKOPT(WS_IPX_PTYPE);
|
|
|
|
DEBUG_SOCKOPT(WS_IPX_FILTERPTYPE);
|
|
|
|
DEBUG_SOCKOPT(WS_IPX_DSTYPE);
|
|
|
|
DEBUG_SOCKOPT(WS_IPX_RECVHDR);
|
|
|
|
DEBUG_SOCKOPT(WS_IPX_MAXSIZE);
|
|
|
|
DEBUG_SOCKOPT(WS_IPX_ADDRESS);
|
|
|
|
DEBUG_SOCKOPT(WS_IPX_MAX_ADAPTER_NUM);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
DEBUG_SOCKLEVEL(WS_SOL_IRLMP);
|
|
|
|
switch(optname)
|
|
|
|
{
|
|
|
|
DEBUG_SOCKOPT(WS_IRLMP_ENUMDEVICES);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
DEBUG_SOCKLEVEL(WS_IPPROTO_TCP);
|
|
|
|
switch(optname)
|
|
|
|
{
|
|
|
|
DEBUG_SOCKOPT(WS_TCP_BSDURGENT);
|
|
|
|
DEBUG_SOCKOPT(WS_TCP_EXPEDITED_1122);
|
|
|
|
DEBUG_SOCKOPT(WS_TCP_NODELAY);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
DEBUG_SOCKLEVEL(WS_IPPROTO_IP);
|
|
|
|
switch(optname)
|
|
|
|
{
|
|
|
|
DEBUG_SOCKOPT(WS_IP_ADD_MEMBERSHIP);
|
2015-11-23 13:15:33 +01:00
|
|
|
DEBUG_SOCKOPT(WS_IP_DONTFRAGMENT);
|
2015-04-02 05:17:39 +02:00
|
|
|
DEBUG_SOCKOPT(WS_IP_DROP_MEMBERSHIP);
|
|
|
|
DEBUG_SOCKOPT(WS_IP_HDRINCL);
|
|
|
|
DEBUG_SOCKOPT(WS_IP_MULTICAST_IF);
|
|
|
|
DEBUG_SOCKOPT(WS_IP_MULTICAST_LOOP);
|
|
|
|
DEBUG_SOCKOPT(WS_IP_MULTICAST_TTL);
|
|
|
|
DEBUG_SOCKOPT(WS_IP_OPTIONS);
|
|
|
|
DEBUG_SOCKOPT(WS_IP_PKTINFO);
|
2015-11-23 13:15:33 +01:00
|
|
|
DEBUG_SOCKOPT(WS_IP_RECEIVE_BROADCAST);
|
2015-04-02 05:17:39 +02:00
|
|
|
DEBUG_SOCKOPT(WS_IP_TOS);
|
|
|
|
DEBUG_SOCKOPT(WS_IP_TTL);
|
|
|
|
DEBUG_SOCKOPT(WS_IP_UNICAST_IF);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
DEBUG_SOCKLEVEL(WS_IPPROTO_IPV6);
|
|
|
|
switch(optname)
|
|
|
|
{
|
|
|
|
DEBUG_SOCKOPT(WS_IPV6_ADD_MEMBERSHIP);
|
|
|
|
DEBUG_SOCKOPT(WS_IPV6_DROP_MEMBERSHIP);
|
|
|
|
DEBUG_SOCKOPT(WS_IPV6_MULTICAST_IF);
|
|
|
|
DEBUG_SOCKOPT(WS_IPV6_MULTICAST_HOPS);
|
|
|
|
DEBUG_SOCKOPT(WS_IPV6_MULTICAST_LOOP);
|
|
|
|
DEBUG_SOCKOPT(WS_IPV6_UNICAST_HOPS);
|
|
|
|
DEBUG_SOCKOPT(WS_IPV6_V6ONLY);
|
|
|
|
DEBUG_SOCKOPT(WS_IPV6_UNICAST_IF);
|
|
|
|
DEBUG_SOCKOPT(WS_IPV6_DONTFRAG);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
#undef DEBUG_SOCKLEVEL
|
|
|
|
#undef DEBUG_SOCKOPT
|
|
|
|
|
|
|
|
if (!strlevel)
|
|
|
|
strlevel = wine_dbg_sprintf("WS_0x%x", level);
|
|
|
|
if (!stropt)
|
|
|
|
stropt = wine_dbg_sprintf("WS_0x%x", optname);
|
|
|
|
|
|
|
|
return wine_dbg_sprintf("level %s, name %s", strlevel + 3, stropt + 3);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline const char *debugstr_optval(const char *optval, int optlenval)
|
|
|
|
{
|
|
|
|
if (optval && !IS_INTRESOURCE(optval) && optlenval >= 1 && optlenval <= sizeof(DWORD))
|
|
|
|
{
|
|
|
|
DWORD value = 0;
|
|
|
|
memcpy(&value, optval, optlenval);
|
|
|
|
return wine_dbg_sprintf("%p (%u)", optval, value);
|
|
|
|
}
|
|
|
|
return wine_dbg_sprintf("%p", optval);
|
|
|
|
}
|
|
|
|
|
2002-10-30 21:26:32 +01:00
|
|
|
/* HANDLE<->SOCKET conversion (SOCKET is UINT_PTR). */
|
|
|
|
#define SOCKET2HANDLE(s) ((HANDLE)(s))
|
|
|
|
#define HANDLE2SOCKET(h) ((SOCKET)(h))
|
|
|
|
|
2002-04-25 23:34:24 +02:00
|
|
|
/****************************************************************
|
|
|
|
* Async IO declarations
|
|
|
|
****************************************************************/
|
|
|
|
|
2015-03-03 07:33:21 +01:00
|
|
|
struct ws2_async_io
|
2002-04-25 23:34:24 +02:00
|
|
|
{
|
2015-03-03 07:33:21 +01:00
|
|
|
struct ws2_async_io *next;
|
|
|
|
};
|
|
|
|
|
2015-03-03 07:30:13 +01:00
|
|
|
struct ws2_async_shutdown
|
|
|
|
{
|
|
|
|
struct ws2_async_io io;
|
|
|
|
HANDLE hSocket;
|
|
|
|
IO_STATUS_BLOCK iosb;
|
|
|
|
int type;
|
|
|
|
};
|
|
|
|
|
2015-03-03 07:33:21 +01:00
|
|
|
struct ws2_async
|
|
|
|
{
|
|
|
|
struct ws2_async_io io;
|
2005-01-14 20:54:38 +01:00
|
|
|
HANDLE hSocket;
|
2002-04-25 23:34:24 +02:00
|
|
|
LPWSAOVERLAPPED user_overlapped;
|
|
|
|
LPWSAOVERLAPPED_COMPLETION_ROUTINE completion_func;
|
2007-05-31 12:07:14 +02:00
|
|
|
IO_STATUS_BLOCK local_iosb;
|
2003-06-26 04:08:17 +02:00
|
|
|
struct WS_sockaddr *addr;
|
2005-01-14 20:54:38 +01:00
|
|
|
union
|
|
|
|
{
|
2002-04-25 23:34:24 +02:00
|
|
|
int val; /* for send operations */
|
|
|
|
int *ptr; /* for recv operations */
|
|
|
|
} addrlen;
|
|
|
|
DWORD flags;
|
2010-12-06 01:08:54 +01:00
|
|
|
DWORD *lpFlags;
|
|
|
|
WSABUF *control;
|
2008-10-09 12:57:33 +02:00
|
|
|
unsigned int n_iovecs;
|
|
|
|
unsigned int first_iovec;
|
|
|
|
struct iovec iovec[1];
|
2015-03-03 07:33:21 +01:00
|
|
|
};
|
2002-04-25 23:34:24 +02:00
|
|
|
|
2015-03-03 07:33:21 +01:00
|
|
|
struct ws2_accept_async
|
2010-09-21 03:30:28 +02:00
|
|
|
{
|
2015-03-03 07:33:21 +01:00
|
|
|
struct ws2_async_io io;
|
2010-09-21 03:30:28 +02:00
|
|
|
HANDLE listen_socket;
|
|
|
|
HANDLE accept_socket;
|
|
|
|
LPOVERLAPPED user_overlapped;
|
|
|
|
ULONG_PTR cvalue;
|
|
|
|
PVOID buf; /* buffer to write data to */
|
|
|
|
int data_len;
|
|
|
|
int local_len;
|
|
|
|
int remote_len;
|
|
|
|
struct ws2_async *read;
|
2015-03-03 07:33:21 +01:00
|
|
|
};
|
2010-09-21 03:30:28 +02:00
|
|
|
|
2015-10-07 20:14:56 +02:00
|
|
|
struct ws2_transmitfile_async
|
|
|
|
{
|
|
|
|
struct ws2_async_io io;
|
|
|
|
char *buffer;
|
|
|
|
HANDLE file;
|
|
|
|
DWORD file_read;
|
|
|
|
DWORD file_bytes;
|
|
|
|
DWORD bytes_per_send;
|
2015-10-07 20:15:28 +02:00
|
|
|
TRANSMIT_FILE_BUFFERS buffers;
|
2015-10-07 20:14:56 +02:00
|
|
|
DWORD flags;
|
2015-10-07 20:19:42 +02:00
|
|
|
LARGE_INTEGER offset;
|
2015-10-07 20:14:56 +02:00
|
|
|
struct ws2_async write;
|
|
|
|
};
|
|
|
|
|
2015-03-03 07:30:38 +01:00
|
|
|
static struct ws2_async_io *async_io_freelist;
|
|
|
|
|
|
|
|
static void release_async_io( struct ws2_async_io *io )
|
|
|
|
{
|
|
|
|
for (;;)
|
|
|
|
{
|
|
|
|
struct ws2_async_io *next = async_io_freelist;
|
|
|
|
io->next = next;
|
2015-03-11 06:21:10 +01:00
|
|
|
if (InterlockedCompareExchangePointer( (void **)&async_io_freelist, io, next ) == next) return;
|
2015-03-03 07:30:38 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static struct ws2_async_io *alloc_async_io( DWORD size )
|
|
|
|
{
|
|
|
|
/* first free remaining previous fileinfos */
|
|
|
|
|
2015-03-11 06:21:10 +01:00
|
|
|
struct ws2_async_io *io = InterlockedExchangePointer( (void **)&async_io_freelist, NULL );
|
2015-03-03 07:30:38 +01:00
|
|
|
|
|
|
|
while (io)
|
|
|
|
{
|
|
|
|
struct ws2_async_io *next = io->next;
|
|
|
|
HeapFree( GetProcessHeap(), 0, io );
|
|
|
|
io = next;
|
|
|
|
}
|
|
|
|
|
|
|
|
return HeapAlloc( GetProcessHeap(), 0, size );
|
|
|
|
}
|
|
|
|
|
2002-04-25 23:34:24 +02:00
|
|
|
/****************************************************************/
|
|
|
|
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
/* ----------------------------------- internal data */
|
|
|
|
|
1999-10-23 18:53:34 +02:00
|
|
|
/* ws_... struct conversion flags */
|
|
|
|
|
|
|
|
typedef struct /* WSAAsyncSelect() control struct */
|
|
|
|
{
|
|
|
|
HANDLE service, event, sock;
|
|
|
|
HWND hWnd;
|
|
|
|
UINT uMsg;
|
2000-03-26 20:21:16 +02:00
|
|
|
LONG lEvent;
|
2002-06-01 01:06:46 +02:00
|
|
|
} ws_select_info;
|
1999-10-23 18:53:34 +02:00
|
|
|
|
|
|
|
#define WS_MAX_SOCKETS_PER_PROCESS 128 /* reasonable guess */
|
|
|
|
#define WS_MAX_UDP_DATAGRAM 1024
|
2003-07-22 02:58:44 +02:00
|
|
|
static INT WINAPI WSA_DefaultBlockingHook( FARPROC x );
|
1999-10-23 18:53:34 +02:00
|
|
|
|
2004-12-22 19:23:49 +01:00
|
|
|
/* hostent's, servent's and protent's are stored in one buffer per thread,
|
|
|
|
* as documented on MSDN for the functions that return any of the buffers */
|
|
|
|
struct per_thread_data
|
|
|
|
{
|
|
|
|
int opentype;
|
|
|
|
struct WS_hostent *he_buffer;
|
|
|
|
struct WS_servent *se_buffer;
|
|
|
|
struct WS_protoent *pe_buffer;
|
|
|
|
int he_len;
|
|
|
|
int se_len;
|
|
|
|
int pe_len;
|
2013-12-11 09:05:01 +01:00
|
|
|
char ntoa_buffer[16]; /* 4*3 digits + 3 '.' + 1 '\0' */
|
2004-12-22 19:23:49 +01:00
|
|
|
};
|
|
|
|
|
2009-12-06 03:26:56 +01:00
|
|
|
/* internal: routing description information */
|
|
|
|
struct route {
|
|
|
|
struct in_addr addr;
|
2011-12-15 10:06:24 +01:00
|
|
|
IF_INDEX interface;
|
2009-12-06 03:26:56 +01:00
|
|
|
DWORD metric;
|
|
|
|
};
|
|
|
|
|
2001-02-20 02:57:13 +01:00
|
|
|
static INT num_startup; /* reference counter */
|
2007-05-24 16:41:17 +02:00
|
|
|
static FARPROC blocking_hook = (FARPROC)WSA_DefaultBlockingHook;
|
1999-10-23 18:53:34 +02:00
|
|
|
|
|
|
|
/* function prototypes */
|
2012-06-09 19:34:59 +02:00
|
|
|
static struct WS_hostent *WS_create_he(char *name, int aliases, int aliases_size, int addresses, int address_length);
|
2003-11-29 00:14:02 +01:00
|
|
|
static struct WS_hostent *WS_dup_he(const struct hostent* p_he);
|
|
|
|
static struct WS_protoent *WS_dup_pe(const struct protoent* p_pe);
|
|
|
|
static struct WS_servent *WS_dup_se(const struct servent* p_se);
|
2013-09-11 15:05:18 +02:00
|
|
|
static int ws_protocol_info(SOCKET s, int unicode, WSAPROTOCOL_INFOW *buffer, int *size);
|
2000-08-04 00:19:09 +02:00
|
|
|
|
2000-07-23 21:28:24 +02:00
|
|
|
int WSAIOCTL_GetInterfaceCount(void);
|
|
|
|
int WSAIOCTL_GetInterfaceName(int intNumber, char *intName);
|
|
|
|
|
2010-09-21 03:30:28 +02:00
|
|
|
static void WS_AddCompletion( SOCKET sock, ULONG_PTR CompletionValue, NTSTATUS CompletionStatus, ULONG Information );
|
|
|
|
|
2003-04-05 00:29:52 +02:00
|
|
|
#define MAP_OPTION(opt) { WS_##opt, opt }
|
|
|
|
|
2015-03-29 05:53:30 +02:00
|
|
|
static const int ws_flags_map[][2] =
|
|
|
|
{
|
|
|
|
MAP_OPTION( MSG_OOB ),
|
|
|
|
MAP_OPTION( MSG_PEEK ),
|
|
|
|
MAP_OPTION( MSG_DONTROUTE ),
|
|
|
|
MAP_OPTION( MSG_WAITALL ),
|
|
|
|
};
|
|
|
|
|
2003-04-05 00:29:52 +02:00
|
|
|
static const int ws_sock_map[][2] =
|
|
|
|
{
|
|
|
|
MAP_OPTION( SO_DEBUG ),
|
2006-10-11 15:16:31 +02:00
|
|
|
MAP_OPTION( SO_ACCEPTCONN ),
|
2003-04-05 00:29:52 +02:00
|
|
|
MAP_OPTION( SO_REUSEADDR ),
|
|
|
|
MAP_OPTION( SO_KEEPALIVE ),
|
|
|
|
MAP_OPTION( SO_DONTROUTE ),
|
|
|
|
MAP_OPTION( SO_BROADCAST ),
|
|
|
|
MAP_OPTION( SO_LINGER ),
|
|
|
|
MAP_OPTION( SO_OOBINLINE ),
|
|
|
|
MAP_OPTION( SO_SNDBUF ),
|
|
|
|
MAP_OPTION( SO_RCVBUF ),
|
|
|
|
MAP_OPTION( SO_ERROR ),
|
|
|
|
MAP_OPTION( SO_TYPE ),
|
1999-03-24 15:53:55 +01:00
|
|
|
#ifdef SO_RCVTIMEO
|
2003-04-05 00:29:52 +02:00
|
|
|
MAP_OPTION( SO_RCVTIMEO ),
|
2000-09-16 22:51:40 +02:00
|
|
|
#endif
|
|
|
|
#ifdef SO_SNDTIMEO
|
2003-04-05 00:29:52 +02:00
|
|
|
MAP_OPTION( SO_SNDTIMEO ),
|
1999-03-09 18:31:42 +01:00
|
|
|
#endif
|
|
|
|
};
|
|
|
|
|
2003-04-05 00:29:52 +02:00
|
|
|
static const int ws_tcp_map[][2] =
|
2003-04-05 00:04:47 +02:00
|
|
|
{
|
2003-04-05 00:29:52 +02:00
|
|
|
#ifdef TCP_NODELAY
|
|
|
|
MAP_OPTION( TCP_NODELAY ),
|
|
|
|
#endif
|
2003-04-05 00:04:47 +02:00
|
|
|
};
|
|
|
|
|
2003-04-05 00:29:52 +02:00
|
|
|
static const int ws_ip_map[][2] =
|
2003-04-05 00:04:47 +02:00
|
|
|
{
|
2003-04-05 00:29:52 +02:00
|
|
|
MAP_OPTION( IP_MULTICAST_IF ),
|
|
|
|
MAP_OPTION( IP_MULTICAST_TTL ),
|
|
|
|
MAP_OPTION( IP_MULTICAST_LOOP ),
|
|
|
|
MAP_OPTION( IP_ADD_MEMBERSHIP ),
|
|
|
|
MAP_OPTION( IP_DROP_MEMBERSHIP ),
|
|
|
|
MAP_OPTION( IP_OPTIONS ),
|
2003-10-14 07:27:43 +02:00
|
|
|
#ifdef IP_HDRINCL
|
2003-04-05 00:29:52 +02:00
|
|
|
MAP_OPTION( IP_HDRINCL ),
|
2003-10-14 07:27:43 +02:00
|
|
|
#endif
|
2003-04-05 00:29:52 +02:00
|
|
|
MAP_OPTION( IP_TOS ),
|
|
|
|
MAP_OPTION( IP_TTL ),
|
2010-12-06 01:08:54 +01:00
|
|
|
#ifdef IP_PKTINFO
|
|
|
|
MAP_OPTION( IP_PKTINFO ),
|
|
|
|
#endif
|
2012-04-09 21:06:08 +02:00
|
|
|
#ifdef IP_UNICAST_IF
|
|
|
|
MAP_OPTION( IP_UNICAST_IF ),
|
|
|
|
#endif
|
2003-04-05 00:04:47 +02:00
|
|
|
};
|
|
|
|
|
2010-03-31 00:07:24 +02:00
|
|
|
static const int ws_ipv6_map[][2] =
|
|
|
|
{
|
|
|
|
#ifdef IPV6_ADD_MEMBERSHIP
|
|
|
|
MAP_OPTION( IPV6_ADD_MEMBERSHIP ),
|
|
|
|
#endif
|
|
|
|
#ifdef IPV6_DROP_MEMBERSHIP
|
|
|
|
MAP_OPTION( IPV6_DROP_MEMBERSHIP ),
|
|
|
|
#endif
|
|
|
|
MAP_OPTION( IPV6_MULTICAST_IF ),
|
|
|
|
MAP_OPTION( IPV6_MULTICAST_HOPS ),
|
|
|
|
MAP_OPTION( IPV6_MULTICAST_LOOP ),
|
|
|
|
MAP_OPTION( IPV6_UNICAST_HOPS ),
|
|
|
|
MAP_OPTION( IPV6_V6ONLY ),
|
2012-04-09 21:06:30 +02:00
|
|
|
#ifdef IPV6_UNICAST_IF
|
|
|
|
MAP_OPTION( IPV6_UNICAST_IF ),
|
|
|
|
#endif
|
2010-03-31 00:07:24 +02:00
|
|
|
};
|
|
|
|
|
2005-11-16 12:21:57 +01:00
|
|
|
static const int ws_af_map[][2] =
|
|
|
|
{
|
2005-12-05 11:59:43 +01:00
|
|
|
MAP_OPTION( AF_UNSPEC ),
|
2005-11-16 12:21:57 +01:00
|
|
|
MAP_OPTION( AF_INET ),
|
|
|
|
MAP_OPTION( AF_INET6 ),
|
2013-06-17 21:56:52 +02:00
|
|
|
#ifdef HAS_IPX
|
2005-11-16 12:21:57 +01:00
|
|
|
MAP_OPTION( AF_IPX ),
|
2009-08-12 18:13:18 +02:00
|
|
|
#endif
|
|
|
|
#ifdef AF_IRDA
|
|
|
|
MAP_OPTION( AF_IRDA ),
|
2005-11-16 12:21:57 +01:00
|
|
|
#endif
|
2008-05-26 10:02:42 +02:00
|
|
|
{FROM_PROTOCOL_INFO, FROM_PROTOCOL_INFO},
|
2005-11-16 12:21:57 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
static const int ws_socktype_map[][2] =
|
|
|
|
{
|
|
|
|
MAP_OPTION( SOCK_DGRAM ),
|
|
|
|
MAP_OPTION( SOCK_STREAM ),
|
|
|
|
MAP_OPTION( SOCK_RAW ),
|
2008-05-26 10:02:42 +02:00
|
|
|
{FROM_PROTOCOL_INFO, FROM_PROTOCOL_INFO},
|
2005-11-16 12:21:57 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
static const int ws_proto_map[][2] =
|
|
|
|
{
|
2005-12-05 11:59:43 +01:00
|
|
|
MAP_OPTION( IPPROTO_IP ),
|
2005-11-16 12:21:57 +01:00
|
|
|
MAP_OPTION( IPPROTO_TCP ),
|
|
|
|
MAP_OPTION( IPPROTO_UDP ),
|
2015-07-29 19:48:30 +02:00
|
|
|
MAP_OPTION( IPPROTO_IPV6 ),
|
2005-11-16 12:21:57 +01:00
|
|
|
MAP_OPTION( IPPROTO_ICMP ),
|
|
|
|
MAP_OPTION( IPPROTO_IGMP ),
|
|
|
|
MAP_OPTION( IPPROTO_RAW ),
|
2008-05-26 10:02:42 +02:00
|
|
|
{FROM_PROTOCOL_INFO, FROM_PROTOCOL_INFO},
|
2005-11-16 12:21:57 +01:00
|
|
|
};
|
|
|
|
|
2005-11-17 13:58:35 +01:00
|
|
|
static const int ws_aiflag_map[][2] =
|
|
|
|
{
|
|
|
|
MAP_OPTION( AI_PASSIVE ),
|
|
|
|
MAP_OPTION( AI_CANONNAME ),
|
|
|
|
MAP_OPTION( AI_NUMERICHOST ),
|
2014-02-13 00:29:31 +01:00
|
|
|
#ifdef AI_NUMERICSERV
|
|
|
|
MAP_OPTION( AI_NUMERICSERV ),
|
|
|
|
#endif
|
2014-09-11 03:59:39 +02:00
|
|
|
#ifdef AI_V4MAPPED
|
2013-12-11 09:01:52 +01:00
|
|
|
MAP_OPTION( AI_V4MAPPED ),
|
2014-09-11 03:59:39 +02:00
|
|
|
#endif
|
2010-11-18 20:46:49 +01:00
|
|
|
MAP_OPTION( AI_ADDRCONFIG ),
|
2005-11-17 13:58:35 +01:00
|
|
|
};
|
|
|
|
|
2007-12-17 15:40:02 +01:00
|
|
|
static const int ws_niflag_map[][2] =
|
|
|
|
{
|
|
|
|
MAP_OPTION( NI_NOFQDN ),
|
|
|
|
MAP_OPTION( NI_NUMERICHOST ),
|
|
|
|
MAP_OPTION( NI_NAMEREQD ),
|
|
|
|
MAP_OPTION( NI_NUMERICSERV ),
|
|
|
|
MAP_OPTION( NI_DGRAM ),
|
|
|
|
};
|
|
|
|
|
2005-11-17 13:58:35 +01:00
|
|
|
static const int ws_eai_map[][2] =
|
|
|
|
{
|
|
|
|
MAP_OPTION( EAI_AGAIN ),
|
|
|
|
MAP_OPTION( EAI_BADFLAGS ),
|
|
|
|
MAP_OPTION( EAI_FAIL ),
|
|
|
|
MAP_OPTION( EAI_FAMILY ),
|
|
|
|
MAP_OPTION( EAI_MEMORY ),
|
2005-11-22 13:00:43 +01:00
|
|
|
/* Note: EAI_NODATA is deprecated, but still
|
|
|
|
* used by Windows and Linux... We map the newer
|
|
|
|
* EAI_NONAME to EAI_NODATA for now until Windows
|
|
|
|
* changes too.
|
|
|
|
*/
|
|
|
|
#ifdef EAI_NODATA
|
2005-11-17 13:58:35 +01:00
|
|
|
MAP_OPTION( EAI_NODATA ),
|
2005-11-22 13:00:43 +01:00
|
|
|
#endif
|
|
|
|
#ifdef EAI_NONAME
|
|
|
|
{ WS_EAI_NODATA, EAI_NONAME },
|
|
|
|
#endif
|
|
|
|
|
2005-11-17 13:58:35 +01:00
|
|
|
MAP_OPTION( EAI_SERVICE ),
|
|
|
|
MAP_OPTION( EAI_SOCKTYPE ),
|
|
|
|
{ 0, 0 }
|
|
|
|
};
|
|
|
|
|
2015-12-22 14:15:41 +01:00
|
|
|
static const int ws_poll_map[][2] =
|
|
|
|
{
|
|
|
|
MAP_OPTION( POLLERR ),
|
|
|
|
MAP_OPTION( POLLHUP ),
|
|
|
|
MAP_OPTION( POLLNVAL ),
|
|
|
|
MAP_OPTION( POLLWRNORM ),
|
|
|
|
MAP_OPTION( POLLWRBAND ),
|
|
|
|
MAP_OPTION( POLLRDNORM ),
|
|
|
|
{ WS_POLLRDBAND, POLLPRI }
|
|
|
|
};
|
|
|
|
|
2008-04-24 13:45:10 +02:00
|
|
|
static const char magic_loopback_addr[] = {127, 12, 34, 56};
|
|
|
|
|
2010-12-06 01:08:54 +01:00
|
|
|
#ifndef HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS
|
2014-08-17 00:28:05 +02:00
|
|
|
#ifdef IP_PKTINFO
|
2010-12-06 01:08:54 +01:00
|
|
|
static inline WSACMSGHDR *fill_control_message(int level, int type, WSACMSGHDR *current, ULONG *maxsize, void *data, int len)
|
|
|
|
{
|
|
|
|
ULONG msgsize = sizeof(WSACMSGHDR) + WSA_CMSG_ALIGN(len);
|
|
|
|
char *ptr = (char *) current + sizeof(WSACMSGHDR);
|
|
|
|
|
|
|
|
/* Make sure there is at least enough room for this entry */
|
|
|
|
if (msgsize > *maxsize)
|
|
|
|
return NULL;
|
|
|
|
*maxsize -= msgsize;
|
|
|
|
/* Fill in the entry */
|
|
|
|
current->cmsg_len = sizeof(WSACMSGHDR) + len;
|
|
|
|
current->cmsg_level = level;
|
|
|
|
current->cmsg_type = type;
|
|
|
|
memcpy(ptr, data, len);
|
|
|
|
/* Return the pointer to where next entry should go */
|
|
|
|
return (WSACMSGHDR *) (ptr + WSA_CMSG_ALIGN(len));
|
|
|
|
}
|
2014-08-17 00:28:05 +02:00
|
|
|
#endif /* IP_PKTINFO */
|
2010-12-06 01:08:54 +01:00
|
|
|
|
|
|
|
static inline int convert_control_headers(struct msghdr *hdr, WSABUF *control)
|
|
|
|
{
|
|
|
|
#ifdef IP_PKTINFO
|
|
|
|
WSACMSGHDR *cmsg_win = (WSACMSGHDR *) control->buf, *ptr;
|
|
|
|
ULONG ctlsize = control->len;
|
|
|
|
struct cmsghdr *cmsg_unix;
|
|
|
|
|
|
|
|
ptr = cmsg_win;
|
|
|
|
/* Loop over all the headers, converting as appropriate */
|
|
|
|
for (cmsg_unix = CMSG_FIRSTHDR(hdr); cmsg_unix != NULL; cmsg_unix = CMSG_NXTHDR(hdr, cmsg_unix))
|
|
|
|
{
|
|
|
|
switch(cmsg_unix->cmsg_level)
|
|
|
|
{
|
|
|
|
case IPPROTO_IP:
|
|
|
|
switch(cmsg_unix->cmsg_type)
|
|
|
|
{
|
|
|
|
case IP_PKTINFO:
|
|
|
|
{
|
|
|
|
/* Convert the Unix IP_PKTINFO structure to the Windows version */
|
|
|
|
struct in_pktinfo *data_unix = (struct in_pktinfo *) CMSG_DATA(cmsg_unix);
|
|
|
|
struct WS_in_pktinfo data_win;
|
|
|
|
|
|
|
|
memcpy(&data_win.ipi_addr,&data_unix->ipi_addr.s_addr,4); /* 4 bytes = 32 address bits */
|
|
|
|
data_win.ipi_ifindex = data_unix->ipi_ifindex;
|
|
|
|
ptr = fill_control_message(WS_IPPROTO_IP, WS_IP_PKTINFO, ptr, &ctlsize,
|
|
|
|
(void*)&data_win, sizeof(data_win));
|
|
|
|
if (!ptr) goto error;
|
|
|
|
} break;
|
|
|
|
default:
|
|
|
|
FIXME("Unhandled IPPROTO_IP message header type %d\n", cmsg_unix->cmsg_type);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
FIXME("Unhandled message header level %d\n", cmsg_unix->cmsg_level);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
error:
|
|
|
|
/* Set the length of the returned control headers */
|
|
|
|
control->len = (ptr == NULL ? 0 : (char*)ptr - (char*)cmsg_win);
|
|
|
|
return (ptr != NULL);
|
|
|
|
#else /* IP_PKTINFO */
|
|
|
|
control->len = 0;
|
|
|
|
return 1;
|
|
|
|
#endif /* IP_PKTINFO */
|
|
|
|
}
|
|
|
|
#endif /* HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS */
|
|
|
|
|
2009-10-07 14:49:17 +02:00
|
|
|
/* ----------------------------------- error handling */
|
|
|
|
|
2010-03-22 19:56:21 +01:00
|
|
|
static NTSTATUS sock_get_ntstatus( int err )
|
2009-10-07 14:49:17 +02:00
|
|
|
{
|
2010-03-22 19:56:21 +01:00
|
|
|
switch ( err )
|
|
|
|
{
|
|
|
|
case EBADF: return STATUS_INVALID_HANDLE;
|
|
|
|
case EBUSY: return STATUS_DEVICE_BUSY;
|
|
|
|
case EPERM:
|
|
|
|
case EACCES: return STATUS_ACCESS_DENIED;
|
|
|
|
case EFAULT: return STATUS_NO_MEMORY;
|
|
|
|
case EINVAL: return STATUS_INVALID_PARAMETER;
|
|
|
|
case ENFILE:
|
|
|
|
case EMFILE: return STATUS_TOO_MANY_OPENED_FILES;
|
|
|
|
case EWOULDBLOCK: return STATUS_CANT_WAIT;
|
|
|
|
case EINPROGRESS: return STATUS_PENDING;
|
|
|
|
case EALREADY: return STATUS_NETWORK_BUSY;
|
|
|
|
case ENOTSOCK: return STATUS_OBJECT_TYPE_MISMATCH;
|
|
|
|
case EDESTADDRREQ: return STATUS_INVALID_PARAMETER;
|
|
|
|
case EMSGSIZE: return STATUS_BUFFER_OVERFLOW;
|
|
|
|
case EPROTONOSUPPORT:
|
|
|
|
case ESOCKTNOSUPPORT:
|
|
|
|
case EPFNOSUPPORT:
|
|
|
|
case EAFNOSUPPORT:
|
|
|
|
case EPROTOTYPE: return STATUS_NOT_SUPPORTED;
|
|
|
|
case ENOPROTOOPT: return STATUS_INVALID_PARAMETER;
|
|
|
|
case EOPNOTSUPP: return STATUS_NOT_SUPPORTED;
|
|
|
|
case EADDRINUSE: return STATUS_ADDRESS_ALREADY_ASSOCIATED;
|
|
|
|
case EADDRNOTAVAIL: return STATUS_INVALID_PARAMETER;
|
|
|
|
case ECONNREFUSED: return STATUS_CONNECTION_REFUSED;
|
|
|
|
case ESHUTDOWN: return STATUS_PIPE_DISCONNECTED;
|
|
|
|
case ENOTCONN: return STATUS_CONNECTION_DISCONNECTED;
|
|
|
|
case ETIMEDOUT: return STATUS_IO_TIMEOUT;
|
|
|
|
case ENETUNREACH: return STATUS_NETWORK_UNREACHABLE;
|
|
|
|
case ENETDOWN: return STATUS_NETWORK_BUSY;
|
|
|
|
case EPIPE:
|
|
|
|
case ECONNRESET: return STATUS_CONNECTION_RESET;
|
|
|
|
case ECONNABORTED: return STATUS_CONNECTION_ABORTED;
|
|
|
|
|
|
|
|
case 0: return STATUS_SUCCESS;
|
|
|
|
default:
|
|
|
|
WARN("Unknown errno %d!\n", err);
|
|
|
|
return STATUS_UNSUCCESSFUL;
|
|
|
|
}
|
|
|
|
}
|
2009-10-07 14:49:17 +02:00
|
|
|
|
2010-03-22 19:56:21 +01:00
|
|
|
static UINT sock_get_error( int err )
|
|
|
|
{
|
|
|
|
switch(err)
|
2009-10-07 14:49:17 +02:00
|
|
|
{
|
|
|
|
case EINTR: return WSAEINTR;
|
|
|
|
case EPERM:
|
|
|
|
case EACCES: return WSAEACCES;
|
|
|
|
case EFAULT: return WSAEFAULT;
|
|
|
|
case EINVAL: return WSAEINVAL;
|
|
|
|
case EMFILE: return WSAEMFILE;
|
|
|
|
case EWOULDBLOCK: return WSAEWOULDBLOCK;
|
|
|
|
case EINPROGRESS: return WSAEINPROGRESS;
|
|
|
|
case EALREADY: return WSAEALREADY;
|
2015-04-14 07:02:51 +02:00
|
|
|
case EBADF:
|
2009-10-07 14:49:17 +02:00
|
|
|
case ENOTSOCK: return WSAENOTSOCK;
|
|
|
|
case EDESTADDRREQ: return WSAEDESTADDRREQ;
|
|
|
|
case EMSGSIZE: return WSAEMSGSIZE;
|
|
|
|
case EPROTOTYPE: return WSAEPROTOTYPE;
|
|
|
|
case ENOPROTOOPT: return WSAENOPROTOOPT;
|
|
|
|
case EPROTONOSUPPORT: return WSAEPROTONOSUPPORT;
|
|
|
|
case ESOCKTNOSUPPORT: return WSAESOCKTNOSUPPORT;
|
|
|
|
case EOPNOTSUPP: return WSAEOPNOTSUPP;
|
|
|
|
case EPFNOSUPPORT: return WSAEPFNOSUPPORT;
|
|
|
|
case EAFNOSUPPORT: return WSAEAFNOSUPPORT;
|
|
|
|
case EADDRINUSE: return WSAEADDRINUSE;
|
|
|
|
case EADDRNOTAVAIL: return WSAEADDRNOTAVAIL;
|
|
|
|
case ENETDOWN: return WSAENETDOWN;
|
|
|
|
case ENETUNREACH: return WSAENETUNREACH;
|
|
|
|
case ENETRESET: return WSAENETRESET;
|
|
|
|
case ECONNABORTED: return WSAECONNABORTED;
|
|
|
|
case EPIPE:
|
|
|
|
case ECONNRESET: return WSAECONNRESET;
|
|
|
|
case ENOBUFS: return WSAENOBUFS;
|
|
|
|
case EISCONN: return WSAEISCONN;
|
|
|
|
case ENOTCONN: return WSAENOTCONN;
|
|
|
|
case ESHUTDOWN: return WSAESHUTDOWN;
|
|
|
|
case ETOOMANYREFS: return WSAETOOMANYREFS;
|
|
|
|
case ETIMEDOUT: return WSAETIMEDOUT;
|
|
|
|
case ECONNREFUSED: return WSAECONNREFUSED;
|
|
|
|
case ELOOP: return WSAELOOP;
|
|
|
|
case ENAMETOOLONG: return WSAENAMETOOLONG;
|
|
|
|
case EHOSTDOWN: return WSAEHOSTDOWN;
|
|
|
|
case EHOSTUNREACH: return WSAEHOSTUNREACH;
|
|
|
|
case ENOTEMPTY: return WSAENOTEMPTY;
|
|
|
|
#ifdef EPROCLIM
|
|
|
|
case EPROCLIM: return WSAEPROCLIM;
|
|
|
|
#endif
|
|
|
|
#ifdef EUSERS
|
|
|
|
case EUSERS: return WSAEUSERS;
|
|
|
|
#endif
|
|
|
|
#ifdef EDQUOT
|
|
|
|
case EDQUOT: return WSAEDQUOT;
|
|
|
|
#endif
|
|
|
|
#ifdef ESTALE
|
|
|
|
case ESTALE: return WSAESTALE;
|
|
|
|
#endif
|
|
|
|
#ifdef EREMOTE
|
|
|
|
case EREMOTE: return WSAEREMOTE;
|
|
|
|
#endif
|
|
|
|
|
2010-03-22 19:56:21 +01:00
|
|
|
/* just in case we ever get here and there are no problems */
|
2009-10-07 14:49:17 +02:00
|
|
|
case 0: return 0;
|
2010-03-22 19:56:21 +01:00
|
|
|
default:
|
|
|
|
WARN("Unknown errno %d!\n", err);
|
2009-10-07 14:49:17 +02:00
|
|
|
return WSAEOPNOTSUPP;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-03-22 19:56:21 +01:00
|
|
|
static UINT wsaErrno(void)
|
2009-10-07 14:49:17 +02:00
|
|
|
{
|
2010-03-22 19:56:21 +01:00
|
|
|
int loc_errno = errno;
|
|
|
|
WARN("errno %d, (%s).\n", loc_errno, strerror(loc_errno));
|
2009-10-07 14:49:17 +02:00
|
|
|
|
2010-03-22 19:56:21 +01:00
|
|
|
return sock_get_error( loc_errno );
|
|
|
|
}
|
|
|
|
|
|
|
|
/* most ws2 overlapped functions return an ntstatus-based error code */
|
|
|
|
static NTSTATUS wsaErrStatus(void)
|
|
|
|
{
|
|
|
|
int loc_errno = errno;
|
|
|
|
WARN("errno %d, (%s).\n", loc_errno, strerror(loc_errno));
|
|
|
|
|
|
|
|
return sock_get_ntstatus(loc_errno);
|
|
|
|
}
|
|
|
|
|
|
|
|
static UINT wsaHerrno(int loc_errno)
|
|
|
|
{
|
2009-10-07 14:49:17 +02:00
|
|
|
WARN("h_errno %d.\n", loc_errno);
|
|
|
|
|
|
|
|
switch(loc_errno)
|
|
|
|
{
|
|
|
|
case HOST_NOT_FOUND: return WSAHOST_NOT_FOUND;
|
|
|
|
case TRY_AGAIN: return WSATRY_AGAIN;
|
|
|
|
case NO_RECOVERY: return WSANO_RECOVERY;
|
|
|
|
case NO_DATA: return WSANO_DATA;
|
|
|
|
case ENOBUFS: return WSAENOBUFS;
|
|
|
|
|
|
|
|
case 0: return 0;
|
2010-03-22 19:56:21 +01:00
|
|
|
default:
|
2009-10-07 14:49:17 +02:00
|
|
|
WARN("Unknown h_errno %d!\n", loc_errno);
|
|
|
|
return WSAEOPNOTSUPP;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2007-03-23 16:11:35 +01:00
|
|
|
static inline DWORD NtStatusToWSAError( const DWORD status )
|
2002-04-25 23:34:24 +02:00
|
|
|
{
|
|
|
|
/* We only need to cover the status codes set by server async request handling */
|
|
|
|
DWORD wserr;
|
|
|
|
switch ( status )
|
|
|
|
{
|
2010-03-22 19:56:21 +01:00
|
|
|
case STATUS_SUCCESS: wserr = 0; break;
|
|
|
|
case STATUS_PENDING: wserr = WSA_IO_PENDING; break;
|
|
|
|
case STATUS_OBJECT_TYPE_MISMATCH: wserr = WSAENOTSOCK; break;
|
|
|
|
case STATUS_INVALID_HANDLE: wserr = WSAEBADF; break;
|
|
|
|
case STATUS_INVALID_PARAMETER: wserr = WSAEINVAL; break;
|
|
|
|
case STATUS_PIPE_DISCONNECTED: wserr = WSAESHUTDOWN; break;
|
|
|
|
case STATUS_NETWORK_BUSY: wserr = WSAEALREADY; break;
|
|
|
|
case STATUS_NETWORK_UNREACHABLE: wserr = WSAENETUNREACH; break;
|
|
|
|
case STATUS_CONNECTION_REFUSED: wserr = WSAECONNREFUSED; break;
|
|
|
|
case STATUS_CONNECTION_DISCONNECTED: wserr = WSAENOTCONN; break;
|
|
|
|
case STATUS_CONNECTION_RESET: wserr = WSAECONNRESET; break;
|
|
|
|
case STATUS_CONNECTION_ABORTED: wserr = WSAECONNABORTED; break;
|
|
|
|
case STATUS_CANCELLED: wserr = WSA_OPERATION_ABORTED; break;
|
|
|
|
case STATUS_ADDRESS_ALREADY_ASSOCIATED: wserr = WSAEADDRINUSE; break;
|
|
|
|
case STATUS_IO_TIMEOUT:
|
|
|
|
case STATUS_TIMEOUT: wserr = WSAETIMEDOUT; break;
|
|
|
|
case STATUS_NO_MEMORY: wserr = WSAEFAULT; break;
|
|
|
|
case STATUS_ACCESS_DENIED: wserr = WSAEACCES; break;
|
|
|
|
case STATUS_TOO_MANY_OPENED_FILES: wserr = WSAEMFILE; break;
|
|
|
|
case STATUS_CANT_WAIT: wserr = WSAEWOULDBLOCK; break;
|
|
|
|
case STATUS_BUFFER_OVERFLOW: wserr = WSAEMSGSIZE; break;
|
|
|
|
case STATUS_NOT_SUPPORTED: wserr = WSAEOPNOTSUPP; break;
|
2010-07-02 14:57:56 +02:00
|
|
|
case STATUS_HOST_UNREACHABLE: wserr = WSAEHOSTUNREACH; break;
|
2010-03-22 19:56:21 +01:00
|
|
|
|
2002-04-25 23:34:24 +02:00
|
|
|
default:
|
2010-03-22 19:56:21 +01:00
|
|
|
wserr = RtlNtStatusToDosError( status );
|
|
|
|
FIXME( "Status code %08x converted to DOS error code %x\n", status, wserr );
|
2002-04-25 23:34:24 +02:00
|
|
|
}
|
|
|
|
return wserr;
|
|
|
|
}
|
|
|
|
|
2001-02-27 03:09:16 +01:00
|
|
|
/* set last error code from NT status without mapping WSA errors */
|
2007-03-23 16:11:35 +01:00
|
|
|
static inline unsigned int set_error( unsigned int err )
|
2000-01-24 22:58:06 +01:00
|
|
|
{
|
2001-02-27 03:09:16 +01:00
|
|
|
if (err)
|
2000-01-24 22:58:06 +01:00
|
|
|
{
|
2005-01-14 20:54:38 +01:00
|
|
|
err = NtStatusToWSAError( err );
|
2001-02-27 03:09:16 +01:00
|
|
|
SetLastError( err );
|
2000-01-24 22:58:06 +01:00
|
|
|
}
|
2001-02-27 03:09:16 +01:00
|
|
|
return err;
|
2000-01-24 22:58:06 +01:00
|
|
|
}
|
|
|
|
|
2007-04-10 22:32:46 +02:00
|
|
|
static inline int get_sock_fd( SOCKET s, DWORD access, unsigned int *options )
|
1999-10-23 18:53:34 +02:00
|
|
|
{
|
2002-03-23 21:43:52 +01:00
|
|
|
int fd;
|
2007-04-10 22:32:46 +02:00
|
|
|
if (set_error( wine_server_handle_to_fd( SOCKET2HANDLE(s), access, &fd, options ) ))
|
2002-10-30 21:26:32 +01:00
|
|
|
return -1;
|
2002-03-23 21:43:52 +01:00
|
|
|
return fd;
|
1999-10-23 18:53:34 +02:00
|
|
|
}
|
|
|
|
|
2007-03-23 16:11:35 +01:00
|
|
|
static inline void release_sock_fd( SOCKET s, int fd )
|
2002-04-17 18:46:49 +02:00
|
|
|
{
|
2003-12-02 05:19:56 +01:00
|
|
|
wine_server_release_fd( SOCKET2HANDLE(s), fd );
|
2002-04-17 18:46:49 +02:00
|
|
|
}
|
|
|
|
|
2002-10-30 21:26:32 +01:00
|
|
|
static void _enable_event( HANDLE s, unsigned int event,
|
|
|
|
unsigned int sstate, unsigned int cstate )
|
1999-10-23 18:53:34 +02:00
|
|
|
{
|
2001-02-27 03:09:16 +01:00
|
|
|
SERVER_START_REQ( enable_socket_event )
|
2000-08-31 03:59:51 +02:00
|
|
|
{
|
2008-12-08 16:05:17 +01:00
|
|
|
req->handle = wine_server_obj_handle( s );
|
2000-08-31 03:59:51 +02:00
|
|
|
req->mask = event;
|
|
|
|
req->sstate = sstate;
|
|
|
|
req->cstate = cstate;
|
2001-11-30 19:46:42 +01:00
|
|
|
wine_server_call( req );
|
2000-08-31 03:59:51 +02:00
|
|
|
}
|
|
|
|
SERVER_END_REQ;
|
1999-10-23 18:53:34 +02:00
|
|
|
}
|
|
|
|
|
2013-03-22 06:59:50 +01:00
|
|
|
static NTSTATUS _is_blocking(SOCKET s, BOOL *ret)
|
1999-10-23 18:53:34 +02:00
|
|
|
{
|
2013-03-22 06:59:50 +01:00
|
|
|
NTSTATUS status;
|
2001-02-27 03:09:16 +01:00
|
|
|
SERVER_START_REQ( get_socket_event )
|
2000-08-31 03:59:51 +02:00
|
|
|
{
|
2008-12-08 16:05:17 +01:00
|
|
|
req->handle = wine_server_obj_handle( SOCKET2HANDLE(s) );
|
2000-08-31 03:59:51 +02:00
|
|
|
req->service = FALSE;
|
|
|
|
req->c_event = 0;
|
2013-03-22 06:59:50 +01:00
|
|
|
status = wine_server_call( req );
|
|
|
|
*ret = (reply->state & FD_WINE_NONBLOCKING) == 0;
|
2000-08-31 03:59:51 +02:00
|
|
|
}
|
|
|
|
SERVER_END_REQ;
|
2013-03-22 06:59:50 +01:00
|
|
|
return status;
|
1999-10-23 18:53:34 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static unsigned int _get_sock_mask(SOCKET s)
|
|
|
|
{
|
2000-08-31 03:59:51 +02:00
|
|
|
unsigned int ret;
|
2001-02-27 03:09:16 +01:00
|
|
|
SERVER_START_REQ( get_socket_event )
|
2000-08-31 03:59:51 +02:00
|
|
|
{
|
2008-12-08 16:05:17 +01:00
|
|
|
req->handle = wine_server_obj_handle( SOCKET2HANDLE(s) );
|
2000-08-31 03:59:51 +02:00
|
|
|
req->service = FALSE;
|
|
|
|
req->c_event = 0;
|
2001-11-30 19:46:42 +01:00
|
|
|
wine_server_call( req );
|
|
|
|
ret = reply->mask;
|
2000-08-31 03:59:51 +02:00
|
|
|
}
|
|
|
|
SERVER_END_REQ;
|
|
|
|
return ret;
|
1999-10-23 18:53:34 +02:00
|
|
|
}
|
1999-04-10 18:58:55 +02:00
|
|
|
|
1999-10-23 18:53:34 +02:00
|
|
|
static void _sync_sock_state(SOCKET s)
|
1999-04-10 18:58:55 +02:00
|
|
|
{
|
2013-03-22 06:59:50 +01:00
|
|
|
BOOL dummy;
|
1999-10-23 18:53:34 +02:00
|
|
|
/* do a dummy wineserver request in order to let
|
|
|
|
the wineserver run through its select loop once */
|
2013-03-22 06:59:50 +01:00
|
|
|
(void)_is_blocking(s, &dummy);
|
1999-10-23 18:53:34 +02:00
|
|
|
}
|
1999-04-10 18:58:55 +02:00
|
|
|
|
2015-04-08 07:02:41 +02:00
|
|
|
static void _get_sock_errors(SOCKET s, int *events)
|
1999-10-23 18:53:34 +02:00
|
|
|
{
|
2001-11-30 19:46:42 +01:00
|
|
|
SERVER_START_REQ( get_socket_event )
|
2000-08-31 03:59:51 +02:00
|
|
|
{
|
2008-12-08 16:05:17 +01:00
|
|
|
req->handle = wine_server_obj_handle( SOCKET2HANDLE(s) );
|
2000-08-31 03:59:51 +02:00
|
|
|
req->service = FALSE;
|
|
|
|
req->c_event = 0;
|
2015-04-08 07:02:41 +02:00
|
|
|
wine_server_set_reply( req, events, sizeof(int) * FD_MAX_EVENTS );
|
2001-11-30 19:46:42 +01:00
|
|
|
wine_server_call( req );
|
2000-08-31 03:59:51 +02:00
|
|
|
}
|
2001-11-30 19:46:42 +01:00
|
|
|
SERVER_END_REQ;
|
2015-04-08 07:02:41 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static int _get_sock_error(SOCKET s, unsigned int bit)
|
|
|
|
{
|
|
|
|
int events[FD_MAX_EVENTS];
|
|
|
|
_get_sock_errors(s, events);
|
2001-11-30 19:46:42 +01:00
|
|
|
return events[bit];
|
1999-04-10 18:58:55 +02:00
|
|
|
}
|
|
|
|
|
2015-06-18 16:03:08 +02:00
|
|
|
static int _get_fd_type(int fd)
|
|
|
|
{
|
|
|
|
int sock_type = -1;
|
|
|
|
socklen_t optlen = sizeof(sock_type);
|
|
|
|
getsockopt(fd, SOL_SOCKET, SO_TYPE, (char*) &sock_type, &optlen);
|
|
|
|
return sock_type;
|
|
|
|
}
|
|
|
|
|
2004-12-22 19:23:49 +01:00
|
|
|
static struct per_thread_data *get_per_thread_data(void)
|
|
|
|
{
|
2005-05-14 13:09:21 +02:00
|
|
|
struct per_thread_data * ptb = NtCurrentTeb()->WinSockData;
|
2004-12-22 19:23:49 +01:00
|
|
|
/* lazy initialization */
|
|
|
|
if (!ptb)
|
|
|
|
{
|
|
|
|
ptb = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*ptb) );
|
2005-05-14 13:09:21 +02:00
|
|
|
NtCurrentTeb()->WinSockData = ptb;
|
2004-12-22 19:23:49 +01:00
|
|
|
}
|
|
|
|
return ptb;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void free_per_thread_data(void)
|
1999-10-23 18:53:34 +02:00
|
|
|
{
|
2005-05-14 13:09:21 +02:00
|
|
|
struct per_thread_data * ptb = NtCurrentTeb()->WinSockData;
|
2004-12-22 19:23:49 +01:00
|
|
|
|
|
|
|
if (!ptb) return;
|
|
|
|
|
2001-02-20 02:57:13 +01:00
|
|
|
/* delete scratch buffers */
|
2004-12-22 19:23:49 +01:00
|
|
|
HeapFree( GetProcessHeap(), 0, ptb->he_buffer );
|
|
|
|
HeapFree( GetProcessHeap(), 0, ptb->se_buffer );
|
|
|
|
HeapFree( GetProcessHeap(), 0, ptb->pe_buffer );
|
|
|
|
ptb->he_buffer = NULL;
|
|
|
|
ptb->se_buffer = NULL;
|
|
|
|
ptb->pe_buffer = NULL;
|
1999-10-23 18:53:34 +02:00
|
|
|
|
2004-12-22 19:23:49 +01:00
|
|
|
HeapFree( GetProcessHeap(), 0, ptb );
|
2005-05-14 13:09:21 +02:00
|
|
|
NtCurrentTeb()->WinSockData = NULL;
|
1999-10-23 18:53:34 +02:00
|
|
|
}
|
|
|
|
|
2000-03-28 22:22:59 +02:00
|
|
|
/***********************************************************************
|
2002-11-05 00:53:41 +01:00
|
|
|
* DllMain (WS2_32.init)
|
2000-03-28 22:22:59 +02:00
|
|
|
*/
|
2002-11-05 00:53:41 +01:00
|
|
|
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID fImpLoad)
|
1999-10-23 18:53:34 +02:00
|
|
|
{
|
2006-10-12 14:53:44 +02:00
|
|
|
TRACE("%p 0x%x %p\n", hInstDLL, fdwReason, fImpLoad);
|
1999-10-23 18:53:34 +02:00
|
|
|
switch (fdwReason) {
|
2002-04-27 03:05:35 +02:00
|
|
|
case DLL_PROCESS_ATTACH:
|
|
|
|
break;
|
1999-10-23 18:53:34 +02:00
|
|
|
case DLL_PROCESS_DETACH:
|
2013-05-15 10:34:26 +02:00
|
|
|
if (fImpLoad) break;
|
2004-12-22 19:23:49 +01:00
|
|
|
free_per_thread_data();
|
2011-11-17 09:52:09 +01:00
|
|
|
DeleteCriticalSection(&csWSgetXXXbyYYY);
|
2004-12-22 19:23:49 +01:00
|
|
|
break;
|
|
|
|
case DLL_THREAD_DETACH:
|
|
|
|
free_per_thread_data();
|
|
|
|
break;
|
1999-10-23 18:53:34 +02:00
|
|
|
}
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2015-03-29 05:53:30 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* convert_flags()
|
|
|
|
*
|
|
|
|
* Converts send/recv flags from Windows format.
|
|
|
|
* Return the converted flag bits, unsupported flags remain unchanged.
|
|
|
|
*/
|
|
|
|
static int convert_flags(int flags)
|
|
|
|
{
|
|
|
|
int i, out;
|
|
|
|
if (!flags) return 0;
|
|
|
|
|
|
|
|
for (out = i = 0; flags && i < sizeof(ws_flags_map) / sizeof(ws_flags_map[0]); i++)
|
|
|
|
{
|
|
|
|
if (ws_flags_map[i][0] & flags)
|
|
|
|
{
|
|
|
|
out |= ws_flags_map[i][1];
|
|
|
|
flags &= ~ws_flags_map[i][0];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (flags)
|
|
|
|
{
|
|
|
|
FIXME("Unknown send/recv flags 0x%x, using anyway...\n", flags);
|
|
|
|
out |= flags;
|
|
|
|
}
|
|
|
|
return out;
|
|
|
|
}
|
|
|
|
|
1997-08-24 18:00:30 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* convert_sockopt()
|
|
|
|
*
|
|
|
|
* Converts socket flags from Windows format.
|
2000-09-16 22:51:40 +02:00
|
|
|
* Return 1 if converted, 0 if not (error).
|
1997-08-24 18:00:30 +02:00
|
|
|
*/
|
2000-09-16 22:51:40 +02:00
|
|
|
static int convert_sockopt(INT *level, INT *optname)
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
{
|
2008-12-10 22:55:35 +01:00
|
|
|
unsigned int i;
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
switch (*level)
|
|
|
|
{
|
|
|
|
case WS_SOL_SOCKET:
|
|
|
|
*level = SOL_SOCKET;
|
2005-12-05 11:59:43 +01:00
|
|
|
for(i=0; i<sizeof(ws_sock_map)/sizeof(ws_sock_map[0]); i++) {
|
2003-04-05 00:29:52 +02:00
|
|
|
if( ws_sock_map[i][0] == *optname )
|
|
|
|
{
|
|
|
|
*optname = ws_sock_map[i][1];
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
2000-09-16 22:51:40 +02:00
|
|
|
FIXME("Unknown SOL_SOCKET optname 0x%x\n", *optname);
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
break;
|
|
|
|
case WS_IPPROTO_TCP:
|
1999-03-09 18:31:42 +01:00
|
|
|
*level = IPPROTO_TCP;
|
2005-12-05 11:59:43 +01:00
|
|
|
for(i=0; i<sizeof(ws_tcp_map)/sizeof(ws_tcp_map[0]); i++) {
|
2003-04-05 00:29:52 +02:00
|
|
|
if ( ws_tcp_map[i][0] == *optname )
|
|
|
|
{
|
|
|
|
*optname = ws_tcp_map[i][1];
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
2000-09-16 22:51:40 +02:00
|
|
|
FIXME("Unknown IPPROTO_TCP optname 0x%x\n", *optname);
|
1999-03-09 18:31:42 +01:00
|
|
|
break;
|
2003-04-05 00:04:47 +02:00
|
|
|
case WS_IPPROTO_IP:
|
|
|
|
*level = IPPROTO_IP;
|
2005-12-05 11:59:43 +01:00
|
|
|
for(i=0; i<sizeof(ws_ip_map)/sizeof(ws_ip_map[0]); i++) {
|
2003-04-05 00:29:52 +02:00
|
|
|
if (ws_ip_map[i][0] == *optname )
|
|
|
|
{
|
|
|
|
*optname = ws_ip_map[i][1];
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
2003-04-05 00:04:47 +02:00
|
|
|
FIXME("Unknown IPPROTO_IP optname 0x%x\n", *optname);
|
|
|
|
break;
|
2010-03-31 00:07:24 +02:00
|
|
|
case WS_IPPROTO_IPV6:
|
|
|
|
*level = IPPROTO_IPV6;
|
|
|
|
for(i=0; i<sizeof(ws_ipv6_map)/sizeof(ws_ipv6_map[0]); i++) {
|
|
|
|
if (ws_ipv6_map[i][0] == *optname )
|
|
|
|
{
|
|
|
|
*optname = ws_ipv6_map[i][1];
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
FIXME("Unknown IPPROTO_IPV6 optname 0x%x\n", *optname);
|
|
|
|
break;
|
2003-04-05 00:04:47 +02:00
|
|
|
default: FIXME("Unimplemented or unknown socket level\n");
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
}
|
2000-09-16 22:51:40 +02:00
|
|
|
return 0;
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
}
|
|
|
|
|
1997-08-24 18:00:30 +02:00
|
|
|
/* ----------------------------------- Per-thread info (or per-process?) */
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
|
2003-11-29 00:14:02 +01:00
|
|
|
static char *strdup_lower(const char *str)
|
Release 980201
Sun Feb 1 13:24:54 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [files/drive.c]
Added Device= parameter to drive configuration.
* [if1632/relay.c]
Throw() and Catch() now use the correct CATCHBUF layout (untested).
* [tools/build.c] [include/stackframe.h] [loader/task.c]
Moved 16-bit stack pointer into thread database.
Save current %fs while running 16-bit code.
Fri Jan 30 09:25:49 1998 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [graphics/mapping.c]
Made DPtoLP32 and LPtoDP32 respect world transforms.
* [graphics/path.c] [graphics/painting.c] [if1632/gdi.spec]
[include/path.h]
More path support.
* [include/gdi.h] [include/windows.h] [objects/dc.c]
[relay/gdi32.spec]
Support for Get/SetArcDirection and Get/SetWorldTransform
* [windows/hook.c]
Fixed a bug in HOOK_Map16To32Common.
Thu Jan 29 23:43:18 1998 Douglas Ridgway <ridgway@taiga.gmcl.com>
* [graphics/metafiledrv/init.c] [objects/metafile.c]
Documentation for metafile related API calls. Fixed a bug to avoid
documenting it.
* [include/windows.h]
Declaration for LoadImage.
Thu Jan 29 21:44:45 1998 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/win16drv/*]
Changes to printing code to enable use of printer fonts with the
win3.1 postscript driver. Remember to add printer=on to [wine]
section of wine.conf . You will also need to disable truetype
fonts from control panel. Winword 6.0 and Write seem to be happy
with this...
* [include/bitmap.h]
Fix Widthbytes for 15bpp displays.
Tue Jan 27 20:54:08 1998 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [tsx11/*] [include/ts*] [tools/make_X11wrappers]
Implemented thread-safe X11 wrappers.
Tue Jan 27 13:54:09 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu>
* [windows/queue.c]
Forgot to convert thdb to thread_id.
* [misc/registry.c]
Sped up Windows 95 registry reading. Changed code to traverse
registry as a tree rather than read in all possible keys
(including dead ones).
Tue Jan 27 12:46:09 1998 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [loader/pe_image.c][Makefile.in][scheduler/thread.c]
[libtest/hello5.c]
Don't exit() on failed to load referenced dlls.
Fixed static tls allocation for multiple threads.
WINELIB should now be able to load PE dlls. A sample
winelib program, that dynamically loads a internal dll
is included.
* [graphics/ddraw.c][include/ddraw.h][include/d3d.h]
Cleaned up and enhanced further. Added several DirectX5
interface definitions and DirectSurface3 implementation.
Stubs for D3D (NOT coming soon, just there so it fails safely).
* [multimedia/dsound.c][include/dsound.h]
Actually works now for a lot of cases. Some DirectX5 stuff
added. Still lacking several features.
* [windows/dinput.c][include/dinput.h]
Started implementing DirectInput. Doesn't work yet, don't
know why.
* [if1632/thunk.c][misc/callbacks.c]
[win32/kernel.c][include/callbacks.h]
Added WOWCallback16Ex, WOWHandle32.
* [misc/cpu.c]
Fixed GetSystemInfo, IsProcessorFeaturePresent.
* [multimedia/joystick.c][multimedia/time.c]
Several fixes. Small hack to get timerevents in timeGetTime() loops.
Tue Jan 20 11:26:27 1998 Slaven Rezic <eserte@cs.tu-berlin.de>
* [configure.in]
Fixed check for union semun on FreeBSD systems.
Sun Jan 18 23:05:04 1998 Karl Backstrm <karl_b@geocities.com>
* [misc/ole2nls.c] [programs/progman/Sw.rc] [programs/winhelp/Sw.rc]
[resources/sysres_Sw.rc]
Added/updated Swedish language support.
Sun Jan 18 18:49:01 1998 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [misc/winsock.c] [misc/winsock_dns.c] [windows/event.c]
[windows/win.c] [windows/dce.c] [windows/winpos.c]
Bug fixes.
Sun Jan 18 12:45:23 1997 Andreas Mohr <100.30936@germany.net>
* [msdos/int25.c] [msdos/int26.c]
Implemented "native" absolute disk read/write access.
* [msdos/int13.c] [msdos/ioports.c]
Enhanced GET DRIVE PARAMETERS (int13 AH=08).
* [graphics/win16drv/prtdrv.c] [if1632/gdi.spec]
Fixed typos, implemented dmEnumDFonts,
Started implementation of dmRealizeObject.
* [if1632/compobj.spec] [ole/compobj.c] [relay32/ole32.spec]
Stubs CoCreateInstance, CoFreeUnusedLibraries, implemented
CoFileTimeNow.
* [if1632/kernel.spec] [include/windows.h] [memory/global.c]
[memory/string.c] [misc/kernel.c] [misc/Makefile.in]
[misc/toolhelp.c] [msdos/int21.c]
Implemented GlobalHandleNoRIP, GetFreeMemInfo, DebugFillBuffer,
stubs GetSetKernelDOSProc, DiagQuery, DiagOutput, ToolHelpHook
(Undocumented Windows).
* [if1632/user.spec] [if1632/win32s16.spec] [misc/win32s16.c]
Misc stubs.
* [if1632/winaspi.spec] [misc/aspi.c]
Implemented GetASPIDLLVersion.
* [if1632/wprocs.spec] [msdos/int20.c] [msdos/Makefile.in]
Added handler for Int 0x20 (terminate program, _very_ old-fashioned).
* [misc/w32scomb.c]
Implemented Get16DLLAddress() partially
(big thanks to Marcus and Alexandre).
* [relay32/Makefile.in] [relay32/builtin32.c] [relay32/dplay.spec]
Added built-in DPLAY.DLL.
* [relay32/winmm.spec] [multimedia/joystick.c]
Added joySetThreshold.
* [misc/windebug.c]
Added WinNotify.
* [win32/console.c]
Stubs CreateConsoleScreenBuffer, SetConsoleActiveScreenBuffer,
WriteConsoleOutput32A.
* [windows/user.c]
Stub SetEventHook.
Sat Jan 17 19:30:35 1998 Matthew Toseland <Paul.Toseland@btinternet.com>
* [windows/painting.c]
Fixed broken restore-to-maximized.
Mon Jan 12 21:25:32 1998 Perceval - Marc Huguet Puig <mhp@tinet.fut.es>
* [documentation/wine.man] [include/options.h]
[misc/main.c] [ole/ole2nls.c] [resources/sysres.c]
[resources/sysres_Ca.rc] [resources/Makefile.in]
Added language catalan. (Afegit l'idioma catal).
1998-02-01 19:33:27 +01:00
|
|
|
{
|
2003-11-29 00:14:02 +01:00
|
|
|
int i;
|
|
|
|
char *ret = HeapAlloc( GetProcessHeap(), 0, strlen(str) + 1 );
|
Release 980201
Sun Feb 1 13:24:54 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [files/drive.c]
Added Device= parameter to drive configuration.
* [if1632/relay.c]
Throw() and Catch() now use the correct CATCHBUF layout (untested).
* [tools/build.c] [include/stackframe.h] [loader/task.c]
Moved 16-bit stack pointer into thread database.
Save current %fs while running 16-bit code.
Fri Jan 30 09:25:49 1998 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [graphics/mapping.c]
Made DPtoLP32 and LPtoDP32 respect world transforms.
* [graphics/path.c] [graphics/painting.c] [if1632/gdi.spec]
[include/path.h]
More path support.
* [include/gdi.h] [include/windows.h] [objects/dc.c]
[relay/gdi32.spec]
Support for Get/SetArcDirection and Get/SetWorldTransform
* [windows/hook.c]
Fixed a bug in HOOK_Map16To32Common.
Thu Jan 29 23:43:18 1998 Douglas Ridgway <ridgway@taiga.gmcl.com>
* [graphics/metafiledrv/init.c] [objects/metafile.c]
Documentation for metafile related API calls. Fixed a bug to avoid
documenting it.
* [include/windows.h]
Declaration for LoadImage.
Thu Jan 29 21:44:45 1998 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/win16drv/*]
Changes to printing code to enable use of printer fonts with the
win3.1 postscript driver. Remember to add printer=on to [wine]
section of wine.conf . You will also need to disable truetype
fonts from control panel. Winword 6.0 and Write seem to be happy
with this...
* [include/bitmap.h]
Fix Widthbytes for 15bpp displays.
Tue Jan 27 20:54:08 1998 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [tsx11/*] [include/ts*] [tools/make_X11wrappers]
Implemented thread-safe X11 wrappers.
Tue Jan 27 13:54:09 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu>
* [windows/queue.c]
Forgot to convert thdb to thread_id.
* [misc/registry.c]
Sped up Windows 95 registry reading. Changed code to traverse
registry as a tree rather than read in all possible keys
(including dead ones).
Tue Jan 27 12:46:09 1998 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [loader/pe_image.c][Makefile.in][scheduler/thread.c]
[libtest/hello5.c]
Don't exit() on failed to load referenced dlls.
Fixed static tls allocation for multiple threads.
WINELIB should now be able to load PE dlls. A sample
winelib program, that dynamically loads a internal dll
is included.
* [graphics/ddraw.c][include/ddraw.h][include/d3d.h]
Cleaned up and enhanced further. Added several DirectX5
interface definitions and DirectSurface3 implementation.
Stubs for D3D (NOT coming soon, just there so it fails safely).
* [multimedia/dsound.c][include/dsound.h]
Actually works now for a lot of cases. Some DirectX5 stuff
added. Still lacking several features.
* [windows/dinput.c][include/dinput.h]
Started implementing DirectInput. Doesn't work yet, don't
know why.
* [if1632/thunk.c][misc/callbacks.c]
[win32/kernel.c][include/callbacks.h]
Added WOWCallback16Ex, WOWHandle32.
* [misc/cpu.c]
Fixed GetSystemInfo, IsProcessorFeaturePresent.
* [multimedia/joystick.c][multimedia/time.c]
Several fixes. Small hack to get timerevents in timeGetTime() loops.
Tue Jan 20 11:26:27 1998 Slaven Rezic <eserte@cs.tu-berlin.de>
* [configure.in]
Fixed check for union semun on FreeBSD systems.
Sun Jan 18 23:05:04 1998 Karl Backstrm <karl_b@geocities.com>
* [misc/ole2nls.c] [programs/progman/Sw.rc] [programs/winhelp/Sw.rc]
[resources/sysres_Sw.rc]
Added/updated Swedish language support.
Sun Jan 18 18:49:01 1998 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [misc/winsock.c] [misc/winsock_dns.c] [windows/event.c]
[windows/win.c] [windows/dce.c] [windows/winpos.c]
Bug fixes.
Sun Jan 18 12:45:23 1997 Andreas Mohr <100.30936@germany.net>
* [msdos/int25.c] [msdos/int26.c]
Implemented "native" absolute disk read/write access.
* [msdos/int13.c] [msdos/ioports.c]
Enhanced GET DRIVE PARAMETERS (int13 AH=08).
* [graphics/win16drv/prtdrv.c] [if1632/gdi.spec]
Fixed typos, implemented dmEnumDFonts,
Started implementation of dmRealizeObject.
* [if1632/compobj.spec] [ole/compobj.c] [relay32/ole32.spec]
Stubs CoCreateInstance, CoFreeUnusedLibraries, implemented
CoFileTimeNow.
* [if1632/kernel.spec] [include/windows.h] [memory/global.c]
[memory/string.c] [misc/kernel.c] [misc/Makefile.in]
[misc/toolhelp.c] [msdos/int21.c]
Implemented GlobalHandleNoRIP, GetFreeMemInfo, DebugFillBuffer,
stubs GetSetKernelDOSProc, DiagQuery, DiagOutput, ToolHelpHook
(Undocumented Windows).
* [if1632/user.spec] [if1632/win32s16.spec] [misc/win32s16.c]
Misc stubs.
* [if1632/winaspi.spec] [misc/aspi.c]
Implemented GetASPIDLLVersion.
* [if1632/wprocs.spec] [msdos/int20.c] [msdos/Makefile.in]
Added handler for Int 0x20 (terminate program, _very_ old-fashioned).
* [misc/w32scomb.c]
Implemented Get16DLLAddress() partially
(big thanks to Marcus and Alexandre).
* [relay32/Makefile.in] [relay32/builtin32.c] [relay32/dplay.spec]
Added built-in DPLAY.DLL.
* [relay32/winmm.spec] [multimedia/joystick.c]
Added joySetThreshold.
* [misc/windebug.c]
Added WinNotify.
* [win32/console.c]
Stubs CreateConsoleScreenBuffer, SetConsoleActiveScreenBuffer,
WriteConsoleOutput32A.
* [windows/user.c]
Stub SetEventHook.
Sat Jan 17 19:30:35 1998 Matthew Toseland <Paul.Toseland@btinternet.com>
* [windows/painting.c]
Fixed broken restore-to-maximized.
Mon Jan 12 21:25:32 1998 Perceval - Marc Huguet Puig <mhp@tinet.fut.es>
* [documentation/wine.man] [include/options.h]
[misc/main.c] [ole/ole2nls.c] [resources/sysres.c]
[resources/sysres_Ca.rc] [resources/Makefile.in]
Added language catalan. (Afegit l'idioma catal).
1998-02-01 19:33:27 +01:00
|
|
|
|
2003-11-29 00:14:02 +01:00
|
|
|
if (ret)
|
Release 980201
Sun Feb 1 13:24:54 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [files/drive.c]
Added Device= parameter to drive configuration.
* [if1632/relay.c]
Throw() and Catch() now use the correct CATCHBUF layout (untested).
* [tools/build.c] [include/stackframe.h] [loader/task.c]
Moved 16-bit stack pointer into thread database.
Save current %fs while running 16-bit code.
Fri Jan 30 09:25:49 1998 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [graphics/mapping.c]
Made DPtoLP32 and LPtoDP32 respect world transforms.
* [graphics/path.c] [graphics/painting.c] [if1632/gdi.spec]
[include/path.h]
More path support.
* [include/gdi.h] [include/windows.h] [objects/dc.c]
[relay/gdi32.spec]
Support for Get/SetArcDirection and Get/SetWorldTransform
* [windows/hook.c]
Fixed a bug in HOOK_Map16To32Common.
Thu Jan 29 23:43:18 1998 Douglas Ridgway <ridgway@taiga.gmcl.com>
* [graphics/metafiledrv/init.c] [objects/metafile.c]
Documentation for metafile related API calls. Fixed a bug to avoid
documenting it.
* [include/windows.h]
Declaration for LoadImage.
Thu Jan 29 21:44:45 1998 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/win16drv/*]
Changes to printing code to enable use of printer fonts with the
win3.1 postscript driver. Remember to add printer=on to [wine]
section of wine.conf . You will also need to disable truetype
fonts from control panel. Winword 6.0 and Write seem to be happy
with this...
* [include/bitmap.h]
Fix Widthbytes for 15bpp displays.
Tue Jan 27 20:54:08 1998 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [tsx11/*] [include/ts*] [tools/make_X11wrappers]
Implemented thread-safe X11 wrappers.
Tue Jan 27 13:54:09 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu>
* [windows/queue.c]
Forgot to convert thdb to thread_id.
* [misc/registry.c]
Sped up Windows 95 registry reading. Changed code to traverse
registry as a tree rather than read in all possible keys
(including dead ones).
Tue Jan 27 12:46:09 1998 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [loader/pe_image.c][Makefile.in][scheduler/thread.c]
[libtest/hello5.c]
Don't exit() on failed to load referenced dlls.
Fixed static tls allocation for multiple threads.
WINELIB should now be able to load PE dlls. A sample
winelib program, that dynamically loads a internal dll
is included.
* [graphics/ddraw.c][include/ddraw.h][include/d3d.h]
Cleaned up and enhanced further. Added several DirectX5
interface definitions and DirectSurface3 implementation.
Stubs for D3D (NOT coming soon, just there so it fails safely).
* [multimedia/dsound.c][include/dsound.h]
Actually works now for a lot of cases. Some DirectX5 stuff
added. Still lacking several features.
* [windows/dinput.c][include/dinput.h]
Started implementing DirectInput. Doesn't work yet, don't
know why.
* [if1632/thunk.c][misc/callbacks.c]
[win32/kernel.c][include/callbacks.h]
Added WOWCallback16Ex, WOWHandle32.
* [misc/cpu.c]
Fixed GetSystemInfo, IsProcessorFeaturePresent.
* [multimedia/joystick.c][multimedia/time.c]
Several fixes. Small hack to get timerevents in timeGetTime() loops.
Tue Jan 20 11:26:27 1998 Slaven Rezic <eserte@cs.tu-berlin.de>
* [configure.in]
Fixed check for union semun on FreeBSD systems.
Sun Jan 18 23:05:04 1998 Karl Backstrm <karl_b@geocities.com>
* [misc/ole2nls.c] [programs/progman/Sw.rc] [programs/winhelp/Sw.rc]
[resources/sysres_Sw.rc]
Added/updated Swedish language support.
Sun Jan 18 18:49:01 1998 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [misc/winsock.c] [misc/winsock_dns.c] [windows/event.c]
[windows/win.c] [windows/dce.c] [windows/winpos.c]
Bug fixes.
Sun Jan 18 12:45:23 1997 Andreas Mohr <100.30936@germany.net>
* [msdos/int25.c] [msdos/int26.c]
Implemented "native" absolute disk read/write access.
* [msdos/int13.c] [msdos/ioports.c]
Enhanced GET DRIVE PARAMETERS (int13 AH=08).
* [graphics/win16drv/prtdrv.c] [if1632/gdi.spec]
Fixed typos, implemented dmEnumDFonts,
Started implementation of dmRealizeObject.
* [if1632/compobj.spec] [ole/compobj.c] [relay32/ole32.spec]
Stubs CoCreateInstance, CoFreeUnusedLibraries, implemented
CoFileTimeNow.
* [if1632/kernel.spec] [include/windows.h] [memory/global.c]
[memory/string.c] [misc/kernel.c] [misc/Makefile.in]
[misc/toolhelp.c] [msdos/int21.c]
Implemented GlobalHandleNoRIP, GetFreeMemInfo, DebugFillBuffer,
stubs GetSetKernelDOSProc, DiagQuery, DiagOutput, ToolHelpHook
(Undocumented Windows).
* [if1632/user.spec] [if1632/win32s16.spec] [misc/win32s16.c]
Misc stubs.
* [if1632/winaspi.spec] [misc/aspi.c]
Implemented GetASPIDLLVersion.
* [if1632/wprocs.spec] [msdos/int20.c] [msdos/Makefile.in]
Added handler for Int 0x20 (terminate program, _very_ old-fashioned).
* [misc/w32scomb.c]
Implemented Get16DLLAddress() partially
(big thanks to Marcus and Alexandre).
* [relay32/Makefile.in] [relay32/builtin32.c] [relay32/dplay.spec]
Added built-in DPLAY.DLL.
* [relay32/winmm.spec] [multimedia/joystick.c]
Added joySetThreshold.
* [misc/windebug.c]
Added WinNotify.
* [win32/console.c]
Stubs CreateConsoleScreenBuffer, SetConsoleActiveScreenBuffer,
WriteConsoleOutput32A.
* [windows/user.c]
Stub SetEventHook.
Sat Jan 17 19:30:35 1998 Matthew Toseland <Paul.Toseland@btinternet.com>
* [windows/painting.c]
Fixed broken restore-to-maximized.
Mon Jan 12 21:25:32 1998 Perceval - Marc Huguet Puig <mhp@tinet.fut.es>
* [documentation/wine.man] [include/options.h]
[misc/main.c] [ole/ole2nls.c] [resources/sysres.c]
[resources/sysres_Ca.rc] [resources/Makefile.in]
Added language catalan. (Afegit l'idioma catal).
1998-02-01 19:33:27 +01:00
|
|
|
{
|
2003-11-29 00:14:02 +01:00
|
|
|
for (i = 0; str[i]; i++) ret[i] = tolower(str[i]);
|
|
|
|
ret[i] = 0;
|
Release 980201
Sun Feb 1 13:24:54 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [files/drive.c]
Added Device= parameter to drive configuration.
* [if1632/relay.c]
Throw() and Catch() now use the correct CATCHBUF layout (untested).
* [tools/build.c] [include/stackframe.h] [loader/task.c]
Moved 16-bit stack pointer into thread database.
Save current %fs while running 16-bit code.
Fri Jan 30 09:25:49 1998 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [graphics/mapping.c]
Made DPtoLP32 and LPtoDP32 respect world transforms.
* [graphics/path.c] [graphics/painting.c] [if1632/gdi.spec]
[include/path.h]
More path support.
* [include/gdi.h] [include/windows.h] [objects/dc.c]
[relay/gdi32.spec]
Support for Get/SetArcDirection and Get/SetWorldTransform
* [windows/hook.c]
Fixed a bug in HOOK_Map16To32Common.
Thu Jan 29 23:43:18 1998 Douglas Ridgway <ridgway@taiga.gmcl.com>
* [graphics/metafiledrv/init.c] [objects/metafile.c]
Documentation for metafile related API calls. Fixed a bug to avoid
documenting it.
* [include/windows.h]
Declaration for LoadImage.
Thu Jan 29 21:44:45 1998 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/win16drv/*]
Changes to printing code to enable use of printer fonts with the
win3.1 postscript driver. Remember to add printer=on to [wine]
section of wine.conf . You will also need to disable truetype
fonts from control panel. Winword 6.0 and Write seem to be happy
with this...
* [include/bitmap.h]
Fix Widthbytes for 15bpp displays.
Tue Jan 27 20:54:08 1998 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [tsx11/*] [include/ts*] [tools/make_X11wrappers]
Implemented thread-safe X11 wrappers.
Tue Jan 27 13:54:09 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu>
* [windows/queue.c]
Forgot to convert thdb to thread_id.
* [misc/registry.c]
Sped up Windows 95 registry reading. Changed code to traverse
registry as a tree rather than read in all possible keys
(including dead ones).
Tue Jan 27 12:46:09 1998 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [loader/pe_image.c][Makefile.in][scheduler/thread.c]
[libtest/hello5.c]
Don't exit() on failed to load referenced dlls.
Fixed static tls allocation for multiple threads.
WINELIB should now be able to load PE dlls. A sample
winelib program, that dynamically loads a internal dll
is included.
* [graphics/ddraw.c][include/ddraw.h][include/d3d.h]
Cleaned up and enhanced further. Added several DirectX5
interface definitions and DirectSurface3 implementation.
Stubs for D3D (NOT coming soon, just there so it fails safely).
* [multimedia/dsound.c][include/dsound.h]
Actually works now for a lot of cases. Some DirectX5 stuff
added. Still lacking several features.
* [windows/dinput.c][include/dinput.h]
Started implementing DirectInput. Doesn't work yet, don't
know why.
* [if1632/thunk.c][misc/callbacks.c]
[win32/kernel.c][include/callbacks.h]
Added WOWCallback16Ex, WOWHandle32.
* [misc/cpu.c]
Fixed GetSystemInfo, IsProcessorFeaturePresent.
* [multimedia/joystick.c][multimedia/time.c]
Several fixes. Small hack to get timerevents in timeGetTime() loops.
Tue Jan 20 11:26:27 1998 Slaven Rezic <eserte@cs.tu-berlin.de>
* [configure.in]
Fixed check for union semun on FreeBSD systems.
Sun Jan 18 23:05:04 1998 Karl Backstrm <karl_b@geocities.com>
* [misc/ole2nls.c] [programs/progman/Sw.rc] [programs/winhelp/Sw.rc]
[resources/sysres_Sw.rc]
Added/updated Swedish language support.
Sun Jan 18 18:49:01 1998 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [misc/winsock.c] [misc/winsock_dns.c] [windows/event.c]
[windows/win.c] [windows/dce.c] [windows/winpos.c]
Bug fixes.
Sun Jan 18 12:45:23 1997 Andreas Mohr <100.30936@germany.net>
* [msdos/int25.c] [msdos/int26.c]
Implemented "native" absolute disk read/write access.
* [msdos/int13.c] [msdos/ioports.c]
Enhanced GET DRIVE PARAMETERS (int13 AH=08).
* [graphics/win16drv/prtdrv.c] [if1632/gdi.spec]
Fixed typos, implemented dmEnumDFonts,
Started implementation of dmRealizeObject.
* [if1632/compobj.spec] [ole/compobj.c] [relay32/ole32.spec]
Stubs CoCreateInstance, CoFreeUnusedLibraries, implemented
CoFileTimeNow.
* [if1632/kernel.spec] [include/windows.h] [memory/global.c]
[memory/string.c] [misc/kernel.c] [misc/Makefile.in]
[misc/toolhelp.c] [msdos/int21.c]
Implemented GlobalHandleNoRIP, GetFreeMemInfo, DebugFillBuffer,
stubs GetSetKernelDOSProc, DiagQuery, DiagOutput, ToolHelpHook
(Undocumented Windows).
* [if1632/user.spec] [if1632/win32s16.spec] [misc/win32s16.c]
Misc stubs.
* [if1632/winaspi.spec] [misc/aspi.c]
Implemented GetASPIDLLVersion.
* [if1632/wprocs.spec] [msdos/int20.c] [msdos/Makefile.in]
Added handler for Int 0x20 (terminate program, _very_ old-fashioned).
* [misc/w32scomb.c]
Implemented Get16DLLAddress() partially
(big thanks to Marcus and Alexandre).
* [relay32/Makefile.in] [relay32/builtin32.c] [relay32/dplay.spec]
Added built-in DPLAY.DLL.
* [relay32/winmm.spec] [multimedia/joystick.c]
Added joySetThreshold.
* [misc/windebug.c]
Added WinNotify.
* [win32/console.c]
Stubs CreateConsoleScreenBuffer, SetConsoleActiveScreenBuffer,
WriteConsoleOutput32A.
* [windows/user.c]
Stub SetEventHook.
Sat Jan 17 19:30:35 1998 Matthew Toseland <Paul.Toseland@btinternet.com>
* [windows/painting.c]
Fixed broken restore-to-maximized.
Mon Jan 12 21:25:32 1998 Perceval - Marc Huguet Puig <mhp@tinet.fut.es>
* [documentation/wine.man] [include/options.h]
[misc/main.c] [ole/ole2nls.c] [resources/sysres.c]
[resources/sysres_Ca.rc] [resources/Makefile.in]
Added language catalan. (Afegit l'idioma catal).
1998-02-01 19:33:27 +01:00
|
|
|
}
|
2003-11-29 00:14:02 +01:00
|
|
|
else SetLastError(WSAENOBUFS);
|
|
|
|
return ret;
|
Release 980201
Sun Feb 1 13:24:54 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [files/drive.c]
Added Device= parameter to drive configuration.
* [if1632/relay.c]
Throw() and Catch() now use the correct CATCHBUF layout (untested).
* [tools/build.c] [include/stackframe.h] [loader/task.c]
Moved 16-bit stack pointer into thread database.
Save current %fs while running 16-bit code.
Fri Jan 30 09:25:49 1998 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [graphics/mapping.c]
Made DPtoLP32 and LPtoDP32 respect world transforms.
* [graphics/path.c] [graphics/painting.c] [if1632/gdi.spec]
[include/path.h]
More path support.
* [include/gdi.h] [include/windows.h] [objects/dc.c]
[relay/gdi32.spec]
Support for Get/SetArcDirection and Get/SetWorldTransform
* [windows/hook.c]
Fixed a bug in HOOK_Map16To32Common.
Thu Jan 29 23:43:18 1998 Douglas Ridgway <ridgway@taiga.gmcl.com>
* [graphics/metafiledrv/init.c] [objects/metafile.c]
Documentation for metafile related API calls. Fixed a bug to avoid
documenting it.
* [include/windows.h]
Declaration for LoadImage.
Thu Jan 29 21:44:45 1998 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/win16drv/*]
Changes to printing code to enable use of printer fonts with the
win3.1 postscript driver. Remember to add printer=on to [wine]
section of wine.conf . You will also need to disable truetype
fonts from control panel. Winword 6.0 and Write seem to be happy
with this...
* [include/bitmap.h]
Fix Widthbytes for 15bpp displays.
Tue Jan 27 20:54:08 1998 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [tsx11/*] [include/ts*] [tools/make_X11wrappers]
Implemented thread-safe X11 wrappers.
Tue Jan 27 13:54:09 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu>
* [windows/queue.c]
Forgot to convert thdb to thread_id.
* [misc/registry.c]
Sped up Windows 95 registry reading. Changed code to traverse
registry as a tree rather than read in all possible keys
(including dead ones).
Tue Jan 27 12:46:09 1998 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [loader/pe_image.c][Makefile.in][scheduler/thread.c]
[libtest/hello5.c]
Don't exit() on failed to load referenced dlls.
Fixed static tls allocation for multiple threads.
WINELIB should now be able to load PE dlls. A sample
winelib program, that dynamically loads a internal dll
is included.
* [graphics/ddraw.c][include/ddraw.h][include/d3d.h]
Cleaned up and enhanced further. Added several DirectX5
interface definitions and DirectSurface3 implementation.
Stubs for D3D (NOT coming soon, just there so it fails safely).
* [multimedia/dsound.c][include/dsound.h]
Actually works now for a lot of cases. Some DirectX5 stuff
added. Still lacking several features.
* [windows/dinput.c][include/dinput.h]
Started implementing DirectInput. Doesn't work yet, don't
know why.
* [if1632/thunk.c][misc/callbacks.c]
[win32/kernel.c][include/callbacks.h]
Added WOWCallback16Ex, WOWHandle32.
* [misc/cpu.c]
Fixed GetSystemInfo, IsProcessorFeaturePresent.
* [multimedia/joystick.c][multimedia/time.c]
Several fixes. Small hack to get timerevents in timeGetTime() loops.
Tue Jan 20 11:26:27 1998 Slaven Rezic <eserte@cs.tu-berlin.de>
* [configure.in]
Fixed check for union semun on FreeBSD systems.
Sun Jan 18 23:05:04 1998 Karl Backstrm <karl_b@geocities.com>
* [misc/ole2nls.c] [programs/progman/Sw.rc] [programs/winhelp/Sw.rc]
[resources/sysres_Sw.rc]
Added/updated Swedish language support.
Sun Jan 18 18:49:01 1998 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [misc/winsock.c] [misc/winsock_dns.c] [windows/event.c]
[windows/win.c] [windows/dce.c] [windows/winpos.c]
Bug fixes.
Sun Jan 18 12:45:23 1997 Andreas Mohr <100.30936@germany.net>
* [msdos/int25.c] [msdos/int26.c]
Implemented "native" absolute disk read/write access.
* [msdos/int13.c] [msdos/ioports.c]
Enhanced GET DRIVE PARAMETERS (int13 AH=08).
* [graphics/win16drv/prtdrv.c] [if1632/gdi.spec]
Fixed typos, implemented dmEnumDFonts,
Started implementation of dmRealizeObject.
* [if1632/compobj.spec] [ole/compobj.c] [relay32/ole32.spec]
Stubs CoCreateInstance, CoFreeUnusedLibraries, implemented
CoFileTimeNow.
* [if1632/kernel.spec] [include/windows.h] [memory/global.c]
[memory/string.c] [misc/kernel.c] [misc/Makefile.in]
[misc/toolhelp.c] [msdos/int21.c]
Implemented GlobalHandleNoRIP, GetFreeMemInfo, DebugFillBuffer,
stubs GetSetKernelDOSProc, DiagQuery, DiagOutput, ToolHelpHook
(Undocumented Windows).
* [if1632/user.spec] [if1632/win32s16.spec] [misc/win32s16.c]
Misc stubs.
* [if1632/winaspi.spec] [misc/aspi.c]
Implemented GetASPIDLLVersion.
* [if1632/wprocs.spec] [msdos/int20.c] [msdos/Makefile.in]
Added handler for Int 0x20 (terminate program, _very_ old-fashioned).
* [misc/w32scomb.c]
Implemented Get16DLLAddress() partially
(big thanks to Marcus and Alexandre).
* [relay32/Makefile.in] [relay32/builtin32.c] [relay32/dplay.spec]
Added built-in DPLAY.DLL.
* [relay32/winmm.spec] [multimedia/joystick.c]
Added joySetThreshold.
* [misc/windebug.c]
Added WinNotify.
* [win32/console.c]
Stubs CreateConsoleScreenBuffer, SetConsoleActiveScreenBuffer,
WriteConsoleOutput32A.
* [windows/user.c]
Stub SetEventHook.
Sat Jan 17 19:30:35 1998 Matthew Toseland <Paul.Toseland@btinternet.com>
* [windows/painting.c]
Fixed broken restore-to-maximized.
Mon Jan 12 21:25:32 1998 Perceval - Marc Huguet Puig <mhp@tinet.fut.es>
* [documentation/wine.man] [include/options.h]
[misc/main.c] [ole/ole2nls.c] [resources/sysres.c]
[resources/sysres_Ca.rc] [resources/Makefile.in]
Added language catalan. (Afegit l'idioma catal).
1998-02-01 19:33:27 +01:00
|
|
|
}
|
|
|
|
|
2004-10-04 21:13:26 +02:00
|
|
|
/* Utility: get the SO_RCVTIMEO or SO_SNDTIMEO socket option
|
|
|
|
* from an fd and return the value converted to milli seconds
|
2015-04-27 16:00:37 +02:00
|
|
|
* or 0 if there is an infinite time out */
|
2015-04-27 16:00:57 +02:00
|
|
|
static inline INT64 get_rcvsnd_timeo( int fd, BOOL is_recv)
|
2004-10-04 21:13:26 +02:00
|
|
|
{
|
|
|
|
struct timeval tv;
|
2013-03-06 13:26:59 +01:00
|
|
|
socklen_t len = sizeof(tv);
|
2015-04-27 16:00:57 +02:00
|
|
|
int optname, res;
|
2004-10-04 21:13:26 +02:00
|
|
|
|
2015-04-27 16:00:57 +02:00
|
|
|
if (is_recv)
|
2004-10-04 21:13:26 +02:00
|
|
|
#ifdef SO_RCVTIMEO
|
2015-04-27 16:00:57 +02:00
|
|
|
optname = SO_RCVTIMEO;
|
2004-10-04 21:13:26 +02:00
|
|
|
#else
|
2015-04-27 16:00:57 +02:00
|
|
|
return 0;
|
2004-10-04 21:13:26 +02:00
|
|
|
#endif
|
2015-04-27 16:00:57 +02:00
|
|
|
else
|
2004-10-04 21:13:26 +02:00
|
|
|
#ifdef SO_SNDTIMEO
|
2015-04-27 16:00:57 +02:00
|
|
|
optname = SO_SNDTIMEO;
|
2004-10-04 21:13:26 +02:00
|
|
|
#else
|
2015-04-27 16:00:57 +02:00
|
|
|
return 0;
|
2004-10-04 21:13:26 +02:00
|
|
|
#endif
|
|
|
|
|
2015-04-27 16:00:57 +02:00
|
|
|
res = getsockopt(fd, SOL_SOCKET, optname, &tv, &len);
|
|
|
|
if (res < 0)
|
|
|
|
return 0;
|
|
|
|
return (UINT64)tv.tv_sec * 1000 + tv.tv_usec / 1000;
|
|
|
|
}
|
|
|
|
|
2003-08-08 23:10:28 +02:00
|
|
|
/* utility: given an fd, will block until one of the events occurs */
|
2004-10-04 21:13:26 +02:00
|
|
|
static inline int do_block( int fd, int events, int timeout )
|
1999-05-24 10:13:02 +02:00
|
|
|
{
|
2003-08-08 23:10:28 +02:00
|
|
|
struct pollfd pfd;
|
2004-10-04 21:13:26 +02:00
|
|
|
int ret;
|
1999-05-24 10:13:02 +02:00
|
|
|
|
2003-08-08 23:10:28 +02:00
|
|
|
pfd.fd = fd;
|
|
|
|
pfd.events = events;
|
2004-08-11 01:42:36 +02:00
|
|
|
|
2004-10-04 21:13:26 +02:00
|
|
|
while ((ret = poll(&pfd, 1, timeout)) < 0)
|
2004-08-11 01:42:36 +02:00
|
|
|
{
|
|
|
|
if (errno != EINTR)
|
|
|
|
return -1;
|
|
|
|
}
|
2004-10-04 21:13:26 +02:00
|
|
|
if( ret == 0 )
|
|
|
|
return 0;
|
2003-08-08 23:10:28 +02:00
|
|
|
return pfd.revents;
|
1999-05-24 10:13:02 +02:00
|
|
|
}
|
|
|
|
|
2005-11-16 12:21:57 +01:00
|
|
|
static int
|
|
|
|
convert_af_w2u(int windowsaf) {
|
2008-12-10 22:55:35 +01:00
|
|
|
unsigned int i;
|
2005-11-16 12:21:57 +01:00
|
|
|
|
2005-12-05 11:59:43 +01:00
|
|
|
for (i=0;i<sizeof(ws_af_map)/sizeof(ws_af_map[0]);i++)
|
2005-11-16 12:21:57 +01:00
|
|
|
if (ws_af_map[i][0] == windowsaf)
|
|
|
|
return ws_af_map[i][1];
|
|
|
|
FIXME("unhandled Windows address family %d\n", windowsaf);
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
|
|
convert_af_u2w(int unixaf) {
|
2008-12-10 22:55:35 +01:00
|
|
|
unsigned int i;
|
2005-11-16 12:21:57 +01:00
|
|
|
|
2005-12-05 11:59:43 +01:00
|
|
|
for (i=0;i<sizeof(ws_af_map)/sizeof(ws_af_map[0]);i++)
|
2005-11-16 12:21:57 +01:00
|
|
|
if (ws_af_map[i][1] == unixaf)
|
|
|
|
return ws_af_map[i][0];
|
|
|
|
FIXME("unhandled UNIX address family %d\n", unixaf);
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
|
|
convert_proto_w2u(int windowsproto) {
|
2008-12-10 22:55:35 +01:00
|
|
|
unsigned int i;
|
2005-11-16 12:21:57 +01:00
|
|
|
|
2005-12-05 11:59:43 +01:00
|
|
|
for (i=0;i<sizeof(ws_proto_map)/sizeof(ws_proto_map[0]);i++)
|
2005-11-16 12:21:57 +01:00
|
|
|
if (ws_proto_map[i][0] == windowsproto)
|
|
|
|
return ws_proto_map[i][1];
|
2013-12-31 01:25:09 +01:00
|
|
|
|
|
|
|
/* check for extended IPX */
|
|
|
|
if (IS_IPX_PROTO(windowsproto))
|
|
|
|
return windowsproto;
|
|
|
|
|
2005-11-16 12:21:57 +01:00
|
|
|
FIXME("unhandled Windows socket protocol %d\n", windowsproto);
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
|
|
convert_proto_u2w(int unixproto) {
|
2008-12-10 22:55:35 +01:00
|
|
|
unsigned int i;
|
2005-11-16 12:21:57 +01:00
|
|
|
|
2005-12-05 11:59:43 +01:00
|
|
|
for (i=0;i<sizeof(ws_proto_map)/sizeof(ws_proto_map[0]);i++)
|
2005-11-16 12:21:57 +01:00
|
|
|
if (ws_proto_map[i][1] == unixproto)
|
|
|
|
return ws_proto_map[i][0];
|
2013-12-31 01:25:09 +01:00
|
|
|
|
|
|
|
/* if value is inside IPX range just return it - the kernel simply
|
|
|
|
* echoes the value used in the socket() function */
|
|
|
|
if (IS_IPX_PROTO(unixproto))
|
|
|
|
return unixproto;
|
|
|
|
|
2005-11-16 12:21:57 +01:00
|
|
|
FIXME("unhandled UNIX socket protocol %d\n", unixproto);
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
|
|
convert_socktype_w2u(int windowssocktype) {
|
2008-12-10 22:55:35 +01:00
|
|
|
unsigned int i;
|
2005-11-16 12:21:57 +01:00
|
|
|
|
2005-12-05 11:59:43 +01:00
|
|
|
for (i=0;i<sizeof(ws_socktype_map)/sizeof(ws_socktype_map[0]);i++)
|
2005-11-16 12:21:57 +01:00
|
|
|
if (ws_socktype_map[i][0] == windowssocktype)
|
|
|
|
return ws_socktype_map[i][1];
|
|
|
|
FIXME("unhandled Windows socket type %d\n", windowssocktype);
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
|
|
convert_socktype_u2w(int unixsocktype) {
|
2008-12-10 22:55:35 +01:00
|
|
|
unsigned int i;
|
2005-11-16 12:21:57 +01:00
|
|
|
|
2005-12-05 11:59:43 +01:00
|
|
|
for (i=0;i<sizeof(ws_socktype_map)/sizeof(ws_socktype_map[0]);i++)
|
2005-11-16 12:21:57 +01:00
|
|
|
if (ws_socktype_map[i][1] == unixsocktype)
|
|
|
|
return ws_socktype_map[i][0];
|
|
|
|
FIXME("unhandled UNIX socket type %d\n", unixsocktype);
|
|
|
|
return -1;
|
|
|
|
}
|
1999-05-24 10:13:02 +02:00
|
|
|
|
2015-12-22 14:15:41 +01:00
|
|
|
static int convert_poll_w2u(int events)
|
|
|
|
{
|
|
|
|
int i, ret;
|
|
|
|
for (i = ret = 0; events && i < sizeof(ws_poll_map) / sizeof(ws_poll_map[0]); i++)
|
|
|
|
{
|
|
|
|
if (ws_poll_map[i][0] & events)
|
|
|
|
{
|
|
|
|
ret |= ws_poll_map[i][1];
|
|
|
|
events &= ~ws_poll_map[i][0];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (events)
|
|
|
|
FIXME("Unsupported WSAPoll() flags 0x%x\n", events);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int convert_poll_u2w(int events)
|
|
|
|
{
|
|
|
|
int i, ret;
|
|
|
|
for (i = ret = 0; events && i < sizeof(ws_poll_map) / sizeof(ws_poll_map[0]); i++)
|
|
|
|
{
|
|
|
|
if (ws_poll_map[i][1] & events)
|
|
|
|
{
|
|
|
|
ret |= ws_poll_map[i][0];
|
|
|
|
events &= ~ws_poll_map[i][1];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (events)
|
|
|
|
FIXME("Unsupported poll() flags 0x%x\n", events);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2013-12-31 01:24:56 +01:00
|
|
|
static int set_ipx_packettype(int sock, int ptype)
|
|
|
|
{
|
|
|
|
#ifdef HAS_IPX
|
|
|
|
int fd = get_sock_fd( sock, 0, NULL ), ret = 0;
|
|
|
|
TRACE("trying to set IPX_PTYPE: %d (fd: %d)\n", ptype, fd);
|
|
|
|
|
2014-01-04 17:49:40 +01:00
|
|
|
if (fd == -1) return SOCKET_ERROR;
|
|
|
|
|
2013-12-31 01:24:56 +01:00
|
|
|
/* We try to set the ipx type on ipx socket level. */
|
|
|
|
#ifdef SOL_IPX
|
|
|
|
if(setsockopt(fd, SOL_IPX, IPX_TYPE, &ptype, sizeof(ptype)) == -1)
|
|
|
|
{
|
|
|
|
ERR("IPX: could not set ipx option type; expect weird behaviour\n");
|
|
|
|
ret = SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
#else
|
|
|
|
{
|
|
|
|
struct ipx val;
|
|
|
|
/* Should we retrieve val using a getsockopt call and then
|
|
|
|
* set the modified one? */
|
|
|
|
val.ipx_pt = ptype;
|
|
|
|
setsockopt(fd, 0, SO_DEFAULT_HEADERS, &val, sizeof(struct ipx));
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
release_sock_fd( sock, fd );
|
|
|
|
return ret;
|
|
|
|
#else
|
|
|
|
WARN("IPX support is not enabled, can't set packet type\n");
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2002-06-01 01:06:46 +02:00
|
|
|
/* ----------------------------------- API -----
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
*
|
|
|
|
* Init / cleanup / error checking.
|
|
|
|
*/
|
|
|
|
|
1997-08-24 18:00:30 +02:00
|
|
|
/***********************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* WSAStartup (WS2_32.115)
|
1997-08-24 18:00:30 +02:00
|
|
|
*/
|
2001-09-14 02:19:52 +02:00
|
|
|
int WINAPI WSAStartup(WORD wVersionRequested, LPWSADATA lpWSAData)
|
2000-06-18 19:23:17 +02:00
|
|
|
{
|
|
|
|
TRACE("verReq=%x\n", wVersionRequested);
|
|
|
|
|
2000-07-09 13:19:35 +02:00
|
|
|
if (LOBYTE(wVersionRequested) < 1)
|
2000-06-18 19:23:17 +02:00
|
|
|
return WSAVERNOTSUPPORTED;
|
|
|
|
|
|
|
|
if (!lpWSAData) return WSAEINVAL;
|
|
|
|
|
2001-02-20 02:57:13 +01:00
|
|
|
num_startup++;
|
2000-06-18 19:23:17 +02:00
|
|
|
|
2000-07-10 12:57:46 +02:00
|
|
|
/* that's the whole of the negotiation for now */
|
|
|
|
lpWSAData->wVersion = wVersionRequested;
|
2002-08-29 03:48:55 +02:00
|
|
|
/* return winsock information */
|
|
|
|
lpWSAData->wHighVersion = 0x0202;
|
|
|
|
strcpy(lpWSAData->szDescription, "WinSock 2.0" );
|
|
|
|
strcpy(lpWSAData->szSystemStatus, "Running" );
|
|
|
|
lpWSAData->iMaxSockets = WS_MAX_SOCKETS_PER_PROCESS;
|
|
|
|
lpWSAData->iMaxUdpDg = WS_MAX_UDP_DATAGRAM;
|
|
|
|
/* don't do anything with lpWSAData->lpVendorInfo */
|
|
|
|
/* (some apps don't allocate the space for this field) */
|
2000-07-10 12:57:46 +02:00
|
|
|
|
2014-07-03 16:18:28 +02:00
|
|
|
TRACE("succeeded starts: %d\n", num_startup);
|
2000-06-18 19:23:17 +02:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
1997-08-24 18:00:30 +02:00
|
|
|
/***********************************************************************
|
2001-07-11 20:56:41 +02:00
|
|
|
* WSACleanup (WS2_32.116)
|
1997-08-24 18:00:30 +02:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
INT WINAPI WSACleanup(void)
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
{
|
2005-11-29 17:06:35 +01:00
|
|
|
if (num_startup) {
|
|
|
|
num_startup--;
|
2014-07-03 16:18:28 +02:00
|
|
|
TRACE("pending cleanups: %d\n", num_startup);
|
2001-02-20 02:57:13 +01:00
|
|
|
return 0;
|
2005-11-29 17:06:35 +01:00
|
|
|
}
|
2000-03-04 20:29:42 +01:00
|
|
|
SetLastError(WSANOTINITIALISED);
|
1999-10-23 18:53:34 +02:00
|
|
|
return SOCKET_ERROR;
|
1997-08-24 18:00:30 +02:00
|
|
|
}
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
|
|
|
|
|
1997-08-24 18:00:30 +02:00
|
|
|
/***********************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* WSAGetLastError (WS2_32.111)
|
1997-08-24 18:00:30 +02:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
INT WINAPI WSAGetLastError(void)
|
1997-08-24 18:00:30 +02:00
|
|
|
{
|
1999-05-12 12:34:03 +02:00
|
|
|
return GetLastError();
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
}
|
|
|
|
|
1997-08-24 18:00:30 +02:00
|
|
|
/***********************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* WSASetLastError (WS2_32.112)
|
1997-08-24 18:00:30 +02:00
|
|
|
*/
|
1999-05-12 12:34:03 +02:00
|
|
|
void WINAPI WSASetLastError(INT iError) {
|
|
|
|
SetLastError(iError);
|
1997-08-24 18:00:30 +02:00
|
|
|
}
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
|
2003-11-29 00:14:02 +01:00
|
|
|
static struct WS_hostent *check_buffer_he(int size)
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
{
|
2004-12-22 19:23:49 +01:00
|
|
|
struct per_thread_data * ptb = get_per_thread_data();
|
|
|
|
if (ptb->he_buffer)
|
2001-02-20 02:57:13 +01:00
|
|
|
{
|
2004-12-22 19:23:49 +01:00
|
|
|
if (ptb->he_len >= size ) return ptb->he_buffer;
|
|
|
|
HeapFree( GetProcessHeap(), 0, ptb->he_buffer );
|
2001-02-20 02:57:13 +01:00
|
|
|
}
|
2004-12-22 19:23:49 +01:00
|
|
|
ptb->he_buffer = HeapAlloc( GetProcessHeap(), 0, (ptb->he_len = size) );
|
|
|
|
if (!ptb->he_buffer) SetLastError(WSAENOBUFS);
|
|
|
|
return ptb->he_buffer;
|
Release 980809
Sat Aug 8 19:11:46 1998 Marcus Meissner <marcus@jet.franken.de>
* [*/*]
Added some missing WINAPI and some missing prototypes for
functions.
* [controls/static.c]
Got rid of the MODULE32_LookupHMODULE error showing up for every
message box.
* [windows/winproc.c]
WM_NOTIFY 16->32 mapping (AOL Instant Messenger or however it is called).
* [misc/winsock.c]
hostent/servent/protoent should not use the same static buffers.
(has broken nt3.15 finger.exe which does hp=gethostbyname(), then
getservbyname("finger","tcp") and the references hp->h_addr_list[0]).
Sat Aug 8 13:21:24 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [include/server.h] [tools/make_requests] [server/request.c]
[server/trace.c]
Automated part of the client/server request code generation.
Added tracing of client/server communication.
* [scheduler/*.c] [server/process.c]
Added support for server-side handles.
* [scheduler/thread.c]
Added DLL_THREAD_ATTACH/DETACH notifications.
* [configure.in]
Added check for -lsocket.
* [windows/winproc.c]
Return the thunk address in WINPROC_GetProc if the function types
don't match.
Sat Aug 8 02:44:04 1998 Douglas Ridgway <ridgway@winehq.com>
* [windows/winproc.c][windows/win.c][windows/message.c]
Documentation for CallWindowProc, SetWindowLong, DispatchMessage,
WaitMessage, GetMessage, and PeekMessage.
Sat Aug 8 01:00:00 1998 Juergen Schmied <juergen.schmied@metronet.de>
* [controls/commctrl.c][controls/widgets.c][include/builtin32.h]
[include/commctrl.h][relay32/builtin32.c][relay32/comctl32.spec]
[tools/build.c] [relay32/shell32.spec]
Added the functionality of the LibMain function. The common
controls are properly initialized now.
* [controls/treeview.c][memory/atom.c][scheduler/thread.c][windows/class.c]
[windows/msgbox.c][windows/win.c]
Put TRACE in, put SetLastError() in.
* [include/interfaces.h]
Added IClassFactory::LockServer.
* [include/ole2.h]
Added struct for LPOLEMENUGROUPWIDTHS32, HOLEMENU32.
* [include/shell.h][include/shlobj.h][misc/shell.c][ole/folders.c]
Reorganized and many structs and classes (IShellBrowser,IShellView)
added. shell32.dll should work in many cases now.
Started SHGetFileInfoA implementeation, rewrote SHGetPathFromIDList32A.
New Shell32LibMain started ShellIconCache Implementation.
* [misc/shellord.c]
Rewrote ILCombine, ILGetSize
New stubs SHFind_InitMenuPopup, FileMenu_Create, ShellExecuteEx,
SHSetInstanceExplorer, SHGetInstanceExplorer, SHFreeUnusedLibraries.
* [include/winerror.h]
Class and window related error codes added.
* [memory/heap.c]
Changed lstrlen32A to strlen to get rid of milions of TRACE lines.
* [misc/ddeml.c]
First lines for DdeCreateStringHandle32A / DdeFreeStringHandle32.
* [misc/network.c][relay32/mpr.spec]
Fixed some bugs, changed ordinals.
* [windows/class.c]
Workarounds for incorrect hInstance handling. Fixes parts of
MSWord95/Excel95 and Money95.
Thu Aug 6 21:05:35 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de>
* [windows/nonclient.c][misc/tweak.c][include/tweak.h]
[documentation/win95look]
Removed some tweak variables. They are no longer needed.
* [files/dos_fs.c]
Added check for null pointer in DOSFS_GetDevice().
* [controls/tooltips.c][include/commctrl.h]
Improved tooltips.
* [controls/status.c][include/commctrl.h]
Cleaned up code and added tooltip support.
* [controls/toolbar.c][include/commctrl.h]
Added tooltip support.
* [documentation/common_controls]
Updated.
Thu Aug 6 00:05:22 1998 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [include/ver.h] [misc/ver.c]
Write VIF_BUFFTOOSMALL, not VIF_BUFTOSMALL.
* [debugger/hash.c] [debugger/stabs.c]
Make debug output more friendly for posting.
* [files/file.c]
Partial implementation of OF_SHARE_EXCLUSIVE.
Needed for Quicklogic/QuickChip (InstallShield).
* [files/profile.c]
When a cached-only entry is found, return it.
* [graphics/x11drv/xfont.c]
Accept a space as delimiter for a fontname and inhibit overrun
(Make xplasim.ex from the Phillips Coolrunner CPLD suite proceed).
* [miscemu/main.c]
Delay setting IF1632_CallLargeStack after loading the executables.
Stops fpgaexp.exe from the Viewlogic FPGA suite from crashing when
showing the Blinker error Message Box.
* [misc/network.c]
Make WNetGetConnection16 recognise a CDROM as a local drive.
* [multimedia/mmsystem.c]
Preliminary check for MCI_ALL_DEVICE_ID in MCI_Close by a FIXME.
Tue Aug 4 21:15:23 1998 James Juran <jrj120@psu.edu>
* [ole/ole2nls.c]
Fixed bug in CompareString32A. strcmp() doesn't necessarily
return -1, 0, or 1, which the previous code depended on.
Changed name of is_punctuation to OLE2NLS_isPunctuation.
Made NORM_IGNOREWIDTH not print a FIXME message in
LCMapString32A.
Other debugging messages, documentation, and code cleanups.
* [objects/font.c] [relay32/gdi32.spec] [include/winerror.h]
Added stub for GetFontData32, and added GDI_ERROR constant
to winerror.h.
Tue Aug 4 07:44:43 1998 Ove Kaaven <ovek@arcticnet.no>
* [multimedia/mmio.c]
Implemented mmioSetBuffer, mmioAdvance, mmioAscend, and
mmioCreateChunk to the best of my knowledge. But watch out,
there's bound to be bugs in there...
* [include/mmsystem.h] [multimedia/mmsystem.c]
Hacked in support for 32-bit multimedia function callbacks.
* [AUTHORS] [misc/shell.c]
Selfishly credited my authorship. Hopefully I'm excused.
* [include/dosexe.h] [include/module.h] [loader/dos/*]
[loader/module.c] [loader/task.c] [Makefile.in]
[configure.in] [Makefile.in]
Added DOS EXE (MZ) loader and virtual machine. Task
structure integration thanks to Ulrich Weigand.
* [files/dos_fs.c]
Work around a null pointer dereference if ioctlGetDeviceInfo-ing
a FILE_DupUnixHandle'd file (i.e. GetStdHandle'd).
* [include/miscemu.h] [include/winnt.h] [loader/main.c]
[memory/global.c] [msdos/dpmi.c] [msdos/dosmem.c]
Added support for DOS memory images, and added
DOSMEM_ResizeBlock() and DOSMEM_Available().
* [msdos/int21.c]
Added support for the DOS virtual machine, tweaked handle
assignment to avoid stdio clashes, forced INT21_FindNext to exit
wildcardless searches after finding one entry, added AH=7, 8, 9,
C, 48, 49, 4A, and 7160 CL=1 (Get Short Filename), and made the
long filename calls only respond if running with with -winver
win95.
* [objects/cursoricon.c]
DestroyCursor32 and DestroyIcon32 should now free the objects
(hopefully) correctly.
Sun Aug 2 21:42:09 1998 Huw D M Davies <daviesh@abacus.physics.ox.ac.uk>
* [graphics/psdrv/*] [include/psdrv.h]
Added PPD file parsing - at the moment it reads a file called
default.ppd from the directory in which you start Wine. Page sizes
other than A4 should now work (landscape may not). All fonts that are
present on your printer (according to the PPD) should be available,
providing you have the AFM files. Fonts should now be the correct size.
Graphics is still basically lines only. See graphics/psdrv/README .
* [misc/printdrv.c]
Yet more Drv[Get/Set]PrinterData fixes.
Fri Jul 31 21:33:22 1998 Per Lindstrm <pelinstr@algonet.se>
* [relay32/crtdll.spec] [misc/crtdll.c]
Added stub for freopen, _findfirst, _findnext, _fstat and _read.
* [files/directory.c]
Modified warning message.
Wed Jul 29 11:25:28 1998 Luiz Otavio L. Zorzella <zorzella@nr.conexware.com>
* [objects/font.c]
Added stub for GetFontData.
* [multimedia/msvideo.c]
Created this file to hold the msvideo.dll calls (and maybe also
msvfw32.dll).
* [objects/cursoricon.c]
Added search in Global Heap for cursor when trying to destroy it
with DestroyCursor16. This test should be done in many (all?)
other functions that use FreeResource.
* [controls/treeview.c] [include/commctrl.h]
Minor correction in name and addition of many placeholders for TVM
messages in TREEVIEW_WindowProc.
* [msdos/dpmi.c]
Fixed a bug in DPMI_xrealloc where in a copy of a memory region
"A" of size "a" to a region "B" of size "b", "b" bytes were being
copied, instead of "a", as the new version does. This both
increases speed, as well as avoids segfaults.
1998-08-09 14:47:43 +02:00
|
|
|
}
|
|
|
|
|
2003-11-29 00:14:02 +01:00
|
|
|
static struct WS_servent *check_buffer_se(int size)
|
Release 980809
Sat Aug 8 19:11:46 1998 Marcus Meissner <marcus@jet.franken.de>
* [*/*]
Added some missing WINAPI and some missing prototypes for
functions.
* [controls/static.c]
Got rid of the MODULE32_LookupHMODULE error showing up for every
message box.
* [windows/winproc.c]
WM_NOTIFY 16->32 mapping (AOL Instant Messenger or however it is called).
* [misc/winsock.c]
hostent/servent/protoent should not use the same static buffers.
(has broken nt3.15 finger.exe which does hp=gethostbyname(), then
getservbyname("finger","tcp") and the references hp->h_addr_list[0]).
Sat Aug 8 13:21:24 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [include/server.h] [tools/make_requests] [server/request.c]
[server/trace.c]
Automated part of the client/server request code generation.
Added tracing of client/server communication.
* [scheduler/*.c] [server/process.c]
Added support for server-side handles.
* [scheduler/thread.c]
Added DLL_THREAD_ATTACH/DETACH notifications.
* [configure.in]
Added check for -lsocket.
* [windows/winproc.c]
Return the thunk address in WINPROC_GetProc if the function types
don't match.
Sat Aug 8 02:44:04 1998 Douglas Ridgway <ridgway@winehq.com>
* [windows/winproc.c][windows/win.c][windows/message.c]
Documentation for CallWindowProc, SetWindowLong, DispatchMessage,
WaitMessage, GetMessage, and PeekMessage.
Sat Aug 8 01:00:00 1998 Juergen Schmied <juergen.schmied@metronet.de>
* [controls/commctrl.c][controls/widgets.c][include/builtin32.h]
[include/commctrl.h][relay32/builtin32.c][relay32/comctl32.spec]
[tools/build.c] [relay32/shell32.spec]
Added the functionality of the LibMain function. The common
controls are properly initialized now.
* [controls/treeview.c][memory/atom.c][scheduler/thread.c][windows/class.c]
[windows/msgbox.c][windows/win.c]
Put TRACE in, put SetLastError() in.
* [include/interfaces.h]
Added IClassFactory::LockServer.
* [include/ole2.h]
Added struct for LPOLEMENUGROUPWIDTHS32, HOLEMENU32.
* [include/shell.h][include/shlobj.h][misc/shell.c][ole/folders.c]
Reorganized and many structs and classes (IShellBrowser,IShellView)
added. shell32.dll should work in many cases now.
Started SHGetFileInfoA implementeation, rewrote SHGetPathFromIDList32A.
New Shell32LibMain started ShellIconCache Implementation.
* [misc/shellord.c]
Rewrote ILCombine, ILGetSize
New stubs SHFind_InitMenuPopup, FileMenu_Create, ShellExecuteEx,
SHSetInstanceExplorer, SHGetInstanceExplorer, SHFreeUnusedLibraries.
* [include/winerror.h]
Class and window related error codes added.
* [memory/heap.c]
Changed lstrlen32A to strlen to get rid of milions of TRACE lines.
* [misc/ddeml.c]
First lines for DdeCreateStringHandle32A / DdeFreeStringHandle32.
* [misc/network.c][relay32/mpr.spec]
Fixed some bugs, changed ordinals.
* [windows/class.c]
Workarounds for incorrect hInstance handling. Fixes parts of
MSWord95/Excel95 and Money95.
Thu Aug 6 21:05:35 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de>
* [windows/nonclient.c][misc/tweak.c][include/tweak.h]
[documentation/win95look]
Removed some tweak variables. They are no longer needed.
* [files/dos_fs.c]
Added check for null pointer in DOSFS_GetDevice().
* [controls/tooltips.c][include/commctrl.h]
Improved tooltips.
* [controls/status.c][include/commctrl.h]
Cleaned up code and added tooltip support.
* [controls/toolbar.c][include/commctrl.h]
Added tooltip support.
* [documentation/common_controls]
Updated.
Thu Aug 6 00:05:22 1998 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [include/ver.h] [misc/ver.c]
Write VIF_BUFFTOOSMALL, not VIF_BUFTOSMALL.
* [debugger/hash.c] [debugger/stabs.c]
Make debug output more friendly for posting.
* [files/file.c]
Partial implementation of OF_SHARE_EXCLUSIVE.
Needed for Quicklogic/QuickChip (InstallShield).
* [files/profile.c]
When a cached-only entry is found, return it.
* [graphics/x11drv/xfont.c]
Accept a space as delimiter for a fontname and inhibit overrun
(Make xplasim.ex from the Phillips Coolrunner CPLD suite proceed).
* [miscemu/main.c]
Delay setting IF1632_CallLargeStack after loading the executables.
Stops fpgaexp.exe from the Viewlogic FPGA suite from crashing when
showing the Blinker error Message Box.
* [misc/network.c]
Make WNetGetConnection16 recognise a CDROM as a local drive.
* [multimedia/mmsystem.c]
Preliminary check for MCI_ALL_DEVICE_ID in MCI_Close by a FIXME.
Tue Aug 4 21:15:23 1998 James Juran <jrj120@psu.edu>
* [ole/ole2nls.c]
Fixed bug in CompareString32A. strcmp() doesn't necessarily
return -1, 0, or 1, which the previous code depended on.
Changed name of is_punctuation to OLE2NLS_isPunctuation.
Made NORM_IGNOREWIDTH not print a FIXME message in
LCMapString32A.
Other debugging messages, documentation, and code cleanups.
* [objects/font.c] [relay32/gdi32.spec] [include/winerror.h]
Added stub for GetFontData32, and added GDI_ERROR constant
to winerror.h.
Tue Aug 4 07:44:43 1998 Ove Kaaven <ovek@arcticnet.no>
* [multimedia/mmio.c]
Implemented mmioSetBuffer, mmioAdvance, mmioAscend, and
mmioCreateChunk to the best of my knowledge. But watch out,
there's bound to be bugs in there...
* [include/mmsystem.h] [multimedia/mmsystem.c]
Hacked in support for 32-bit multimedia function callbacks.
* [AUTHORS] [misc/shell.c]
Selfishly credited my authorship. Hopefully I'm excused.
* [include/dosexe.h] [include/module.h] [loader/dos/*]
[loader/module.c] [loader/task.c] [Makefile.in]
[configure.in] [Makefile.in]
Added DOS EXE (MZ) loader and virtual machine. Task
structure integration thanks to Ulrich Weigand.
* [files/dos_fs.c]
Work around a null pointer dereference if ioctlGetDeviceInfo-ing
a FILE_DupUnixHandle'd file (i.e. GetStdHandle'd).
* [include/miscemu.h] [include/winnt.h] [loader/main.c]
[memory/global.c] [msdos/dpmi.c] [msdos/dosmem.c]
Added support for DOS memory images, and added
DOSMEM_ResizeBlock() and DOSMEM_Available().
* [msdos/int21.c]
Added support for the DOS virtual machine, tweaked handle
assignment to avoid stdio clashes, forced INT21_FindNext to exit
wildcardless searches after finding one entry, added AH=7, 8, 9,
C, 48, 49, 4A, and 7160 CL=1 (Get Short Filename), and made the
long filename calls only respond if running with with -winver
win95.
* [objects/cursoricon.c]
DestroyCursor32 and DestroyIcon32 should now free the objects
(hopefully) correctly.
Sun Aug 2 21:42:09 1998 Huw D M Davies <daviesh@abacus.physics.ox.ac.uk>
* [graphics/psdrv/*] [include/psdrv.h]
Added PPD file parsing - at the moment it reads a file called
default.ppd from the directory in which you start Wine. Page sizes
other than A4 should now work (landscape may not). All fonts that are
present on your printer (according to the PPD) should be available,
providing you have the AFM files. Fonts should now be the correct size.
Graphics is still basically lines only. See graphics/psdrv/README .
* [misc/printdrv.c]
Yet more Drv[Get/Set]PrinterData fixes.
Fri Jul 31 21:33:22 1998 Per Lindstrm <pelinstr@algonet.se>
* [relay32/crtdll.spec] [misc/crtdll.c]
Added stub for freopen, _findfirst, _findnext, _fstat and _read.
* [files/directory.c]
Modified warning message.
Wed Jul 29 11:25:28 1998 Luiz Otavio L. Zorzella <zorzella@nr.conexware.com>
* [objects/font.c]
Added stub for GetFontData.
* [multimedia/msvideo.c]
Created this file to hold the msvideo.dll calls (and maybe also
msvfw32.dll).
* [objects/cursoricon.c]
Added search in Global Heap for cursor when trying to destroy it
with DestroyCursor16. This test should be done in many (all?)
other functions that use FreeResource.
* [controls/treeview.c] [include/commctrl.h]
Minor correction in name and addition of many placeholders for TVM
messages in TREEVIEW_WindowProc.
* [msdos/dpmi.c]
Fixed a bug in DPMI_xrealloc where in a copy of a memory region
"A" of size "a" to a region "B" of size "b", "b" bytes were being
copied, instead of "a", as the new version does. This both
increases speed, as well as avoids segfaults.
1998-08-09 14:47:43 +02:00
|
|
|
{
|
2004-12-22 19:23:49 +01:00
|
|
|
struct per_thread_data * ptb = get_per_thread_data();
|
|
|
|
if (ptb->se_buffer)
|
2001-02-20 02:57:13 +01:00
|
|
|
{
|
2004-12-22 19:23:49 +01:00
|
|
|
if (ptb->se_len >= size ) return ptb->se_buffer;
|
|
|
|
HeapFree( GetProcessHeap(), 0, ptb->se_buffer );
|
2001-02-20 02:57:13 +01:00
|
|
|
}
|
2004-12-22 19:23:49 +01:00
|
|
|
ptb->se_buffer = HeapAlloc( GetProcessHeap(), 0, (ptb->se_len = size) );
|
|
|
|
if (!ptb->se_buffer) SetLastError(WSAENOBUFS);
|
|
|
|
return ptb->se_buffer;
|
Release 980809
Sat Aug 8 19:11:46 1998 Marcus Meissner <marcus@jet.franken.de>
* [*/*]
Added some missing WINAPI and some missing prototypes for
functions.
* [controls/static.c]
Got rid of the MODULE32_LookupHMODULE error showing up for every
message box.
* [windows/winproc.c]
WM_NOTIFY 16->32 mapping (AOL Instant Messenger or however it is called).
* [misc/winsock.c]
hostent/servent/protoent should not use the same static buffers.
(has broken nt3.15 finger.exe which does hp=gethostbyname(), then
getservbyname("finger","tcp") and the references hp->h_addr_list[0]).
Sat Aug 8 13:21:24 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [include/server.h] [tools/make_requests] [server/request.c]
[server/trace.c]
Automated part of the client/server request code generation.
Added tracing of client/server communication.
* [scheduler/*.c] [server/process.c]
Added support for server-side handles.
* [scheduler/thread.c]
Added DLL_THREAD_ATTACH/DETACH notifications.
* [configure.in]
Added check for -lsocket.
* [windows/winproc.c]
Return the thunk address in WINPROC_GetProc if the function types
don't match.
Sat Aug 8 02:44:04 1998 Douglas Ridgway <ridgway@winehq.com>
* [windows/winproc.c][windows/win.c][windows/message.c]
Documentation for CallWindowProc, SetWindowLong, DispatchMessage,
WaitMessage, GetMessage, and PeekMessage.
Sat Aug 8 01:00:00 1998 Juergen Schmied <juergen.schmied@metronet.de>
* [controls/commctrl.c][controls/widgets.c][include/builtin32.h]
[include/commctrl.h][relay32/builtin32.c][relay32/comctl32.spec]
[tools/build.c] [relay32/shell32.spec]
Added the functionality of the LibMain function. The common
controls are properly initialized now.
* [controls/treeview.c][memory/atom.c][scheduler/thread.c][windows/class.c]
[windows/msgbox.c][windows/win.c]
Put TRACE in, put SetLastError() in.
* [include/interfaces.h]
Added IClassFactory::LockServer.
* [include/ole2.h]
Added struct for LPOLEMENUGROUPWIDTHS32, HOLEMENU32.
* [include/shell.h][include/shlobj.h][misc/shell.c][ole/folders.c]
Reorganized and many structs and classes (IShellBrowser,IShellView)
added. shell32.dll should work in many cases now.
Started SHGetFileInfoA implementeation, rewrote SHGetPathFromIDList32A.
New Shell32LibMain started ShellIconCache Implementation.
* [misc/shellord.c]
Rewrote ILCombine, ILGetSize
New stubs SHFind_InitMenuPopup, FileMenu_Create, ShellExecuteEx,
SHSetInstanceExplorer, SHGetInstanceExplorer, SHFreeUnusedLibraries.
* [include/winerror.h]
Class and window related error codes added.
* [memory/heap.c]
Changed lstrlen32A to strlen to get rid of milions of TRACE lines.
* [misc/ddeml.c]
First lines for DdeCreateStringHandle32A / DdeFreeStringHandle32.
* [misc/network.c][relay32/mpr.spec]
Fixed some bugs, changed ordinals.
* [windows/class.c]
Workarounds for incorrect hInstance handling. Fixes parts of
MSWord95/Excel95 and Money95.
Thu Aug 6 21:05:35 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de>
* [windows/nonclient.c][misc/tweak.c][include/tweak.h]
[documentation/win95look]
Removed some tweak variables. They are no longer needed.
* [files/dos_fs.c]
Added check for null pointer in DOSFS_GetDevice().
* [controls/tooltips.c][include/commctrl.h]
Improved tooltips.
* [controls/status.c][include/commctrl.h]
Cleaned up code and added tooltip support.
* [controls/toolbar.c][include/commctrl.h]
Added tooltip support.
* [documentation/common_controls]
Updated.
Thu Aug 6 00:05:22 1998 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [include/ver.h] [misc/ver.c]
Write VIF_BUFFTOOSMALL, not VIF_BUFTOSMALL.
* [debugger/hash.c] [debugger/stabs.c]
Make debug output more friendly for posting.
* [files/file.c]
Partial implementation of OF_SHARE_EXCLUSIVE.
Needed for Quicklogic/QuickChip (InstallShield).
* [files/profile.c]
When a cached-only entry is found, return it.
* [graphics/x11drv/xfont.c]
Accept a space as delimiter for a fontname and inhibit overrun
(Make xplasim.ex from the Phillips Coolrunner CPLD suite proceed).
* [miscemu/main.c]
Delay setting IF1632_CallLargeStack after loading the executables.
Stops fpgaexp.exe from the Viewlogic FPGA suite from crashing when
showing the Blinker error Message Box.
* [misc/network.c]
Make WNetGetConnection16 recognise a CDROM as a local drive.
* [multimedia/mmsystem.c]
Preliminary check for MCI_ALL_DEVICE_ID in MCI_Close by a FIXME.
Tue Aug 4 21:15:23 1998 James Juran <jrj120@psu.edu>
* [ole/ole2nls.c]
Fixed bug in CompareString32A. strcmp() doesn't necessarily
return -1, 0, or 1, which the previous code depended on.
Changed name of is_punctuation to OLE2NLS_isPunctuation.
Made NORM_IGNOREWIDTH not print a FIXME message in
LCMapString32A.
Other debugging messages, documentation, and code cleanups.
* [objects/font.c] [relay32/gdi32.spec] [include/winerror.h]
Added stub for GetFontData32, and added GDI_ERROR constant
to winerror.h.
Tue Aug 4 07:44:43 1998 Ove Kaaven <ovek@arcticnet.no>
* [multimedia/mmio.c]
Implemented mmioSetBuffer, mmioAdvance, mmioAscend, and
mmioCreateChunk to the best of my knowledge. But watch out,
there's bound to be bugs in there...
* [include/mmsystem.h] [multimedia/mmsystem.c]
Hacked in support for 32-bit multimedia function callbacks.
* [AUTHORS] [misc/shell.c]
Selfishly credited my authorship. Hopefully I'm excused.
* [include/dosexe.h] [include/module.h] [loader/dos/*]
[loader/module.c] [loader/task.c] [Makefile.in]
[configure.in] [Makefile.in]
Added DOS EXE (MZ) loader and virtual machine. Task
structure integration thanks to Ulrich Weigand.
* [files/dos_fs.c]
Work around a null pointer dereference if ioctlGetDeviceInfo-ing
a FILE_DupUnixHandle'd file (i.e. GetStdHandle'd).
* [include/miscemu.h] [include/winnt.h] [loader/main.c]
[memory/global.c] [msdos/dpmi.c] [msdos/dosmem.c]
Added support for DOS memory images, and added
DOSMEM_ResizeBlock() and DOSMEM_Available().
* [msdos/int21.c]
Added support for the DOS virtual machine, tweaked handle
assignment to avoid stdio clashes, forced INT21_FindNext to exit
wildcardless searches after finding one entry, added AH=7, 8, 9,
C, 48, 49, 4A, and 7160 CL=1 (Get Short Filename), and made the
long filename calls only respond if running with with -winver
win95.
* [objects/cursoricon.c]
DestroyCursor32 and DestroyIcon32 should now free the objects
(hopefully) correctly.
Sun Aug 2 21:42:09 1998 Huw D M Davies <daviesh@abacus.physics.ox.ac.uk>
* [graphics/psdrv/*] [include/psdrv.h]
Added PPD file parsing - at the moment it reads a file called
default.ppd from the directory in which you start Wine. Page sizes
other than A4 should now work (landscape may not). All fonts that are
present on your printer (according to the PPD) should be available,
providing you have the AFM files. Fonts should now be the correct size.
Graphics is still basically lines only. See graphics/psdrv/README .
* [misc/printdrv.c]
Yet more Drv[Get/Set]PrinterData fixes.
Fri Jul 31 21:33:22 1998 Per Lindstrm <pelinstr@algonet.se>
* [relay32/crtdll.spec] [misc/crtdll.c]
Added stub for freopen, _findfirst, _findnext, _fstat and _read.
* [files/directory.c]
Modified warning message.
Wed Jul 29 11:25:28 1998 Luiz Otavio L. Zorzella <zorzella@nr.conexware.com>
* [objects/font.c]
Added stub for GetFontData.
* [multimedia/msvideo.c]
Created this file to hold the msvideo.dll calls (and maybe also
msvfw32.dll).
* [objects/cursoricon.c]
Added search in Global Heap for cursor when trying to destroy it
with DestroyCursor16. This test should be done in many (all?)
other functions that use FreeResource.
* [controls/treeview.c] [include/commctrl.h]
Minor correction in name and addition of many placeholders for TVM
messages in TREEVIEW_WindowProc.
* [msdos/dpmi.c]
Fixed a bug in DPMI_xrealloc where in a copy of a memory region
"A" of size "a" to a region "B" of size "b", "b" bytes were being
copied, instead of "a", as the new version does. This both
increases speed, as well as avoids segfaults.
1998-08-09 14:47:43 +02:00
|
|
|
}
|
|
|
|
|
2003-11-29 00:14:02 +01:00
|
|
|
static struct WS_protoent *check_buffer_pe(int size)
|
Release 980809
Sat Aug 8 19:11:46 1998 Marcus Meissner <marcus@jet.franken.de>
* [*/*]
Added some missing WINAPI and some missing prototypes for
functions.
* [controls/static.c]
Got rid of the MODULE32_LookupHMODULE error showing up for every
message box.
* [windows/winproc.c]
WM_NOTIFY 16->32 mapping (AOL Instant Messenger or however it is called).
* [misc/winsock.c]
hostent/servent/protoent should not use the same static buffers.
(has broken nt3.15 finger.exe which does hp=gethostbyname(), then
getservbyname("finger","tcp") and the references hp->h_addr_list[0]).
Sat Aug 8 13:21:24 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [include/server.h] [tools/make_requests] [server/request.c]
[server/trace.c]
Automated part of the client/server request code generation.
Added tracing of client/server communication.
* [scheduler/*.c] [server/process.c]
Added support for server-side handles.
* [scheduler/thread.c]
Added DLL_THREAD_ATTACH/DETACH notifications.
* [configure.in]
Added check for -lsocket.
* [windows/winproc.c]
Return the thunk address in WINPROC_GetProc if the function types
don't match.
Sat Aug 8 02:44:04 1998 Douglas Ridgway <ridgway@winehq.com>
* [windows/winproc.c][windows/win.c][windows/message.c]
Documentation for CallWindowProc, SetWindowLong, DispatchMessage,
WaitMessage, GetMessage, and PeekMessage.
Sat Aug 8 01:00:00 1998 Juergen Schmied <juergen.schmied@metronet.de>
* [controls/commctrl.c][controls/widgets.c][include/builtin32.h]
[include/commctrl.h][relay32/builtin32.c][relay32/comctl32.spec]
[tools/build.c] [relay32/shell32.spec]
Added the functionality of the LibMain function. The common
controls are properly initialized now.
* [controls/treeview.c][memory/atom.c][scheduler/thread.c][windows/class.c]
[windows/msgbox.c][windows/win.c]
Put TRACE in, put SetLastError() in.
* [include/interfaces.h]
Added IClassFactory::LockServer.
* [include/ole2.h]
Added struct for LPOLEMENUGROUPWIDTHS32, HOLEMENU32.
* [include/shell.h][include/shlobj.h][misc/shell.c][ole/folders.c]
Reorganized and many structs and classes (IShellBrowser,IShellView)
added. shell32.dll should work in many cases now.
Started SHGetFileInfoA implementeation, rewrote SHGetPathFromIDList32A.
New Shell32LibMain started ShellIconCache Implementation.
* [misc/shellord.c]
Rewrote ILCombine, ILGetSize
New stubs SHFind_InitMenuPopup, FileMenu_Create, ShellExecuteEx,
SHSetInstanceExplorer, SHGetInstanceExplorer, SHFreeUnusedLibraries.
* [include/winerror.h]
Class and window related error codes added.
* [memory/heap.c]
Changed lstrlen32A to strlen to get rid of milions of TRACE lines.
* [misc/ddeml.c]
First lines for DdeCreateStringHandle32A / DdeFreeStringHandle32.
* [misc/network.c][relay32/mpr.spec]
Fixed some bugs, changed ordinals.
* [windows/class.c]
Workarounds for incorrect hInstance handling. Fixes parts of
MSWord95/Excel95 and Money95.
Thu Aug 6 21:05:35 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de>
* [windows/nonclient.c][misc/tweak.c][include/tweak.h]
[documentation/win95look]
Removed some tweak variables. They are no longer needed.
* [files/dos_fs.c]
Added check for null pointer in DOSFS_GetDevice().
* [controls/tooltips.c][include/commctrl.h]
Improved tooltips.
* [controls/status.c][include/commctrl.h]
Cleaned up code and added tooltip support.
* [controls/toolbar.c][include/commctrl.h]
Added tooltip support.
* [documentation/common_controls]
Updated.
Thu Aug 6 00:05:22 1998 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [include/ver.h] [misc/ver.c]
Write VIF_BUFFTOOSMALL, not VIF_BUFTOSMALL.
* [debugger/hash.c] [debugger/stabs.c]
Make debug output more friendly for posting.
* [files/file.c]
Partial implementation of OF_SHARE_EXCLUSIVE.
Needed for Quicklogic/QuickChip (InstallShield).
* [files/profile.c]
When a cached-only entry is found, return it.
* [graphics/x11drv/xfont.c]
Accept a space as delimiter for a fontname and inhibit overrun
(Make xplasim.ex from the Phillips Coolrunner CPLD suite proceed).
* [miscemu/main.c]
Delay setting IF1632_CallLargeStack after loading the executables.
Stops fpgaexp.exe from the Viewlogic FPGA suite from crashing when
showing the Blinker error Message Box.
* [misc/network.c]
Make WNetGetConnection16 recognise a CDROM as a local drive.
* [multimedia/mmsystem.c]
Preliminary check for MCI_ALL_DEVICE_ID in MCI_Close by a FIXME.
Tue Aug 4 21:15:23 1998 James Juran <jrj120@psu.edu>
* [ole/ole2nls.c]
Fixed bug in CompareString32A. strcmp() doesn't necessarily
return -1, 0, or 1, which the previous code depended on.
Changed name of is_punctuation to OLE2NLS_isPunctuation.
Made NORM_IGNOREWIDTH not print a FIXME message in
LCMapString32A.
Other debugging messages, documentation, and code cleanups.
* [objects/font.c] [relay32/gdi32.spec] [include/winerror.h]
Added stub for GetFontData32, and added GDI_ERROR constant
to winerror.h.
Tue Aug 4 07:44:43 1998 Ove Kaaven <ovek@arcticnet.no>
* [multimedia/mmio.c]
Implemented mmioSetBuffer, mmioAdvance, mmioAscend, and
mmioCreateChunk to the best of my knowledge. But watch out,
there's bound to be bugs in there...
* [include/mmsystem.h] [multimedia/mmsystem.c]
Hacked in support for 32-bit multimedia function callbacks.
* [AUTHORS] [misc/shell.c]
Selfishly credited my authorship. Hopefully I'm excused.
* [include/dosexe.h] [include/module.h] [loader/dos/*]
[loader/module.c] [loader/task.c] [Makefile.in]
[configure.in] [Makefile.in]
Added DOS EXE (MZ) loader and virtual machine. Task
structure integration thanks to Ulrich Weigand.
* [files/dos_fs.c]
Work around a null pointer dereference if ioctlGetDeviceInfo-ing
a FILE_DupUnixHandle'd file (i.e. GetStdHandle'd).
* [include/miscemu.h] [include/winnt.h] [loader/main.c]
[memory/global.c] [msdos/dpmi.c] [msdos/dosmem.c]
Added support for DOS memory images, and added
DOSMEM_ResizeBlock() and DOSMEM_Available().
* [msdos/int21.c]
Added support for the DOS virtual machine, tweaked handle
assignment to avoid stdio clashes, forced INT21_FindNext to exit
wildcardless searches after finding one entry, added AH=7, 8, 9,
C, 48, 49, 4A, and 7160 CL=1 (Get Short Filename), and made the
long filename calls only respond if running with with -winver
win95.
* [objects/cursoricon.c]
DestroyCursor32 and DestroyIcon32 should now free the objects
(hopefully) correctly.
Sun Aug 2 21:42:09 1998 Huw D M Davies <daviesh@abacus.physics.ox.ac.uk>
* [graphics/psdrv/*] [include/psdrv.h]
Added PPD file parsing - at the moment it reads a file called
default.ppd from the directory in which you start Wine. Page sizes
other than A4 should now work (landscape may not). All fonts that are
present on your printer (according to the PPD) should be available,
providing you have the AFM files. Fonts should now be the correct size.
Graphics is still basically lines only. See graphics/psdrv/README .
* [misc/printdrv.c]
Yet more Drv[Get/Set]PrinterData fixes.
Fri Jul 31 21:33:22 1998 Per Lindstrm <pelinstr@algonet.se>
* [relay32/crtdll.spec] [misc/crtdll.c]
Added stub for freopen, _findfirst, _findnext, _fstat and _read.
* [files/directory.c]
Modified warning message.
Wed Jul 29 11:25:28 1998 Luiz Otavio L. Zorzella <zorzella@nr.conexware.com>
* [objects/font.c]
Added stub for GetFontData.
* [multimedia/msvideo.c]
Created this file to hold the msvideo.dll calls (and maybe also
msvfw32.dll).
* [objects/cursoricon.c]
Added search in Global Heap for cursor when trying to destroy it
with DestroyCursor16. This test should be done in many (all?)
other functions that use FreeResource.
* [controls/treeview.c] [include/commctrl.h]
Minor correction in name and addition of many placeholders for TVM
messages in TREEVIEW_WindowProc.
* [msdos/dpmi.c]
Fixed a bug in DPMI_xrealloc where in a copy of a memory region
"A" of size "a" to a region "B" of size "b", "b" bytes were being
copied, instead of "a", as the new version does. This both
increases speed, as well as avoids segfaults.
1998-08-09 14:47:43 +02:00
|
|
|
{
|
2004-12-22 19:23:49 +01:00
|
|
|
struct per_thread_data * ptb = get_per_thread_data();
|
|
|
|
if (ptb->pe_buffer)
|
2001-02-20 02:57:13 +01:00
|
|
|
{
|
2004-12-22 19:23:49 +01:00
|
|
|
if (ptb->pe_len >= size ) return ptb->pe_buffer;
|
|
|
|
HeapFree( GetProcessHeap(), 0, ptb->pe_buffer );
|
2001-02-20 02:57:13 +01:00
|
|
|
}
|
2004-12-22 19:23:49 +01:00
|
|
|
ptb->pe_buffer = HeapAlloc( GetProcessHeap(), 0, (ptb->pe_len = size) );
|
|
|
|
if (!ptb->pe_buffer) SetLastError(WSAENOBUFS);
|
|
|
|
return ptb->pe_buffer;
|
Release 980809
Sat Aug 8 19:11:46 1998 Marcus Meissner <marcus@jet.franken.de>
* [*/*]
Added some missing WINAPI and some missing prototypes for
functions.
* [controls/static.c]
Got rid of the MODULE32_LookupHMODULE error showing up for every
message box.
* [windows/winproc.c]
WM_NOTIFY 16->32 mapping (AOL Instant Messenger or however it is called).
* [misc/winsock.c]
hostent/servent/protoent should not use the same static buffers.
(has broken nt3.15 finger.exe which does hp=gethostbyname(), then
getservbyname("finger","tcp") and the references hp->h_addr_list[0]).
Sat Aug 8 13:21:24 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [include/server.h] [tools/make_requests] [server/request.c]
[server/trace.c]
Automated part of the client/server request code generation.
Added tracing of client/server communication.
* [scheduler/*.c] [server/process.c]
Added support for server-side handles.
* [scheduler/thread.c]
Added DLL_THREAD_ATTACH/DETACH notifications.
* [configure.in]
Added check for -lsocket.
* [windows/winproc.c]
Return the thunk address in WINPROC_GetProc if the function types
don't match.
Sat Aug 8 02:44:04 1998 Douglas Ridgway <ridgway@winehq.com>
* [windows/winproc.c][windows/win.c][windows/message.c]
Documentation for CallWindowProc, SetWindowLong, DispatchMessage,
WaitMessage, GetMessage, and PeekMessage.
Sat Aug 8 01:00:00 1998 Juergen Schmied <juergen.schmied@metronet.de>
* [controls/commctrl.c][controls/widgets.c][include/builtin32.h]
[include/commctrl.h][relay32/builtin32.c][relay32/comctl32.spec]
[tools/build.c] [relay32/shell32.spec]
Added the functionality of the LibMain function. The common
controls are properly initialized now.
* [controls/treeview.c][memory/atom.c][scheduler/thread.c][windows/class.c]
[windows/msgbox.c][windows/win.c]
Put TRACE in, put SetLastError() in.
* [include/interfaces.h]
Added IClassFactory::LockServer.
* [include/ole2.h]
Added struct for LPOLEMENUGROUPWIDTHS32, HOLEMENU32.
* [include/shell.h][include/shlobj.h][misc/shell.c][ole/folders.c]
Reorganized and many structs and classes (IShellBrowser,IShellView)
added. shell32.dll should work in many cases now.
Started SHGetFileInfoA implementeation, rewrote SHGetPathFromIDList32A.
New Shell32LibMain started ShellIconCache Implementation.
* [misc/shellord.c]
Rewrote ILCombine, ILGetSize
New stubs SHFind_InitMenuPopup, FileMenu_Create, ShellExecuteEx,
SHSetInstanceExplorer, SHGetInstanceExplorer, SHFreeUnusedLibraries.
* [include/winerror.h]
Class and window related error codes added.
* [memory/heap.c]
Changed lstrlen32A to strlen to get rid of milions of TRACE lines.
* [misc/ddeml.c]
First lines for DdeCreateStringHandle32A / DdeFreeStringHandle32.
* [misc/network.c][relay32/mpr.spec]
Fixed some bugs, changed ordinals.
* [windows/class.c]
Workarounds for incorrect hInstance handling. Fixes parts of
MSWord95/Excel95 and Money95.
Thu Aug 6 21:05:35 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de>
* [windows/nonclient.c][misc/tweak.c][include/tweak.h]
[documentation/win95look]
Removed some tweak variables. They are no longer needed.
* [files/dos_fs.c]
Added check for null pointer in DOSFS_GetDevice().
* [controls/tooltips.c][include/commctrl.h]
Improved tooltips.
* [controls/status.c][include/commctrl.h]
Cleaned up code and added tooltip support.
* [controls/toolbar.c][include/commctrl.h]
Added tooltip support.
* [documentation/common_controls]
Updated.
Thu Aug 6 00:05:22 1998 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [include/ver.h] [misc/ver.c]
Write VIF_BUFFTOOSMALL, not VIF_BUFTOSMALL.
* [debugger/hash.c] [debugger/stabs.c]
Make debug output more friendly for posting.
* [files/file.c]
Partial implementation of OF_SHARE_EXCLUSIVE.
Needed for Quicklogic/QuickChip (InstallShield).
* [files/profile.c]
When a cached-only entry is found, return it.
* [graphics/x11drv/xfont.c]
Accept a space as delimiter for a fontname and inhibit overrun
(Make xplasim.ex from the Phillips Coolrunner CPLD suite proceed).
* [miscemu/main.c]
Delay setting IF1632_CallLargeStack after loading the executables.
Stops fpgaexp.exe from the Viewlogic FPGA suite from crashing when
showing the Blinker error Message Box.
* [misc/network.c]
Make WNetGetConnection16 recognise a CDROM as a local drive.
* [multimedia/mmsystem.c]
Preliminary check for MCI_ALL_DEVICE_ID in MCI_Close by a FIXME.
Tue Aug 4 21:15:23 1998 James Juran <jrj120@psu.edu>
* [ole/ole2nls.c]
Fixed bug in CompareString32A. strcmp() doesn't necessarily
return -1, 0, or 1, which the previous code depended on.
Changed name of is_punctuation to OLE2NLS_isPunctuation.
Made NORM_IGNOREWIDTH not print a FIXME message in
LCMapString32A.
Other debugging messages, documentation, and code cleanups.
* [objects/font.c] [relay32/gdi32.spec] [include/winerror.h]
Added stub for GetFontData32, and added GDI_ERROR constant
to winerror.h.
Tue Aug 4 07:44:43 1998 Ove Kaaven <ovek@arcticnet.no>
* [multimedia/mmio.c]
Implemented mmioSetBuffer, mmioAdvance, mmioAscend, and
mmioCreateChunk to the best of my knowledge. But watch out,
there's bound to be bugs in there...
* [include/mmsystem.h] [multimedia/mmsystem.c]
Hacked in support for 32-bit multimedia function callbacks.
* [AUTHORS] [misc/shell.c]
Selfishly credited my authorship. Hopefully I'm excused.
* [include/dosexe.h] [include/module.h] [loader/dos/*]
[loader/module.c] [loader/task.c] [Makefile.in]
[configure.in] [Makefile.in]
Added DOS EXE (MZ) loader and virtual machine. Task
structure integration thanks to Ulrich Weigand.
* [files/dos_fs.c]
Work around a null pointer dereference if ioctlGetDeviceInfo-ing
a FILE_DupUnixHandle'd file (i.e. GetStdHandle'd).
* [include/miscemu.h] [include/winnt.h] [loader/main.c]
[memory/global.c] [msdos/dpmi.c] [msdos/dosmem.c]
Added support for DOS memory images, and added
DOSMEM_ResizeBlock() and DOSMEM_Available().
* [msdos/int21.c]
Added support for the DOS virtual machine, tweaked handle
assignment to avoid stdio clashes, forced INT21_FindNext to exit
wildcardless searches after finding one entry, added AH=7, 8, 9,
C, 48, 49, 4A, and 7160 CL=1 (Get Short Filename), and made the
long filename calls only respond if running with with -winver
win95.
* [objects/cursoricon.c]
DestroyCursor32 and DestroyIcon32 should now free the objects
(hopefully) correctly.
Sun Aug 2 21:42:09 1998 Huw D M Davies <daviesh@abacus.physics.ox.ac.uk>
* [graphics/psdrv/*] [include/psdrv.h]
Added PPD file parsing - at the moment it reads a file called
default.ppd from the directory in which you start Wine. Page sizes
other than A4 should now work (landscape may not). All fonts that are
present on your printer (according to the PPD) should be available,
providing you have the AFM files. Fonts should now be the correct size.
Graphics is still basically lines only. See graphics/psdrv/README .
* [misc/printdrv.c]
Yet more Drv[Get/Set]PrinterData fixes.
Fri Jul 31 21:33:22 1998 Per Lindstrm <pelinstr@algonet.se>
* [relay32/crtdll.spec] [misc/crtdll.c]
Added stub for freopen, _findfirst, _findnext, _fstat and _read.
* [files/directory.c]
Modified warning message.
Wed Jul 29 11:25:28 1998 Luiz Otavio L. Zorzella <zorzella@nr.conexware.com>
* [objects/font.c]
Added stub for GetFontData.
* [multimedia/msvideo.c]
Created this file to hold the msvideo.dll calls (and maybe also
msvfw32.dll).
* [objects/cursoricon.c]
Added search in Global Heap for cursor when trying to destroy it
with DestroyCursor16. This test should be done in many (all?)
other functions that use FreeResource.
* [controls/treeview.c] [include/commctrl.h]
Minor correction in name and addition of many placeholders for TVM
messages in TREEVIEW_WindowProc.
* [msdos/dpmi.c]
Fixed a bug in DPMI_xrealloc where in a copy of a memory region
"A" of size "a" to a region "B" of size "b", "b" bytes were being
copied, instead of "a", as the new version does. This both
increases speed, as well as avoids segfaults.
1998-08-09 14:47:43 +02:00
|
|
|
}
|
|
|
|
|
1997-08-24 18:00:30 +02:00
|
|
|
/* ----------------------------------- i/o APIs */
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
|
2009-08-12 18:14:27 +02:00
|
|
|
static inline BOOL supported_pf(int pf)
|
|
|
|
{
|
|
|
|
switch (pf)
|
|
|
|
{
|
|
|
|
case WS_AF_INET:
|
|
|
|
case WS_AF_INET6:
|
|
|
|
return TRUE;
|
2013-06-17 21:56:52 +02:00
|
|
|
#ifdef HAS_IPX
|
2009-08-12 18:14:27 +02:00
|
|
|
case WS_AF_IPX:
|
|
|
|
return TRUE;
|
|
|
|
#endif
|
2013-06-17 21:56:52 +02:00
|
|
|
#ifdef HAS_IRDA
|
2009-08-12 18:14:27 +02:00
|
|
|
case WS_AF_IRDA:
|
|
|
|
return TRUE;
|
2001-10-08 22:36:03 +02:00
|
|
|
#endif
|
2009-08-12 18:14:27 +02:00
|
|
|
default:
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
}
|
2001-10-08 22:36:03 +02:00
|
|
|
|
2013-09-05 14:56:19 +02:00
|
|
|
static inline BOOL supported_protocol(int protocol)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
for (i = 0; i < sizeof(valid_protocols) / sizeof(valid_protocols[0]); i++)
|
|
|
|
if (protocol == valid_protocols[i])
|
|
|
|
return TRUE;
|
|
|
|
return FALSE;
|
|
|
|
}
|
2000-03-26 20:21:16 +02:00
|
|
|
|
2000-12-02 00:58:28 +01:00
|
|
|
/**********************************************************************/
|
|
|
|
|
2007-05-30 20:11:58 +02:00
|
|
|
/* Returns the length of the converted address if successful, 0 if it was too small to
|
|
|
|
* start with.
|
2001-10-08 22:36:03 +02:00
|
|
|
*/
|
2007-05-30 20:11:58 +02:00
|
|
|
static unsigned int ws_sockaddr_ws2u(const struct WS_sockaddr* wsaddr, int wsaddrlen,
|
|
|
|
union generic_unix_sockaddr *uaddr)
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
{
|
2007-05-30 20:11:58 +02:00
|
|
|
unsigned int uaddrlen = 0;
|
|
|
|
|
2001-10-08 22:36:03 +02:00
|
|
|
switch (wsaddr->sa_family)
|
|
|
|
{
|
2013-06-17 21:56:52 +02:00
|
|
|
#ifdef HAS_IPX
|
2001-10-08 22:36:03 +02:00
|
|
|
case WS_AF_IPX:
|
|
|
|
{
|
2005-06-27 11:53:46 +02:00
|
|
|
const struct WS_sockaddr_ipx* wsipx=(const struct WS_sockaddr_ipx*)wsaddr;
|
2007-05-30 20:11:58 +02:00
|
|
|
struct sockaddr_ipx* uipx = (struct sockaddr_ipx *)uaddr;
|
2001-10-08 22:36:03 +02:00
|
|
|
|
2001-11-14 22:26:23 +01:00
|
|
|
if (wsaddrlen<sizeof(struct WS_sockaddr_ipx))
|
2007-05-30 20:11:58 +02:00
|
|
|
return 0;
|
2001-10-08 22:36:03 +02:00
|
|
|
|
2007-05-30 20:11:58 +02:00
|
|
|
uaddrlen = sizeof(struct sockaddr_ipx);
|
2007-07-24 14:52:27 +02:00
|
|
|
memset( uaddr, 0, uaddrlen );
|
2001-10-08 22:36:03 +02:00
|
|
|
uipx->sipx_family=AF_IPX;
|
|
|
|
uipx->sipx_port=wsipx->sa_socket;
|
2002-06-01 01:06:46 +02:00
|
|
|
/* copy sa_netnum and sa_nodenum to sipx_network and sipx_node
|
2001-10-08 22:36:03 +02:00
|
|
|
* in one go
|
|
|
|
*/
|
|
|
|
memcpy(&uipx->sipx_network,wsipx->sa_netnum,sizeof(uipx->sipx_network)+sizeof(uipx->sipx_node));
|
2003-01-23 22:20:36 +01:00
|
|
|
#ifdef IPX_FRAME_NONE
|
2001-10-08 22:36:03 +02:00
|
|
|
uipx->sipx_type=IPX_FRAME_NONE;
|
2003-01-23 22:20:36 +01:00
|
|
|
#endif
|
2007-05-30 20:11:58 +02:00
|
|
|
break;
|
2001-10-08 22:36:03 +02:00
|
|
|
}
|
|
|
|
#endif
|
2005-11-16 12:21:57 +01:00
|
|
|
case WS_AF_INET6: {
|
2007-05-30 20:11:58 +02:00
|
|
|
struct sockaddr_in6* uin6 = (struct sockaddr_in6 *)uaddr;
|
2006-11-23 23:39:34 +01:00
|
|
|
const struct WS_sockaddr_in6* win6 = (const struct WS_sockaddr_in6*)wsaddr;
|
2005-11-16 12:21:57 +01:00
|
|
|
|
|
|
|
/* Note: Windows has 2 versions of the sockaddr_in6 struct, one with
|
2008-03-01 05:36:46 +01:00
|
|
|
* scope_id, one without.
|
2005-11-16 12:21:57 +01:00
|
|
|
*/
|
2006-02-20 13:33:09 +01:00
|
|
|
if (wsaddrlen >= sizeof(struct WS_sockaddr_in6_old)) {
|
2007-05-30 20:11:58 +02:00
|
|
|
uaddrlen = sizeof(struct sockaddr_in6);
|
2007-07-24 14:52:27 +02:00
|
|
|
memset( uaddr, 0, uaddrlen );
|
2005-11-16 12:21:57 +01:00
|
|
|
uin6->sin6_family = AF_INET6;
|
|
|
|
uin6->sin6_port = win6->sin6_port;
|
|
|
|
uin6->sin6_flowinfo = win6->sin6_flowinfo;
|
2006-02-20 13:33:09 +01:00
|
|
|
#ifdef HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID
|
|
|
|
if (wsaddrlen >= sizeof(struct WS_sockaddr_in6)) uin6->sin6_scope_id = win6->sin6_scope_id;
|
|
|
|
#endif
|
2005-11-16 12:21:57 +01:00
|
|
|
memcpy(&uin6->sin6_addr,&win6->sin6_addr,16); /* 16 bytes = 128 address bits */
|
2007-05-30 20:11:58 +02:00
|
|
|
break;
|
2005-11-16 12:21:57 +01:00
|
|
|
}
|
|
|
|
FIXME("bad size %d for WS_sockaddr_in6\n",wsaddrlen);
|
2007-05-30 20:11:58 +02:00
|
|
|
return 0;
|
2005-11-16 12:21:57 +01:00
|
|
|
}
|
|
|
|
case WS_AF_INET: {
|
2007-05-30 20:11:58 +02:00
|
|
|
struct sockaddr_in* uin = (struct sockaddr_in *)uaddr;
|
2006-11-23 23:39:34 +01:00
|
|
|
const struct WS_sockaddr_in* win = (const struct WS_sockaddr_in*)wsaddr;
|
2001-10-08 22:36:03 +02:00
|
|
|
|
2005-11-16 12:21:57 +01:00
|
|
|
if (wsaddrlen<sizeof(struct WS_sockaddr_in))
|
2007-05-30 20:11:58 +02:00
|
|
|
return 0;
|
|
|
|
uaddrlen = sizeof(struct sockaddr_in);
|
2007-07-24 14:52:27 +02:00
|
|
|
memset( uaddr, 0, uaddrlen );
|
2005-11-16 12:21:57 +01:00
|
|
|
uin->sin_family = AF_INET;
|
|
|
|
uin->sin_port = win->sin_port;
|
|
|
|
memcpy(&uin->sin_addr,&win->sin_addr,4); /* 4 bytes = 32 address bits */
|
2007-05-30 20:11:58 +02:00
|
|
|
break;
|
2006-01-03 12:11:07 +01:00
|
|
|
}
|
2013-06-17 21:56:52 +02:00
|
|
|
#ifdef HAS_IRDA
|
2009-08-12 18:14:41 +02:00
|
|
|
case WS_AF_IRDA: {
|
|
|
|
struct sockaddr_irda *uin = (struct sockaddr_irda *)uaddr;
|
|
|
|
const SOCKADDR_IRDA *win = (const SOCKADDR_IRDA *)wsaddr;
|
|
|
|
|
|
|
|
if (wsaddrlen < sizeof(SOCKADDR_IRDA))
|
|
|
|
return 0;
|
|
|
|
uaddrlen = sizeof(struct sockaddr_irda);
|
|
|
|
memset( uaddr, 0, uaddrlen );
|
|
|
|
uin->sir_family = AF_IRDA;
|
|
|
|
if (!strncmp( win->irdaServiceName, "LSAP-SEL", strlen( "LSAP-SEL" ) ))
|
|
|
|
{
|
2010-08-19 22:02:35 +02:00
|
|
|
unsigned int lsap_sel = 0;
|
2009-08-12 18:14:41 +02:00
|
|
|
|
|
|
|
sscanf( win->irdaServiceName, "LSAP-SEL%u", &lsap_sel );
|
|
|
|
uin->sir_lsap_sel = lsap_sel;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
uin->sir_lsap_sel = LSAP_ANY;
|
|
|
|
memcpy( uin->sir_name, win->irdaServiceName, 25 );
|
|
|
|
}
|
|
|
|
memcpy( &uin->sir_addr, win->irdaDeviceID, sizeof(uin->sir_addr) );
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
#endif
|
2006-01-03 12:11:07 +01:00
|
|
|
case WS_AF_UNSPEC: {
|
|
|
|
/* Try to determine the needed space by the passed windows sockaddr space */
|
|
|
|
switch (wsaddrlen) {
|
2013-12-03 14:25:04 +01:00
|
|
|
default: /* likely an ipv4 address */
|
2006-01-03 12:11:07 +01:00
|
|
|
case sizeof(struct WS_sockaddr_in):
|
2007-05-30 20:11:58 +02:00
|
|
|
uaddrlen = sizeof(struct sockaddr_in);
|
2006-01-03 12:11:07 +01:00
|
|
|
break;
|
2013-06-17 21:56:52 +02:00
|
|
|
#ifdef HAS_IPX
|
2006-01-03 12:11:07 +01:00
|
|
|
case sizeof(struct WS_sockaddr_ipx):
|
2007-05-30 20:11:58 +02:00
|
|
|
uaddrlen = sizeof(struct sockaddr_ipx);
|
2006-01-03 12:11:07 +01:00
|
|
|
break;
|
2009-08-12 18:14:41 +02:00
|
|
|
#endif
|
2013-06-17 21:56:52 +02:00
|
|
|
#ifdef HAS_IRDA
|
2009-08-12 18:14:41 +02:00
|
|
|
case sizeof(SOCKADDR_IRDA):
|
|
|
|
uaddrlen = sizeof(struct sockaddr_irda);
|
|
|
|
break;
|
2006-01-03 12:11:07 +01:00
|
|
|
#endif
|
|
|
|
case sizeof(struct WS_sockaddr_in6):
|
|
|
|
case sizeof(struct WS_sockaddr_in6_old):
|
2007-05-30 20:11:58 +02:00
|
|
|
uaddrlen = sizeof(struct sockaddr_in6);
|
2006-01-03 12:11:07 +01:00
|
|
|
break;
|
|
|
|
}
|
2007-05-30 20:11:58 +02:00
|
|
|
memset( uaddr, 0, uaddrlen );
|
|
|
|
break;
|
2005-11-16 12:21:57 +01:00
|
|
|
}
|
|
|
|
default:
|
|
|
|
FIXME("Unknown address family %d, return NULL.\n", wsaddr->sa_family);
|
2007-05-30 20:11:58 +02:00
|
|
|
return 0;
|
2002-06-13 21:09:55 +02:00
|
|
|
}
|
2007-05-30 20:11:58 +02:00
|
|
|
return uaddrlen;
|
2001-10-08 22:36:03 +02:00
|
|
|
}
|
|
|
|
|
2007-06-14 15:27:29 +02:00
|
|
|
static BOOL is_sockaddr_bound(const struct sockaddr *uaddr, int uaddrlen)
|
|
|
|
{
|
|
|
|
switch (uaddr->sa_family)
|
|
|
|
{
|
2013-06-17 21:56:52 +02:00
|
|
|
#ifdef HAS_IPX
|
2007-06-14 15:27:29 +02:00
|
|
|
case AF_IPX:
|
2013-12-27 21:32:29 +01:00
|
|
|
{
|
|
|
|
static const struct sockaddr_ipx emptyAddr;
|
|
|
|
struct sockaddr_ipx *ipx = (struct sockaddr_ipx*) uaddr;
|
2014-01-05 19:40:32 +01:00
|
|
|
return ipx->sipx_port
|
|
|
|
|| memcmp(&ipx->sipx_network, &emptyAddr.sipx_network, sizeof(emptyAddr.sipx_network))
|
|
|
|
|| memcmp(&ipx->sipx_node, &emptyAddr.sipx_node, sizeof(emptyAddr.sipx_node));
|
2013-12-27 21:32:29 +01:00
|
|
|
}
|
2007-06-14 15:27:29 +02:00
|
|
|
#endif
|
|
|
|
case AF_INET6:
|
|
|
|
{
|
|
|
|
static const struct sockaddr_in6 emptyAddr;
|
|
|
|
const struct sockaddr_in6 *in6 = (const struct sockaddr_in6*) uaddr;
|
|
|
|
return in6->sin6_port || memcmp(&in6->sin6_addr, &emptyAddr.sin6_addr, sizeof(struct in6_addr));
|
|
|
|
}
|
|
|
|
case AF_INET:
|
|
|
|
{
|
|
|
|
static const struct sockaddr_in emptyAddr;
|
|
|
|
const struct sockaddr_in *in = (const struct sockaddr_in*) uaddr;
|
|
|
|
return in->sin_port || memcmp(&in->sin_addr, &emptyAddr.sin_addr, sizeof(struct in_addr));
|
|
|
|
}
|
|
|
|
case AF_UNSPEC:
|
|
|
|
return FALSE;
|
|
|
|
default:
|
|
|
|
FIXME("unknown address family %d\n", uaddr->sa_family);
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-03-29 05:53:36 +02:00
|
|
|
/* Returns -1 if getsockname fails, 0 if not bound, 1 otherwise */
|
|
|
|
static int is_fd_bound(int fd, union generic_unix_sockaddr *uaddr, socklen_t *uaddrlen)
|
|
|
|
{
|
|
|
|
union generic_unix_sockaddr inaddr;
|
|
|
|
socklen_t inlen;
|
|
|
|
int res;
|
|
|
|
|
|
|
|
if (!uaddr) uaddr = &inaddr;
|
|
|
|
if (!uaddrlen) uaddrlen = &inlen;
|
|
|
|
|
|
|
|
*uaddrlen = sizeof(inaddr);
|
|
|
|
res = getsockname(fd, &uaddr->addr, uaddrlen);
|
|
|
|
if (!res) res = is_sockaddr_bound(&uaddr->addr, *uaddrlen);
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
2001-10-08 22:36:03 +02:00
|
|
|
/* Returns 0 if successful, -1 if the buffer is too small */
|
2007-05-30 20:11:58 +02:00
|
|
|
static int ws_sockaddr_u2ws(const struct sockaddr* uaddr, struct WS_sockaddr* wsaddr, int* wsaddrlen)
|
2001-10-08 22:36:03 +02:00
|
|
|
{
|
|
|
|
int res;
|
|
|
|
|
|
|
|
switch(uaddr->sa_family)
|
|
|
|
{
|
2013-06-17 21:56:52 +02:00
|
|
|
#ifdef HAS_IPX
|
2001-10-08 22:36:03 +02:00
|
|
|
case AF_IPX:
|
|
|
|
{
|
2005-06-27 11:53:46 +02:00
|
|
|
const struct sockaddr_ipx* uipx=(const struct sockaddr_ipx*)uaddr;
|
2001-11-14 22:26:23 +01:00
|
|
|
struct WS_sockaddr_ipx* wsipx=(struct WS_sockaddr_ipx*)wsaddr;
|
2001-10-08 22:36:03 +02:00
|
|
|
|
|
|
|
res=-1;
|
|
|
|
switch (*wsaddrlen) /* how much can we copy? */
|
|
|
|
{
|
|
|
|
default:
|
|
|
|
res=0; /* enough */
|
2007-05-30 20:11:58 +02:00
|
|
|
*wsaddrlen = sizeof(*wsipx);
|
2001-10-08 22:36:03 +02:00
|
|
|
wsipx->sa_socket=uipx->sipx_port;
|
|
|
|
/* fall through */
|
|
|
|
case 13:
|
|
|
|
case 12:
|
|
|
|
memcpy(wsipx->sa_nodenum,uipx->sipx_node,sizeof(wsipx->sa_nodenum));
|
|
|
|
/* fall through */
|
|
|
|
case 11:
|
|
|
|
case 10:
|
|
|
|
case 9:
|
|
|
|
case 8:
|
|
|
|
case 7:
|
|
|
|
case 6:
|
|
|
|
memcpy(wsipx->sa_netnum,&uipx->sipx_network,sizeof(wsipx->sa_netnum));
|
|
|
|
/* fall through */
|
|
|
|
case 5:
|
|
|
|
case 4:
|
|
|
|
case 3:
|
|
|
|
case 2:
|
2002-01-15 21:26:28 +01:00
|
|
|
wsipx->sa_family=WS_AF_IPX;
|
2001-10-08 22:36:03 +02:00
|
|
|
/* fall through */
|
|
|
|
case 1:
|
|
|
|
case 0:
|
|
|
|
/* way too small */
|
2002-01-21 18:59:38 +01:00
|
|
|
break;
|
2001-10-08 22:36:03 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
2009-08-12 18:15:05 +02:00
|
|
|
#endif
|
2013-06-17 21:56:52 +02:00
|
|
|
#ifdef HAS_IRDA
|
2009-08-12 18:15:05 +02:00
|
|
|
case AF_IRDA: {
|
|
|
|
const struct sockaddr_irda *uin = (const struct sockaddr_irda *)uaddr;
|
|
|
|
SOCKADDR_IRDA *win = (SOCKADDR_IRDA *)wsaddr;
|
|
|
|
|
|
|
|
if (*wsaddrlen < sizeof(SOCKADDR_IRDA))
|
|
|
|
return -1;
|
|
|
|
win->irdaAddressFamily = WS_AF_IRDA;
|
|
|
|
memcpy( win->irdaDeviceID, &uin->sir_addr, sizeof(win->irdaDeviceID) );
|
|
|
|
if (uin->sir_lsap_sel != LSAP_ANY)
|
|
|
|
sprintf( win->irdaServiceName, "LSAP-SEL%u", uin->sir_lsap_sel );
|
|
|
|
else
|
|
|
|
memcpy( win->irdaServiceName, uin->sir_name,
|
|
|
|
sizeof(win->irdaServiceName) );
|
|
|
|
return 0;
|
|
|
|
}
|
1998-11-08 16:42:40 +01:00
|
|
|
#endif
|
2005-11-16 12:21:57 +01:00
|
|
|
case AF_INET6: {
|
2006-11-23 23:39:34 +01:00
|
|
|
const struct sockaddr_in6* uin6 = (const struct sockaddr_in6*)uaddr;
|
2005-11-16 12:21:57 +01:00
|
|
|
struct WS_sockaddr_in6_old* win6old = (struct WS_sockaddr_in6_old*)wsaddr;
|
|
|
|
|
|
|
|
if (*wsaddrlen < sizeof(struct WS_sockaddr_in6_old))
|
|
|
|
return -1;
|
2006-02-20 13:33:09 +01:00
|
|
|
win6old->sin6_family = WS_AF_INET6;
|
|
|
|
win6old->sin6_port = uin6->sin6_port;
|
|
|
|
win6old->sin6_flowinfo = uin6->sin6_flowinfo;
|
|
|
|
memcpy(&win6old->sin6_addr,&uin6->sin6_addr,16); /* 16 bytes = 128 address bits */
|
|
|
|
#ifdef HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID
|
2005-11-16 12:21:57 +01:00
|
|
|
if (*wsaddrlen >= sizeof(struct WS_sockaddr_in6)) {
|
2006-02-20 13:33:09 +01:00
|
|
|
struct WS_sockaddr_in6* win6 = (struct WS_sockaddr_in6*)wsaddr;
|
2005-11-16 12:21:57 +01:00
|
|
|
win6->sin6_scope_id = uin6->sin6_scope_id;
|
|
|
|
*wsaddrlen = sizeof(struct WS_sockaddr_in6);
|
|
|
|
}
|
2009-10-17 01:53:53 +02:00
|
|
|
else
|
|
|
|
*wsaddrlen = sizeof(struct WS_sockaddr_in6_old);
|
|
|
|
#else
|
|
|
|
*wsaddrlen = sizeof(struct WS_sockaddr_in6_old);
|
2006-02-20 13:33:09 +01:00
|
|
|
#endif
|
2005-11-16 12:21:57 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
case AF_INET: {
|
2006-11-23 23:39:34 +01:00
|
|
|
const struct sockaddr_in* uin = (const struct sockaddr_in*)uaddr;
|
2005-11-16 12:21:57 +01:00
|
|
|
struct WS_sockaddr_in* win = (struct WS_sockaddr_in*)wsaddr;
|
2001-10-08 22:36:03 +02:00
|
|
|
|
2005-11-16 12:21:57 +01:00
|
|
|
if (*wsaddrlen < sizeof(struct WS_sockaddr_in))
|
|
|
|
return -1;
|
|
|
|
win->sin_family = WS_AF_INET;
|
|
|
|
win->sin_port = uin->sin_port;
|
|
|
|
memcpy(&win->sin_addr,&uin->sin_addr,4); /* 4 bytes = 32 address bits */
|
2008-07-12 21:37:39 +02:00
|
|
|
memset(win->sin_zero, 0, 8); /* Make sure the null padding is null */
|
2005-11-21 12:56:42 +01:00
|
|
|
*wsaddrlen = sizeof(struct WS_sockaddr_in);
|
2005-11-16 12:21:57 +01:00
|
|
|
return 0;
|
|
|
|
}
|
2006-01-03 12:11:07 +01:00
|
|
|
case AF_UNSPEC: {
|
|
|
|
memset(wsaddr,0,*wsaddrlen);
|
|
|
|
return 0;
|
|
|
|
}
|
2001-10-08 22:36:03 +02:00
|
|
|
default:
|
2005-11-16 12:21:57 +01:00
|
|
|
FIXME("Unknown address family %d\n", uaddr->sa_family);
|
|
|
|
return -1;
|
2001-10-08 22:36:03 +02:00
|
|
|
}
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
2013-09-08 06:47:46 +02:00
|
|
|
static INT WS_DuplicateSocket(BOOL unicode, SOCKET s, DWORD dwProcessId, LPWSAPROTOCOL_INFOW lpProtocolInfo)
|
|
|
|
{
|
|
|
|
HANDLE hProcess;
|
2013-09-11 15:05:18 +02:00
|
|
|
int size;
|
|
|
|
WSAPROTOCOL_INFOW infow;
|
2013-09-08 06:47:46 +02:00
|
|
|
|
|
|
|
TRACE("(unicode %d, socket %04lx, processid %x, buffer %p)\n",
|
|
|
|
unicode, s, dwProcessId, lpProtocolInfo);
|
2013-09-11 15:05:18 +02:00
|
|
|
|
|
|
|
if (!ws_protocol_info(s, unicode, &infow, &size))
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
|
|
|
|
if (!(hProcess = OpenProcess(PROCESS_DUP_HANDLE, FALSE, dwProcessId)))
|
|
|
|
{
|
|
|
|
SetLastError(WSAEINVAL);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!lpProtocolInfo)
|
|
|
|
{
|
|
|
|
CloseHandle(hProcess);
|
|
|
|
SetLastError(WSAEFAULT);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
2013-09-08 06:47:46 +02:00
|
|
|
/* I don't know what the real Windoze does next, this is a hack */
|
|
|
|
/* ...we could duplicate and then use ConvertToGlobalHandle on the duplicate, then let
|
|
|
|
* the target use the global duplicate, or we could copy a reference to us to the structure
|
|
|
|
* and let the target duplicate it from us, but let's do it as simple as possible */
|
2013-09-11 15:05:18 +02:00
|
|
|
memcpy(lpProtocolInfo, &infow, size);
|
2013-09-08 06:47:46 +02:00
|
|
|
DuplicateHandle(GetCurrentProcess(), SOCKET2HANDLE(s),
|
2013-09-11 15:05:18 +02:00
|
|
|
hProcess, (LPHANDLE)&lpProtocolInfo->dwServiceFlags3,
|
2013-09-08 06:47:46 +02:00
|
|
|
0, FALSE, DUPLICATE_SAME_ACCESS);
|
|
|
|
CloseHandle(hProcess);
|
|
|
|
lpProtocolInfo->dwServiceFlags4 = 0xff00ff00; /* magic */
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2013-09-04 03:51:58 +02:00
|
|
|
/*****************************************************************************
|
|
|
|
* WS_EnterSingleProtocolW [internal]
|
|
|
|
*
|
|
|
|
* enters the protocol information of one given protocol into the given
|
|
|
|
* buffer.
|
|
|
|
*
|
|
|
|
* RETURNS
|
2013-09-16 06:44:03 +02:00
|
|
|
* TRUE if a protocol was entered into the buffer.
|
2013-09-04 03:51:58 +02:00
|
|
|
*
|
|
|
|
* BUGS
|
|
|
|
* - only implemented for IPX, SPX, SPXII, TCP, UDP
|
|
|
|
* - there is no check that the operating system supports the returned
|
|
|
|
* protocols
|
|
|
|
*/
|
2013-09-16 06:44:03 +02:00
|
|
|
static BOOL WS_EnterSingleProtocolW( INT protocol, WSAPROTOCOL_INFOW* info )
|
2013-09-04 03:51:58 +02:00
|
|
|
{
|
|
|
|
memset( info, 0, sizeof(WSAPROTOCOL_INFOW) );
|
|
|
|
info->iProtocol = protocol;
|
|
|
|
|
|
|
|
switch (protocol)
|
|
|
|
{
|
|
|
|
case WS_IPPROTO_TCP:
|
|
|
|
info->dwServiceFlags1 = XP1_IFS_HANDLES | XP1_EXPEDITED_DATA |
|
|
|
|
XP1_GRACEFUL_CLOSE | XP1_GUARANTEED_ORDER |
|
|
|
|
XP1_GUARANTEED_DELIVERY;
|
|
|
|
info->ProviderId = ProviderIdIP;
|
|
|
|
info->dwCatalogEntryId = 0x3e9;
|
2013-09-16 06:43:31 +02:00
|
|
|
info->dwProviderFlags = PFL_MATCHES_PROTOCOL_ZERO;
|
2013-09-04 03:51:58 +02:00
|
|
|
info->ProtocolChain.ChainLen = 1;
|
|
|
|
info->iVersion = 2;
|
|
|
|
info->iAddressFamily = WS_AF_INET;
|
|
|
|
info->iMaxSockAddr = 0x10;
|
|
|
|
info->iMinSockAddr = 0x10;
|
|
|
|
info->iSocketType = WS_SOCK_STREAM;
|
|
|
|
strcpyW( info->szProtocol, NameTcpW );
|
|
|
|
break;
|
|
|
|
|
|
|
|
case WS_IPPROTO_UDP:
|
|
|
|
info->dwServiceFlags1 = XP1_IFS_HANDLES | XP1_SUPPORT_BROADCAST |
|
|
|
|
XP1_SUPPORT_MULTIPOINT | XP1_MESSAGE_ORIENTED |
|
|
|
|
XP1_CONNECTIONLESS;
|
|
|
|
info->ProviderId = ProviderIdIP;
|
|
|
|
info->dwCatalogEntryId = 0x3ea;
|
2013-09-16 06:43:31 +02:00
|
|
|
info->dwProviderFlags = PFL_MATCHES_PROTOCOL_ZERO;
|
2013-09-04 03:51:58 +02:00
|
|
|
info->ProtocolChain.ChainLen = 1;
|
|
|
|
info->iVersion = 2;
|
|
|
|
info->iAddressFamily = WS_AF_INET;
|
|
|
|
info->iMaxSockAddr = 0x10;
|
|
|
|
info->iMinSockAddr = 0x10;
|
|
|
|
info->iSocketType = WS_SOCK_DGRAM;
|
|
|
|
info->dwMessageSize = 0xffbb;
|
|
|
|
strcpyW( info->szProtocol, NameUdpW );
|
|
|
|
break;
|
|
|
|
|
2013-12-27 16:48:40 +01:00
|
|
|
case WS_NSPROTO_IPX:
|
2013-09-04 03:51:58 +02:00
|
|
|
info->dwServiceFlags1 = XP1_PARTIAL_MESSAGE | XP1_SUPPORT_BROADCAST |
|
|
|
|
XP1_SUPPORT_MULTIPOINT | XP1_MESSAGE_ORIENTED |
|
|
|
|
XP1_CONNECTIONLESS;
|
|
|
|
info->ProviderId = ProviderIdIPX;
|
|
|
|
info->dwCatalogEntryId = 0x406;
|
2013-09-16 06:43:31 +02:00
|
|
|
info->dwProviderFlags = PFL_MATCHES_PROTOCOL_ZERO;
|
2013-09-04 03:51:58 +02:00
|
|
|
info->ProtocolChain.ChainLen = 1;
|
|
|
|
info->iVersion = 2;
|
|
|
|
info->iAddressFamily = WS_AF_IPX;
|
|
|
|
info->iMaxSockAddr = 0x10;
|
|
|
|
info->iMinSockAddr = 0x0e;
|
|
|
|
info->iSocketType = WS_SOCK_DGRAM;
|
|
|
|
info->iProtocolMaxOffset = 0xff;
|
|
|
|
info->dwMessageSize = 0x240;
|
|
|
|
strcpyW( info->szProtocol, NameIpxW );
|
|
|
|
break;
|
|
|
|
|
2013-12-27 16:48:40 +01:00
|
|
|
case WS_NSPROTO_SPX:
|
2013-09-04 03:51:58 +02:00
|
|
|
info->dwServiceFlags1 = XP1_IFS_HANDLES | XP1_PSEUDO_STREAM |
|
|
|
|
XP1_MESSAGE_ORIENTED | XP1_GUARANTEED_ORDER |
|
|
|
|
XP1_GUARANTEED_DELIVERY;
|
|
|
|
info->ProviderId = ProviderIdSPX;
|
|
|
|
info->dwCatalogEntryId = 0x407;
|
2013-09-16 06:43:31 +02:00
|
|
|
info->dwProviderFlags = PFL_MATCHES_PROTOCOL_ZERO;
|
2013-09-04 03:51:58 +02:00
|
|
|
info->ProtocolChain.ChainLen = 1;
|
|
|
|
info->iVersion = 2;
|
|
|
|
info->iAddressFamily = WS_AF_IPX;
|
|
|
|
info->iMaxSockAddr = 0x10;
|
|
|
|
info->iMinSockAddr = 0x0e;
|
2013-09-16 06:43:45 +02:00
|
|
|
info->iSocketType = WS_SOCK_SEQPACKET;
|
2013-09-04 03:51:58 +02:00
|
|
|
info->dwMessageSize = 0xffffffff;
|
|
|
|
strcpyW( info->szProtocol, NameSpxW );
|
|
|
|
break;
|
|
|
|
|
2013-12-27 16:48:40 +01:00
|
|
|
case WS_NSPROTO_SPXII:
|
2013-09-04 03:51:58 +02:00
|
|
|
info->dwServiceFlags1 = XP1_IFS_HANDLES | XP1_GRACEFUL_CLOSE |
|
|
|
|
XP1_PSEUDO_STREAM | XP1_MESSAGE_ORIENTED |
|
|
|
|
XP1_GUARANTEED_ORDER | XP1_GUARANTEED_DELIVERY;
|
|
|
|
info->ProviderId = ProviderIdSPX;
|
|
|
|
info->dwCatalogEntryId = 0x409;
|
2013-09-16 06:43:31 +02:00
|
|
|
info->dwProviderFlags = PFL_MATCHES_PROTOCOL_ZERO;
|
2013-09-04 03:51:58 +02:00
|
|
|
info->ProtocolChain.ChainLen = 1;
|
|
|
|
info->iVersion = 2;
|
|
|
|
info->iAddressFamily = WS_AF_IPX;
|
|
|
|
info->iMaxSockAddr = 0x10;
|
|
|
|
info->iMinSockAddr = 0x0e;
|
2013-09-16 06:43:45 +02:00
|
|
|
info->iSocketType = WS_SOCK_SEQPACKET;
|
2013-09-04 03:51:58 +02:00
|
|
|
info->dwMessageSize = 0xffffffff;
|
|
|
|
strcpyW( info->szProtocol, NameSpxIIW );
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
2013-09-06 14:14:06 +02:00
|
|
|
FIXME("unknown Protocol <0x%08x>\n", protocol);
|
2013-09-16 06:44:03 +02:00
|
|
|
return FALSE;
|
2013-09-04 03:51:58 +02:00
|
|
|
}
|
2013-09-16 06:44:03 +02:00
|
|
|
return TRUE;
|
2013-09-04 03:51:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/*****************************************************************************
|
|
|
|
* WS_EnterSingleProtocolA [internal]
|
|
|
|
*
|
|
|
|
* see function WS_EnterSingleProtocolW
|
|
|
|
*
|
|
|
|
*/
|
2013-09-16 06:44:03 +02:00
|
|
|
static BOOL WS_EnterSingleProtocolA( INT protocol, WSAPROTOCOL_INFOA* info )
|
2013-09-04 03:51:58 +02:00
|
|
|
{
|
|
|
|
WSAPROTOCOL_INFOW infow;
|
|
|
|
INT ret;
|
|
|
|
memset( info, 0, sizeof(WSAPROTOCOL_INFOA) );
|
|
|
|
|
|
|
|
ret = WS_EnterSingleProtocolW( protocol, &infow );
|
2013-09-16 06:44:03 +02:00
|
|
|
if (ret)
|
2013-09-04 03:51:58 +02:00
|
|
|
{
|
|
|
|
/* convert the structure from W to A */
|
|
|
|
memcpy( info, &infow, FIELD_OFFSET( WSAPROTOCOL_INFOA, szProtocol ) );
|
|
|
|
WideCharToMultiByte( CP_ACP, 0, infow.szProtocol, -1,
|
|
|
|
info->szProtocol, WSAPROTOCOL_LEN+1, NULL, NULL );
|
|
|
|
}
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2013-09-05 14:56:19 +02:00
|
|
|
static INT WS_EnumProtocols( BOOL unicode, const INT *protocols, LPWSAPROTOCOL_INFOW buffer, LPDWORD len )
|
2013-09-04 03:51:58 +02:00
|
|
|
{
|
2013-09-05 14:56:19 +02:00
|
|
|
INT i = 0, items = 0;
|
2013-09-04 03:51:58 +02:00
|
|
|
DWORD size = 0;
|
|
|
|
union _info
|
|
|
|
{
|
|
|
|
LPWSAPROTOCOL_INFOA a;
|
|
|
|
LPWSAPROTOCOL_INFOW w;
|
|
|
|
} info;
|
|
|
|
info.w = buffer;
|
|
|
|
|
2013-09-05 14:56:19 +02:00
|
|
|
if (!protocols) protocols = valid_protocols;
|
2013-09-04 03:51:58 +02:00
|
|
|
|
2013-09-05 14:56:19 +02:00
|
|
|
while (protocols[i])
|
|
|
|
{
|
|
|
|
if(supported_protocol(protocols[i++]))
|
|
|
|
items++;
|
|
|
|
}
|
2013-09-04 03:51:58 +02:00
|
|
|
|
2013-09-05 14:56:19 +02:00
|
|
|
size = items * (unicode ? sizeof(WSAPROTOCOL_INFOW) : sizeof(WSAPROTOCOL_INFOA));
|
2013-09-04 03:51:58 +02:00
|
|
|
|
2013-09-06 14:13:53 +02:00
|
|
|
TRACE("unicode %d, protocols %p, buffer %p, length %p %d, items %d, required %d\n",
|
|
|
|
unicode, protocols, buffer, len, len ? *len : 0, items, size);
|
|
|
|
|
2013-09-04 03:51:58 +02:00
|
|
|
if (*len < size || !buffer)
|
|
|
|
{
|
|
|
|
*len = size;
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError(WSAENOBUFS);
|
2013-09-04 03:51:58 +02:00
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
2013-09-05 14:56:19 +02:00
|
|
|
for (i = items = 0; protocols[i]; i++)
|
2013-09-04 03:51:58 +02:00
|
|
|
{
|
2014-06-15 23:54:54 +02:00
|
|
|
if (!supported_protocol(protocols[i])) continue;
|
2013-09-04 03:51:58 +02:00
|
|
|
if (unicode)
|
|
|
|
{
|
2013-09-16 06:44:03 +02:00
|
|
|
if (WS_EnterSingleProtocolW( protocols[i], &info.w[items] ))
|
2013-09-05 14:56:19 +02:00
|
|
|
items++;
|
2013-09-04 03:51:58 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2013-09-16 06:44:03 +02:00
|
|
|
if (WS_EnterSingleProtocolA( protocols[i], &info.a[items] ))
|
2013-09-05 14:56:19 +02:00
|
|
|
items++;
|
2013-09-04 03:51:58 +02:00
|
|
|
}
|
|
|
|
}
|
2013-09-05 14:56:19 +02:00
|
|
|
return items;
|
2013-09-04 03:51:58 +02:00
|
|
|
}
|
|
|
|
|
2013-09-10 05:56:47 +02:00
|
|
|
static BOOL ws_protocol_info(SOCKET s, int unicode, WSAPROTOCOL_INFOW *buffer, int *size)
|
|
|
|
{
|
|
|
|
NTSTATUS status;
|
|
|
|
|
|
|
|
*size = unicode ? sizeof(WSAPROTOCOL_INFOW) : sizeof(WSAPROTOCOL_INFOA);
|
|
|
|
memset(buffer, 0, *size);
|
|
|
|
|
|
|
|
SERVER_START_REQ( get_socket_info )
|
|
|
|
{
|
|
|
|
req->handle = wine_server_obj_handle( SOCKET2HANDLE(s) );
|
|
|
|
status = wine_server_call( req );
|
|
|
|
if (!status)
|
|
|
|
{
|
|
|
|
buffer->iAddressFamily = convert_af_u2w(reply->family);
|
|
|
|
buffer->iSocketType = convert_socktype_u2w(reply->type);
|
|
|
|
buffer->iProtocol = convert_proto_u2w(reply->protocol);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
SERVER_END_REQ;
|
|
|
|
|
|
|
|
if (status)
|
|
|
|
{
|
2013-09-11 15:05:18 +02:00
|
|
|
unsigned int err = NtStatusToWSAError( status );
|
|
|
|
SetLastError( err == WSAEBADF ? WSAENOTSOCK : err );
|
2013-09-10 05:56:47 +02:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (unicode)
|
|
|
|
WS_EnterSingleProtocolW( buffer->iProtocol, buffer);
|
|
|
|
else
|
|
|
|
WS_EnterSingleProtocolA( buffer->iProtocol, (WSAPROTOCOL_INFOA *)buffer);
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2002-04-25 23:34:24 +02:00
|
|
|
/**************************************************************************
|
|
|
|
* Functions for handling overlapped I/O
|
|
|
|
**************************************************************************/
|
|
|
|
|
2007-05-31 17:48:07 +02:00
|
|
|
/* user APC called upon async completion */
|
|
|
|
static void WINAPI ws2_async_apc( void *arg, IO_STATUS_BLOCK *iosb, ULONG reserved )
|
|
|
|
{
|
2015-03-03 07:33:21 +01:00
|
|
|
struct ws2_async *wsa = arg;
|
2007-05-31 17:48:07 +02:00
|
|
|
|
|
|
|
if (wsa->completion_func) wsa->completion_func( NtStatusToWSAError(iosb->u.Status),
|
|
|
|
iosb->Information, wsa->user_overlapped,
|
|
|
|
wsa->flags );
|
2015-03-03 07:30:38 +01:00
|
|
|
release_async_io( &wsa->io );
|
2007-05-31 17:48:07 +02:00
|
|
|
}
|
|
|
|
|
2002-04-25 23:34:24 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* WS2_recv (INTERNAL)
|
|
|
|
*
|
2004-12-20 20:27:06 +01:00
|
|
|
* Workhorse for both synchronous and asynchronous recv() operations.
|
2002-04-25 23:34:24 +02:00
|
|
|
*/
|
2015-03-29 05:53:30 +02:00
|
|
|
static int WS2_recv( int fd, struct ws2_async *wsa, int flags )
|
2002-04-25 23:34:24 +02:00
|
|
|
{
|
2010-12-06 01:08:54 +01:00
|
|
|
#ifndef HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS
|
|
|
|
char pktbuf[512];
|
|
|
|
#endif
|
2002-04-25 23:34:24 +02:00
|
|
|
struct msghdr hdr;
|
2007-05-30 20:11:58 +02:00
|
|
|
union generic_unix_sockaddr unix_sockaddr;
|
2002-04-25 23:34:24 +02:00
|
|
|
int n;
|
|
|
|
|
|
|
|
hdr.msg_name = NULL;
|
|
|
|
|
2008-10-09 12:57:33 +02:00
|
|
|
if (wsa->addr)
|
2002-04-25 23:34:24 +02:00
|
|
|
{
|
2007-05-30 20:11:58 +02:00
|
|
|
hdr.msg_namelen = sizeof(unix_sockaddr);
|
|
|
|
hdr.msg_name = &unix_sockaddr;
|
2002-04-25 23:34:24 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
hdr.msg_namelen = 0;
|
|
|
|
|
2008-10-09 12:57:33 +02:00
|
|
|
hdr.msg_iov = wsa->iovec + wsa->first_iovec;
|
|
|
|
hdr.msg_iovlen = wsa->n_iovecs - wsa->first_iovec;
|
2003-03-28 01:36:12 +01:00
|
|
|
#ifdef HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS
|
2002-05-17 01:12:03 +02:00
|
|
|
hdr.msg_accrights = NULL;
|
|
|
|
hdr.msg_accrightslen = 0;
|
|
|
|
#else
|
2010-12-06 01:08:54 +01:00
|
|
|
hdr.msg_control = pktbuf;
|
|
|
|
hdr.msg_controllen = sizeof(pktbuf);
|
2002-04-25 23:34:24 +02:00
|
|
|
hdr.msg_flags = 0;
|
2002-05-17 01:12:03 +02:00
|
|
|
#endif
|
2002-04-25 23:34:24 +02:00
|
|
|
|
2015-03-29 05:53:30 +02:00
|
|
|
while ((n = recvmsg(fd, &hdr, flags)) == -1)
|
2014-05-17 22:42:11 +02:00
|
|
|
{
|
|
|
|
if (errno != EINTR)
|
|
|
|
return -1;
|
|
|
|
}
|
2002-04-25 23:34:24 +02:00
|
|
|
|
2010-12-06 01:08:54 +01:00
|
|
|
#ifdef HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS
|
|
|
|
if (wsa->control)
|
|
|
|
{
|
|
|
|
ERR("Message control headers cannot be properly supported on this system.\n");
|
2010-12-08 16:24:23 +01:00
|
|
|
wsa->control->len = 0;
|
2010-12-06 01:08:54 +01:00
|
|
|
}
|
|
|
|
#else
|
|
|
|
if (wsa->control && !convert_control_headers(&hdr, wsa->control))
|
|
|
|
{
|
|
|
|
WARN("Application passed insufficient room for control headers.\n");
|
|
|
|
*wsa->lpFlags |= WS_MSG_CTRUNC;
|
|
|
|
errno = EMSGSIZE;
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2008-06-13 10:05:22 +02:00
|
|
|
/* if this socket is connected and lpFrom is not NULL, Linux doesn't give us
|
|
|
|
* msg_name and msg_namelen from recvmsg, but it does set msg_namelen to zero.
|
|
|
|
*
|
|
|
|
* quoting linux 2.6 net/ipv4/tcp.c:
|
|
|
|
* "According to UNIX98, msg_name/msg_namelen are ignored
|
|
|
|
* on connected socket. I was just happy when found this 8) --ANK"
|
|
|
|
*
|
|
|
|
* likewise MSDN says that lpFrom and lpFromlen are ignored for
|
|
|
|
* connection-oriented sockets, so don't try to update lpFrom.
|
|
|
|
*/
|
2008-10-09 12:57:33 +02:00
|
|
|
if (wsa->addr && hdr.msg_namelen)
|
|
|
|
ws_sockaddr_u2ws( &unix_sockaddr.addr, wsa->addr, wsa->addrlen.ptr );
|
2002-04-25 23:34:24 +02:00
|
|
|
|
|
|
|
return n;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* WS2_async_recv (INTERNAL)
|
|
|
|
*
|
|
|
|
* Handler for overlapped recv() operations.
|
|
|
|
*/
|
2015-03-03 08:06:51 +01:00
|
|
|
static NTSTATUS WS2_async_recv( void *user, IO_STATUS_BLOCK *iosb,
|
|
|
|
NTSTATUS status, void **apc, void **arg )
|
2002-04-25 23:34:24 +02:00
|
|
|
{
|
2015-03-03 07:33:21 +01:00
|
|
|
struct ws2_async *wsa = user;
|
2007-06-01 11:15:33 +02:00
|
|
|
int result = 0, fd;
|
2002-04-25 23:34:24 +02:00
|
|
|
|
2005-01-14 20:54:38 +01:00
|
|
|
switch (status)
|
2002-04-25 23:34:24 +02:00
|
|
|
{
|
2005-01-14 20:54:38 +01:00
|
|
|
case STATUS_ALERTED:
|
2007-04-05 11:29:30 +02:00
|
|
|
if ((status = wine_server_handle_to_fd( wsa->hSocket, FILE_READ_DATA, &fd, NULL ) ))
|
2006-11-03 12:03:14 +01:00
|
|
|
break;
|
2007-04-10 17:07:27 +02:00
|
|
|
|
2015-03-29 05:53:30 +02:00
|
|
|
result = WS2_recv( fd, wsa, convert_flags(wsa->flags) );
|
2006-11-03 12:03:14 +01:00
|
|
|
wine_server_release_fd( wsa->hSocket, fd );
|
2005-01-14 20:54:38 +01:00
|
|
|
if (result >= 0)
|
|
|
|
{
|
2007-04-05 11:29:30 +02:00
|
|
|
status = STATUS_SUCCESS;
|
2005-01-14 20:54:38 +01:00
|
|
|
_enable_event( wsa->hSocket, FD_READ, 0, 0 );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2014-05-17 22:42:11 +02:00
|
|
|
if (errno == EAGAIN)
|
2005-01-14 20:54:38 +01:00
|
|
|
{
|
2007-04-05 11:29:30 +02:00
|
|
|
status = STATUS_PENDING;
|
2005-01-14 20:54:38 +01:00
|
|
|
_enable_event( wsa->hSocket, FD_READ, 0, 0 );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2007-04-05 11:29:30 +02:00
|
|
|
result = 0;
|
2010-03-22 19:56:21 +01:00
|
|
|
status = wsaErrStatus();
|
2005-01-14 20:54:38 +01:00
|
|
|
}
|
|
|
|
}
|
2007-04-05 11:29:30 +02:00
|
|
|
break;
|
2002-04-25 23:34:24 +02:00
|
|
|
}
|
2007-05-31 17:48:07 +02:00
|
|
|
if (status != STATUS_PENDING)
|
|
|
|
{
|
|
|
|
iosb->u.Status = status;
|
2008-12-30 20:51:55 +01:00
|
|
|
iosb->Information = result;
|
2015-03-03 07:30:38 +01:00
|
|
|
if (wsa->completion_func)
|
2015-03-03 08:06:51 +01:00
|
|
|
{
|
2015-03-03 07:30:38 +01:00
|
|
|
*apc = ws2_async_apc;
|
2015-03-03 08:06:51 +01:00
|
|
|
*arg = wsa;
|
|
|
|
}
|
2015-03-03 07:30:38 +01:00
|
|
|
else
|
|
|
|
release_async_io( &wsa->io );
|
2007-05-31 17:48:07 +02:00
|
|
|
}
|
2007-04-10 17:07:27 +02:00
|
|
|
return status;
|
2002-04-25 23:34:24 +02:00
|
|
|
}
|
|
|
|
|
2010-09-21 03:30:28 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* WS2_async_accept_recv (INTERNAL)
|
|
|
|
*
|
|
|
|
* This function is used to finish the read part of an accept request. It is
|
|
|
|
* needed to place the completion on the correct socket (listener).
|
|
|
|
*/
|
2015-03-03 08:06:51 +01:00
|
|
|
static NTSTATUS WS2_async_accept_recv( void *user, IO_STATUS_BLOCK *iosb,
|
|
|
|
NTSTATUS status, void **apc, void **arg )
|
2010-09-21 03:30:28 +02:00
|
|
|
{
|
|
|
|
void *junk;
|
2015-03-03 08:06:51 +01:00
|
|
|
struct ws2_accept_async *wsa = user;
|
2010-09-21 03:30:28 +02:00
|
|
|
|
2015-03-03 08:06:51 +01:00
|
|
|
status = WS2_async_recv( wsa->read, iosb, status, &junk, &junk );
|
2010-09-21 03:30:28 +02:00
|
|
|
if (status == STATUS_PENDING)
|
|
|
|
return status;
|
|
|
|
|
|
|
|
if (wsa->cvalue)
|
|
|
|
WS_AddCompletion( HANDLE2SOCKET(wsa->listen_socket), wsa->cvalue, iosb->u.Status, iosb->Information );
|
|
|
|
|
2015-03-03 07:30:38 +01:00
|
|
|
release_async_io( &wsa->io );
|
2010-09-21 03:30:28 +02:00
|
|
|
return status;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* WS2_async_accept (INTERNAL)
|
|
|
|
*
|
|
|
|
* This is the function called to satisfy the AcceptEx callback
|
|
|
|
*/
|
2015-03-03 08:06:51 +01:00
|
|
|
static NTSTATUS WS2_async_accept( void *user, IO_STATUS_BLOCK *iosb,
|
|
|
|
NTSTATUS status, void **apc, void **arg )
|
2010-09-21 03:30:28 +02:00
|
|
|
{
|
2015-03-03 08:06:51 +01:00
|
|
|
struct ws2_accept_async *wsa = user;
|
2010-09-21 03:30:28 +02:00
|
|
|
int len;
|
|
|
|
char *addr;
|
|
|
|
|
|
|
|
TRACE("status: 0x%x listen: %p, accept: %p\n", status, wsa->listen_socket, wsa->accept_socket);
|
|
|
|
|
|
|
|
if (status == STATUS_ALERTED)
|
|
|
|
{
|
|
|
|
SERVER_START_REQ( accept_into_socket )
|
|
|
|
{
|
|
|
|
req->lhandle = wine_server_obj_handle( wsa->listen_socket );
|
|
|
|
req->ahandle = wine_server_obj_handle( wsa->accept_socket );
|
|
|
|
status = wine_server_call( req );
|
|
|
|
}
|
|
|
|
SERVER_END_REQ;
|
|
|
|
|
|
|
|
if (status == STATUS_CANT_WAIT)
|
|
|
|
return STATUS_PENDING;
|
|
|
|
|
|
|
|
if (status == STATUS_INVALID_HANDLE)
|
|
|
|
{
|
2010-11-02 13:03:36 +01:00
|
|
|
FIXME("AcceptEx accepting socket closed but request was not cancelled\n");
|
2010-09-21 03:30:28 +02:00
|
|
|
status = STATUS_CANCELLED;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (status == STATUS_HANDLES_CLOSED)
|
|
|
|
status = STATUS_CANCELLED; /* strange windows behavior */
|
|
|
|
|
|
|
|
if (status != STATUS_SUCCESS)
|
|
|
|
goto finish;
|
|
|
|
|
|
|
|
/* WS2 Spec says size param is extra 16 bytes long...what do we put in it? */
|
|
|
|
addr = ((char *)wsa->buf) + wsa->data_len;
|
|
|
|
len = wsa->local_len - sizeof(int);
|
2011-11-26 22:26:06 +01:00
|
|
|
WS_getsockname(HANDLE2SOCKET(wsa->accept_socket),
|
2010-09-21 03:30:28 +02:00
|
|
|
(struct WS_sockaddr *)(addr + sizeof(int)), &len);
|
|
|
|
*(int *)addr = len;
|
|
|
|
|
|
|
|
addr += wsa->local_len;
|
|
|
|
len = wsa->remote_len - sizeof(int);
|
2011-11-26 22:26:06 +01:00
|
|
|
WS_getpeername(HANDLE2SOCKET(wsa->accept_socket),
|
2010-09-21 03:30:28 +02:00
|
|
|
(struct WS_sockaddr *)(addr + sizeof(int)), &len);
|
|
|
|
*(int *)addr = len;
|
|
|
|
|
|
|
|
if (!wsa->read)
|
|
|
|
goto finish;
|
|
|
|
|
|
|
|
SERVER_START_REQ( register_async )
|
|
|
|
{
|
|
|
|
req->type = ASYNC_TYPE_READ;
|
|
|
|
req->async.handle = wine_server_obj_handle( wsa->accept_socket );
|
2015-03-07 07:17:05 +01:00
|
|
|
req->async.event = wine_server_obj_handle( wsa->user_overlapped->hEvent );
|
2010-09-21 03:30:28 +02:00
|
|
|
req->async.callback = wine_server_client_ptr( WS2_async_accept_recv );
|
|
|
|
req->async.iosb = wine_server_client_ptr( iosb );
|
|
|
|
req->async.arg = wine_server_client_ptr( wsa );
|
|
|
|
status = wine_server_call( req );
|
|
|
|
}
|
|
|
|
SERVER_END_REQ;
|
|
|
|
|
|
|
|
if (status != STATUS_PENDING)
|
|
|
|
goto finish;
|
|
|
|
|
2012-06-07 01:35:32 +02:00
|
|
|
/* The APC has finished but no completion should be sent for the operation yet, additional processing
|
|
|
|
* needs to be performed by WS2_async_accept_recv() first. */
|
|
|
|
return STATUS_MORE_PROCESSING_REQUIRED;
|
2010-09-21 03:30:28 +02:00
|
|
|
|
|
|
|
finish:
|
|
|
|
iosb->u.Status = status;
|
|
|
|
iosb->Information = 0;
|
|
|
|
|
2015-03-03 07:30:38 +01:00
|
|
|
if (wsa->read) release_async_io( &wsa->read->io );
|
|
|
|
release_async_io( &wsa->io );
|
2010-09-21 03:30:28 +02:00
|
|
|
return status;
|
|
|
|
}
|
|
|
|
|
2002-04-25 23:34:24 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* WS2_send (INTERNAL)
|
|
|
|
*
|
2004-12-20 20:27:06 +01:00
|
|
|
* Workhorse for both synchronous and asynchronous send() operations.
|
2002-04-25 23:34:24 +02:00
|
|
|
*/
|
2015-03-29 05:53:30 +02:00
|
|
|
static int WS2_send( int fd, struct ws2_async *wsa, int flags )
|
2002-04-25 23:34:24 +02:00
|
|
|
{
|
|
|
|
struct msghdr hdr;
|
2007-05-30 20:11:58 +02:00
|
|
|
union generic_unix_sockaddr unix_addr;
|
2011-01-24 06:19:12 +01:00
|
|
|
int n, ret;
|
2007-05-30 20:11:58 +02:00
|
|
|
|
2002-04-25 23:34:24 +02:00
|
|
|
hdr.msg_name = NULL;
|
2007-06-29 13:40:48 +02:00
|
|
|
hdr.msg_namelen = 0;
|
2002-04-25 23:34:24 +02:00
|
|
|
|
2008-10-09 12:57:33 +02:00
|
|
|
if (wsa->addr)
|
2002-04-25 23:34:24 +02:00
|
|
|
{
|
2007-05-30 20:11:58 +02:00
|
|
|
hdr.msg_name = &unix_addr;
|
2008-10-09 12:57:33 +02:00
|
|
|
hdr.msg_namelen = ws_sockaddr_ws2u( wsa->addr, wsa->addrlen.val, &unix_addr );
|
2007-05-30 20:11:58 +02:00
|
|
|
if ( !hdr.msg_namelen )
|
2002-04-25 23:34:24 +02:00
|
|
|
{
|
2007-06-01 11:15:33 +02:00
|
|
|
errno = EFAULT;
|
|
|
|
return -1;
|
2002-04-25 23:34:24 +02:00
|
|
|
}
|
2004-09-07 22:47:03 +02:00
|
|
|
|
2013-06-17 21:56:52 +02:00
|
|
|
#if defined(HAS_IPX) && defined(SOL_IPX)
|
2008-10-09 12:57:33 +02:00
|
|
|
if(wsa->addr->sa_family == WS_AF_IPX)
|
2004-09-07 22:47:03 +02:00
|
|
|
{
|
|
|
|
struct sockaddr_ipx* uipx = (struct sockaddr_ipx*)hdr.msg_name;
|
|
|
|
int val=0;
|
2013-03-06 13:26:59 +01:00
|
|
|
socklen_t len = sizeof(int);
|
2004-09-07 22:47:03 +02:00
|
|
|
|
2004-12-20 20:27:06 +01:00
|
|
|
/* The packet type is stored at the ipx socket level; At least the linux kernel seems
|
2004-09-07 22:47:03 +02:00
|
|
|
* to do something with it in case hdr.msg_name is NULL. Nonetheless can we use it to store
|
|
|
|
* the packet type and then we can retrieve it using getsockopt. After that we can set the
|
|
|
|
* ipx type in the sockaddr_opx structure with the stored value.
|
|
|
|
*/
|
|
|
|
if(getsockopt(fd, SOL_IPX, IPX_TYPE, &val, &len) != -1)
|
|
|
|
uipx->sipx_type = val;
|
|
|
|
}
|
|
|
|
#endif
|
2002-04-25 23:34:24 +02:00
|
|
|
}
|
|
|
|
|
2008-10-09 12:57:33 +02:00
|
|
|
hdr.msg_iov = wsa->iovec + wsa->first_iovec;
|
|
|
|
hdr.msg_iovlen = wsa->n_iovecs - wsa->first_iovec;
|
2003-03-28 01:36:12 +01:00
|
|
|
#ifdef HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS
|
2002-05-17 01:12:03 +02:00
|
|
|
hdr.msg_accrights = NULL;
|
|
|
|
hdr.msg_accrightslen = 0;
|
|
|
|
#else
|
2002-04-25 23:34:24 +02:00
|
|
|
hdr.msg_control = NULL;
|
|
|
|
hdr.msg_controllen = 0;
|
|
|
|
hdr.msg_flags = 0;
|
2002-05-17 01:12:03 +02:00
|
|
|
#endif
|
2002-04-25 23:34:24 +02:00
|
|
|
|
2015-03-29 05:53:30 +02:00
|
|
|
while ((ret = sendmsg(fd, &hdr, flags)) == -1)
|
2011-01-24 06:19:12 +01:00
|
|
|
{
|
2014-05-17 22:42:11 +02:00
|
|
|
if (errno != EINTR)
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
n = ret;
|
|
|
|
while (wsa->first_iovec < wsa->n_iovecs && wsa->iovec[wsa->first_iovec].iov_len <= n)
|
|
|
|
n -= wsa->iovec[wsa->first_iovec++].iov_len;
|
|
|
|
if (wsa->first_iovec < wsa->n_iovecs)
|
|
|
|
{
|
|
|
|
wsa->iovec[wsa->first_iovec].iov_base = (char*)wsa->iovec[wsa->first_iovec].iov_base + n;
|
|
|
|
wsa->iovec[wsa->first_iovec].iov_len -= n;
|
2011-01-24 06:19:12 +01:00
|
|
|
}
|
|
|
|
return ret;
|
2002-04-25 23:34:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* WS2_async_send (INTERNAL)
|
|
|
|
*
|
|
|
|
* Handler for overlapped send() operations.
|
|
|
|
*/
|
2015-03-03 08:06:51 +01:00
|
|
|
static NTSTATUS WS2_async_send( void *user, IO_STATUS_BLOCK *iosb,
|
|
|
|
NTSTATUS status, void **apc, void **arg )
|
2002-04-25 23:34:24 +02:00
|
|
|
{
|
2015-03-03 07:33:21 +01:00
|
|
|
struct ws2_async *wsa = user;
|
2007-04-10 17:07:27 +02:00
|
|
|
int result = 0, fd;
|
2002-04-25 23:34:24 +02:00
|
|
|
|
2005-01-14 20:54:38 +01:00
|
|
|
switch (status)
|
2002-04-25 23:34:24 +02:00
|
|
|
{
|
2005-01-14 20:54:38 +01:00
|
|
|
case STATUS_ALERTED:
|
2011-03-04 19:09:44 +01:00
|
|
|
if ( wsa->n_iovecs <= wsa->first_iovec )
|
|
|
|
{
|
|
|
|
/* Nothing to do */
|
|
|
|
status = STATUS_SUCCESS;
|
|
|
|
break;
|
|
|
|
}
|
2007-04-05 11:29:30 +02:00
|
|
|
if ((status = wine_server_handle_to_fd( wsa->hSocket, FILE_WRITE_DATA, &fd, NULL ) ))
|
2006-11-03 12:03:14 +01:00
|
|
|
break;
|
2007-04-10 17:07:27 +02:00
|
|
|
|
2005-01-14 20:54:38 +01:00
|
|
|
/* check to see if the data is ready (non-blocking) */
|
2015-03-29 05:53:30 +02:00
|
|
|
result = WS2_send( fd, wsa, convert_flags(wsa->flags) );
|
2006-11-03 12:03:14 +01:00
|
|
|
wine_server_release_fd( wsa->hSocket, fd );
|
2002-04-25 23:34:24 +02:00
|
|
|
|
2005-01-14 20:54:38 +01:00
|
|
|
if (result >= 0)
|
|
|
|
{
|
2011-01-24 06:19:25 +01:00
|
|
|
if (wsa->first_iovec < wsa->n_iovecs)
|
|
|
|
status = STATUS_PENDING;
|
|
|
|
else
|
|
|
|
status = STATUS_SUCCESS;
|
|
|
|
|
2011-01-24 06:19:19 +01:00
|
|
|
iosb->Information += result;
|
2011-01-24 06:19:06 +01:00
|
|
|
}
|
2014-05-17 22:42:11 +02:00
|
|
|
else if (errno == EAGAIN)
|
2011-01-24 06:19:06 +01:00
|
|
|
{
|
|
|
|
status = STATUS_PENDING;
|
2005-01-14 20:54:38 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2011-01-24 06:19:06 +01:00
|
|
|
status = wsaErrStatus();
|
2005-01-14 20:54:38 +01:00
|
|
|
}
|
2007-04-05 11:29:30 +02:00
|
|
|
break;
|
2002-04-25 23:34:24 +02:00
|
|
|
}
|
2007-05-31 17:48:07 +02:00
|
|
|
if (status != STATUS_PENDING)
|
|
|
|
{
|
|
|
|
iosb->u.Status = status;
|
2015-03-03 07:30:38 +01:00
|
|
|
if (wsa->completion_func)
|
2015-03-03 08:06:51 +01:00
|
|
|
{
|
2015-03-03 07:30:38 +01:00
|
|
|
*apc = ws2_async_apc;
|
2015-03-03 08:06:51 +01:00
|
|
|
*arg = wsa;
|
|
|
|
}
|
2015-03-03 07:30:38 +01:00
|
|
|
else
|
|
|
|
release_async_io( &wsa->io );
|
2007-05-31 17:48:07 +02:00
|
|
|
}
|
2007-04-10 17:07:27 +02:00
|
|
|
return status;
|
2002-04-25 23:34:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* WS2_async_shutdown (INTERNAL)
|
|
|
|
*
|
|
|
|
* Handler for shutdown() operations on overlapped sockets.
|
|
|
|
*/
|
2015-03-03 08:06:51 +01:00
|
|
|
static NTSTATUS WS2_async_shutdown( void *user, IO_STATUS_BLOCK *iosb,
|
|
|
|
NTSTATUS status, void **apc, void **arg )
|
2002-04-25 23:34:24 +02:00
|
|
|
{
|
2015-03-03 07:30:13 +01:00
|
|
|
struct ws2_async_shutdown *wsa = user;
|
2006-11-03 12:03:14 +01:00
|
|
|
int fd, err = 1;
|
2002-04-25 23:34:24 +02:00
|
|
|
|
2005-01-14 20:54:38 +01:00
|
|
|
switch (status)
|
2002-04-25 23:34:24 +02:00
|
|
|
{
|
2005-01-14 20:54:38 +01:00
|
|
|
case STATUS_ALERTED:
|
2007-04-05 11:29:30 +02:00
|
|
|
if ((status = wine_server_handle_to_fd( wsa->hSocket, 0, &fd, NULL ) ))
|
2006-11-03 12:03:14 +01:00
|
|
|
break;
|
2007-04-10 17:07:27 +02:00
|
|
|
|
2007-05-31 17:51:18 +02:00
|
|
|
switch ( wsa->type )
|
2005-01-14 20:54:38 +01:00
|
|
|
{
|
2007-05-31 17:51:18 +02:00
|
|
|
case ASYNC_TYPE_READ: err = shutdown( fd, 0 ); break;
|
|
|
|
case ASYNC_TYPE_WRITE: err = shutdown( fd, 1 ); break;
|
2005-01-14 20:54:38 +01:00
|
|
|
}
|
2010-03-22 19:56:21 +01:00
|
|
|
status = err ? wsaErrStatus() : STATUS_SUCCESS;
|
2006-11-03 12:03:14 +01:00
|
|
|
wine_server_release_fd( wsa->hSocket, fd );
|
2005-01-14 20:54:38 +01:00
|
|
|
break;
|
2002-04-25 23:34:24 +02:00
|
|
|
}
|
2007-05-31 17:51:18 +02:00
|
|
|
iosb->u.Status = status;
|
2009-10-19 11:44:20 +02:00
|
|
|
iosb->Information = 0;
|
2015-03-03 07:30:38 +01:00
|
|
|
release_async_io( &wsa->io );
|
2007-04-10 17:07:27 +02:00
|
|
|
return status;
|
2002-04-25 23:34:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* WS2_register_async_shutdown (INTERNAL)
|
|
|
|
*
|
|
|
|
* Helper function for WS_shutdown() on overlapped sockets.
|
|
|
|
*/
|
2007-05-31 17:51:18 +02:00
|
|
|
static int WS2_register_async_shutdown( SOCKET s, int type )
|
2002-04-25 23:34:24 +02:00
|
|
|
{
|
2015-03-03 07:30:13 +01:00
|
|
|
struct ws2_async_shutdown *wsa;
|
2007-05-31 17:51:18 +02:00
|
|
|
NTSTATUS status;
|
2002-04-25 23:34:24 +02:00
|
|
|
|
2015-03-11 01:41:21 +01:00
|
|
|
TRACE("socket %04lx type %d\n", s, type);
|
2002-04-25 23:34:24 +02:00
|
|
|
|
2015-03-03 07:30:38 +01:00
|
|
|
wsa = (struct ws2_async_shutdown *)alloc_async_io( sizeof(*wsa) );
|
2002-04-25 23:34:24 +02:00
|
|
|
if ( !wsa )
|
2007-05-31 17:51:18 +02:00
|
|
|
return WSAEFAULT;
|
|
|
|
|
2015-03-03 07:30:13 +01:00
|
|
|
wsa->hSocket = SOCKET2HANDLE(s);
|
|
|
|
wsa->type = type;
|
2002-04-25 23:34:24 +02:00
|
|
|
|
2007-05-31 17:51:18 +02:00
|
|
|
SERVER_START_REQ( register_async )
|
2002-04-25 23:34:24 +02:00
|
|
|
{
|
2007-05-31 17:51:18 +02:00
|
|
|
req->type = type;
|
2008-12-26 12:17:20 +01:00
|
|
|
req->async.handle = wine_server_obj_handle( wsa->hSocket );
|
2008-12-30 21:09:41 +01:00
|
|
|
req->async.callback = wine_server_client_ptr( WS2_async_shutdown );
|
2015-03-03 07:30:13 +01:00
|
|
|
req->async.iosb = wine_server_client_ptr( &wsa->iosb );
|
2008-12-30 21:09:41 +01:00
|
|
|
req->async.arg = wine_server_client_ptr( wsa );
|
2007-11-09 23:11:48 +01:00
|
|
|
req->async.cvalue = 0;
|
2007-05-31 17:51:18 +02:00
|
|
|
status = wine_server_call( req );
|
2002-04-25 23:34:24 +02:00
|
|
|
}
|
2007-05-31 17:51:18 +02:00
|
|
|
SERVER_END_REQ;
|
|
|
|
|
|
|
|
if (status != STATUS_PENDING)
|
|
|
|
{
|
|
|
|
HeapFree( GetProcessHeap(), 0, wsa );
|
|
|
|
return NtStatusToWSAError( status );
|
|
|
|
}
|
2002-12-05 20:02:55 +01:00
|
|
|
return 0;
|
2002-04-25 23:34:24 +02:00
|
|
|
}
|
|
|
|
|
2001-10-08 22:36:03 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* accept (WS2_32.1)
|
|
|
|
*/
|
2013-10-02 16:06:25 +02:00
|
|
|
SOCKET WINAPI WS_accept(SOCKET s, struct WS_sockaddr *addr, int *addrlen32)
|
2001-10-08 22:36:03 +02:00
|
|
|
{
|
2009-09-25 07:59:16 +02:00
|
|
|
NTSTATUS status;
|
2003-12-02 05:19:56 +01:00
|
|
|
SOCKET as;
|
2005-10-24 23:41:34 +02:00
|
|
|
BOOL is_blocking;
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
|
2007-05-24 16:41:17 +02:00
|
|
|
TRACE("socket %04lx\n", s );
|
2013-03-22 06:59:50 +01:00
|
|
|
status = _is_blocking(s, &is_blocking);
|
|
|
|
if (status)
|
|
|
|
{
|
|
|
|
set_error(status);
|
|
|
|
return INVALID_SOCKET;
|
|
|
|
}
|
2005-10-24 23:41:34 +02:00
|
|
|
|
|
|
|
do {
|
2009-09-25 07:59:16 +02:00
|
|
|
/* try accepting first (if there is a deferred connection) */
|
2005-10-24 23:41:34 +02:00
|
|
|
SERVER_START_REQ( accept_socket )
|
|
|
|
{
|
2008-12-08 16:05:17 +01:00
|
|
|
req->lhandle = wine_server_obj_handle( SOCKET2HANDLE(s) );
|
2005-12-09 11:58:55 +01:00
|
|
|
req->access = GENERIC_READ|GENERIC_WRITE|SYNCHRONIZE;
|
|
|
|
req->attributes = OBJ_INHERIT;
|
2009-09-25 07:59:16 +02:00
|
|
|
status = wine_server_call( req );
|
2008-12-08 16:05:17 +01:00
|
|
|
as = HANDLE2SOCKET( wine_server_ptr_handle( reply->handle ));
|
2005-10-24 23:41:34 +02:00
|
|
|
}
|
|
|
|
SERVER_END_REQ;
|
2009-09-25 07:59:16 +02:00
|
|
|
if (!status)
|
2005-10-24 23:41:34 +02:00
|
|
|
{
|
2013-10-02 16:06:25 +02:00
|
|
|
if (addr && WS_getpeername(as, addr, addrlen32))
|
|
|
|
{
|
|
|
|
WS_closesocket(as);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
2015-06-15 15:22:05 +02:00
|
|
|
TRACE("\taccepted %04lx\n", as);
|
2005-10-24 23:41:34 +02:00
|
|
|
return as;
|
|
|
|
}
|
2010-03-22 19:56:21 +01:00
|
|
|
if (is_blocking && status == STATUS_CANT_WAIT)
|
2009-09-25 07:59:16 +02:00
|
|
|
{
|
|
|
|
int fd = get_sock_fd( s, FILE_READ_DATA, NULL );
|
|
|
|
/* block here */
|
|
|
|
do_block(fd, POLLIN, -1);
|
|
|
|
_sync_sock_state(s); /* let wineserver notice connection */
|
|
|
|
release_sock_fd( s, fd );
|
|
|
|
}
|
2010-03-22 19:56:21 +01:00
|
|
|
} while (is_blocking && status == STATUS_CANT_WAIT);
|
2009-09-25 07:59:16 +02:00
|
|
|
|
|
|
|
set_error(status);
|
1999-02-26 12:11:13 +01:00
|
|
|
return INVALID_SOCKET;
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
}
|
|
|
|
|
2010-09-21 03:30:28 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* AcceptEx
|
|
|
|
*/
|
2010-09-28 20:12:39 +02:00
|
|
|
static BOOL WINAPI WS2_AcceptEx(SOCKET listener, SOCKET acceptor, PVOID dest, DWORD dest_len,
|
2010-09-21 03:30:28 +02:00
|
|
|
DWORD local_addr_len, DWORD rem_addr_len, LPDWORD received,
|
|
|
|
LPOVERLAPPED overlapped)
|
|
|
|
{
|
|
|
|
DWORD status;
|
|
|
|
struct ws2_accept_async *wsa;
|
|
|
|
int fd;
|
|
|
|
|
2015-03-11 01:41:21 +01:00
|
|
|
TRACE("(%04lx, %04lx, %p, %d, %d, %d, %p, %p)\n", listener, acceptor, dest, dest_len, local_addr_len,
|
2010-09-21 03:30:28 +02:00
|
|
|
rem_addr_len, received, overlapped);
|
|
|
|
|
|
|
|
if (!dest)
|
|
|
|
{
|
|
|
|
SetLastError(WSAEINVAL);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!overlapped)
|
|
|
|
{
|
|
|
|
SetLastError(WSA_INVALID_PARAMETER);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2014-02-06 01:38:54 +01:00
|
|
|
if (!rem_addr_len)
|
2013-09-21 21:45:20 +02:00
|
|
|
{
|
2014-02-06 01:38:54 +01:00
|
|
|
SetLastError(WSAEFAULT);
|
2013-09-21 21:45:20 +02:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2010-09-21 03:30:28 +02:00
|
|
|
fd = get_sock_fd( listener, FILE_READ_DATA, NULL );
|
|
|
|
if (fd == -1)
|
|
|
|
{
|
|
|
|
SetLastError(WSAENOTSOCK);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
release_sock_fd( listener, fd );
|
|
|
|
|
|
|
|
fd = get_sock_fd( acceptor, FILE_READ_DATA, NULL );
|
|
|
|
if (fd == -1)
|
|
|
|
{
|
2014-02-06 01:38:54 +01:00
|
|
|
SetLastError(WSAENOTSOCK);
|
2010-09-21 03:30:28 +02:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
release_sock_fd( acceptor, fd );
|
|
|
|
|
2015-03-03 07:30:38 +01:00
|
|
|
wsa = (struct ws2_accept_async *)alloc_async_io( sizeof(*wsa) );
|
2010-09-21 03:30:28 +02:00
|
|
|
if(!wsa)
|
|
|
|
{
|
|
|
|
SetLastError(WSAEFAULT);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
wsa->listen_socket = SOCKET2HANDLE(listener);
|
|
|
|
wsa->accept_socket = SOCKET2HANDLE(acceptor);
|
|
|
|
wsa->user_overlapped = overlapped;
|
2015-03-07 07:17:05 +01:00
|
|
|
wsa->cvalue = !((ULONG_PTR)overlapped->hEvent & 1) ? (ULONG_PTR)overlapped : 0;
|
2010-09-21 03:30:28 +02:00
|
|
|
wsa->buf = dest;
|
|
|
|
wsa->data_len = dest_len;
|
|
|
|
wsa->local_len = local_addr_len;
|
|
|
|
wsa->remote_len = rem_addr_len;
|
|
|
|
wsa->read = NULL;
|
|
|
|
|
|
|
|
if (wsa->data_len)
|
|
|
|
{
|
|
|
|
/* set up a read request if we need it */
|
2015-03-03 07:30:38 +01:00
|
|
|
wsa->read = (struct ws2_async *)alloc_async_io( offsetof(struct ws2_async, iovec[1]) );
|
2010-09-21 03:30:28 +02:00
|
|
|
if (!wsa->read)
|
|
|
|
{
|
|
|
|
HeapFree( GetProcessHeap(), 0, wsa );
|
|
|
|
SetLastError(WSAEFAULT);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
wsa->read->hSocket = wsa->accept_socket;
|
|
|
|
wsa->read->flags = 0;
|
2010-12-06 01:08:54 +01:00
|
|
|
wsa->read->lpFlags = &wsa->read->flags;
|
2010-09-21 03:30:28 +02:00
|
|
|
wsa->read->addr = NULL;
|
|
|
|
wsa->read->addrlen.ptr = NULL;
|
2010-12-06 01:08:54 +01:00
|
|
|
wsa->read->control = NULL;
|
2010-09-21 03:30:28 +02:00
|
|
|
wsa->read->n_iovecs = 1;
|
|
|
|
wsa->read->first_iovec = 0;
|
2015-03-03 07:30:38 +01:00
|
|
|
wsa->read->completion_func = NULL;
|
2010-09-21 03:30:28 +02:00
|
|
|
wsa->read->iovec[0].iov_base = wsa->buf;
|
|
|
|
wsa->read->iovec[0].iov_len = wsa->data_len;
|
|
|
|
}
|
|
|
|
|
|
|
|
SERVER_START_REQ( register_async )
|
|
|
|
{
|
|
|
|
req->type = ASYNC_TYPE_READ;
|
|
|
|
req->async.handle = wine_server_obj_handle( SOCKET2HANDLE(listener) );
|
2015-03-07 07:17:05 +01:00
|
|
|
req->async.event = wine_server_obj_handle( overlapped->hEvent );
|
2010-09-21 03:30:28 +02:00
|
|
|
req->async.callback = wine_server_client_ptr( WS2_async_accept );
|
|
|
|
req->async.iosb = wine_server_client_ptr( overlapped );
|
|
|
|
req->async.arg = wine_server_client_ptr( wsa );
|
2015-03-07 07:17:05 +01:00
|
|
|
req->async.cvalue = wsa->cvalue;
|
2010-09-21 03:30:28 +02:00
|
|
|
status = wine_server_call( req );
|
|
|
|
}
|
|
|
|
SERVER_END_REQ;
|
|
|
|
|
2011-09-04 16:16:31 +02:00
|
|
|
if(status != STATUS_PENDING)
|
|
|
|
{
|
|
|
|
HeapFree( GetProcessHeap(), 0, wsa->read );
|
|
|
|
HeapFree( GetProcessHeap(), 0, wsa );
|
|
|
|
}
|
2010-09-21 03:30:28 +02:00
|
|
|
|
|
|
|
SetLastError( NtStatusToWSAError(status) );
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2015-10-07 20:14:56 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* WS2_ReadFile (INTERNAL)
|
|
|
|
*
|
|
|
|
* Perform an APC-safe ReadFile operation
|
|
|
|
*/
|
2015-10-07 20:19:42 +02:00
|
|
|
static NTSTATUS WS2_ReadFile(HANDLE hFile, PIO_STATUS_BLOCK io_status, char* buffer, ULONG length,
|
|
|
|
PLARGE_INTEGER offset)
|
2015-10-07 20:14:56 +02:00
|
|
|
{
|
2015-10-07 20:19:42 +02:00
|
|
|
int result = -1, unix_handle;
|
2015-10-07 20:14:56 +02:00
|
|
|
unsigned int options;
|
|
|
|
NTSTATUS status;
|
|
|
|
|
|
|
|
TRACE( "(%p,%p,0x%08x)\n", hFile, buffer,length );
|
|
|
|
|
|
|
|
status = wine_server_handle_to_fd( hFile, FILE_READ_DATA, &unix_handle, &options );
|
|
|
|
if (status) return status;
|
|
|
|
|
2015-10-07 20:19:42 +02:00
|
|
|
while (result == -1)
|
2015-10-07 20:14:56 +02:00
|
|
|
{
|
2015-10-07 20:19:42 +02:00
|
|
|
if (offset->QuadPart != FILE_USE_FILE_POINTER_POSITION)
|
|
|
|
result = pread( unix_handle, buffer, length, offset->QuadPart );
|
|
|
|
else
|
|
|
|
result = read( unix_handle, buffer, length );
|
2015-10-07 20:14:56 +02:00
|
|
|
if (errno != EINTR)
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!result)
|
|
|
|
status = (length ? STATUS_END_OF_FILE : STATUS_SUCCESS);
|
|
|
|
else if (result != -1)
|
|
|
|
status = STATUS_SUCCESS;
|
|
|
|
else if (errno != EAGAIN)
|
|
|
|
status = wsaErrStatus();
|
|
|
|
else
|
|
|
|
status = STATUS_PENDING;
|
|
|
|
|
2015-10-25 01:10:18 +02:00
|
|
|
wine_server_release_fd( hFile, unix_handle );
|
2015-10-07 20:14:56 +02:00
|
|
|
TRACE("= 0x%08x (%d)\n", status, result);
|
|
|
|
if (status == STATUS_SUCCESS || status == STATUS_END_OF_FILE)
|
|
|
|
{
|
|
|
|
io_status->u.Status = status;
|
|
|
|
io_status->Information = result;
|
|
|
|
}
|
|
|
|
|
|
|
|
return status;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* WS2_transmitfile_getbuffer (INTERNAL)
|
|
|
|
*
|
|
|
|
* Pick the appropriate buffer for a TransmitFile send operation.
|
|
|
|
*/
|
|
|
|
static NTSTATUS WS2_transmitfile_getbuffer( int fd, struct ws2_transmitfile_async *wsa )
|
|
|
|
{
|
|
|
|
/* send any incomplete writes from a previous iteration */
|
|
|
|
if (wsa->write.first_iovec < wsa->write.n_iovecs)
|
|
|
|
return STATUS_PENDING;
|
|
|
|
|
2015-10-07 20:15:28 +02:00
|
|
|
/* process the header (if applicable) */
|
|
|
|
if (wsa->buffers.Head)
|
|
|
|
{
|
|
|
|
wsa->write.first_iovec = 0;
|
|
|
|
wsa->write.n_iovecs = 1;
|
|
|
|
wsa->write.iovec[0].iov_base = wsa->buffers.Head;
|
|
|
|
wsa->write.iovec[0].iov_len = wsa->buffers.HeadLength;
|
|
|
|
wsa->buffers.Head = NULL;
|
|
|
|
return STATUS_PENDING;
|
|
|
|
}
|
|
|
|
|
2015-10-07 20:14:56 +02:00
|
|
|
/* process the main file */
|
|
|
|
if (wsa->file)
|
|
|
|
{
|
|
|
|
DWORD bytes_per_send = wsa->bytes_per_send;
|
|
|
|
IO_STATUS_BLOCK iosb;
|
|
|
|
NTSTATUS status;
|
|
|
|
|
2015-10-07 20:19:42 +02:00
|
|
|
iosb.Information = 0;
|
2015-10-07 20:14:56 +02:00
|
|
|
/* when the size of the transfer is limited ensure that we don't go past that limit */
|
|
|
|
if (wsa->file_bytes != 0)
|
|
|
|
bytes_per_send = min(bytes_per_send, wsa->file_bytes - wsa->file_read);
|
2015-10-07 20:19:42 +02:00
|
|
|
status = WS2_ReadFile( wsa->file, &iosb, wsa->buffer, bytes_per_send, &wsa->offset );
|
|
|
|
if (wsa->offset.QuadPart != FILE_USE_FILE_POINTER_POSITION)
|
|
|
|
wsa->offset.QuadPart += iosb.Information;
|
2015-10-07 20:14:56 +02:00
|
|
|
if (status == STATUS_END_OF_FILE)
|
2015-10-07 20:15:28 +02:00
|
|
|
wsa->file = NULL; /* continue on to the footer */
|
2015-10-07 20:14:56 +02:00
|
|
|
else if (status != STATUS_SUCCESS)
|
|
|
|
return status;
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (iosb.Information)
|
|
|
|
{
|
|
|
|
wsa->write.first_iovec = 0;
|
|
|
|
wsa->write.n_iovecs = 1;
|
|
|
|
wsa->write.iovec[0].iov_base = wsa->buffer;
|
|
|
|
wsa->write.iovec[0].iov_len = iosb.Information;
|
|
|
|
wsa->file_read += iosb.Information;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (wsa->file_bytes != 0 && wsa->file_read >= wsa->file_bytes)
|
|
|
|
wsa->file = NULL;
|
|
|
|
|
|
|
|
return STATUS_PENDING;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-10-07 20:15:28 +02:00
|
|
|
/* send the footer (if applicable) */
|
|
|
|
if (wsa->buffers.Tail)
|
|
|
|
{
|
|
|
|
wsa->write.first_iovec = 0;
|
|
|
|
wsa->write.n_iovecs = 1;
|
|
|
|
wsa->write.iovec[0].iov_base = wsa->buffers.Tail;
|
|
|
|
wsa->write.iovec[0].iov_len = wsa->buffers.TailLength;
|
|
|
|
wsa->buffers.Tail = NULL;
|
|
|
|
return STATUS_PENDING;
|
|
|
|
}
|
|
|
|
|
2015-10-07 20:14:56 +02:00
|
|
|
return STATUS_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* WS2_transmitfile_base (INTERNAL)
|
|
|
|
*
|
|
|
|
* Shared implementation for both synchronous and asynchronous TransmitFile.
|
|
|
|
*/
|
|
|
|
static NTSTATUS WS2_transmitfile_base( int fd, struct ws2_transmitfile_async *wsa )
|
|
|
|
{
|
|
|
|
NTSTATUS status;
|
|
|
|
|
|
|
|
status = WS2_transmitfile_getbuffer( fd, wsa );
|
|
|
|
if (status == STATUS_PENDING)
|
|
|
|
{
|
2015-10-07 20:19:42 +02:00
|
|
|
IO_STATUS_BLOCK *iosb = (IO_STATUS_BLOCK *)wsa->write.user_overlapped;
|
2015-10-07 20:14:56 +02:00
|
|
|
int n;
|
|
|
|
|
|
|
|
n = WS2_send( fd, &wsa->write, convert_flags(wsa->write.flags) );
|
2015-10-07 20:19:42 +02:00
|
|
|
if (n >= 0)
|
|
|
|
{
|
|
|
|
if (iosb) iosb->Information += n;
|
|
|
|
}
|
|
|
|
else if (errno != EAGAIN)
|
2015-10-07 20:14:56 +02:00
|
|
|
return wsaErrStatus();
|
|
|
|
}
|
|
|
|
|
|
|
|
return status;
|
|
|
|
}
|
|
|
|
|
2015-10-07 20:19:42 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* WS2_async_transmitfile (INTERNAL)
|
|
|
|
*
|
|
|
|
* Asynchronous callback for overlapped TransmitFile operations.
|
|
|
|
*/
|
|
|
|
static NTSTATUS WS2_async_transmitfile( void *user, IO_STATUS_BLOCK *iosb,
|
|
|
|
NTSTATUS status, void **apc, void **arg )
|
|
|
|
{
|
|
|
|
struct ws2_transmitfile_async *wsa = user;
|
|
|
|
int fd;
|
|
|
|
|
|
|
|
if (status == STATUS_ALERTED)
|
|
|
|
{
|
|
|
|
if (!(status = wine_server_handle_to_fd( wsa->write.hSocket, FILE_WRITE_DATA, &fd, NULL )))
|
|
|
|
{
|
|
|
|
status = WS2_transmitfile_base( fd, wsa );
|
|
|
|
wine_server_release_fd( wsa->write.hSocket, fd );
|
|
|
|
}
|
|
|
|
if (status == STATUS_PENDING)
|
|
|
|
return status;
|
|
|
|
}
|
|
|
|
|
|
|
|
iosb->u.Status = status;
|
|
|
|
release_async_io( &wsa->io );
|
|
|
|
return status;
|
|
|
|
}
|
|
|
|
|
2014-01-17 01:52:50 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* TransmitFile
|
|
|
|
*/
|
|
|
|
static BOOL WINAPI WS2_TransmitFile( SOCKET s, HANDLE h, DWORD file_bytes, DWORD bytes_per_send,
|
|
|
|
LPOVERLAPPED overlapped, LPTRANSMIT_FILE_BUFFERS buffers,
|
|
|
|
DWORD flags )
|
|
|
|
{
|
2014-01-17 20:35:57 +01:00
|
|
|
union generic_unix_sockaddr uaddr;
|
|
|
|
unsigned int uaddrlen = sizeof(uaddr);
|
2015-10-07 20:14:56 +02:00
|
|
|
struct ws2_transmitfile_async *wsa;
|
|
|
|
NTSTATUS status;
|
2014-01-17 20:35:57 +01:00
|
|
|
int fd;
|
|
|
|
|
2015-10-07 20:14:56 +02:00
|
|
|
TRACE("(%lx, %p, %d, %d, %p, %p, %d)\n", s, h, file_bytes, bytes_per_send, overlapped,
|
|
|
|
buffers, flags );
|
|
|
|
|
|
|
|
fd = get_sock_fd( s, FILE_WRITE_DATA, NULL );
|
2014-01-17 20:35:57 +01:00
|
|
|
if (fd == -1)
|
|
|
|
{
|
|
|
|
WSASetLastError( WSAENOTSOCK );
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
if (getpeername( fd, &uaddr.addr, &uaddrlen ) != 0)
|
|
|
|
{
|
|
|
|
release_sock_fd( s, fd );
|
|
|
|
WSASetLastError( WSAENOTCONN );
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
if (flags)
|
|
|
|
FIXME("Flags are not currently supported (0x%x).\n", flags);
|
|
|
|
|
2015-10-07 20:14:56 +02:00
|
|
|
if (h && GetFileType( h ) != FILE_TYPE_DISK)
|
|
|
|
{
|
|
|
|
FIXME("Non-disk file handles are not currently supported.\n");
|
|
|
|
release_sock_fd( s, fd );
|
|
|
|
WSASetLastError( WSAEOPNOTSUPP );
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* set reasonable defaults when requested */
|
|
|
|
if (!bytes_per_send)
|
|
|
|
bytes_per_send = (1 << 16); /* Depends on OS version: PAGE_SIZE, 2*PAGE_SIZE, or 2^16 */
|
|
|
|
|
|
|
|
if (!(wsa = (struct ws2_transmitfile_async *)alloc_async_io( sizeof(*wsa) + bytes_per_send )))
|
|
|
|
{
|
|
|
|
release_sock_fd( s, fd );
|
|
|
|
WSASetLastError( WSAEFAULT );
|
|
|
|
return FALSE;
|
|
|
|
}
|
2015-10-07 20:15:28 +02:00
|
|
|
if (buffers)
|
|
|
|
wsa->buffers = *buffers;
|
|
|
|
else
|
|
|
|
memset(&wsa->buffers, 0x0, sizeof(wsa->buffers));
|
2015-10-07 20:14:56 +02:00
|
|
|
wsa->buffer = (char *)(wsa + 1);
|
|
|
|
wsa->file = h;
|
|
|
|
wsa->file_read = 0;
|
|
|
|
wsa->file_bytes = file_bytes;
|
|
|
|
wsa->bytes_per_send = bytes_per_send;
|
|
|
|
wsa->flags = flags;
|
2015-10-07 20:19:42 +02:00
|
|
|
wsa->offset.QuadPart = FILE_USE_FILE_POINTER_POSITION;
|
2015-10-07 20:14:56 +02:00
|
|
|
wsa->write.hSocket = SOCKET2HANDLE(s);
|
|
|
|
wsa->write.addr = NULL;
|
|
|
|
wsa->write.addrlen.val = 0;
|
|
|
|
wsa->write.flags = 0;
|
|
|
|
wsa->write.lpFlags = &wsa->flags;
|
|
|
|
wsa->write.control = NULL;
|
|
|
|
wsa->write.n_iovecs = 0;
|
|
|
|
wsa->write.first_iovec = 0;
|
2015-10-07 20:19:42 +02:00
|
|
|
wsa->write.user_overlapped = overlapped;
|
|
|
|
if (overlapped)
|
|
|
|
{
|
|
|
|
IO_STATUS_BLOCK *iosb = (IO_STATUS_BLOCK *)overlapped;
|
|
|
|
int status;
|
|
|
|
|
|
|
|
wsa->offset.u.LowPart = overlapped->u.s.Offset;
|
|
|
|
wsa->offset.u.HighPart = overlapped->u.s.OffsetHigh;
|
|
|
|
iosb->u.Status = STATUS_PENDING;
|
|
|
|
iosb->Information = 0;
|
|
|
|
SERVER_START_REQ( register_async )
|
|
|
|
{
|
|
|
|
req->type = ASYNC_TYPE_WRITE;
|
|
|
|
req->async.handle = wine_server_obj_handle( SOCKET2HANDLE(s) );
|
|
|
|
req->async.event = wine_server_obj_handle( overlapped->hEvent );
|
|
|
|
req->async.callback = wine_server_client_ptr( WS2_async_transmitfile );
|
|
|
|
req->async.iosb = wine_server_client_ptr( iosb );
|
|
|
|
req->async.arg = wine_server_client_ptr( wsa );
|
|
|
|
status = wine_server_call( req );
|
|
|
|
}
|
|
|
|
SERVER_END_REQ;
|
|
|
|
|
|
|
|
if(status != STATUS_PENDING) HeapFree( GetProcessHeap(), 0, wsa );
|
|
|
|
release_sock_fd( s, fd );
|
|
|
|
WSASetLastError( NtStatusToWSAError(status) );
|
|
|
|
return FALSE;
|
|
|
|
}
|
2015-10-07 20:14:56 +02:00
|
|
|
|
|
|
|
do
|
|
|
|
{
|
|
|
|
status = WS2_transmitfile_base( fd, wsa );
|
|
|
|
if (status == STATUS_PENDING)
|
|
|
|
{
|
|
|
|
/* block here */
|
|
|
|
do_block(fd, POLLOUT, -1);
|
|
|
|
_sync_sock_state(s); /* let wineserver notice connection */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
while (status == STATUS_PENDING);
|
|
|
|
release_sock_fd( s, fd );
|
|
|
|
|
|
|
|
if (status != STATUS_SUCCESS)
|
|
|
|
WSASetLastError( NtStatusToWSAError(status) );
|
|
|
|
HeapFree( GetProcessHeap(), 0, wsa );
|
|
|
|
return (status == STATUS_SUCCESS);
|
2014-01-17 01:52:50 +01:00
|
|
|
}
|
|
|
|
|
2010-09-21 03:30:28 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* GetAcceptExSockaddrs
|
|
|
|
*/
|
2010-09-28 20:12:39 +02:00
|
|
|
static void WINAPI WS2_GetAcceptExSockaddrs(PVOID buffer, DWORD data_size, DWORD local_size, DWORD remote_size,
|
2010-09-21 03:30:28 +02:00
|
|
|
struct WS_sockaddr **local_addr, LPINT local_addr_len,
|
|
|
|
struct WS_sockaddr **remote_addr, LPINT remote_addr_len)
|
|
|
|
{
|
|
|
|
char *cbuf = buffer;
|
|
|
|
TRACE("(%p, %d, %d, %d, %p, %p, %p, %p)\n", buffer, data_size, local_size, remote_size, local_addr,
|
|
|
|
local_addr_len, remote_addr, remote_addr_len );
|
|
|
|
cbuf += data_size;
|
|
|
|
|
|
|
|
*local_addr_len = *(int *) cbuf;
|
|
|
|
*local_addr = (struct WS_sockaddr *)(cbuf + sizeof(int));
|
|
|
|
|
|
|
|
cbuf += local_size;
|
|
|
|
|
|
|
|
*remote_addr_len = *(int *) cbuf;
|
|
|
|
*remote_addr = (struct WS_sockaddr *)(cbuf + sizeof(int));
|
|
|
|
}
|
|
|
|
|
2013-10-01 04:56:53 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* WSASendMsg
|
|
|
|
*/
|
|
|
|
int WINAPI WSASendMsg( SOCKET s, LPWSAMSG msg, DWORD dwFlags, LPDWORD lpNumberOfBytesSent,
|
|
|
|
LPWSAOVERLAPPED lpOverlapped,
|
|
|
|
LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine)
|
|
|
|
{
|
|
|
|
if (!msg)
|
|
|
|
{
|
|
|
|
SetLastError( WSAEFAULT );
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
return WS2_sendto( s, msg->lpBuffers, msg->dwBufferCount, lpNumberOfBytesSent,
|
|
|
|
dwFlags, msg->name, msg->namelen,
|
|
|
|
lpOverlapped, lpCompletionRoutine );
|
|
|
|
}
|
|
|
|
|
2010-12-06 01:08:54 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* WSARecvMsg
|
|
|
|
*
|
|
|
|
* Perform a receive operation that is capable of returning message
|
|
|
|
* control headers. It is important to note that the WSAMSG parameter
|
|
|
|
* must remain valid throughout the operation, even when an overlapped
|
|
|
|
* receive is performed.
|
|
|
|
*/
|
|
|
|
static int WINAPI WS2_WSARecvMsg( SOCKET s, LPWSAMSG msg, LPDWORD lpNumberOfBytesRecvd,
|
|
|
|
LPWSAOVERLAPPED lpOverlapped,
|
|
|
|
LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine )
|
|
|
|
{
|
|
|
|
if (!msg)
|
|
|
|
{
|
|
|
|
SetLastError( WSAEFAULT );
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
return WS2_recv_base( s, msg->lpBuffers, msg->dwBufferCount, lpNumberOfBytesRecvd,
|
|
|
|
&msg->dwFlags, msg->name, &msg->namelen,
|
|
|
|
lpOverlapped, lpCompletionRoutine, &msg->Control );
|
|
|
|
}
|
|
|
|
|
2012-09-27 00:38:09 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* interface_bind (INTERNAL)
|
|
|
|
*
|
|
|
|
* Take bind() calls on any name corresponding to a local network adapter and restrict the given socket to
|
|
|
|
* operating only on the specified interface. This restriction consists of two components:
|
|
|
|
* 1) An outgoing packet restriction suggesting the egress interface for all packets.
|
|
|
|
* 2) An incoming packet restriction dropping packets not meant for the interface.
|
|
|
|
* If the function succeeds in placing these restrictions (returns TRUE) then the name for the bind() may
|
|
|
|
* safely be changed to INADDR_ANY, permitting the transmission and receipt of broadcast packets on the
|
|
|
|
* socket. This behavior is only relevant to UDP sockets and is needed for applications that expect to be able
|
|
|
|
* to receive broadcast packets on a socket that is bound to a specific network interface.
|
|
|
|
*/
|
|
|
|
static BOOL interface_bind( SOCKET s, int fd, struct sockaddr *addr )
|
|
|
|
{
|
|
|
|
struct sockaddr_in *in_sock = (struct sockaddr_in *) addr;
|
2012-10-11 22:08:23 +02:00
|
|
|
in_addr_t bind_addr = in_sock->sin_addr.s_addr;
|
2012-09-27 00:38:09 +02:00
|
|
|
PIP_ADAPTER_INFO adapters = NULL, adapter;
|
|
|
|
BOOL ret = FALSE;
|
|
|
|
DWORD adap_size;
|
|
|
|
int enable = 1;
|
|
|
|
|
2014-05-08 04:31:57 +02:00
|
|
|
if (bind_addr == htonl(INADDR_ANY) || bind_addr == htonl(INADDR_LOOPBACK))
|
2012-10-11 22:08:23 +02:00
|
|
|
return FALSE; /* Not binding to a network adapter, special interface binding unnecessary. */
|
2015-06-18 16:03:08 +02:00
|
|
|
if (_get_fd_type(fd) != SOCK_DGRAM)
|
2012-09-27 00:38:09 +02:00
|
|
|
return FALSE; /* Special interface binding is only necessary for UDP datagrams. */
|
|
|
|
if (GetAdaptersInfo(NULL, &adap_size) != ERROR_BUFFER_OVERFLOW)
|
|
|
|
goto cleanup;
|
|
|
|
adapters = HeapAlloc(GetProcessHeap(), 0, adap_size);
|
|
|
|
if (adapters == NULL || GetAdaptersInfo(adapters, &adap_size) != NO_ERROR)
|
|
|
|
goto cleanup;
|
|
|
|
/* Search the IPv4 adapter list for the appropriate binding interface */
|
|
|
|
for (adapter = adapters; adapter != NULL; adapter = adapter->Next)
|
|
|
|
{
|
|
|
|
in_addr_t adapter_addr = (in_addr_t) inet_addr(adapter->IpAddressList.IpAddress.String);
|
|
|
|
|
2012-10-11 22:08:23 +02:00
|
|
|
if (bind_addr == adapter_addr)
|
2012-09-27 00:38:09 +02:00
|
|
|
{
|
|
|
|
#if defined(IP_BOUND_IF)
|
|
|
|
/* IP_BOUND_IF sets both the incoming and outgoing restriction at once */
|
|
|
|
if (setsockopt(fd, IPPROTO_IP, IP_BOUND_IF, &adapter->Index, sizeof(adapter->Index)) != 0)
|
|
|
|
goto cleanup;
|
|
|
|
ret = TRUE;
|
2012-09-27 00:38:29 +02:00
|
|
|
#elif defined(LINUX_BOUND_IF)
|
|
|
|
in_addr_t ifindex = (in_addr_t) htonl(adapter->Index);
|
|
|
|
struct interface_filter specific_interface_filter;
|
|
|
|
struct sock_fprog filter_prog;
|
|
|
|
|
|
|
|
if (setsockopt(fd, IPPROTO_IP, IP_UNICAST_IF, &ifindex, sizeof(ifindex)) != 0)
|
|
|
|
goto cleanup; /* Failed to suggest egress interface */
|
2013-01-24 14:21:53 +01:00
|
|
|
specific_interface_filter = generic_interface_filter;
|
2012-09-27 00:38:29 +02:00
|
|
|
specific_interface_filter.iface_rule.k = adapter->Index;
|
2013-06-24 04:19:16 +02:00
|
|
|
specific_interface_filter.ip_rule.k = htonl(adapter_addr);
|
2012-09-27 00:38:29 +02:00
|
|
|
filter_prog.len = sizeof(generic_interface_filter)/sizeof(struct sock_filter);
|
|
|
|
filter_prog.filter = (struct sock_filter *) &specific_interface_filter;
|
|
|
|
if (setsockopt(fd, SOL_SOCKET, SO_ATTACH_FILTER, &filter_prog, sizeof(filter_prog)) != 0)
|
|
|
|
goto cleanup; /* Failed to specify incoming packet filter */
|
|
|
|
ret = TRUE;
|
2012-09-27 00:38:09 +02:00
|
|
|
#else
|
|
|
|
FIXME("Broadcast packets on interface-bound sockets are not currently supported on this platform, "
|
|
|
|
"receiving broadcast packets will not work on socket %04lx.\n", s);
|
|
|
|
#endif
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/* Will soon be switching to INADDR_ANY: permit address reuse */
|
|
|
|
if (ret && setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &enable, sizeof(enable)) == 0)
|
|
|
|
TRACE("Socket %04lx bound to interface index %d\n", s, adapter->Index);
|
|
|
|
else
|
|
|
|
ret = FALSE;
|
|
|
|
|
|
|
|
cleanup:
|
|
|
|
if(!ret)
|
|
|
|
ERR("Failed to bind to interface, receiving broadcast packets will not work on socket %04lx.\n", s);
|
|
|
|
HeapFree(GetProcessHeap(), 0, adapters);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
1997-08-24 18:00:30 +02:00
|
|
|
/***********************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* bind (WS2_32.2)
|
1997-08-24 18:00:30 +02:00
|
|
|
*/
|
2001-11-14 22:26:23 +01:00
|
|
|
int WINAPI WS_bind(SOCKET s, const struct WS_sockaddr* name, int namelen)
|
1997-08-24 18:00:30 +02:00
|
|
|
{
|
2003-12-02 05:19:56 +01:00
|
|
|
int fd = get_sock_fd( s, 0, NULL );
|
|
|
|
int res = SOCKET_ERROR;
|
1997-08-24 18:00:30 +02:00
|
|
|
|
2007-05-24 16:41:17 +02:00
|
|
|
TRACE("socket %04lx, ptr %p %s, length %d\n", s, name, debugstr_sockaddr(name), namelen);
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
|
2001-02-20 02:57:13 +01:00
|
|
|
if (fd != -1)
|
1998-11-01 20:27:22 +01:00
|
|
|
{
|
2009-08-12 18:14:27 +02:00
|
|
|
if (!name || (name->sa_family && !supported_pf(name->sa_family)))
|
1998-11-01 20:27:22 +01:00
|
|
|
{
|
2001-10-08 22:36:03 +02:00
|
|
|
SetLastError(WSAEAFNOSUPPORT);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2007-05-30 20:11:58 +02:00
|
|
|
union generic_unix_sockaddr uaddr;
|
|
|
|
unsigned int uaddrlen = ws_sockaddr_ws2u(name, namelen, &uaddr);
|
|
|
|
if (!uaddrlen)
|
2001-10-08 22:36:03 +02:00
|
|
|
{
|
|
|
|
SetLastError(WSAEFAULT);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2007-09-22 16:18:55 +02:00
|
|
|
#ifdef IPV6_V6ONLY
|
|
|
|
const struct sockaddr_in6 *in6 = (const struct sockaddr_in6*) &uaddr;
|
|
|
|
if (name->sa_family == WS_AF_INET6 &&
|
|
|
|
!memcmp(&in6->sin6_addr, &in6addr_any, sizeof(struct in6_addr)))
|
|
|
|
{
|
|
|
|
int enable = 1;
|
|
|
|
if (setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, &enable, sizeof(enable)) == -1)
|
|
|
|
{
|
|
|
|
release_sock_fd( s, fd );
|
|
|
|
SetLastError(WSAEAFNOSUPPORT);
|
2009-01-08 17:29:27 +01:00
|
|
|
return SOCKET_ERROR;
|
2007-09-22 16:18:55 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
2008-04-24 13:45:10 +02:00
|
|
|
if (name->sa_family == WS_AF_INET)
|
|
|
|
{
|
|
|
|
struct sockaddr_in *in4 = (struct sockaddr_in*) &uaddr;
|
2008-07-12 21:37:39 +02:00
|
|
|
if (memcmp(&in4->sin_addr, magic_loopback_addr, 4) == 0)
|
2008-04-24 13:45:10 +02:00
|
|
|
{
|
|
|
|
/* Trying to bind to the default host interface, using
|
|
|
|
* INADDR_ANY instead*/
|
|
|
|
WARN("Trying to bind to magic IP address, using "
|
|
|
|
"INADDR_ANY instead.\n");
|
2014-05-08 04:31:57 +02:00
|
|
|
in4->sin_addr.s_addr = htonl(INADDR_ANY);
|
2008-04-24 13:45:10 +02:00
|
|
|
}
|
2012-09-27 00:38:09 +02:00
|
|
|
else if (interface_bind(s, fd, &uaddr.addr))
|
2014-05-08 04:31:57 +02:00
|
|
|
in4->sin_addr.s_addr = htonl(INADDR_ANY);
|
2008-04-24 13:45:10 +02:00
|
|
|
}
|
2007-05-30 20:11:58 +02:00
|
|
|
if (bind(fd, &uaddr.addr, uaddrlen) < 0)
|
2001-10-08 22:36:03 +02:00
|
|
|
{
|
|
|
|
int loc_errno = errno;
|
|
|
|
WARN("\tfailure - errno = %i\n", errno);
|
|
|
|
errno = loc_errno;
|
|
|
|
switch (errno)
|
|
|
|
{
|
|
|
|
case EADDRNOTAVAIL:
|
|
|
|
SetLastError(WSAEINVAL);
|
|
|
|
break;
|
2014-05-09 02:30:27 +02:00
|
|
|
case EADDRINUSE:
|
|
|
|
{
|
|
|
|
int optval = 0;
|
|
|
|
socklen_t optlen = sizeof(optval);
|
|
|
|
/* Windows >= 2003 will return different results depending on
|
|
|
|
* SO_REUSEADDR, WSAEACCES may be returned representing that
|
|
|
|
* the socket hijacking protection prevented the bind */
|
|
|
|
if (!getsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (char *)&optval, &optlen) && optval)
|
|
|
|
{
|
|
|
|
SetLastError(WSAEACCES);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
/* fall through */
|
|
|
|
}
|
2001-10-08 22:36:03 +02:00
|
|
|
default:
|
|
|
|
SetLastError(wsaErrno());
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
res=0; /* success */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2003-12-02 05:19:56 +01:00
|
|
|
release_sock_fd( s, fd );
|
2001-10-08 22:36:03 +02:00
|
|
|
}
|
|
|
|
return res;
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
}
|
|
|
|
|
1997-08-24 18:00:30 +02:00
|
|
|
/***********************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* closesocket (WS2_32.3)
|
1997-08-24 18:00:30 +02:00
|
|
|
*/
|
2001-11-14 22:26:23 +01:00
|
|
|
int WINAPI WS_closesocket(SOCKET s)
|
1997-08-24 18:00:30 +02:00
|
|
|
{
|
2015-03-05 07:35:06 +01:00
|
|
|
int res = SOCKET_ERROR, fd;
|
|
|
|
if (num_startup)
|
|
|
|
{
|
|
|
|
fd = get_sock_fd(s, FILE_READ_DATA, NULL);
|
|
|
|
if (fd >= 0)
|
|
|
|
{
|
|
|
|
release_sock_fd(s, fd);
|
|
|
|
if (CloseHandle(SOCKET2HANDLE(s)))
|
|
|
|
res = 0;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
SetLastError(WSAENOTSOCK);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
SetLastError(WSANOTINITIALISED);
|
|
|
|
TRACE("(socket %04lx) -> %d\n", s, res);
|
|
|
|
return res;
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
}
|
|
|
|
|
2010-08-01 05:21:31 +02:00
|
|
|
static int do_connect(int fd, const struct WS_sockaddr* name, int namelen)
|
|
|
|
{
|
|
|
|
union generic_unix_sockaddr uaddr;
|
|
|
|
unsigned int uaddrlen = ws_sockaddr_ws2u(name, namelen, &uaddr);
|
|
|
|
|
|
|
|
if (!uaddrlen)
|
|
|
|
return WSAEFAULT;
|
|
|
|
|
|
|
|
if (name->sa_family == WS_AF_INET)
|
|
|
|
{
|
|
|
|
struct sockaddr_in *in4 = (struct sockaddr_in*) &uaddr;
|
|
|
|
if (memcmp(&in4->sin_addr, magic_loopback_addr, 4) == 0)
|
|
|
|
{
|
|
|
|
/* Trying to connect to magic replace-loopback address,
|
|
|
|
* assuming we really want to connect to localhost */
|
|
|
|
TRACE("Trying to connect to magic IP address, using "
|
|
|
|
"INADDR_LOOPBACK instead.\n");
|
2014-05-08 04:31:57 +02:00
|
|
|
in4->sin_addr.s_addr = htonl(INADDR_LOOPBACK);
|
2010-08-01 05:21:31 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (connect(fd, &uaddr.addr, uaddrlen) == 0)
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
return wsaErrno();
|
|
|
|
}
|
|
|
|
|
1997-08-24 18:00:30 +02:00
|
|
|
/***********************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* connect (WS2_32.4)
|
1997-08-24 18:00:30 +02:00
|
|
|
*/
|
2001-11-14 22:26:23 +01:00
|
|
|
int WINAPI WS_connect(SOCKET s, const struct WS_sockaddr* name, int namelen)
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
{
|
2005-12-12 17:15:26 +01:00
|
|
|
int fd = get_sock_fd( s, FILE_READ_DATA, NULL );
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
|
2007-05-24 16:41:17 +02:00
|
|
|
TRACE("socket %04lx, ptr %p %s, length %d\n", s, name, debugstr_sockaddr(name), namelen);
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
|
2001-10-08 22:36:03 +02:00
|
|
|
if (fd != -1)
|
1999-10-23 18:53:34 +02:00
|
|
|
{
|
2013-03-22 06:59:50 +01:00
|
|
|
NTSTATUS status;
|
|
|
|
BOOL is_blocking;
|
2010-08-01 05:21:31 +02:00
|
|
|
int ret = do_connect(fd, name, namelen);
|
|
|
|
if (ret == 0)
|
|
|
|
goto connect_success;
|
2001-10-08 22:36:03 +02:00
|
|
|
|
2010-08-01 05:21:31 +02:00
|
|
|
if (ret == WSAEINPROGRESS)
|
2001-10-08 22:36:03 +02:00
|
|
|
{
|
|
|
|
/* tell wineserver that a connection is in progress */
|
2002-10-30 21:26:32 +01:00
|
|
|
_enable_event(SOCKET2HANDLE(s), FD_CONNECT|FD_READ|FD_WRITE,
|
2010-08-01 05:21:28 +02:00
|
|
|
FD_CONNECT,
|
2001-10-08 22:36:03 +02:00
|
|
|
FD_WINE_CONNECTED|FD_WINE_LISTENING);
|
2013-03-22 06:59:50 +01:00
|
|
|
status = _is_blocking( s, &is_blocking );
|
|
|
|
if (status)
|
|
|
|
{
|
|
|
|
release_sock_fd( s, fd );
|
|
|
|
set_error( status );
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
if (is_blocking)
|
2001-10-08 22:36:03 +02:00
|
|
|
{
|
|
|
|
int result;
|
|
|
|
/* block here */
|
2004-10-04 21:13:26 +02:00
|
|
|
do_block(fd, POLLIN | POLLOUT, -1);
|
2001-10-08 22:36:03 +02:00
|
|
|
_sync_sock_state(s); /* let wineserver notice connection */
|
|
|
|
/* retrieve any error codes from it */
|
|
|
|
result = _get_sock_error(s, FD_CONNECT_BIT);
|
|
|
|
if (result)
|
2010-03-22 19:56:21 +01:00
|
|
|
SetLastError(NtStatusToWSAError(result));
|
2001-10-08 22:36:03 +02:00
|
|
|
else
|
|
|
|
{
|
|
|
|
goto connect_success;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
SetLastError(WSAEWOULDBLOCK);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2010-08-01 05:21:31 +02:00
|
|
|
SetLastError(ret);
|
2001-10-08 22:36:03 +02:00
|
|
|
}
|
2003-12-02 05:19:56 +01:00
|
|
|
release_sock_fd( s, fd );
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
}
|
2001-10-08 22:36:03 +02:00
|
|
|
return SOCKET_ERROR;
|
|
|
|
|
1999-10-23 18:53:34 +02:00
|
|
|
connect_success:
|
2003-12-02 05:19:56 +01:00
|
|
|
release_sock_fd( s, fd );
|
2002-10-30 21:26:32 +01:00
|
|
|
_enable_event(SOCKET2HANDLE(s), FD_CONNECT|FD_READ|FD_WRITE,
|
2001-10-08 22:36:03 +02:00
|
|
|
FD_WINE_CONNECTED|FD_READ|FD_WRITE,
|
|
|
|
FD_CONNECT|FD_WINE_LISTENING);
|
2015-05-14 03:08:41 +02:00
|
|
|
TRACE("\tconnected %04lx\n", s);
|
2001-10-08 22:36:03 +02:00
|
|
|
return 0;
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
}
|
|
|
|
|
2002-04-24 00:03:42 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* WSAConnect (WS2_32.30)
|
|
|
|
*/
|
2005-01-14 20:54:38 +01:00
|
|
|
int WINAPI WSAConnect( SOCKET s, const struct WS_sockaddr* name, int namelen,
|
|
|
|
LPWSABUF lpCallerData, LPWSABUF lpCalleeData,
|
|
|
|
LPQOS lpSQOS, LPQOS lpGQOS )
|
2002-04-24 00:03:42 +02:00
|
|
|
{
|
|
|
|
if ( lpCallerData || lpCalleeData || lpSQOS || lpGQOS )
|
2005-01-14 20:54:38 +01:00
|
|
|
FIXME("unsupported parameters!\n");
|
|
|
|
return WS_connect( s, name, namelen );
|
2002-04-24 00:03:42 +02:00
|
|
|
}
|
|
|
|
|
2010-08-01 05:21:34 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* ConnectEx
|
|
|
|
*/
|
2010-08-04 05:14:52 +02:00
|
|
|
static BOOL WINAPI WS2_ConnectEx(SOCKET s, const struct WS_sockaddr* name, int namelen,
|
2010-08-01 05:21:34 +02:00
|
|
|
PVOID sendBuf, DWORD sendBufLen, LPDWORD sent, LPOVERLAPPED ov)
|
|
|
|
{
|
2010-08-04 05:14:52 +02:00
|
|
|
int fd, ret, status;
|
|
|
|
|
|
|
|
if (!ov)
|
2010-08-01 05:21:34 +02:00
|
|
|
{
|
2010-08-04 05:14:52 +02:00
|
|
|
SetLastError( ERROR_INVALID_PARAMETER );
|
2010-08-01 05:21:34 +02:00
|
|
|
return FALSE;
|
|
|
|
}
|
2010-08-04 05:14:52 +02:00
|
|
|
|
|
|
|
fd = get_sock_fd( s, FILE_READ_DATA, NULL );
|
|
|
|
if (fd == -1)
|
2010-08-01 05:21:34 +02:00
|
|
|
{
|
2010-08-04 05:14:52 +02:00
|
|
|
SetLastError( WSAENOTSOCK );
|
2010-08-01 05:21:34 +02:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
TRACE("socket %04lx, ptr %p %s, length %d, sendptr %p, len %d, ov %p\n",
|
|
|
|
s, name, debugstr_sockaddr(name), namelen, sendBuf, sendBufLen, ov);
|
|
|
|
|
2015-03-29 05:53:36 +02:00
|
|
|
ret = is_fd_bound(fd, NULL, NULL);
|
|
|
|
if (ret <= 0)
|
2013-09-20 05:14:27 +02:00
|
|
|
{
|
2015-03-29 05:53:36 +02:00
|
|
|
SetLastError(ret == -1 ? wsaErrno() : WSAEINVAL);
|
2015-04-14 07:37:50 +02:00
|
|
|
release_sock_fd( s, fd );
|
2013-09-20 05:14:27 +02:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2010-08-01 05:21:34 +02:00
|
|
|
ret = do_connect(fd, name, namelen);
|
|
|
|
if (ret == 0)
|
|
|
|
{
|
|
|
|
WSABUF wsabuf;
|
|
|
|
|
|
|
|
_enable_event(SOCKET2HANDLE(s), FD_CONNECT|FD_READ|FD_WRITE,
|
|
|
|
FD_WINE_CONNECTED|FD_READ|FD_WRITE,
|
|
|
|
FD_CONNECT|FD_WINE_LISTENING);
|
|
|
|
|
|
|
|
wsabuf.len = sendBufLen;
|
|
|
|
wsabuf.buf = (char*) sendBuf;
|
|
|
|
|
|
|
|
/* WSASend takes care of completion if need be */
|
|
|
|
if (WSASend(s, &wsabuf, sendBuf ? 1 : 0, sent, 0, ov, NULL) != SOCKET_ERROR)
|
|
|
|
goto connection_success;
|
|
|
|
}
|
|
|
|
else if (ret == WSAEINPROGRESS)
|
|
|
|
{
|
|
|
|
struct ws2_async *wsa;
|
|
|
|
ULONG_PTR cvalue = (((ULONG_PTR)ov->hEvent & 1) == 0) ? (ULONG_PTR)ov : 0;
|
|
|
|
|
|
|
|
_enable_event(SOCKET2HANDLE(s), FD_CONNECT|FD_READ|FD_WRITE,
|
|
|
|
FD_CONNECT,
|
|
|
|
FD_WINE_CONNECTED|FD_WINE_LISTENING);
|
|
|
|
|
|
|
|
/* Indirectly call WSASend */
|
2015-03-03 07:30:38 +01:00
|
|
|
if (!(wsa = (struct ws2_async *)alloc_async_io( offsetof( struct ws2_async, iovec[1] ))))
|
2010-08-01 05:21:34 +02:00
|
|
|
{
|
|
|
|
SetLastError(WSAEFAULT);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
IO_STATUS_BLOCK *iosb = (IO_STATUS_BLOCK *)ov;
|
|
|
|
iosb->u.Status = STATUS_PENDING;
|
|
|
|
iosb->Information = 0;
|
|
|
|
|
|
|
|
wsa->hSocket = SOCKET2HANDLE(s);
|
|
|
|
wsa->addr = NULL;
|
|
|
|
wsa->addrlen.val = 0;
|
|
|
|
wsa->flags = 0;
|
2010-12-06 01:08:54 +01:00
|
|
|
wsa->lpFlags = &wsa->flags;
|
|
|
|
wsa->control = NULL;
|
2010-08-01 05:21:34 +02:00
|
|
|
wsa->n_iovecs = sendBuf ? 1 : 0;
|
|
|
|
wsa->first_iovec = 0;
|
2010-08-15 02:11:10 +02:00
|
|
|
wsa->completion_func = NULL;
|
2010-08-01 05:21:34 +02:00
|
|
|
wsa->iovec[0].iov_base = sendBuf;
|
|
|
|
wsa->iovec[0].iov_len = sendBufLen;
|
|
|
|
|
|
|
|
SERVER_START_REQ( register_async )
|
|
|
|
{
|
|
|
|
req->type = ASYNC_TYPE_WRITE;
|
|
|
|
req->async.handle = wine_server_obj_handle( wsa->hSocket );
|
|
|
|
req->async.callback = wine_server_client_ptr( WS2_async_send );
|
|
|
|
req->async.iosb = wine_server_client_ptr( iosb );
|
|
|
|
req->async.arg = wine_server_client_ptr( wsa );
|
|
|
|
req->async.event = wine_server_obj_handle( ov->hEvent );
|
|
|
|
req->async.cvalue = cvalue;
|
|
|
|
status = wine_server_call( req );
|
|
|
|
}
|
|
|
|
SERVER_END_REQ;
|
|
|
|
|
|
|
|
if (status != STATUS_PENDING) HeapFree(GetProcessHeap(), 0, wsa);
|
|
|
|
|
|
|
|
/* If the connect already failed */
|
|
|
|
if (status == STATUS_PIPE_DISCONNECTED)
|
|
|
|
status = _get_sock_error(s, FD_CONNECT_BIT);
|
|
|
|
SetLastError( NtStatusToWSAError(status) );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
SetLastError(ret);
|
|
|
|
}
|
|
|
|
|
|
|
|
release_sock_fd( s, fd );
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
connection_success:
|
|
|
|
release_sock_fd( s, fd );
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2002-04-24 00:03:42 +02:00
|
|
|
|
1997-08-24 18:00:30 +02:00
|
|
|
/***********************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* getpeername (WS2_32.5)
|
1997-08-24 18:00:30 +02:00
|
|
|
*/
|
2001-11-14 22:26:23 +01:00
|
|
|
int WINAPI WS_getpeername(SOCKET s, struct WS_sockaddr *name, int *namelen)
|
1997-08-24 18:00:30 +02:00
|
|
|
{
|
2002-06-13 21:09:55 +02:00
|
|
|
int fd;
|
2001-10-08 22:36:03 +02:00
|
|
|
int res;
|
1997-08-24 18:00:30 +02:00
|
|
|
|
2015-03-11 01:41:21 +01:00
|
|
|
TRACE("socket %04lx, ptr %p, len %08x\n", s, name, namelen ? *namelen : 0);
|
2001-10-08 22:36:03 +02:00
|
|
|
|
2003-12-02 05:19:56 +01:00
|
|
|
fd = get_sock_fd( s, 0, NULL );
|
2002-06-13 21:09:55 +02:00
|
|
|
res = SOCKET_ERROR;
|
|
|
|
|
2001-02-20 02:57:13 +01:00
|
|
|
if (fd != -1)
|
1997-08-24 18:00:30 +02:00
|
|
|
{
|
2007-05-30 20:11:58 +02:00
|
|
|
union generic_unix_sockaddr uaddr;
|
2013-03-06 13:26:59 +01:00
|
|
|
socklen_t uaddrlen = sizeof(uaddr);
|
2001-10-08 22:36:03 +02:00
|
|
|
|
2010-02-03 08:18:40 +01:00
|
|
|
if (getpeername(fd, &uaddr.addr, &uaddrlen) == 0)
|
2001-10-08 22:36:03 +02:00
|
|
|
{
|
2010-02-03 08:18:40 +01:00
|
|
|
if (!name || !namelen)
|
|
|
|
SetLastError(WSAEFAULT);
|
|
|
|
else if (ws_sockaddr_u2ws(&uaddr.addr, name, namelen) != 0)
|
|
|
|
/* The buffer was too small */
|
|
|
|
SetLastError(WSAEFAULT);
|
|
|
|
else
|
2015-01-15 01:51:16 +01:00
|
|
|
{
|
2010-02-03 08:18:40 +01:00
|
|
|
res = 0;
|
2015-01-15 01:51:16 +01:00
|
|
|
TRACE("=> %s\n", debugstr_sockaddr(name));
|
|
|
|
}
|
2001-10-08 22:36:03 +02:00
|
|
|
}
|
|
|
|
else
|
2010-02-03 08:18:40 +01:00
|
|
|
SetLastError(wsaErrno());
|
2003-12-02 05:19:56 +01:00
|
|
|
release_sock_fd( s, fd );
|
2001-10-08 22:36:03 +02:00
|
|
|
}
|
|
|
|
return res;
|
1997-08-24 18:00:30 +02:00
|
|
|
}
|
|
|
|
|
2015-04-09 05:09:29 +02:00
|
|
|
/* When binding to an UDP address with filter support the getsockname call on the socket
|
|
|
|
* will always return 0.0.0.0 instead of the filtered interface address. This function
|
|
|
|
* checks if the socket is interface-bound on UDP and return the correct address.
|
|
|
|
* This is required because applications often do a bind() with port zero followed by a
|
|
|
|
* getsockname() to retrieve the port and address acquired.
|
|
|
|
*/
|
|
|
|
static void interface_bind_check(int fd, struct sockaddr_in *addr)
|
|
|
|
{
|
|
|
|
#if !defined(IP_BOUND_IF) && !defined(LINUX_BOUND_IF)
|
|
|
|
return;
|
|
|
|
#else
|
|
|
|
int ifindex;
|
2015-06-18 16:03:08 +02:00
|
|
|
socklen_t len;
|
2015-04-09 05:09:29 +02:00
|
|
|
|
|
|
|
/* Check for IPv4, address 0.0.0.0 and UDP socket */
|
|
|
|
if (addr->sin_family != AF_INET || addr->sin_addr.s_addr != 0)
|
|
|
|
return;
|
2015-06-18 16:03:08 +02:00
|
|
|
if (_get_fd_type(fd) != SOCK_DGRAM)
|
2015-04-09 05:09:29 +02:00
|
|
|
return;
|
|
|
|
|
|
|
|
ifindex = -1;
|
|
|
|
len = sizeof(ifindex);
|
|
|
|
#if defined(IP_BOUND_IF)
|
|
|
|
getsockopt(fd, IPPROTO_IP, IP_BOUND_IF, &ifindex, &len);
|
|
|
|
#elif defined(LINUX_BOUND_IF)
|
|
|
|
getsockopt(fd, IPPROTO_IP, IP_UNICAST_IF, &ifindex, &len);
|
|
|
|
if (ifindex > 0) ifindex = ntohl(ifindex);
|
|
|
|
#endif
|
|
|
|
if (ifindex > 0)
|
|
|
|
{
|
|
|
|
PIP_ADAPTER_INFO adapters, adapter;
|
|
|
|
DWORD adap_size;
|
|
|
|
|
|
|
|
if (GetAdaptersInfo(NULL, &adap_size) != ERROR_BUFFER_OVERFLOW)
|
|
|
|
return;
|
|
|
|
adapters = HeapAlloc(GetProcessHeap(), 0, adap_size);
|
|
|
|
if (adapters && GetAdaptersInfo(adapters, &adap_size) == NO_ERROR)
|
|
|
|
{
|
|
|
|
/* Search the IPv4 adapter list for the appropriate bound interface */
|
|
|
|
for (adapter = adapters; adapter != NULL; adapter = adapter->Next)
|
|
|
|
{
|
|
|
|
in_addr_t adapter_addr;
|
|
|
|
if (adapter->Index != ifindex) continue;
|
|
|
|
|
|
|
|
adapter_addr = inet_addr(adapter->IpAddressList.IpAddress.String);
|
|
|
|
addr->sin_addr.s_addr = adapter_addr;
|
|
|
|
TRACE("reporting interface address from adapter %d\n", ifindex);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
HeapFree(GetProcessHeap(), 0, adapters);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
1997-08-24 18:00:30 +02:00
|
|
|
/***********************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* getsockname (WS2_32.6)
|
1997-08-24 18:00:30 +02:00
|
|
|
*/
|
2001-11-14 22:26:23 +01:00
|
|
|
int WINAPI WS_getsockname(SOCKET s, struct WS_sockaddr *name, int *namelen)
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
{
|
2002-06-13 21:09:55 +02:00
|
|
|
int fd;
|
2001-10-08 22:36:03 +02:00
|
|
|
int res;
|
|
|
|
|
2015-03-11 01:41:21 +01:00
|
|
|
TRACE("socket %04lx, ptr %p, len %08x\n", s, name, namelen ? *namelen : 0);
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
|
2002-06-13 21:09:55 +02:00
|
|
|
/* Check if what we've received is valid. Should we use IsBadReadPtr? */
|
|
|
|
if( (name == NULL) || (namelen == NULL) )
|
|
|
|
{
|
|
|
|
SetLastError( WSAEFAULT );
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
2003-12-02 05:19:56 +01:00
|
|
|
fd = get_sock_fd( s, 0, NULL );
|
2002-06-13 21:09:55 +02:00
|
|
|
res = SOCKET_ERROR;
|
|
|
|
|
2001-02-20 02:57:13 +01:00
|
|
|
if (fd != -1)
|
1997-08-24 18:00:30 +02:00
|
|
|
{
|
2007-05-30 20:11:58 +02:00
|
|
|
union generic_unix_sockaddr uaddr;
|
2015-03-29 05:53:36 +02:00
|
|
|
socklen_t uaddrlen;
|
|
|
|
int bound = is_fd_bound(fd, &uaddr, &uaddrlen);
|
2001-10-08 22:36:03 +02:00
|
|
|
|
2015-03-29 05:53:36 +02:00
|
|
|
if (bound <= 0)
|
2007-06-14 15:27:29 +02:00
|
|
|
{
|
2015-03-29 05:53:36 +02:00
|
|
|
SetLastError(bound == -1 ? wsaErrno() : WSAEINVAL);
|
2007-06-14 15:27:29 +02:00
|
|
|
}
|
2007-05-30 20:11:58 +02:00
|
|
|
else if (ws_sockaddr_u2ws(&uaddr.addr, name, namelen) != 0)
|
2001-10-08 22:36:03 +02:00
|
|
|
{
|
|
|
|
/* The buffer was too small */
|
|
|
|
SetLastError(WSAEFAULT);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-04-09 05:09:29 +02:00
|
|
|
interface_bind_check(fd, (struct sockaddr_in*) &uaddr);
|
|
|
|
if (ws_sockaddr_u2ws(&uaddr.addr, name, namelen) != 0)
|
|
|
|
{
|
|
|
|
/* The buffer was too small */
|
|
|
|
SetLastError(WSAEFAULT);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
res = 0;
|
|
|
|
TRACE("=> %s\n", debugstr_sockaddr(name));
|
|
|
|
}
|
2001-10-08 22:36:03 +02:00
|
|
|
}
|
2003-12-02 05:19:56 +01:00
|
|
|
release_sock_fd( s, fd );
|
2001-10-08 22:36:03 +02:00
|
|
|
}
|
|
|
|
return res;
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
}
|
|
|
|
|
1997-08-24 18:00:30 +02:00
|
|
|
/***********************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* getsockopt (WS2_32.7)
|
1997-08-24 18:00:30 +02:00
|
|
|
*/
|
2002-06-01 01:06:46 +02:00
|
|
|
INT WINAPI WS_getsockopt(SOCKET s, INT level,
|
1999-02-26 12:11:13 +01:00
|
|
|
INT optname, char *optval, INT *optlen)
|
1997-08-24 18:00:30 +02:00
|
|
|
{
|
2001-12-14 23:48:38 +01:00
|
|
|
int fd;
|
2004-10-06 20:52:51 +02:00
|
|
|
INT ret = 0;
|
2001-12-14 23:48:38 +01:00
|
|
|
|
2015-04-02 05:17:39 +02:00
|
|
|
TRACE("(socket %04lx, %s, optval %s, optlen %p (%d))\n", s,
|
|
|
|
debugstr_sockopt(level, optname), debugstr_optval(optval, 0),
|
|
|
|
optlen, optlen ? *optlen : 0);
|
2006-12-04 09:46:10 +01:00
|
|
|
|
|
|
|
switch(level)
|
|
|
|
{
|
|
|
|
case WS_SOL_SOCKET:
|
2001-12-14 23:48:38 +01:00
|
|
|
{
|
2006-12-04 09:46:10 +01:00
|
|
|
switch(optname)
|
2001-12-14 23:48:38 +01:00
|
|
|
{
|
2006-12-04 09:46:10 +01:00
|
|
|
/* Handle common cases. The special cases are below, sorted
|
|
|
|
* alphabetically */
|
|
|
|
case WS_SO_BROADCAST:
|
|
|
|
case WS_SO_DEBUG:
|
|
|
|
case WS_SO_KEEPALIVE:
|
|
|
|
case WS_SO_OOBINLINE:
|
|
|
|
case WS_SO_RCVBUF:
|
2007-11-03 08:45:12 +01:00
|
|
|
case WS_SO_REUSEADDR:
|
2006-12-04 09:46:10 +01:00
|
|
|
case WS_SO_SNDBUF:
|
|
|
|
if ( (fd = get_sock_fd( s, 0, NULL )) == -1)
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
convert_sockopt(&level, &optname);
|
2013-03-06 13:26:59 +01:00
|
|
|
if (getsockopt(fd, level, optname, optval, (socklen_t *)optlen) != 0 )
|
2006-12-04 09:46:10 +01:00
|
|
|
{
|
2015-04-14 07:02:51 +02:00
|
|
|
SetLastError(wsaErrno());
|
2006-12-04 09:46:10 +01:00
|
|
|
ret = SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
release_sock_fd( s, fd );
|
|
|
|
return ret;
|
2013-09-06 14:14:00 +02:00
|
|
|
case WS_SO_ACCEPTCONN:
|
|
|
|
if ( (fd = get_sock_fd( s, 0, NULL )) == -1)
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
if (getsockopt(fd, SOL_SOCKET, SO_ACCEPTCONN, optval, (socklen_t *)optlen) != 0 )
|
|
|
|
{
|
2015-04-14 07:02:51 +02:00
|
|
|
SetLastError(wsaErrno());
|
2013-09-06 14:14:00 +02:00
|
|
|
ret = SOCKET_ERROR;
|
|
|
|
}
|
2013-09-21 20:44:57 +02:00
|
|
|
else
|
|
|
|
{
|
|
|
|
/* BSD returns != 0 while Windows return exact == 1 */
|
|
|
|
if (*(int *)optval) *(int *)optval = 1;
|
|
|
|
}
|
2013-09-06 14:14:00 +02:00
|
|
|
release_sock_fd( s, fd );
|
|
|
|
return ret;
|
2014-12-08 23:55:45 +01:00
|
|
|
case WS_SO_BSP_STATE:
|
|
|
|
{
|
|
|
|
int req_size, addr_size;
|
|
|
|
WSAPROTOCOL_INFOW infow;
|
|
|
|
CSADDR_INFO *csinfo;
|
|
|
|
|
|
|
|
ret = ws_protocol_info(s, TRUE, &infow, &addr_size);
|
|
|
|
if (ret)
|
|
|
|
{
|
|
|
|
if (infow.iAddressFamily == WS_AF_INET)
|
|
|
|
addr_size = sizeof(struct sockaddr_in);
|
|
|
|
else if (infow.iAddressFamily == WS_AF_INET6)
|
|
|
|
addr_size = sizeof(struct sockaddr_in6);
|
|
|
|
else
|
|
|
|
{
|
2015-01-05 19:26:11 +01:00
|
|
|
FIXME("Family %d is unsupported for SO_BSP_STATE\n", infow.iAddressFamily);
|
2014-12-08 23:55:45 +01:00
|
|
|
SetLastError(WSAEAFNOSUPPORT);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
req_size = sizeof(CSADDR_INFO) + addr_size * 2;
|
|
|
|
if (*optlen < req_size)
|
|
|
|
{
|
|
|
|
ret = 0;
|
|
|
|
SetLastError(WSAEFAULT);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
union generic_unix_sockaddr uaddr;
|
2015-03-29 05:53:36 +02:00
|
|
|
socklen_t uaddrlen;
|
2014-12-08 23:55:45 +01:00
|
|
|
|
|
|
|
if ( (fd = get_sock_fd( s, 0, NULL )) == -1)
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
|
|
|
|
csinfo = (CSADDR_INFO*) optval;
|
|
|
|
|
|
|
|
/* Check if the sock is bound */
|
2015-03-29 05:53:36 +02:00
|
|
|
if (is_fd_bound(fd, &uaddr, &uaddrlen) == 1)
|
2014-12-08 23:55:45 +01:00
|
|
|
{
|
|
|
|
csinfo->LocalAddr.lpSockaddr =
|
|
|
|
(LPSOCKADDR) (optval + sizeof(CSADDR_INFO));
|
|
|
|
ws_sockaddr_u2ws(&uaddr.addr, csinfo->LocalAddr.lpSockaddr, &addr_size);
|
|
|
|
csinfo->LocalAddr.iSockaddrLength = addr_size;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
csinfo->LocalAddr.lpSockaddr = NULL;
|
|
|
|
csinfo->LocalAddr.iSockaddrLength = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Check if the sock is connected */
|
|
|
|
if (!getpeername(fd, &uaddr.addr, &uaddrlen) &&
|
|
|
|
is_sockaddr_bound(&uaddr.addr, uaddrlen))
|
|
|
|
{
|
|
|
|
csinfo->RemoteAddr.lpSockaddr =
|
|
|
|
(LPSOCKADDR) (optval + sizeof(CSADDR_INFO) + addr_size);
|
|
|
|
ws_sockaddr_u2ws(&uaddr.addr, csinfo->RemoteAddr.lpSockaddr, &addr_size);
|
|
|
|
csinfo->RemoteAddr.iSockaddrLength = addr_size;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
csinfo->RemoteAddr.lpSockaddr = NULL;
|
|
|
|
csinfo->RemoteAddr.iSockaddrLength = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
csinfo->iSocketType = infow.iSocketType;
|
|
|
|
csinfo->iProtocol = infow.iProtocol;
|
|
|
|
release_sock_fd( s, fd );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return ret ? 0 : SOCKET_ERROR;
|
|
|
|
}
|
2006-12-04 09:46:10 +01:00
|
|
|
case WS_SO_DONTLINGER:
|
|
|
|
{
|
|
|
|
struct linger lingval;
|
2013-03-06 13:26:59 +01:00
|
|
|
socklen_t len = sizeof(struct linger);
|
2006-12-04 09:46:10 +01:00
|
|
|
|
|
|
|
if (!optlen || *optlen < sizeof(BOOL)|| !optval)
|
|
|
|
{
|
|
|
|
SetLastError(WSAEFAULT);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
if ( (fd = get_sock_fd( s, 0, NULL )) == -1)
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
|
|
|
|
if (getsockopt(fd, SOL_SOCKET, SO_LINGER, &lingval, &len) != 0 )
|
|
|
|
{
|
2015-04-14 07:02:51 +02:00
|
|
|
SetLastError(wsaErrno());
|
2006-12-04 09:46:10 +01:00
|
|
|
ret = SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2012-08-14 23:16:41 +02:00
|
|
|
*(BOOL *)optval = !lingval.l_onoff;
|
2006-12-04 09:46:10 +01:00
|
|
|
*optlen = sizeof(BOOL);
|
|
|
|
}
|
|
|
|
|
|
|
|
release_sock_fd( s, fd );
|
|
|
|
return ret;
|
2001-12-14 23:48:38 +01:00
|
|
|
}
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
|
2011-01-26 17:01:09 +01:00
|
|
|
case WS_SO_CONNECT_TIME:
|
|
|
|
{
|
|
|
|
static int pretendtime = 0;
|
2011-12-19 15:42:08 +01:00
|
|
|
struct WS_sockaddr addr;
|
|
|
|
int len = sizeof(addr);
|
2011-01-26 17:01:09 +01:00
|
|
|
|
|
|
|
if (!optlen || *optlen < sizeof(DWORD) || !optval)
|
|
|
|
{
|
|
|
|
SetLastError(WSAEFAULT);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
2011-12-19 15:42:08 +01:00
|
|
|
if (WS_getpeername(s, &addr, &len) == SOCKET_ERROR)
|
|
|
|
*(DWORD *)optval = ~0u;
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (!pretendtime) FIXME("WS_SO_CONNECT_TIME - faking results\n");
|
|
|
|
*(DWORD *)optval = pretendtime++;
|
|
|
|
}
|
2011-01-26 17:01:09 +01:00
|
|
|
*optlen = sizeof(DWORD);
|
|
|
|
return ret;
|
|
|
|
}
|
2006-12-04 09:46:10 +01:00
|
|
|
/* As mentioned in setsockopt, Windows ignores this, so we
|
|
|
|
* always return true here */
|
|
|
|
case WS_SO_DONTROUTE:
|
|
|
|
if (!optlen || *optlen < sizeof(BOOL) || !optval)
|
|
|
|
{
|
|
|
|
SetLastError(WSAEFAULT);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
*(BOOL *)optval = TRUE;
|
|
|
|
*optlen = sizeof(BOOL);
|
|
|
|
return 0;
|
|
|
|
|
2015-04-08 07:02:55 +02:00
|
|
|
case WS_SO_ERROR:
|
|
|
|
{
|
|
|
|
if ( (fd = get_sock_fd( s, 0, NULL )) == -1)
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
if (getsockopt(fd, SOL_SOCKET, SO_ERROR, optval, (socklen_t *)optlen) != 0 )
|
|
|
|
{
|
2015-04-14 07:02:51 +02:00
|
|
|
SetLastError(wsaErrno());
|
2015-04-08 07:02:55 +02:00
|
|
|
ret = SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
release_sock_fd( s, fd );
|
|
|
|
|
|
|
|
/* The wineserver may have swallowed the error before us */
|
|
|
|
if (!ret && *(int*) optval == 0)
|
|
|
|
{
|
|
|
|
int i, events[FD_MAX_EVENTS];
|
|
|
|
_get_sock_errors(s, events);
|
|
|
|
for (i = 0; i < FD_MAX_EVENTS; i++)
|
|
|
|
{
|
|
|
|
if(events[i])
|
|
|
|
{
|
|
|
|
events[i] = NtStatusToWSAError(events[i]);
|
|
|
|
TRACE("returning SO_ERROR %d from wine server\n", events[i]);
|
|
|
|
*(int*) optval = events[i];
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2006-12-04 09:46:10 +01:00
|
|
|
case WS_SO_LINGER:
|
2006-11-28 18:43:49 +01:00
|
|
|
{
|
2006-12-04 09:46:10 +01:00
|
|
|
struct linger lingval;
|
2015-06-18 16:03:08 +02:00
|
|
|
socklen_t len = sizeof(struct linger);
|
2006-12-04 09:46:10 +01:00
|
|
|
|
|
|
|
/* struct linger and LINGER have different sizes */
|
|
|
|
if (!optlen || *optlen < sizeof(LINGER) || !optval)
|
|
|
|
{
|
|
|
|
SetLastError(WSAEFAULT);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
if ( (fd = get_sock_fd( s, 0, NULL )) == -1)
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
|
2015-06-18 16:03:08 +02:00
|
|
|
if (_get_fd_type(fd) == SOCK_DGRAM)
|
2011-10-04 05:10:25 +02:00
|
|
|
{
|
|
|
|
SetLastError(WSAENOPROTOOPT);
|
|
|
|
ret = SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
else if (getsockopt(fd, SOL_SOCKET, SO_LINGER, &lingval, &len) != 0)
|
2006-12-04 09:46:10 +01:00
|
|
|
{
|
2015-04-14 07:02:51 +02:00
|
|
|
SetLastError(wsaErrno());
|
2006-12-04 09:46:10 +01:00
|
|
|
ret = SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
((LINGER *)optval)->l_onoff = lingval.l_onoff;
|
|
|
|
((LINGER *)optval)->l_linger = lingval.l_linger;
|
|
|
|
*optlen = sizeof(struct linger);
|
|
|
|
}
|
|
|
|
|
|
|
|
release_sock_fd( s, fd );
|
|
|
|
return ret;
|
2006-11-28 18:43:49 +01:00
|
|
|
}
|
|
|
|
|
2006-12-04 09:46:10 +01:00
|
|
|
case WS_SO_MAX_MSG_SIZE:
|
|
|
|
if (!optlen || *optlen < sizeof(int) || !optval)
|
|
|
|
{
|
|
|
|
SetLastError(WSAEFAULT);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
TRACE("getting global SO_MAX_MSG_SIZE = 65507\n");
|
|
|
|
*(int *)optval = 65507;
|
|
|
|
*optlen = sizeof(int);
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
/* SO_OPENTYPE does not require a valid socket handle. */
|
|
|
|
case WS_SO_OPENTYPE:
|
|
|
|
if (!optlen || *optlen < sizeof(int) || !optval)
|
|
|
|
{
|
|
|
|
SetLastError(WSAEFAULT);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
*(int *)optval = get_per_thread_data()->opentype;
|
|
|
|
*optlen = sizeof(int);
|
|
|
|
TRACE("getting global SO_OPENTYPE = 0x%x\n", *((int*)optval) );
|
|
|
|
return 0;
|
2013-09-10 05:56:47 +02:00
|
|
|
case WS_SO_PROTOCOL_INFOA:
|
|
|
|
case WS_SO_PROTOCOL_INFOW:
|
|
|
|
{
|
|
|
|
int size;
|
|
|
|
WSAPROTOCOL_INFOW infow;
|
2004-09-14 02:48:15 +02:00
|
|
|
|
2013-09-10 05:56:47 +02:00
|
|
|
ret = ws_protocol_info(s, optname == WS_SO_PROTOCOL_INFOW, &infow, &size);
|
|
|
|
if (ret)
|
|
|
|
{
|
|
|
|
if (!optlen || !optval || *optlen < size)
|
|
|
|
{
|
|
|
|
if(optlen) *optlen = size;
|
|
|
|
ret = 0;
|
|
|
|
SetLastError(WSAEFAULT);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
memcpy(optval, &infow, size);
|
|
|
|
}
|
|
|
|
return ret ? 0 : SOCKET_ERROR;
|
|
|
|
}
|
2006-12-04 09:46:10 +01:00
|
|
|
case WS_SO_RCVTIMEO:
|
|
|
|
case WS_SO_SNDTIMEO:
|
|
|
|
{
|
2015-04-27 16:01:15 +02:00
|
|
|
INT64 timeout;
|
2004-09-07 22:47:03 +02:00
|
|
|
|
2006-12-04 09:46:10 +01:00
|
|
|
if (!optlen || *optlen < sizeof(int)|| !optval)
|
|
|
|
{
|
|
|
|
SetLastError(WSAEFAULT);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
if ( (fd = get_sock_fd( s, 0, NULL )) == -1)
|
|
|
|
return SOCKET_ERROR;
|
2004-10-06 20:52:51 +02:00
|
|
|
|
2015-04-27 16:01:15 +02:00
|
|
|
timeout = get_rcvsnd_timeo(fd, optname == WS_SO_RCVTIMEO);
|
2015-05-01 08:45:11 +02:00
|
|
|
*(int *)optval = timeout <= UINT_MAX ? timeout : UINT_MAX;
|
2006-12-04 09:46:10 +01:00
|
|
|
|
|
|
|
release_sock_fd( s, fd );
|
|
|
|
return ret;
|
2004-10-06 20:52:51 +02:00
|
|
|
}
|
2013-09-18 22:36:25 +02:00
|
|
|
case WS_SO_TYPE:
|
|
|
|
{
|
2015-06-18 16:03:08 +02:00
|
|
|
int sock_type;
|
2013-09-18 22:36:25 +02:00
|
|
|
if (!optlen || *optlen < sizeof(int) || !optval)
|
|
|
|
{
|
|
|
|
SetLastError(WSAEFAULT);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
if ( (fd = get_sock_fd( s, 0, NULL )) == -1)
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
|
2015-06-18 16:03:08 +02:00
|
|
|
sock_type = _get_fd_type(fd);
|
|
|
|
if (sock_type == -1)
|
2013-09-18 22:36:25 +02:00
|
|
|
{
|
2015-04-14 07:02:51 +02:00
|
|
|
SetLastError(wsaErrno());
|
2013-09-18 22:36:25 +02:00
|
|
|
ret = SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
else
|
2015-06-18 16:03:08 +02:00
|
|
|
(*(int *)optval) = convert_socktype_u2w(sock_type);
|
2013-09-18 22:36:25 +02:00
|
|
|
|
|
|
|
release_sock_fd( s, fd );
|
|
|
|
return ret;
|
|
|
|
}
|
2006-12-04 09:46:10 +01:00
|
|
|
default:
|
|
|
|
TRACE("Unknown SOL_SOCKET optname: 0x%08x\n", optname);
|
|
|
|
SetLastError(WSAENOPROTOOPT);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
} /* end switch(optname) */
|
|
|
|
}/* end case WS_SOL_SOCKET */
|
2013-06-17 21:56:52 +02:00
|
|
|
#ifdef HAS_IPX
|
2013-12-27 16:48:40 +01:00
|
|
|
case WS_NSPROTO_IPX:
|
2006-12-04 09:46:10 +01:00
|
|
|
{
|
|
|
|
struct WS_sockaddr_ipx addr;
|
|
|
|
IPX_ADDRESS_DATA *data;
|
|
|
|
int namelen;
|
|
|
|
switch(optname)
|
|
|
|
{
|
2015-01-04 19:57:47 +01:00
|
|
|
case WS_IPX_PTYPE:
|
2006-12-04 09:46:10 +01:00
|
|
|
if ((fd = get_sock_fd( s, 0, NULL )) == -1) return SOCKET_ERROR;
|
|
|
|
#ifdef SOL_IPX
|
2013-03-06 13:26:59 +01:00
|
|
|
if(getsockopt(fd, SOL_IPX, IPX_TYPE, optval, (socklen_t *)optlen) == -1)
|
2006-12-04 09:46:10 +01:00
|
|
|
{
|
2004-10-06 20:52:51 +02:00
|
|
|
ret = SOCKET_ERROR;
|
|
|
|
}
|
2006-12-04 09:46:10 +01:00
|
|
|
#else
|
|
|
|
{
|
|
|
|
struct ipx val;
|
|
|
|
socklen_t len=sizeof(struct ipx);
|
|
|
|
if(getsockopt(fd, 0, SO_DEFAULT_HEADERS, &val, &len) == -1 )
|
|
|
|
ret = SOCKET_ERROR;
|
|
|
|
else
|
|
|
|
*optval = (int)val.ipx_pt;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
TRACE("ptype: %d (fd: %d)\n", *(int*)optval, fd);
|
|
|
|
release_sock_fd( s, fd );
|
|
|
|
return ret;
|
|
|
|
|
2015-01-04 19:57:47 +01:00
|
|
|
case WS_IPX_ADDRESS:
|
2006-12-04 09:46:10 +01:00
|
|
|
/*
|
|
|
|
* On a Win2000 system with one network card there are usually
|
|
|
|
* three ipx devices one with a speed of 28.8kbps, 10Mbps and 100Mbps.
|
|
|
|
* Using this call you can then retrieve info about this all.
|
|
|
|
* In case of Linux it is a bit different. Usually you have
|
|
|
|
* only "one" device active and further it is not possible to
|
|
|
|
* query things like the linkspeed.
|
|
|
|
*/
|
|
|
|
FIXME("IPX_ADDRESS\n");
|
|
|
|
namelen = sizeof(struct WS_sockaddr_ipx);
|
|
|
|
memset(&addr, 0, sizeof(struct WS_sockaddr_ipx));
|
|
|
|
WS_getsockname(s, (struct WS_sockaddr*)&addr, &namelen);
|
|
|
|
|
|
|
|
data = (IPX_ADDRESS_DATA*)optval;
|
2008-07-12 21:37:39 +02:00
|
|
|
memcpy(data->nodenum,addr.sa_nodenum,sizeof(data->nodenum));
|
|
|
|
memcpy(data->netnum,addr.sa_netnum,sizeof(data->netnum));
|
2006-12-04 09:46:10 +01:00
|
|
|
data->adapternum = 0;
|
|
|
|
data->wan = FALSE; /* We are not on a wan for now .. */
|
|
|
|
data->status = FALSE; /* Since we are not on a wan, the wan link isn't up */
|
|
|
|
data->maxpkt = 1467; /* This value is the default one, at least on Win2k/WinXP */
|
|
|
|
data->linkspeed = 100000; /* Set the line speed in 100bit/s to 10 Mbit;
|
|
|
|
* note 1MB = 1000kB in this case */
|
|
|
|
return 0;
|
|
|
|
|
2015-01-04 19:57:47 +01:00
|
|
|
case WS_IPX_MAX_ADAPTER_NUM:
|
2006-12-04 09:46:10 +01:00
|
|
|
FIXME("IPX_MAX_ADAPTER_NUM\n");
|
|
|
|
*(int*)optval = 1; /* As noted under IPX_ADDRESS we have just one card. */
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
default:
|
|
|
|
FIXME("IPX optname:%x\n", optname);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}/* end switch(optname) */
|
2013-12-27 16:48:40 +01:00
|
|
|
} /* end case WS_NSPROTO_IPX */
|
2006-12-04 09:46:10 +01:00
|
|
|
#endif
|
2009-08-12 18:15:33 +02:00
|
|
|
|
2013-06-17 21:56:52 +02:00
|
|
|
#ifdef HAS_IRDA
|
2014-03-25 16:49:12 +01:00
|
|
|
#define MAX_IRDA_DEVICES 10
|
|
|
|
|
2009-08-12 18:15:33 +02:00
|
|
|
case WS_SOL_IRLMP:
|
|
|
|
switch(optname)
|
|
|
|
{
|
|
|
|
case WS_IRLMP_ENUMDEVICES:
|
|
|
|
{
|
|
|
|
char buf[sizeof(struct irda_device_list) +
|
|
|
|
(MAX_IRDA_DEVICES - 1) * sizeof(struct irda_device_info)];
|
2012-04-22 19:05:05 +02:00
|
|
|
int res;
|
2009-08-12 18:15:33 +02:00
|
|
|
socklen_t len = sizeof(buf);
|
|
|
|
|
|
|
|
if ( (fd = get_sock_fd( s, 0, NULL )) == -1)
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
res = getsockopt( fd, SOL_IRLMP, IRLMP_ENUMDEVICES, buf, &len );
|
2013-12-31 01:24:43 +01:00
|
|
|
release_sock_fd( s, fd );
|
2009-08-12 18:15:33 +02:00
|
|
|
if (res < 0)
|
|
|
|
{
|
|
|
|
SetLastError(wsaErrno());
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
struct irda_device_list *src = (struct irda_device_list *)buf;
|
|
|
|
DEVICELIST *dst = (DEVICELIST *)optval;
|
2013-03-07 23:22:31 +01:00
|
|
|
INT needed = sizeof(DEVICELIST);
|
|
|
|
unsigned int i;
|
2009-08-12 18:15:33 +02:00
|
|
|
|
|
|
|
if (src->len > 0)
|
|
|
|
needed += (src->len - 1) * sizeof(IRDA_DEVICE_INFO);
|
|
|
|
if (*optlen < needed)
|
|
|
|
{
|
|
|
|
SetLastError(WSAEFAULT);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
*optlen = needed;
|
|
|
|
TRACE("IRLMP_ENUMDEVICES: %d devices found:\n", src->len);
|
|
|
|
dst->numDevice = src->len;
|
|
|
|
for (i = 0; i < src->len; i++)
|
|
|
|
{
|
|
|
|
TRACE("saddr = %08x, daddr = %08x, info = %s, hints = %02x%02x\n",
|
|
|
|
src->dev[i].saddr, src->dev[i].daddr,
|
|
|
|
src->dev[i].info, src->dev[i].hints[0],
|
|
|
|
src->dev[i].hints[1]);
|
|
|
|
memcpy( dst->Device[i].irdaDeviceID,
|
|
|
|
&src->dev[i].daddr,
|
|
|
|
sizeof(dst->Device[i].irdaDeviceID) ) ;
|
|
|
|
memcpy( dst->Device[i].irdaDeviceName,
|
2011-11-04 00:03:22 +01:00
|
|
|
src->dev[i].info,
|
2009-08-12 18:15:33 +02:00
|
|
|
sizeof(dst->Device[i].irdaDeviceName) ) ;
|
|
|
|
memcpy( &dst->Device[i].irdaDeviceHints1,
|
|
|
|
&src->dev[i].hints[0],
|
|
|
|
sizeof(dst->Device[i].irdaDeviceHints1) ) ;
|
|
|
|
memcpy( &dst->Device[i].irdaDeviceHints2,
|
|
|
|
&src->dev[i].hints[1],
|
|
|
|
sizeof(dst->Device[i].irdaDeviceHints2) ) ;
|
|
|
|
dst->Device[i].irdaCharSet = src->dev[i].charset;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
FIXME("IrDA optname:0x%x\n", optname);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
break; /* case WS_SOL_IRLMP */
|
2014-03-25 16:49:12 +01:00
|
|
|
#undef MAX_IRDA_DEVICES
|
2009-08-12 18:15:33 +02:00
|
|
|
#endif
|
|
|
|
|
2006-12-04 09:46:10 +01:00
|
|
|
/* Levels WS_IPPROTO_TCP and WS_IPPROTO_IP convert directly */
|
|
|
|
case WS_IPPROTO_TCP:
|
|
|
|
switch(optname)
|
|
|
|
{
|
|
|
|
case WS_TCP_NODELAY:
|
|
|
|
if ( (fd = get_sock_fd( s, 0, NULL )) == -1)
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
convert_sockopt(&level, &optname);
|
2013-03-06 13:26:59 +01:00
|
|
|
if (getsockopt(fd, level, optname, optval, (socklen_t *)optlen) != 0 )
|
2006-12-04 09:46:10 +01:00
|
|
|
{
|
2015-04-14 07:02:51 +02:00
|
|
|
SetLastError(wsaErrno());
|
2004-10-06 20:52:51 +02:00
|
|
|
ret = SOCKET_ERROR;
|
|
|
|
}
|
2006-12-04 09:46:10 +01:00
|
|
|
release_sock_fd( s, fd );
|
|
|
|
return ret;
|
2004-10-06 20:52:51 +02:00
|
|
|
}
|
2006-12-04 09:46:10 +01:00
|
|
|
FIXME("Unknown IPPROTO_TCP optname 0x%08x\n", optname);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
|
|
|
|
case WS_IPPROTO_IP:
|
|
|
|
switch(optname)
|
|
|
|
{
|
|
|
|
case WS_IP_ADD_MEMBERSHIP:
|
|
|
|
case WS_IP_DROP_MEMBERSHIP:
|
|
|
|
#ifdef IP_HDRINCL
|
|
|
|
case WS_IP_HDRINCL:
|
|
|
|
#endif
|
|
|
|
case WS_IP_MULTICAST_IF:
|
|
|
|
case WS_IP_MULTICAST_LOOP:
|
|
|
|
case WS_IP_MULTICAST_TTL:
|
|
|
|
case WS_IP_OPTIONS:
|
2010-12-06 01:08:54 +01:00
|
|
|
#ifdef IP_PKTINFO
|
|
|
|
case WS_IP_PKTINFO:
|
|
|
|
#endif
|
2006-12-04 09:46:10 +01:00
|
|
|
case WS_IP_TOS:
|
|
|
|
case WS_IP_TTL:
|
2012-04-09 21:06:08 +02:00
|
|
|
#ifdef IP_UNICAST_IF
|
|
|
|
case WS_IP_UNICAST_IF:
|
|
|
|
#endif
|
2006-12-04 09:46:10 +01:00
|
|
|
if ( (fd = get_sock_fd( s, 0, NULL )) == -1)
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
convert_sockopt(&level, &optname);
|
2013-03-06 13:26:59 +01:00
|
|
|
if (getsockopt(fd, level, optname, optval, (socklen_t *)optlen) != 0 )
|
2006-12-04 09:46:10 +01:00
|
|
|
{
|
2015-04-14 07:02:51 +02:00
|
|
|
SetLastError(wsaErrno());
|
2006-12-04 09:46:10 +01:00
|
|
|
ret = SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
release_sock_fd( s, fd );
|
|
|
|
return ret;
|
2007-10-04 08:48:57 +02:00
|
|
|
case WS_IP_DONTFRAGMENT:
|
|
|
|
FIXME("WS_IP_DONTFRAGMENT is always false!\n");
|
|
|
|
*(BOOL*)optval = FALSE;
|
|
|
|
return 0;
|
2006-12-04 09:46:10 +01:00
|
|
|
}
|
|
|
|
FIXME("Unknown IPPROTO_IP optname 0x%08x\n", optname);
|
|
|
|
return SOCKET_ERROR;
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
|
2009-09-01 19:37:51 +02:00
|
|
|
case WS_IPPROTO_IPV6:
|
2010-04-01 23:50:54 +02:00
|
|
|
switch(optname)
|
|
|
|
{
|
|
|
|
#ifdef IPV6_ADD_MEMBERSHIP
|
|
|
|
case WS_IPV6_ADD_MEMBERSHIP:
|
|
|
|
#endif
|
|
|
|
#ifdef IPV6_DROP_MEMBERSHIP
|
|
|
|
case WS_IPV6_DROP_MEMBERSHIP:
|
|
|
|
#endif
|
|
|
|
case WS_IPV6_MULTICAST_IF:
|
|
|
|
case WS_IPV6_MULTICAST_HOPS:
|
|
|
|
case WS_IPV6_MULTICAST_LOOP:
|
|
|
|
case WS_IPV6_UNICAST_HOPS:
|
|
|
|
case WS_IPV6_V6ONLY:
|
2012-04-09 21:06:30 +02:00
|
|
|
#ifdef IPV6_UNICAST_IF
|
|
|
|
case WS_IPV6_UNICAST_IF:
|
|
|
|
#endif
|
2010-04-01 23:50:54 +02:00
|
|
|
if ( (fd = get_sock_fd( s, 0, NULL )) == -1)
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
convert_sockopt(&level, &optname);
|
2013-03-06 13:26:59 +01:00
|
|
|
if (getsockopt(fd, level, optname, optval, (socklen_t *)optlen) != 0 )
|
2010-04-01 23:50:54 +02:00
|
|
|
{
|
2015-04-14 07:02:51 +02:00
|
|
|
SetLastError(wsaErrno());
|
2010-04-01 23:50:54 +02:00
|
|
|
ret = SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
release_sock_fd( s, fd );
|
|
|
|
return ret;
|
|
|
|
case WS_IPV6_DONTFRAG:
|
|
|
|
FIXME("WS_IPV6_DONTFRAG is always false!\n");
|
|
|
|
*(BOOL*)optval = FALSE;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
FIXME("Unknown IPPROTO_IPV6 optname 0x%08x\n", optname);
|
2009-09-01 19:37:51 +02:00
|
|
|
return SOCKET_ERROR;
|
|
|
|
|
2006-12-04 09:46:10 +01:00
|
|
|
default:
|
2009-08-24 23:39:18 +02:00
|
|
|
WARN("Unknown level: 0x%08x\n", level);
|
|
|
|
SetLastError(WSAEINVAL);
|
2006-12-04 09:46:10 +01:00
|
|
|
return SOCKET_ERROR;
|
|
|
|
} /* end switch(level) */
|
|
|
|
}
|
2001-11-14 22:26:23 +01:00
|
|
|
|
1997-08-24 18:00:30 +02:00
|
|
|
/***********************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* htonl (WS2_32.8)
|
1997-08-24 18:00:30 +02:00
|
|
|
*/
|
2006-10-12 13:45:39 +02:00
|
|
|
WS_u_long WINAPI WS_htonl(WS_u_long hostlong)
|
2001-11-14 22:26:23 +01:00
|
|
|
{
|
|
|
|
return htonl(hostlong);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
1997-08-24 18:00:30 +02:00
|
|
|
/***********************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* htons (WS2_32.9)
|
1997-08-24 18:00:30 +02:00
|
|
|
*/
|
2006-10-12 13:45:39 +02:00
|
|
|
WS_u_short WINAPI WS_htons(WS_u_short hostshort)
|
2001-11-14 22:26:23 +01:00
|
|
|
{
|
|
|
|
return htons(hostshort);
|
|
|
|
}
|
|
|
|
|
2003-12-11 06:16:48 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* WSAHtonl (WS2_32.46)
|
2008-01-03 18:04:28 +01:00
|
|
|
* From MSDN description of error codes, this function should also
|
2004-09-14 01:18:19 +02:00
|
|
|
* check if WinSock has been initialized and the socket is a valid
|
|
|
|
* socket. But why? This function only translates a host byte order
|
|
|
|
* u_long into a network byte order u_long...
|
2003-12-11 06:16:48 +01:00
|
|
|
*/
|
2006-10-12 13:45:39 +02:00
|
|
|
int WINAPI WSAHtonl(SOCKET s, WS_u_long hostlong, WS_u_long *lpnetlong)
|
2003-12-11 06:16:48 +01:00
|
|
|
{
|
2004-09-14 01:18:19 +02:00
|
|
|
if (lpnetlong)
|
|
|
|
{
|
|
|
|
*lpnetlong = htonl(hostlong);
|
|
|
|
return 0;
|
|
|
|
}
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError(WSAEFAULT);
|
2004-09-14 01:18:19 +02:00
|
|
|
return SOCKET_ERROR;
|
2003-12-11 06:16:48 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* WSAHtons (WS2_32.47)
|
2008-01-16 12:20:50 +01:00
|
|
|
* From MSDN description of error codes, this function should also
|
2004-09-14 01:18:19 +02:00
|
|
|
* check if WinSock has been initialized and the socket is a valid
|
|
|
|
* socket. But why? This function only translates a host byte order
|
|
|
|
* u_short into a network byte order u_short...
|
2003-12-11 06:16:48 +01:00
|
|
|
*/
|
2006-10-12 13:45:39 +02:00
|
|
|
int WINAPI WSAHtons(SOCKET s, WS_u_short hostshort, WS_u_short *lpnetshort)
|
2003-12-11 06:16:48 +01:00
|
|
|
{
|
2004-09-14 01:18:19 +02:00
|
|
|
|
|
|
|
if (lpnetshort)
|
|
|
|
{
|
|
|
|
*lpnetshort = htons(hostshort);
|
|
|
|
return 0;
|
|
|
|
}
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError(WSAEFAULT);
|
2004-09-14 01:18:19 +02:00
|
|
|
return SOCKET_ERROR;
|
2003-12-11 06:16:48 +01:00
|
|
|
}
|
|
|
|
|
2001-11-14 22:26:23 +01:00
|
|
|
|
1997-08-24 18:00:30 +02:00
|
|
|
/***********************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* inet_addr (WS2_32.11)
|
1997-08-24 18:00:30 +02:00
|
|
|
*/
|
2006-10-12 13:45:39 +02:00
|
|
|
WS_u_long WINAPI WS_inet_addr(const char *cp)
|
2001-11-14 22:26:23 +01:00
|
|
|
{
|
2007-02-23 15:41:10 +01:00
|
|
|
if (!cp) return INADDR_NONE;
|
2001-11-14 22:26:23 +01:00
|
|
|
return inet_addr(cp);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
1997-08-24 18:00:30 +02:00
|
|
|
/***********************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* ntohl (WS2_32.14)
|
1997-08-24 18:00:30 +02:00
|
|
|
*/
|
2006-10-12 13:45:39 +02:00
|
|
|
WS_u_long WINAPI WS_ntohl(WS_u_long netlong)
|
2001-11-14 22:26:23 +01:00
|
|
|
{
|
|
|
|
return ntohl(netlong);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
1997-08-24 18:00:30 +02:00
|
|
|
/***********************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* ntohs (WS2_32.15)
|
1997-08-24 18:00:30 +02:00
|
|
|
*/
|
2006-10-12 13:45:39 +02:00
|
|
|
WS_u_short WINAPI WS_ntohs(WS_u_short netshort)
|
2001-11-14 22:26:23 +01:00
|
|
|
{
|
|
|
|
return ntohs(netshort);
|
|
|
|
}
|
|
|
|
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
|
1997-08-24 18:00:30 +02:00
|
|
|
/***********************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* inet_ntoa (WS2_32.12)
|
1997-08-24 18:00:30 +02:00
|
|
|
*/
|
2001-11-14 22:26:23 +01:00
|
|
|
char* WINAPI WS_inet_ntoa(struct WS_in_addr in)
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
{
|
2015-08-10 16:08:44 +02:00
|
|
|
struct per_thread_data *data = get_per_thread_data();
|
|
|
|
|
|
|
|
sprintf( data->ntoa_buffer, "%u.%u.%u.%u",
|
|
|
|
(unsigned int)(ntohl( in.WS_s_addr ) >> 24 & 0xff),
|
|
|
|
(unsigned int)(ntohl( in.WS_s_addr ) >> 16 & 0xff),
|
|
|
|
(unsigned int)(ntohl( in.WS_s_addr ) >> 8 & 0xff),
|
|
|
|
(unsigned int)(ntohl( in.WS_s_addr ) & 0xff) );
|
|
|
|
|
|
|
|
return data->ntoa_buffer;
|
Release 971221
Fri Dec 19 10:50:46 1997 Douglas Ridgway <ridgway@winehq.com>
* [Make.rules.in] [Makefile.in] [documentation/Makefile.in]
[documentation/README.documentation]
First cut at Wine API documentation. No longer install reference
manual by default.
Wed Dec 17 21:32:23 1997 Andreas Mohr <100.30936@germany.net>
* [files/file.c]
Fixed GetTempFileName16() to use current path of requested drive
as needed.
* [if1632/Makefile.in] [if1632/builtin.c] [if1632/dciman32.spec]
[if1632/msvfw32.spec] [if1632/tapi32.spec] [if1632/wow32.spec]
Added misc DLLs needed by various apps.
Wed Dec 17 12:01:50 1997 Morten Eriksen <mortene@sim.no>
* [if1632/gdi32.spec] [include/windows.h] [objects/palette.c]
Inserted empty stub for CreateHalftonePalette.
Tue Dec 16 22:08:06 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/mdi.c]
Use VK_TAB instead of VK_SEPARATOR in TranslateMDISysAccel().
* [graphics/metafiledrv/init.c]
DeleteDC() on a MetaDC doesn't do anything - it shouldn't. Therefore
fix cleanup of MetaDCs in CloseMetaFile(); they now actually get
removed from the GDI heap!
* [graphics/x11drv/xfont.c]
Preserve FO_MATCH_XYINDEP flag in XFONT_MatchFIList(). Should reduce
the number of bold-italic matches.
Tue Dec 16 20:11:43 1997 Bertho Stultiens <bertho@panter.soci.aau.dk>
* [graphics/painting.c]
Included an implementation of DrawState
* [if1632/thunk.c]
Changed many fprintfs into dprintf_thunk
* [include/cache.h] [graphics/cache.c]
New files to hold cached handles to regulary used GDI object.
* [include/windows.h]
Added DRAWSTATExx typedefs
Added DSS_DEFAULT define for DrawState
* [objects/text.c]
New implementation of GrayString()
* [controls/uitools.c]
Implemented DrawFrameControl() functions
Changed DrawEdge() behaviour to win95 implementation
Mon Dec 15 23:43:01 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [graphics/path.c] [include/path.h] [graphics/painting.c]
[if1632/gdi32.spec] [include/gdi.h] [include/windows.h]
[objects/dc.c]
Added preliminary support for GDI paths.
* [objects/dc.c]
Added DC_Init_DC_INFO function for initializing WIN_DC_INFO
structure.
* [include/windows.h] [include/gdi.h] [objects/gdiobj.c]
Added DEFAULT_GUI_FONT.
* [include/winerror.h]
Added a few error codes.
* [memory/heap.c]
Changed HeapAlloc to make the correct calls to SetLastError
(now conforms to NT's behaviour).
* [windows/win.c]
Changed WIN_CreateWindowEx to allow child windows with zero
width / height.
Sun Dec 14 12:01:07 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [if1632/*] [relay32/*]
Moved all 32-bit relay stuff to relay32/
* [fi1632/thunk.c] [win32/kernel32.c]
Moved all KERNEL32 ordinal functions to kernel32.c
* [memory/selector.c]
Initialize selectors in AllocSelectorArray.
* [tools/build.c]
Generate C instead of assembly for Win32 relays.
Fixed stack corruption in CallTo16 functions, found by Bertho
Stultiens.
Sun Dec 14 10:55:00 1997 Andreas Mohr <100.30936@germany.net>
* [if1632/Makefile.in] [if1632/builtin.c] [if1632/ole2thk.spec]
Added built-in OLE2THK.DLL.
* [if1632/toolhelp.spec] [include/toolhelp.h] [memory/selector.c]
[misc/toolhelp.c]
Added stubs for StackTraceFirst(), StackTraceCSIPFirst(),
StackTraceNext(), UTSelectorOffsetToLinear()
and UTLinearToSelectorOffset().
Sat Dec 13 17:26:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [misc/winsock.c]
32-bit API fixes for reported problems (thanks to Marcus
and David).
* [graphics/x11drv/xfont.c]
Little tweak in point size calculation.
* [windows/defwnd.c] [windows/dce.c] [windows/winhelp.c]
[windows/winproc.c] [windows/win.c]
Bug fixes.
Sat Dec 13 16:35:14 1997 Kai Morich <kai.morich@rhein-neckar.netsurf.de>
* [files/dos_fs.c]
OpenFile with empty filename and OF_PARSE returns current dir.
* [misc/commdlg.c]
Ignore initial dir if bogus.
* [files/file.c]
Locking an identic region in a file must not be an error.
* [misc/lstr.c]
Use wide char ctype functions.
Fri Dec 12 23:46:22 1997 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [file/drive.c]
First attempt for GetDiskFreeSpaceEx.
Fri Dec 12 23:18:41 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [loader/pe_resource.c]
Fixed wrongly appearing menus problem (only use default lookups in
last resource subtree).
* [multimedia/*.c]
Added win32 support for time* and joy* lowlevel drivers,
(not excessively tested), some misc fixes and cleanups.
* [misc/shellord.c][misc/shell.c][ole/folders.c][ole/ifs.c]
[include/interfaces.h][include/shlobj.h]
Added some more undocumented SHELL32 functions, some shell folder
interface stubs added, SHGetMalloc, SHGetDesktopFolder,
SHGetSpecialFolderLocation, SHGetPathFromIDList stubs added,
IMalloc, IUnknown implemented.
* [windows/msgbox.c]
Implemented MessageBoxIndirect*, some internal changes.
* [if1632/thunk.c]
KERNEL_431 implemented.
* [objects/gdiobj.c]
GetCurrentObject implemented.
Wed Dec 3 01:09:17 1997 Gordon Chaffee <chaffee@apu.cs.berkeley.edu>
* [objects/dib.c]
Fix a couple small DIB problems.
* [controls/edit.c]
Fix a typo.
* [files/dos_fs.c]
Try normal readdir in case fs is specified as vfat but isn't.
* [files/profile.c]
Implementation of WritePrivateProfileSection32A from Uwe Bonnes.
* [misc/printdrv.c]
OpenPrinter32A stub, helps Word97 start.
* [objects/text.c]
Fixup implementation of GetTextCharsetInfo.
* [scheduler/process.c]
Fix environment variable expansion.
* [win32/code_page.c]
Make MultiByteToWideChar and WideCharToMultiByte conform in return
values and error conditions to those in Windows NT 4.0.
* [windows/message.c]
Fix broadcasting problems in Win32. The Win32 docs say to use
HWND_TOPMOST to broadcast to all Win32 Windows.
* [memory/virtual.c] [loader/pe_image.c]
Do not map in VirtualAlloc if address is specified and space is
not available. This is required by Win32.
* [include/pen.h] [include/x11drv.h] [objects/dc.c]
[objects/pen.c] [graphics/x11drv/pen.c]
Support for ExtCreatePen.
Tue Dec 2 20:22:06 1997 Morten Welinder <terra@diku.dk>
* [*/*.c] [*/*.h]
Add lots of prototypes.
* [if1632/kernel32.spec][include/windows.h][include/winnt.h]
[misc/cpu.c]
Define IsProcessorFeaturePresent.
* [misc/crtdll.c]
(CRTDLL__getcwd): Allocate enough memory for the terminating zero.
* [misc/ver.c]
Improve check for null component in _find_data[AW]. Plug leaks
in VerQueryValue*.
* [win32/console.c][if1632/kernel32.spec]
Add stubs for GetConsoleCursorInfo32, SetConsoleCursorInfo32.
* [windows/message.c][if1632/user32.spec][include/windows.h]
Define SendMessageTimeout*.
* [graphics/x11drv/xfont.c]
Change algorithm of __genericCheckSum to be alignment safe.
* [misc/main.c] [misc/winsock.c] [misc/winsock_dns.c]
Include winsock.h early to avoid Solaris problem.
* [include/windows.h]
Undef FSHIFT before we define it.
* [rc/winerc.c]
Include <fcntl.h> instead of <sys/fcntl.h>.
* [files/file.c]
Use strerror in FILE_SetDosError if available.
* [include/config.h.in] [configure.in]
Check for strerror.
* [objects/gdiobj.c]
Make static font structures aligned.
Mon Dec 1 10:10:21 1997 Karl Garrison <karlos@eznet.net>
* [win32/console.c] [if1632/kernel32.spec] [include/windows.h]
Added stub for GetNumberOfConsoleMouseButtons.
Added stub for PeekConsoleInput(A,W).
Fixed parameter list for WriteConsole(A,W).
GetNumberOfConsoleInputEvents now returns 0 events instead of 1
(since low-level console functions are not yet supported).
GetConsoleMode no longer returns ENABLE_WINDOW_INPUT and
ENABLE_MOUSE_INPUT since these are not currently implemented.
1997-12-21 20:17:50 +01:00
|
|
|
}
|
|
|
|
|
2010-09-24 23:20:14 +02:00
|
|
|
static const char *debugstr_wsaioctl(DWORD ioctl)
|
|
|
|
{
|
2011-01-08 16:47:59 +01:00
|
|
|
const char *buf_type, *family;
|
|
|
|
|
2010-09-24 23:20:14 +02:00
|
|
|
switch(ioctl & 0x18000000)
|
|
|
|
{
|
2011-01-08 16:47:59 +01:00
|
|
|
case WS_IOC_WS2:
|
|
|
|
family = "IOC_WS2";
|
|
|
|
break;
|
|
|
|
case WS_IOC_PROTOCOL:
|
|
|
|
family = "IOC_PROTOCOL";
|
|
|
|
break;
|
|
|
|
case WS_IOC_VENDOR:
|
|
|
|
family = "IOC_VENDOR";
|
|
|
|
break;
|
|
|
|
default: /* WS_IOC_UNIX */
|
2010-09-24 23:20:14 +02:00
|
|
|
{
|
|
|
|
BYTE size = (ioctl >> 16) & WS_IOCPARM_MASK;
|
|
|
|
char x = (ioctl & 0xff00) >> 8;
|
|
|
|
BYTE y = ioctl & 0xff;
|
|
|
|
char args[14];
|
|
|
|
|
|
|
|
switch (ioctl & (WS_IOC_VOID|WS_IOC_INOUT))
|
|
|
|
{
|
|
|
|
case WS_IOC_VOID:
|
|
|
|
buf_type = "_IO";
|
|
|
|
sprintf(args, "%d, %d", x, y);
|
|
|
|
break;
|
|
|
|
case WS_IOC_IN:
|
|
|
|
buf_type = "_IOW";
|
|
|
|
sprintf(args, "'%c', %d, %d", x, y, size);
|
|
|
|
break;
|
|
|
|
case WS_IOC_OUT:
|
|
|
|
buf_type = "_IOR";
|
|
|
|
sprintf(args, "'%c', %d, %d", x, y, size);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
buf_type = "?";
|
|
|
|
sprintf(args, "'%c', %d, %d", x, y, size);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
return wine_dbg_sprintf("%s(%s)", buf_type, args);
|
|
|
|
}
|
2011-01-08 16:47:59 +01:00
|
|
|
}
|
2010-09-24 23:20:14 +02:00
|
|
|
|
2011-01-08 16:47:59 +01:00
|
|
|
/* We are different from WS_IOC_UNIX. */
|
|
|
|
switch (ioctl & (WS_IOC_VOID|WS_IOC_INOUT))
|
|
|
|
{
|
|
|
|
case WS_IOC_VOID:
|
|
|
|
buf_type = "_WSAIO";
|
2010-09-24 23:20:14 +02:00
|
|
|
break;
|
2011-01-08 16:47:59 +01:00
|
|
|
case WS_IOC_INOUT:
|
|
|
|
buf_type = "_WSAIORW";
|
2010-09-24 23:20:14 +02:00
|
|
|
break;
|
2011-01-08 16:47:59 +01:00
|
|
|
case WS_IOC_IN:
|
|
|
|
buf_type = "_WSAIOW";
|
|
|
|
break;
|
|
|
|
case WS_IOC_OUT:
|
|
|
|
buf_type = "_WSAIOR";
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
buf_type = "?";
|
2010-09-24 23:20:14 +02:00
|
|
|
break;
|
|
|
|
}
|
2011-01-08 16:47:59 +01:00
|
|
|
|
|
|
|
return wine_dbg_sprintf("%s(%s, %d)", buf_type, family,
|
|
|
|
(USHORT)(ioctl & 0xffff));
|
2010-09-24 23:20:14 +02:00
|
|
|
}
|
|
|
|
|
2014-03-18 19:45:17 +01:00
|
|
|
/* do an ioctl call through the server */
|
|
|
|
static DWORD server_ioctl_sock( SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size,
|
|
|
|
LPVOID out_buff, DWORD out_size, LPDWORD ret_size,
|
|
|
|
LPWSAOVERLAPPED overlapped,
|
|
|
|
LPWSAOVERLAPPED_COMPLETION_ROUTINE completion )
|
|
|
|
{
|
|
|
|
HANDLE event = overlapped ? overlapped->hEvent : 0;
|
|
|
|
HANDLE handle = SOCKET2HANDLE( s );
|
|
|
|
struct ws2_async *wsa;
|
|
|
|
NTSTATUS status;
|
|
|
|
PIO_STATUS_BLOCK io;
|
|
|
|
|
2015-03-03 07:30:38 +01:00
|
|
|
if (!(wsa = (struct ws2_async *)alloc_async_io( sizeof(*wsa) )))
|
2014-03-18 19:45:17 +01:00
|
|
|
return WSA_NOT_ENOUGH_MEMORY;
|
|
|
|
wsa->hSocket = handle;
|
|
|
|
wsa->user_overlapped = overlapped;
|
|
|
|
wsa->completion_func = completion;
|
|
|
|
io = (overlapped ? (PIO_STATUS_BLOCK)overlapped : &wsa->local_iosb);
|
|
|
|
|
2015-03-03 07:33:21 +01:00
|
|
|
status = NtDeviceIoControlFile( handle, event, ws2_async_apc, wsa, io, code,
|
2014-03-18 19:45:17 +01:00
|
|
|
in_buff, in_size, out_buff, out_size );
|
|
|
|
if (status == STATUS_NOT_SUPPORTED)
|
|
|
|
{
|
|
|
|
FIXME("Unsupported ioctl %x (device=%x access=%x func=%x method=%x)\n",
|
|
|
|
code, code >> 16, (code >> 14) & 3, (code >> 2) & 0xfff, code & 3);
|
|
|
|
}
|
|
|
|
else if (status == STATUS_SUCCESS)
|
|
|
|
*ret_size = io->Information; /* "Information" is the size written to the output buffer */
|
|
|
|
|
|
|
|
if (status != STATUS_PENDING) RtlFreeHeap( GetProcessHeap(), 0, wsa );
|
|
|
|
|
|
|
|
return NtStatusToWSAError( status );
|
|
|
|
}
|
|
|
|
|
2000-07-23 21:28:24 +02:00
|
|
|
/**********************************************************************
|
2001-06-21 01:03:14 +02:00
|
|
|
* WSAIoctl (WS2_32.50)
|
2000-07-23 21:28:24 +02:00
|
|
|
*
|
|
|
|
*/
|
2011-04-19 11:34:42 +02:00
|
|
|
INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID out_buff,
|
|
|
|
DWORD out_size, LPDWORD ret_size, LPWSAOVERLAPPED overlapped,
|
|
|
|
LPWSAOVERLAPPED_COMPLETION_ROUTINE completion )
|
|
|
|
{
|
2011-04-19 11:57:37 +02:00
|
|
|
int fd;
|
2011-04-19 12:26:50 +02:00
|
|
|
DWORD status = 0, total = 0;
|
2011-04-19 11:57:37 +02:00
|
|
|
|
2014-10-08 00:27:19 +02:00
|
|
|
TRACE("%04lx, %s, %p, %d, %p, %d, %p, %p, %p\n",
|
2014-03-06 14:57:13 +01:00
|
|
|
s, debugstr_wsaioctl(code), in_buff, in_size, out_buff, out_size, ret_size, overlapped, completion);
|
2011-04-19 11:34:42 +02:00
|
|
|
|
|
|
|
switch (code)
|
|
|
|
{
|
|
|
|
case WS_FIONBIO:
|
2011-04-19 11:57:37 +02:00
|
|
|
if (in_size != sizeof(WS_u_long) || IS_INTRESOURCE(in_buff))
|
|
|
|
{
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError(WSAEFAULT);
|
2006-10-02 14:08:25 +02:00
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
2014-03-06 14:57:13 +01:00
|
|
|
TRACE("-> FIONBIO (%x)\n", *(WS_u_long*)in_buff);
|
2011-04-19 11:57:37 +02:00
|
|
|
if (_get_sock_mask(s))
|
|
|
|
{
|
|
|
|
/* AsyncSelect()'ed sockets are always nonblocking */
|
2011-04-19 12:26:50 +02:00
|
|
|
if (!*(WS_u_long *)in_buff) status = WSAEINVAL;
|
|
|
|
break;
|
2011-04-19 11:57:37 +02:00
|
|
|
}
|
|
|
|
if (*(WS_u_long *)in_buff)
|
|
|
|
_enable_event(SOCKET2HANDLE(s), 0, FD_WINE_NONBLOCKING, 0);
|
|
|
|
else
|
|
|
|
_enable_event(SOCKET2HANDLE(s), 0, 0, FD_WINE_NONBLOCKING);
|
2011-04-19 12:26:50 +02:00
|
|
|
break;
|
2006-10-03 11:46:11 +02:00
|
|
|
|
2011-04-19 11:57:37 +02:00
|
|
|
case WS_FIONREAD:
|
2011-09-13 14:07:00 +02:00
|
|
|
{
|
|
|
|
if (out_size != sizeof(WS_u_long) || IS_INTRESOURCE(out_buff))
|
|
|
|
{
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError(WSAEFAULT);
|
2011-09-13 14:07:00 +02:00
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
if ((fd = get_sock_fd( s, 0, NULL )) == -1) return SOCKET_ERROR;
|
|
|
|
if (ioctl(fd, FIONREAD, out_buff ) == -1)
|
2015-04-14 07:02:51 +02:00
|
|
|
status = wsaErrno();
|
2011-09-13 14:07:00 +02:00
|
|
|
release_sock_fd( s, fd );
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2011-04-19 11:57:37 +02:00
|
|
|
case WS_SIOCATMARK:
|
|
|
|
{
|
2013-03-06 13:26:59 +01:00
|
|
|
unsigned int oob = 0, atmark = 0;
|
|
|
|
socklen_t oobsize = sizeof(int);
|
2011-04-19 11:57:37 +02:00
|
|
|
if (out_size != sizeof(WS_u_long) || IS_INTRESOURCE(out_buff))
|
|
|
|
{
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError(WSAEFAULT);
|
2006-10-02 14:08:25 +02:00
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
2011-04-19 11:57:37 +02:00
|
|
|
if ((fd = get_sock_fd( s, 0, NULL )) == -1) return SOCKET_ERROR;
|
2011-09-13 14:07:00 +02:00
|
|
|
/* SO_OOBINLINE sockets must always return TRUE to SIOCATMARK */
|
|
|
|
if ((getsockopt(fd, SOL_SOCKET, SO_OOBINLINE, &oob, &oobsize ) == -1)
|
|
|
|
|| (!oob && ioctl(fd, SIOCATMARK, &atmark ) == -1))
|
2015-04-14 07:02:51 +02:00
|
|
|
status = wsaErrno();
|
2011-09-13 14:07:00 +02:00
|
|
|
else
|
2011-11-20 02:20:30 +01:00
|
|
|
{
|
|
|
|
/* The SIOCATMARK value read from ioctl() is reversed
|
|
|
|
* because BSD returns TRUE if it's in the OOB mark
|
|
|
|
* while Windows returns TRUE if there are NO OOB bytes.
|
|
|
|
*/
|
2015-03-10 10:20:02 +01:00
|
|
|
(*(WS_u_long *) out_buff) = oob || !atmark;
|
2011-11-20 02:20:30 +01:00
|
|
|
}
|
|
|
|
|
2011-04-19 11:57:37 +02:00
|
|
|
release_sock_fd( s, fd );
|
2011-04-19 12:26:50 +02:00
|
|
|
break;
|
2011-04-19 11:57:37 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
case WS_FIOASYNC:
|
|
|
|
WARN("Warning: WS1.1 shouldn't be using async I/O\n");
|
|
|
|
SetLastError(WSAEINVAL);
|
|
|
|
return SOCKET_ERROR;
|
2006-10-03 11:46:11 +02:00
|
|
|
|
2006-11-27 18:48:58 +01:00
|
|
|
case WS_SIO_GET_INTERFACE_LIST:
|
2003-12-02 05:19:56 +01:00
|
|
|
{
|
2011-04-19 11:34:42 +02:00
|
|
|
INTERFACE_INFO* intArray = out_buff;
|
2011-04-19 12:26:50 +02:00
|
|
|
DWORD size, numInt = 0, apiReturn;
|
2000-07-23 21:28:24 +02:00
|
|
|
|
2005-01-14 20:54:38 +01:00
|
|
|
TRACE("-> SIO_GET_INTERFACE_LIST request\n");
|
2003-08-30 02:16:19 +02:00
|
|
|
|
2011-04-19 12:26:50 +02:00
|
|
|
if (!out_buff || !ret_size)
|
2003-12-02 05:19:56 +01:00
|
|
|
{
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError(WSAEFAULT);
|
2003-08-30 02:16:19 +02:00
|
|
|
return SOCKET_ERROR;
|
2003-12-02 05:19:56 +01:00
|
|
|
}
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2006-10-03 11:46:11 +02:00
|
|
|
fd = get_sock_fd( s, 0, NULL );
|
|
|
|
if (fd == -1) return SOCKET_ERROR;
|
|
|
|
|
2003-12-02 05:19:56 +01:00
|
|
|
apiReturn = GetAdaptersInfo(NULL, &size);
|
2011-04-19 12:26:50 +02:00
|
|
|
if (apiReturn == ERROR_BUFFER_OVERFLOW)
|
2003-12-02 05:19:56 +01:00
|
|
|
{
|
2005-03-24 22:01:35 +01:00
|
|
|
PIP_ADAPTER_INFO table = HeapAlloc(GetProcessHeap(),0,size);
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2003-05-13 06:43:44 +02:00
|
|
|
if (table)
|
2000-07-23 21:28:24 +02:00
|
|
|
{
|
2003-05-13 06:43:44 +02:00
|
|
|
if (GetAdaptersInfo(table, &size) == NO_ERROR)
|
|
|
|
{
|
|
|
|
PIP_ADAPTER_INFO ptr;
|
|
|
|
|
2012-06-21 14:13:09 +02:00
|
|
|
for (ptr = table, numInt = 0; ptr; ptr = ptr->Next)
|
2003-05-13 06:43:44 +02:00
|
|
|
{
|
|
|
|
unsigned int addr, mask, bcast;
|
|
|
|
struct ifreq ifInfo;
|
|
|
|
|
2012-06-21 14:13:09 +02:00
|
|
|
/* Skip interfaces without an IPv4 address. */
|
|
|
|
if (ptr->IpAddressList.IpAddress.String[0] == '\0')
|
|
|
|
continue;
|
|
|
|
|
|
|
|
if ((numInt + 1)*sizeof(INTERFACE_INFO)/sizeof(IP_ADAPTER_INFO) > out_size)
|
|
|
|
{
|
|
|
|
WARN("Buffer too small = %u, out_size = %u\n", numInt + 1, out_size);
|
|
|
|
status = WSAEFAULT;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2003-05-13 06:43:44 +02:00
|
|
|
/* Socket Status Flags */
|
2005-03-28 16:17:51 +02:00
|
|
|
lstrcpynA(ifInfo.ifr_name, ptr->AdapterName, IFNAMSIZ);
|
2003-05-13 06:43:44 +02:00
|
|
|
if (ioctl(fd, SIOCGIFFLAGS, &ifInfo) < 0)
|
|
|
|
{
|
2005-01-14 20:54:38 +01:00
|
|
|
ERR("Error obtaining status flags for socket!\n");
|
2011-04-19 12:26:50 +02:00
|
|
|
status = WSAEINVAL;
|
|
|
|
break;
|
2003-05-13 06:43:44 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* set flags; the values of IFF_* are not the same
|
|
|
|
under Linux and Windows, therefore must generate
|
|
|
|
new flags */
|
|
|
|
intArray->iiFlags = 0;
|
|
|
|
if (ifInfo.ifr_flags & IFF_BROADCAST)
|
|
|
|
intArray->iiFlags |= WS_IFF_BROADCAST;
|
2003-10-14 07:27:43 +02:00
|
|
|
#ifdef IFF_POINTOPOINT
|
2003-05-13 06:43:44 +02:00
|
|
|
if (ifInfo.ifr_flags & IFF_POINTOPOINT)
|
|
|
|
intArray->iiFlags |= WS_IFF_POINTTOPOINT;
|
2003-10-14 07:27:43 +02:00
|
|
|
#endif
|
2003-05-13 06:43:44 +02:00
|
|
|
if (ifInfo.ifr_flags & IFF_LOOPBACK)
|
|
|
|
intArray->iiFlags |= WS_IFF_LOOPBACK;
|
|
|
|
if (ifInfo.ifr_flags & IFF_UP)
|
|
|
|
intArray->iiFlags |= WS_IFF_UP;
|
2004-10-04 22:37:43 +02:00
|
|
|
if (ifInfo.ifr_flags & IFF_MULTICAST)
|
|
|
|
intArray->iiFlags |= WS_IFF_MULTICAST;
|
2003-05-13 06:43:44 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
addr = inet_addr(ptr->IpAddressList.IpAddress.String);
|
|
|
|
mask = inet_addr(ptr->IpAddressList.IpMask.String);
|
2007-10-13 01:15:29 +02:00
|
|
|
bcast = addr | ~mask;
|
2003-05-13 06:43:44 +02:00
|
|
|
intArray->iiAddress.AddressIn.sin_family = AF_INET;
|
|
|
|
intArray->iiAddress.AddressIn.sin_port = 0;
|
|
|
|
intArray->iiAddress.AddressIn.sin_addr.WS_s_addr =
|
|
|
|
addr;
|
|
|
|
intArray->iiNetmask.AddressIn.sin_family = AF_INET;
|
|
|
|
intArray->iiNetmask.AddressIn.sin_port = 0;
|
|
|
|
intArray->iiNetmask.AddressIn.sin_addr.WS_s_addr =
|
|
|
|
mask;
|
|
|
|
intArray->iiBroadcastAddress.AddressIn.sin_family =
|
|
|
|
AF_INET;
|
|
|
|
intArray->iiBroadcastAddress.AddressIn.sin_port = 0;
|
|
|
|
intArray->iiBroadcastAddress.AddressIn.sin_addr.
|
|
|
|
WS_s_addr = bcast;
|
2012-06-21 14:13:09 +02:00
|
|
|
intArray++;
|
|
|
|
numInt++;
|
2003-05-13 06:43:44 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2005-01-14 20:54:38 +01:00
|
|
|
ERR("Unable to get interface table!\n");
|
2011-04-19 12:26:50 +02:00
|
|
|
status = WSAEINVAL;
|
2003-05-13 06:43:44 +02:00
|
|
|
}
|
2003-08-30 02:16:19 +02:00
|
|
|
HeapFree(GetProcessHeap(),0,table);
|
2000-07-23 21:28:24 +02:00
|
|
|
}
|
2011-04-19 12:26:50 +02:00
|
|
|
else status = WSAEINVAL;
|
2003-12-02 05:19:56 +01:00
|
|
|
}
|
2011-04-19 12:26:50 +02:00
|
|
|
else if (apiReturn != ERROR_NO_DATA)
|
2003-12-02 05:19:56 +01:00
|
|
|
{
|
2005-01-14 20:54:38 +01:00
|
|
|
ERR("Unable to get interface table!\n");
|
2011-04-19 12:26:50 +02:00
|
|
|
status = WSAEINVAL;
|
2003-12-02 05:19:56 +01:00
|
|
|
}
|
|
|
|
/* Calculate the size of the array being returned */
|
2011-04-19 12:26:50 +02:00
|
|
|
total = sizeof(INTERFACE_INFO) * numInt;
|
2006-10-03 11:46:11 +02:00
|
|
|
release_sock_fd( s, fd );
|
2003-12-02 05:19:56 +01:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2006-11-27 20:09:46 +01:00
|
|
|
case WS_SIO_ADDRESS_LIST_QUERY:
|
2006-12-18 19:37:52 +01:00
|
|
|
{
|
|
|
|
DWORD size;
|
|
|
|
|
|
|
|
TRACE("-> SIO_ADDRESS_LIST_QUERY request\n");
|
|
|
|
|
2011-04-19 11:34:42 +02:00
|
|
|
if (!ret_size)
|
2006-12-18 19:37:52 +01:00
|
|
|
{
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError(WSAEFAULT);
|
2006-12-18 19:37:52 +01:00
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
2014-10-03 09:19:22 +02:00
|
|
|
if (out_size && out_size < FIELD_OFFSET(SOCKET_ADDRESS_LIST, Address[0]))
|
|
|
|
{
|
|
|
|
*ret_size = 0;
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError(WSAEINVAL);
|
2014-10-03 09:19:22 +02:00
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
2006-12-18 19:37:52 +01:00
|
|
|
if (GetAdaptersInfo(NULL, &size) == ERROR_BUFFER_OVERFLOW)
|
|
|
|
{
|
|
|
|
IP_ADAPTER_INFO *p, *table = HeapAlloc(GetProcessHeap(), 0, size);
|
2014-10-07 08:41:12 +02:00
|
|
|
SOCKET_ADDRESS_LIST *sa_list;
|
|
|
|
SOCKADDR_IN *sockaddr;
|
|
|
|
SOCKET_ADDRESS *sa;
|
|
|
|
unsigned int i;
|
2011-04-19 12:26:50 +02:00
|
|
|
DWORD num;
|
2006-12-18 19:37:52 +01:00
|
|
|
|
|
|
|
if (!table || GetAdaptersInfo(table, &size))
|
|
|
|
{
|
|
|
|
HeapFree(GetProcessHeap(), 0, table);
|
2011-04-19 12:26:50 +02:00
|
|
|
status = WSAEINVAL;
|
|
|
|
break;
|
2006-12-18 19:37:52 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
for (p = table, num = 0; p; p = p->Next)
|
|
|
|
if (p->IpAddressList.IpAddress.String[0]) num++;
|
|
|
|
|
2014-10-07 08:41:13 +02:00
|
|
|
total = FIELD_OFFSET(SOCKET_ADDRESS_LIST, Address[num]) + num * sizeof(*sockaddr);
|
2014-10-07 08:41:12 +02:00
|
|
|
if (total > out_size || !out_buff)
|
2006-12-18 19:37:52 +01:00
|
|
|
{
|
2014-10-03 09:19:21 +02:00
|
|
|
*ret_size = total;
|
2006-12-18 19:37:52 +01:00
|
|
|
HeapFree(GetProcessHeap(), 0, table);
|
2011-04-19 12:26:50 +02:00
|
|
|
status = WSAEFAULT;
|
|
|
|
break;
|
2006-12-18 19:37:52 +01:00
|
|
|
}
|
|
|
|
|
2014-10-07 08:41:12 +02:00
|
|
|
sa_list = out_buff;
|
|
|
|
sa = sa_list->Address;
|
2014-10-07 08:41:13 +02:00
|
|
|
sockaddr = (SOCKADDR_IN *)&sa[num];
|
2014-10-07 08:41:12 +02:00
|
|
|
sa_list->iAddressCount = num;
|
2006-12-18 19:37:52 +01:00
|
|
|
|
2014-10-07 08:41:12 +02:00
|
|
|
for (p = table, i = 0; p; p = p->Next)
|
|
|
|
{
|
|
|
|
if (!p->IpAddressList.IpAddress.String[0]) continue;
|
2006-12-18 19:37:52 +01:00
|
|
|
|
2014-10-07 08:41:12 +02:00
|
|
|
sa[i].lpSockaddr = (SOCKADDR *)&sockaddr[i];
|
|
|
|
sa[i].iSockaddrLength = sizeof(SOCKADDR);
|
2006-12-18 19:37:52 +01:00
|
|
|
|
2014-10-07 08:41:12 +02:00
|
|
|
sockaddr[i].sin_family = AF_INET;
|
|
|
|
sockaddr[i].sin_port = 0;
|
|
|
|
sockaddr[i].sin_addr.WS_s_addr = inet_addr(p->IpAddressList.IpAddress.String);
|
|
|
|
i++;
|
2006-12-18 19:37:52 +01:00
|
|
|
}
|
2006-11-27 20:09:46 +01:00
|
|
|
|
2006-12-18 19:37:52 +01:00
|
|
|
HeapFree(GetProcessHeap(), 0, table);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
WARN("unable to get IP address list\n");
|
2011-04-19 12:26:50 +02:00
|
|
|
status = WSAEINVAL;
|
2006-12-18 19:37:52 +01:00
|
|
|
}
|
2011-04-19 12:26:50 +02:00
|
|
|
break;
|
2006-12-18 19:37:52 +01:00
|
|
|
}
|
2011-04-19 12:26:50 +02:00
|
|
|
|
2006-11-27 18:48:58 +01:00
|
|
|
case WS_SIO_FLUSH:
|
2006-10-02 14:08:25 +02:00
|
|
|
FIXME("SIO_FLUSH: stub.\n");
|
|
|
|
break;
|
|
|
|
|
2008-02-04 21:18:42 +01:00
|
|
|
case WS_SIO_GET_EXTENSION_FUNCTION_POINTER:
|
2010-05-08 21:10:58 +02:00
|
|
|
{
|
|
|
|
static const GUID connectex_guid = WSAID_CONNECTEX;
|
|
|
|
static const GUID disconnectex_guid = WSAID_DISCONNECTEX;
|
|
|
|
static const GUID acceptex_guid = WSAID_ACCEPTEX;
|
|
|
|
static const GUID getaccepexsockaddrs_guid = WSAID_GETACCEPTEXSOCKADDRS;
|
|
|
|
static const GUID transmitfile_guid = WSAID_TRANSMITFILE;
|
|
|
|
static const GUID transmitpackets_guid = WSAID_TRANSMITPACKETS;
|
|
|
|
static const GUID wsarecvmsg_guid = WSAID_WSARECVMSG;
|
|
|
|
static const GUID wsasendmsg_guid = WSAID_WSASENDMSG;
|
|
|
|
|
2011-04-19 11:34:42 +02:00
|
|
|
if ( IsEqualGUID(&connectex_guid, in_buff) )
|
2010-05-08 21:10:58 +02:00
|
|
|
{
|
2011-04-19 11:34:42 +02:00
|
|
|
*(LPFN_CONNECTEX *)out_buff = WS2_ConnectEx;
|
2011-04-19 12:26:50 +02:00
|
|
|
break;
|
2010-05-08 21:10:58 +02:00
|
|
|
}
|
2011-04-19 11:34:42 +02:00
|
|
|
else if ( IsEqualGUID(&disconnectex_guid, in_buff) )
|
2010-05-08 21:10:58 +02:00
|
|
|
{
|
|
|
|
FIXME("SIO_GET_EXTENSION_FUNCTION_POINTER: unimplemented DisconnectEx\n");
|
|
|
|
}
|
2011-04-19 11:34:42 +02:00
|
|
|
else if ( IsEqualGUID(&acceptex_guid, in_buff) )
|
2010-05-08 21:10:58 +02:00
|
|
|
{
|
2011-04-19 11:34:42 +02:00
|
|
|
*(LPFN_ACCEPTEX *)out_buff = WS2_AcceptEx;
|
2011-04-19 12:26:50 +02:00
|
|
|
break;
|
2010-05-08 21:10:58 +02:00
|
|
|
}
|
2011-04-19 11:34:42 +02:00
|
|
|
else if ( IsEqualGUID(&getaccepexsockaddrs_guid, in_buff) )
|
2010-05-08 21:10:58 +02:00
|
|
|
{
|
2011-04-19 11:34:42 +02:00
|
|
|
*(LPFN_GETACCEPTEXSOCKADDRS *)out_buff = WS2_GetAcceptExSockaddrs;
|
2011-04-19 12:26:50 +02:00
|
|
|
break;
|
2010-05-08 21:10:58 +02:00
|
|
|
}
|
2011-04-19 11:34:42 +02:00
|
|
|
else if ( IsEqualGUID(&transmitfile_guid, in_buff) )
|
2010-05-08 21:10:58 +02:00
|
|
|
{
|
2014-01-17 01:52:50 +01:00
|
|
|
*(LPFN_TRANSMITFILE *)out_buff = WS2_TransmitFile;
|
|
|
|
break;
|
2010-05-08 21:10:58 +02:00
|
|
|
}
|
2011-04-19 11:34:42 +02:00
|
|
|
else if ( IsEqualGUID(&transmitpackets_guid, in_buff) )
|
2010-05-08 21:10:58 +02:00
|
|
|
{
|
|
|
|
FIXME("SIO_GET_EXTENSION_FUNCTION_POINTER: unimplemented TransmitPackets\n");
|
|
|
|
}
|
2011-04-19 11:34:42 +02:00
|
|
|
else if ( IsEqualGUID(&wsarecvmsg_guid, in_buff) )
|
2010-05-08 21:10:58 +02:00
|
|
|
{
|
2011-04-19 11:34:42 +02:00
|
|
|
*(LPFN_WSARECVMSG *)out_buff = WS2_WSARecvMsg;
|
2011-04-19 12:26:50 +02:00
|
|
|
break;
|
2010-05-08 21:10:58 +02:00
|
|
|
}
|
2011-04-19 11:34:42 +02:00
|
|
|
else if ( IsEqualGUID(&wsasendmsg_guid, in_buff) )
|
2010-05-08 21:10:58 +02:00
|
|
|
{
|
2013-10-01 04:56:53 +02:00
|
|
|
*(LPFN_WSASENDMSG *)out_buff = WSASendMsg;
|
|
|
|
break;
|
2010-05-08 21:10:58 +02:00
|
|
|
}
|
|
|
|
else
|
2011-04-19 11:34:42 +02:00
|
|
|
FIXME("SIO_GET_EXTENSION_FUNCTION_POINTER %s: stub\n", debugstr_guid(in_buff));
|
2010-05-08 21:10:58 +02:00
|
|
|
|
2011-04-19 12:26:50 +02:00
|
|
|
status = WSAEOPNOTSUPP;
|
|
|
|
break;
|
2010-05-08 21:10:58 +02:00
|
|
|
}
|
2008-12-08 14:27:24 +01:00
|
|
|
case WS_SIO_KEEPALIVE_VALS:
|
|
|
|
{
|
2011-09-06 04:04:23 +02:00
|
|
|
struct tcp_keepalive *k;
|
|
|
|
int keepalive, keepidle, keepintvl;
|
2008-12-08 14:27:24 +01:00
|
|
|
|
2011-09-06 04:04:23 +02:00
|
|
|
if (!in_buff || in_size < sizeof(struct tcp_keepalive))
|
2008-12-08 14:27:24 +01:00
|
|
|
{
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError(WSAEFAULT);
|
2008-12-08 14:27:24 +01:00
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
2011-09-06 04:04:23 +02:00
|
|
|
k = in_buff;
|
|
|
|
keepalive = k->onoff ? 1 : 0;
|
2011-09-08 02:20:37 +02:00
|
|
|
keepidle = max( 1, (k->keepalivetime + 500) / 1000 );
|
|
|
|
keepintvl = max( 1, (k->keepaliveinterval + 500) / 1000 );
|
2011-09-06 04:04:23 +02:00
|
|
|
|
2008-12-08 14:27:24 +01:00
|
|
|
TRACE("onoff: %d, keepalivetime: %d, keepaliveinterval: %d\n", keepalive, keepidle, keepintvl);
|
|
|
|
|
|
|
|
fd = get_sock_fd(s, 0, NULL);
|
|
|
|
if (setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, (void *)&keepalive, sizeof(int)) == -1)
|
2011-04-19 12:26:50 +02:00
|
|
|
status = WSAEINVAL;
|
2015-08-03 01:54:42 +02:00
|
|
|
#if defined(TCP_KEEPIDLE) || defined(TCP_KEEPINTVL)
|
2011-09-08 02:20:37 +02:00
|
|
|
/* these values need to be set only if SO_KEEPALIVE is enabled */
|
|
|
|
else if(keepalive)
|
|
|
|
{
|
2015-08-03 01:54:42 +02:00
|
|
|
#ifndef TCP_KEEPIDLE
|
|
|
|
FIXME("ignoring keepalive timeout\n");
|
|
|
|
#else
|
2011-09-09 00:17:51 +02:00
|
|
|
if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE, (void *)&keepidle, sizeof(int)) == -1)
|
2011-09-08 02:20:37 +02:00
|
|
|
status = WSAEINVAL;
|
2015-08-03 01:54:42 +02:00
|
|
|
else
|
|
|
|
#endif
|
|
|
|
#ifdef TCP_KEEPINTVL
|
|
|
|
if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPINTVL, (void *)&keepintvl, sizeof(int)) == -1)
|
2011-09-08 02:20:37 +02:00
|
|
|
status = WSAEINVAL;
|
2015-08-03 01:54:42 +02:00
|
|
|
#else
|
|
|
|
FIXME("ignoring keepalive interval\n");
|
|
|
|
#endif
|
2011-09-08 02:20:37 +02:00
|
|
|
}
|
2008-12-08 14:27:24 +01:00
|
|
|
#else
|
2011-04-19 12:26:50 +02:00
|
|
|
else
|
|
|
|
FIXME("ignoring keepalive interval and timeout\n");
|
2008-12-08 14:27:24 +01:00
|
|
|
#endif
|
|
|
|
release_sock_fd(s, fd);
|
|
|
|
break;
|
|
|
|
}
|
2010-09-28 22:18:12 +02:00
|
|
|
case WS_SIO_ROUTING_INTERFACE_QUERY:
|
|
|
|
{
|
2011-04-19 11:34:42 +02:00
|
|
|
struct WS_sockaddr *daddr = (struct WS_sockaddr *)in_buff;
|
2010-09-28 22:18:12 +02:00
|
|
|
struct WS_sockaddr_in *daddr_in = (struct WS_sockaddr_in *)daddr;
|
2011-04-19 11:34:42 +02:00
|
|
|
struct WS_sockaddr_in *saddr_in = out_buff;
|
2010-09-28 22:18:12 +02:00
|
|
|
MIB_IPFORWARDROW row;
|
|
|
|
PMIB_IPADDRTABLE ipAddrTable = NULL;
|
|
|
|
DWORD size, i, found_index;
|
|
|
|
|
|
|
|
TRACE("-> WS_SIO_ROUTING_INTERFACE_QUERY request\n");
|
|
|
|
|
2011-04-19 12:26:50 +02:00
|
|
|
if (!in_buff || in_size < sizeof(struct WS_sockaddr) ||
|
|
|
|
!out_buff || out_size < sizeof(struct WS_sockaddr_in) || !ret_size)
|
2010-09-28 22:18:12 +02:00
|
|
|
{
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError(WSAEFAULT);
|
2010-09-28 22:18:12 +02:00
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
if (daddr->sa_family != AF_INET)
|
|
|
|
{
|
|
|
|
FIXME("unsupported address family %d\n", daddr->sa_family);
|
2011-04-19 12:26:50 +02:00
|
|
|
status = WSAEAFNOSUPPORT;
|
|
|
|
break;
|
2010-09-28 22:18:12 +02:00
|
|
|
}
|
2011-04-19 12:26:50 +02:00
|
|
|
if (GetBestRoute(daddr_in->sin_addr.S_un.S_addr, 0, &row) != NOERROR ||
|
|
|
|
GetIpAddrTable(NULL, &size, FALSE) != ERROR_INSUFFICIENT_BUFFER)
|
2010-09-28 22:18:12 +02:00
|
|
|
{
|
2011-04-19 12:26:50 +02:00
|
|
|
status = WSAEFAULT;
|
|
|
|
break;
|
2010-09-28 22:18:12 +02:00
|
|
|
}
|
|
|
|
ipAddrTable = HeapAlloc(GetProcessHeap(), 0, size);
|
|
|
|
if (GetIpAddrTable(ipAddrTable, &size, FALSE))
|
|
|
|
{
|
|
|
|
HeapFree(GetProcessHeap(), 0, ipAddrTable);
|
2011-04-19 12:26:50 +02:00
|
|
|
status = WSAEFAULT;
|
|
|
|
break;
|
2010-09-28 22:18:12 +02:00
|
|
|
}
|
|
|
|
for (i = 0, found_index = ipAddrTable->dwNumEntries;
|
|
|
|
i < ipAddrTable->dwNumEntries; i++)
|
|
|
|
{
|
|
|
|
if (ipAddrTable->table[i].dwIndex == row.dwForwardIfIndex)
|
|
|
|
found_index = i;
|
|
|
|
}
|
|
|
|
if (found_index == ipAddrTable->dwNumEntries)
|
|
|
|
{
|
|
|
|
ERR("no matching IP address for interface %d\n",
|
|
|
|
row.dwForwardIfIndex);
|
|
|
|
HeapFree(GetProcessHeap(), 0, ipAddrTable);
|
2011-04-19 12:26:50 +02:00
|
|
|
status = WSAEFAULT;
|
|
|
|
break;
|
2010-09-28 22:18:12 +02:00
|
|
|
}
|
|
|
|
saddr_in->sin_family = AF_INET;
|
|
|
|
saddr_in->sin_addr.S_un.S_addr = ipAddrTable->table[found_index].dwAddr;
|
|
|
|
saddr_in->sin_port = 0;
|
2011-04-19 12:26:50 +02:00
|
|
|
total = sizeof(struct WS_sockaddr_in);
|
2010-09-28 22:18:12 +02:00
|
|
|
HeapFree(GetProcessHeap(), 0, ipAddrTable);
|
2011-04-19 12:26:50 +02:00
|
|
|
break;
|
2010-09-28 22:18:12 +02:00
|
|
|
}
|
2011-03-12 22:27:32 +01:00
|
|
|
case WS_SIO_SET_COMPATIBILITY_MODE:
|
|
|
|
TRACE("WS_SIO_SET_COMPATIBILITY_MODE ignored\n");
|
2011-04-19 12:26:50 +02:00
|
|
|
status = WSAEOPNOTSUPP;
|
|
|
|
break;
|
2010-05-11 15:53:02 +02:00
|
|
|
case WS_SIO_UDP_CONNRESET:
|
|
|
|
FIXME("WS_SIO_UDP_CONNRESET stub\n");
|
|
|
|
break;
|
2011-04-19 11:57:37 +02:00
|
|
|
case 0x667e: /* Netscape tries hard to use bogus ioctl 0x667e */
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError(WSAEOPNOTSUPP);
|
2011-04-19 11:57:37 +02:00
|
|
|
return SOCKET_ERROR;
|
|
|
|
default:
|
2011-04-19 12:26:50 +02:00
|
|
|
status = WSAEOPNOTSUPP;
|
|
|
|
break;
|
2011-04-19 11:57:37 +02:00
|
|
|
}
|
2003-12-02 05:19:56 +01:00
|
|
|
|
2014-03-18 19:45:17 +01:00
|
|
|
if (status == WSAEOPNOTSUPP)
|
|
|
|
{
|
|
|
|
status = server_ioctl_sock(s, code, in_buff, in_size, out_buff, out_size, &total,
|
|
|
|
overlapped, completion);
|
|
|
|
if (status != WSAEOPNOTSUPP)
|
|
|
|
{
|
|
|
|
if (status == 0 || status == WSA_IO_PENDING)
|
|
|
|
TRACE("-> %s request\n", debugstr_wsaioctl(code));
|
|
|
|
else
|
|
|
|
ERR("-> %s request failed with status 0x%x\n", debugstr_wsaioctl(code), status);
|
|
|
|
|
|
|
|
/* overlapped and completion operations will be handled by the server */
|
|
|
|
completion = NULL;
|
|
|
|
overlapped = NULL;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
FIXME("unsupported WS_IOCTL cmd (%s)\n", debugstr_wsaioctl(code));
|
|
|
|
}
|
|
|
|
|
2011-04-19 12:26:50 +02:00
|
|
|
if (completion)
|
|
|
|
{
|
|
|
|
FIXME( "completion routine %p not supported\n", completion );
|
|
|
|
}
|
|
|
|
else if (overlapped)
|
|
|
|
{
|
|
|
|
ULONG_PTR cvalue = (overlapped && ((ULONG_PTR)overlapped->hEvent & 1) == 0) ? (ULONG_PTR)overlapped : 0;
|
|
|
|
overlapped->Internal = status;
|
|
|
|
overlapped->InternalHigh = total;
|
|
|
|
if (overlapped->hEvent) NtSetEvent( overlapped->hEvent, NULL );
|
|
|
|
if (cvalue) WS_AddCompletion( HANDLE2SOCKET(s), cvalue, status, total );
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!status)
|
|
|
|
{
|
|
|
|
if (ret_size) *ret_size = total;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
SetLastError( status );
|
|
|
|
return SOCKET_ERROR;
|
2000-07-23 21:28:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
1997-08-24 18:00:30 +02:00
|
|
|
/***********************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* ioctlsocket (WS2_32.10)
|
1997-08-24 18:00:30 +02:00
|
|
|
*/
|
2007-06-01 12:10:32 +02:00
|
|
|
int WINAPI WS_ioctlsocket(SOCKET s, LONG cmd, WS_u_long *argp)
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
{
|
2011-04-19 11:57:37 +02:00
|
|
|
DWORD ret_size;
|
|
|
|
return WSAIoctl( s, cmd, argp, sizeof(WS_u_long), argp, sizeof(WS_u_long), &ret_size, NULL, NULL );
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
}
|
|
|
|
|
1997-08-24 18:00:30 +02:00
|
|
|
/***********************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* listen (WS2_32.13)
|
1997-08-24 18:00:30 +02:00
|
|
|
*/
|
2001-11-14 22:26:23 +01:00
|
|
|
int WINAPI WS_listen(SOCKET s, int backlog)
|
1997-08-24 18:00:30 +02:00
|
|
|
{
|
2013-07-23 03:31:41 +02:00
|
|
|
int fd = get_sock_fd( s, FILE_READ_DATA, NULL ), ret = SOCKET_ERROR;
|
1997-08-24 18:00:30 +02:00
|
|
|
|
2007-05-24 16:41:17 +02:00
|
|
|
TRACE("socket %04lx, backlog %d\n", s, backlog);
|
2001-02-20 02:57:13 +01:00
|
|
|
if (fd != -1)
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
{
|
2015-03-29 05:53:36 +02:00
|
|
|
int bound = is_fd_bound(fd, NULL, NULL);
|
2013-07-23 03:31:41 +02:00
|
|
|
|
2015-03-29 05:53:36 +02:00
|
|
|
if (bound <= 0)
|
2013-07-23 03:31:41 +02:00
|
|
|
{
|
2015-03-29 05:53:36 +02:00
|
|
|
SetLastError(bound == -1 ? wsaErrno() : WSAEINVAL);
|
2013-07-23 03:31:41 +02:00
|
|
|
}
|
|
|
|
else if (listen(fd, backlog) == 0)
|
|
|
|
{
|
|
|
|
_enable_event(SOCKET2HANDLE(s), FD_ACCEPT,
|
|
|
|
FD_WINE_LISTENING,
|
|
|
|
FD_CONNECT|FD_WINE_CONNECTED);
|
|
|
|
ret = 0;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
SetLastError(wsaErrno());
|
2003-12-02 05:19:56 +01:00
|
|
|
release_sock_fd( s, fd );
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
}
|
2013-07-23 03:31:41 +02:00
|
|
|
else
|
|
|
|
SetLastError(WSAENOTSOCK);
|
|
|
|
return ret;
|
1997-08-24 18:00:30 +02:00
|
|
|
}
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
|
1997-08-24 18:00:30 +02:00
|
|
|
/***********************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* recv (WS2_32.16)
|
1997-08-24 18:00:30 +02:00
|
|
|
*/
|
2001-11-14 22:26:23 +01:00
|
|
|
int WINAPI WS_recv(SOCKET s, char *buf, int len, int flags)
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
{
|
2002-04-05 23:22:55 +02:00
|
|
|
DWORD n, dwFlags = flags;
|
2002-07-03 23:06:58 +02:00
|
|
|
WSABUF wsabuf;
|
|
|
|
|
|
|
|
wsabuf.len = len;
|
|
|
|
wsabuf.buf = buf;
|
1997-08-24 18:00:30 +02:00
|
|
|
|
2010-12-06 01:08:54 +01:00
|
|
|
if ( WS2_recv_base(s, &wsabuf, 1, &n, &dwFlags, NULL, NULL, NULL, NULL, NULL) == SOCKET_ERROR )
|
2002-04-05 23:22:55 +02:00
|
|
|
return SOCKET_ERROR;
|
|
|
|
else
|
|
|
|
return n;
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
}
|
|
|
|
|
1997-08-24 18:00:30 +02:00
|
|
|
/***********************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* recvfrom (WS2_32.17)
|
1997-08-24 18:00:30 +02:00
|
|
|
*/
|
2001-11-14 22:26:23 +01:00
|
|
|
int WINAPI WS_recvfrom(SOCKET s, char *buf, INT len, int flags,
|
2005-01-14 20:54:38 +01:00
|
|
|
struct WS_sockaddr *from, int *fromlen)
|
1997-08-24 18:00:30 +02:00
|
|
|
{
|
2002-04-05 23:22:55 +02:00
|
|
|
DWORD n, dwFlags = flags;
|
2002-07-03 23:06:58 +02:00
|
|
|
WSABUF wsabuf;
|
|
|
|
|
|
|
|
wsabuf.len = len;
|
|
|
|
wsabuf.buf = buf;
|
1997-08-24 18:00:30 +02:00
|
|
|
|
2010-12-06 01:08:54 +01:00
|
|
|
if ( WS2_recv_base(s, &wsabuf, 1, &n, &dwFlags, from, fromlen, NULL, NULL, NULL) == SOCKET_ERROR )
|
2002-04-05 23:22:55 +02:00
|
|
|
return SOCKET_ERROR;
|
2001-10-08 22:36:03 +02:00
|
|
|
else
|
2002-04-05 23:22:55 +02:00
|
|
|
return n;
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
}
|
|
|
|
|
2006-11-06 12:28:53 +01:00
|
|
|
/* allocate a poll array for the corresponding fd sets */
|
|
|
|
static struct pollfd *fd_sets_to_poll( const WS_fd_set *readfds, const WS_fd_set *writefds,
|
|
|
|
const WS_fd_set *exceptfds, int *count_ptr )
|
|
|
|
{
|
2008-12-10 22:55:35 +01:00
|
|
|
unsigned int i, j = 0, count = 0;
|
2006-11-06 12:28:53 +01:00
|
|
|
struct pollfd *fds;
|
|
|
|
|
|
|
|
if (readfds) count += readfds->fd_count;
|
|
|
|
if (writefds) count += writefds->fd_count;
|
|
|
|
if (exceptfds) count += exceptfds->fd_count;
|
|
|
|
*count_ptr = count;
|
2010-10-18 12:42:16 +02:00
|
|
|
if (!count)
|
|
|
|
{
|
|
|
|
SetLastError(WSAEINVAL);
|
|
|
|
return NULL;
|
|
|
|
}
|
2010-09-20 14:56:55 +02:00
|
|
|
if (!(fds = HeapAlloc( GetProcessHeap(), 0, count * sizeof(fds[0]))))
|
|
|
|
{
|
|
|
|
SetLastError( ERROR_NOT_ENOUGH_MEMORY );
|
|
|
|
return NULL;
|
|
|
|
}
|
2006-11-06 12:28:53 +01:00
|
|
|
if (readfds)
|
|
|
|
for (i = 0; i < readfds->fd_count; i++, j++)
|
|
|
|
{
|
|
|
|
fds[j].fd = get_sock_fd( readfds->fd_array[i], FILE_READ_DATA, NULL );
|
2010-09-20 14:56:55 +02:00
|
|
|
if (fds[j].fd == -1) goto failed;
|
2006-11-06 12:28:53 +01:00
|
|
|
fds[j].revents = 0;
|
2015-03-29 05:53:48 +02:00
|
|
|
if (is_fd_bound(fds[j].fd, NULL, NULL) == 1)
|
|
|
|
{
|
|
|
|
fds[j].events = POLLIN;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
release_sock_fd( readfds->fd_array[i], fds[j].fd );
|
|
|
|
fds[j].fd = -1;
|
|
|
|
fds[j].events = 0;
|
|
|
|
}
|
2006-11-06 12:28:53 +01:00
|
|
|
}
|
|
|
|
if (writefds)
|
|
|
|
for (i = 0; i < writefds->fd_count; i++, j++)
|
|
|
|
{
|
|
|
|
fds[j].fd = get_sock_fd( writefds->fd_array[i], FILE_WRITE_DATA, NULL );
|
2010-09-20 14:56:55 +02:00
|
|
|
if (fds[j].fd == -1) goto failed;
|
2006-11-06 12:28:53 +01:00
|
|
|
fds[j].revents = 0;
|
2015-06-18 16:03:10 +02:00
|
|
|
if (is_fd_bound(fds[j].fd, NULL, NULL) == 1 ||
|
|
|
|
_get_fd_type(fds[j].fd) == SOCK_DGRAM)
|
2015-03-29 05:53:48 +02:00
|
|
|
{
|
|
|
|
fds[j].events = POLLOUT;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-04-05 16:48:57 +02:00
|
|
|
release_sock_fd( writefds->fd_array[i], fds[j].fd );
|
2015-03-29 05:53:48 +02:00
|
|
|
fds[j].fd = -1;
|
|
|
|
fds[j].events = 0;
|
|
|
|
}
|
2006-11-06 12:28:53 +01:00
|
|
|
}
|
|
|
|
if (exceptfds)
|
|
|
|
for (i = 0; i < exceptfds->fd_count; i++, j++)
|
|
|
|
{
|
|
|
|
fds[j].fd = get_sock_fd( exceptfds->fd_array[i], 0, NULL );
|
2010-09-20 14:56:55 +02:00
|
|
|
if (fds[j].fd == -1) goto failed;
|
2006-11-06 12:28:53 +01:00
|
|
|
fds[j].revents = 0;
|
2015-03-29 05:53:48 +02:00
|
|
|
if (is_fd_bound(fds[j].fd, NULL, NULL) == 1)
|
|
|
|
{
|
2015-03-29 05:53:58 +02:00
|
|
|
int oob_inlined = 0;
|
|
|
|
socklen_t olen = sizeof(oob_inlined);
|
|
|
|
|
2015-03-29 05:53:48 +02:00
|
|
|
fds[j].events = POLLHUP;
|
2015-03-29 05:53:58 +02:00
|
|
|
|
|
|
|
/* Check if we need to test for urgent data or not */
|
|
|
|
getsockopt(fds[j].fd, SOL_SOCKET, SO_OOBINLINE, (char*) &oob_inlined, &olen);
|
|
|
|
if (!oob_inlined)
|
|
|
|
fds[j].events |= POLLPRI;
|
2015-03-29 05:53:48 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-04-05 16:48:57 +02:00
|
|
|
release_sock_fd( exceptfds->fd_array[i], fds[j].fd );
|
2015-03-29 05:53:48 +02:00
|
|
|
fds[j].fd = -1;
|
|
|
|
fds[j].events = 0;
|
|
|
|
}
|
2006-11-06 12:28:53 +01:00
|
|
|
}
|
|
|
|
return fds;
|
2010-09-20 14:56:55 +02:00
|
|
|
|
|
|
|
failed:
|
|
|
|
count = j;
|
|
|
|
j = 0;
|
|
|
|
if (readfds)
|
|
|
|
for (i = 0; i < readfds->fd_count && j < count; i++, j++)
|
2015-03-29 05:53:48 +02:00
|
|
|
if (fds[j].fd != -1) release_sock_fd( readfds->fd_array[i], fds[j].fd );
|
2010-09-20 14:56:55 +02:00
|
|
|
if (writefds)
|
|
|
|
for (i = 0; i < writefds->fd_count && j < count; i++, j++)
|
2015-03-29 05:53:48 +02:00
|
|
|
if (fds[j].fd != -1) release_sock_fd( writefds->fd_array[i], fds[j].fd );
|
2010-09-20 14:56:55 +02:00
|
|
|
if (exceptfds)
|
|
|
|
for (i = 0; i < exceptfds->fd_count && j < count; i++, j++)
|
2015-03-29 05:53:48 +02:00
|
|
|
if (fds[j].fd != -1) release_sock_fd( exceptfds->fd_array[i], fds[j].fd );
|
2010-09-20 14:56:55 +02:00
|
|
|
HeapFree( GetProcessHeap(), 0, fds );
|
|
|
|
return NULL;
|
2006-11-06 12:28:53 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/* release the file descriptor obtained in fd_sets_to_poll */
|
|
|
|
/* must be called with the original fd_set arrays, before calling get_poll_results */
|
|
|
|
static void release_poll_fds( const WS_fd_set *readfds, const WS_fd_set *writefds,
|
|
|
|
const WS_fd_set *exceptfds, struct pollfd *fds )
|
|
|
|
{
|
2008-12-10 22:55:35 +01:00
|
|
|
unsigned int i, j = 0;
|
2006-11-06 12:28:53 +01:00
|
|
|
|
|
|
|
if (readfds)
|
|
|
|
{
|
|
|
|
for (i = 0; i < readfds->fd_count; i++, j++)
|
|
|
|
if (fds[j].fd != -1) release_sock_fd( readfds->fd_array[i], fds[j].fd );
|
|
|
|
}
|
|
|
|
if (writefds)
|
|
|
|
{
|
|
|
|
for (i = 0; i < writefds->fd_count; i++, j++)
|
|
|
|
if (fds[j].fd != -1) release_sock_fd( writefds->fd_array[i], fds[j].fd );
|
|
|
|
}
|
|
|
|
if (exceptfds)
|
|
|
|
{
|
|
|
|
for (i = 0; i < exceptfds->fd_count; i++, j++)
|
2015-04-30 05:43:26 +02:00
|
|
|
{
|
|
|
|
if (fds[j].fd == -1) continue;
|
|
|
|
release_sock_fd( exceptfds->fd_array[i], fds[j].fd );
|
|
|
|
if (fds[j].revents & POLLHUP)
|
|
|
|
{
|
|
|
|
int fd = get_sock_fd( exceptfds->fd_array[i], 0, NULL );
|
|
|
|
if (fd != -1)
|
|
|
|
release_sock_fd( exceptfds->fd_array[i], fd );
|
|
|
|
else
|
|
|
|
fds[j].revents = 0;
|
|
|
|
}
|
|
|
|
}
|
2006-11-06 12:28:53 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-05-22 04:55:03 +02:00
|
|
|
static int do_poll(struct pollfd *pollfds, int count, int timeout)
|
|
|
|
{
|
|
|
|
struct timeval tv1, tv2;
|
|
|
|
int ret, torig = timeout;
|
|
|
|
|
|
|
|
if (timeout > 0) gettimeofday( &tv1, 0 );
|
|
|
|
|
|
|
|
while ((ret = poll( pollfds, count, timeout )) < 0)
|
|
|
|
{
|
|
|
|
if (errno != EINTR) break;
|
|
|
|
if (timeout < 0) continue;
|
2015-06-07 19:19:39 +02:00
|
|
|
if (timeout == 0) return 0;
|
2015-05-22 04:55:03 +02:00
|
|
|
|
|
|
|
gettimeofday( &tv2, 0 );
|
|
|
|
|
|
|
|
tv2.tv_sec -= tv1.tv_sec;
|
|
|
|
tv2.tv_usec -= tv1.tv_usec;
|
|
|
|
if (tv2.tv_usec < 0)
|
|
|
|
{
|
|
|
|
tv2.tv_usec += 1000000;
|
|
|
|
tv2.tv_sec -= 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
timeout = torig - (tv2.tv_sec * 1000) - (tv2.tv_usec + 999) / 1000;
|
|
|
|
if (timeout <= 0) return 0;
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2006-11-06 12:28:53 +01:00
|
|
|
/* map the poll results back into the Windows fd sets */
|
|
|
|
static int get_poll_results( WS_fd_set *readfds, WS_fd_set *writefds, WS_fd_set *exceptfds,
|
|
|
|
const struct pollfd *fds )
|
|
|
|
{
|
2014-11-29 11:18:18 +01:00
|
|
|
const struct pollfd *poll_writefds = fds + (readfds ? readfds->fd_count : 0);
|
|
|
|
const struct pollfd *poll_exceptfds = poll_writefds + (writefds ? writefds->fd_count : 0);
|
|
|
|
unsigned int i, k, total = 0;
|
2006-11-06 12:28:53 +01:00
|
|
|
|
|
|
|
if (readfds)
|
|
|
|
{
|
2014-11-29 11:18:18 +01:00
|
|
|
for (i = k = 0; i < readfds->fd_count; i++)
|
2014-11-27 18:51:38 +01:00
|
|
|
{
|
2014-11-29 11:18:18 +01:00
|
|
|
if (fds[i].revents ||
|
|
|
|
(readfds == writefds && (poll_writefds[i].revents & POLLOUT) && !(poll_writefds[i].revents & POLLHUP)) ||
|
|
|
|
(readfds == exceptfds && poll_exceptfds[i].revents))
|
2014-11-27 18:51:38 +01:00
|
|
|
readfds->fd_array[k++] = readfds->fd_array[i];
|
|
|
|
}
|
2006-11-06 12:28:53 +01:00
|
|
|
readfds->fd_count = k;
|
|
|
|
total += k;
|
|
|
|
}
|
2014-11-29 11:18:18 +01:00
|
|
|
if (writefds && writefds != readfds)
|
2006-11-06 12:28:53 +01:00
|
|
|
{
|
2014-11-29 11:18:18 +01:00
|
|
|
for (i = k = 0; i < writefds->fd_count; i++)
|
|
|
|
{
|
|
|
|
if (((poll_writefds[i].revents & POLLOUT) && !(poll_writefds[i].revents & POLLHUP)) ||
|
|
|
|
(writefds == exceptfds && poll_exceptfds[i].revents))
|
2011-08-05 06:04:06 +02:00
|
|
|
writefds->fd_array[k++] = writefds->fd_array[i];
|
2014-11-29 11:18:18 +01:00
|
|
|
}
|
2006-11-06 12:28:53 +01:00
|
|
|
writefds->fd_count = k;
|
|
|
|
total += k;
|
|
|
|
}
|
2014-11-29 11:18:18 +01:00
|
|
|
if (exceptfds && exceptfds != readfds && exceptfds != writefds)
|
2006-11-06 12:28:53 +01:00
|
|
|
{
|
2014-11-27 18:51:38 +01:00
|
|
|
for (i = k = 0; i < exceptfds->fd_count; i++)
|
2014-11-29 11:18:18 +01:00
|
|
|
if (poll_exceptfds[i].revents) exceptfds->fd_array[k++] = exceptfds->fd_array[i];
|
2006-11-06 12:28:53 +01:00
|
|
|
exceptfds->fd_count = k;
|
|
|
|
total += k;
|
|
|
|
}
|
|
|
|
return total;
|
|
|
|
}
|
|
|
|
|
1997-08-24 18:00:30 +02:00
|
|
|
/***********************************************************************
|
2003-11-29 00:14:02 +01:00
|
|
|
* select (WS2_32.18)
|
1997-08-24 18:00:30 +02:00
|
|
|
*/
|
2003-11-29 00:14:02 +01:00
|
|
|
int WINAPI WS_select(int nfds, WS_fd_set *ws_readfds,
|
|
|
|
WS_fd_set *ws_writefds, WS_fd_set *ws_exceptfds,
|
|
|
|
const struct WS_timeval* ws_timeout)
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
{
|
2006-11-06 12:28:53 +01:00
|
|
|
struct pollfd *pollfds;
|
|
|
|
int count, ret, timeout = -1;
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
|
2001-11-14 22:26:23 +01:00
|
|
|
TRACE("read %p, write %p, excp %p timeout %p\n",
|
|
|
|
ws_readfds, ws_writefds, ws_exceptfds, ws_timeout);
|
1997-08-24 18:00:30 +02:00
|
|
|
|
2010-10-18 12:42:16 +02:00
|
|
|
if (!(pollfds = fd_sets_to_poll( ws_readfds, ws_writefds, ws_exceptfds, &count )))
|
2007-03-08 15:30:53 +01:00
|
|
|
return SOCKET_ERROR;
|
1997-08-24 18:00:30 +02:00
|
|
|
|
2009-10-20 18:35:00 +02:00
|
|
|
if (ws_timeout)
|
2015-05-22 04:55:03 +02:00
|
|
|
timeout = (ws_timeout->tv_sec * 1000) + (ws_timeout->tv_usec + 999) / 1000;
|
1997-08-24 18:00:30 +02:00
|
|
|
|
2015-05-22 04:55:03 +02:00
|
|
|
ret = do_poll(pollfds, count, timeout);
|
2006-11-06 12:28:53 +01:00
|
|
|
release_poll_fds( ws_readfds, ws_writefds, ws_exceptfds, pollfds );
|
1997-09-28 19:43:24 +02:00
|
|
|
|
2006-11-06 12:28:53 +01:00
|
|
|
if (ret == -1) SetLastError(wsaErrno());
|
|
|
|
else ret = get_poll_results( ws_readfds, ws_writefds, ws_exceptfds, pollfds );
|
|
|
|
HeapFree( GetProcessHeap(), 0, pollfds );
|
|
|
|
return ret;
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
}
|
|
|
|
|
2015-12-22 14:15:41 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* WSAPoll
|
|
|
|
*/
|
|
|
|
int WINAPI WSAPoll(WSAPOLLFD *wfds, ULONG count, int timeout)
|
|
|
|
{
|
|
|
|
int i, ret;
|
|
|
|
struct pollfd *ufds;
|
|
|
|
|
|
|
|
if (!count)
|
|
|
|
{
|
|
|
|
SetLastError(WSAEINVAL);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
if (!wfds)
|
|
|
|
{
|
|
|
|
SetLastError(WSAEFAULT);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!(ufds = HeapAlloc(GetProcessHeap(), 0, count * sizeof(ufds[0]))))
|
|
|
|
{
|
|
|
|
SetLastError(WSAENOBUFS);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
for (i = 0; i < count; i++)
|
|
|
|
{
|
|
|
|
ufds[i].fd = get_sock_fd(wfds[i].fd, 0, NULL);
|
|
|
|
ufds[i].events = convert_poll_w2u(wfds[i].events);
|
|
|
|
ufds[i].revents = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
ret = do_poll(ufds, count, timeout);
|
|
|
|
|
|
|
|
for (i = 0; i < count; i++)
|
|
|
|
{
|
|
|
|
if (ufds[i].fd != -1)
|
|
|
|
{
|
|
|
|
release_sock_fd(wfds[i].fd, ufds[i].fd);
|
|
|
|
wfds[i].revents = convert_poll_u2w(ufds[i].revents);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
wfds[i].revents = WS_POLLNVAL;
|
|
|
|
}
|
|
|
|
|
|
|
|
HeapFree(GetProcessHeap(), 0, ufds);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2007-11-09 23:11:58 +01:00
|
|
|
/* helper to send completion messages for client-only i/o operation case */
|
2008-12-15 13:30:25 +01:00
|
|
|
static void WS_AddCompletion( SOCKET sock, ULONG_PTR CompletionValue, NTSTATUS CompletionStatus,
|
|
|
|
ULONG Information )
|
2007-11-09 23:11:58 +01:00
|
|
|
{
|
|
|
|
SERVER_START_REQ( add_fd_completion )
|
|
|
|
{
|
2008-12-08 16:05:17 +01:00
|
|
|
req->handle = wine_server_obj_handle( SOCKET2HANDLE(sock) );
|
2007-11-09 23:11:58 +01:00
|
|
|
req->cvalue = CompletionValue;
|
|
|
|
req->status = CompletionStatus;
|
|
|
|
req->information = Information;
|
2010-07-21 06:42:48 +02:00
|
|
|
wine_server_call( req );
|
2007-11-09 23:11:58 +01:00
|
|
|
}
|
|
|
|
SERVER_END_REQ;
|
|
|
|
}
|
|
|
|
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
|
1997-08-24 18:00:30 +02:00
|
|
|
/***********************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* send (WS2_32.19)
|
1997-08-24 18:00:30 +02:00
|
|
|
*/
|
2001-11-14 22:26:23 +01:00
|
|
|
int WINAPI WS_send(SOCKET s, const char *buf, int len, int flags)
|
1997-08-24 18:00:30 +02:00
|
|
|
{
|
2002-04-05 23:22:55 +02:00
|
|
|
DWORD n;
|
2002-07-03 23:06:58 +02:00
|
|
|
WSABUF wsabuf;
|
|
|
|
|
|
|
|
wsabuf.len = len;
|
|
|
|
wsabuf.buf = (char*) buf;
|
1997-08-24 18:00:30 +02:00
|
|
|
|
2010-07-18 02:53:06 +02:00
|
|
|
if ( WS2_sendto( s, &wsabuf, 1, &n, flags, NULL, 0, NULL, NULL) == SOCKET_ERROR )
|
2002-04-05 23:22:55 +02:00
|
|
|
return SOCKET_ERROR;
|
|
|
|
else
|
|
|
|
return n;
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
}
|
|
|
|
|
2001-04-10 23:22:34 +02:00
|
|
|
/***********************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* WSASend (WS2_32.72)
|
2001-04-10 23:22:34 +02:00
|
|
|
*/
|
|
|
|
INT WINAPI WSASend( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount,
|
|
|
|
LPDWORD lpNumberOfBytesSent, DWORD dwFlags,
|
|
|
|
LPWSAOVERLAPPED lpOverlapped,
|
|
|
|
LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine )
|
|
|
|
{
|
2010-07-18 02:53:06 +02:00
|
|
|
return WS2_sendto( s, lpBuffers, dwBufferCount, lpNumberOfBytesSent, dwFlags,
|
2005-01-14 20:54:38 +01:00
|
|
|
NULL, 0, lpOverlapped, lpCompletionRoutine );
|
2002-04-05 23:22:55 +02:00
|
|
|
}
|
2001-04-10 23:22:34 +02:00
|
|
|
|
2002-10-29 22:27:20 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* WSASendDisconnect (WS2_32.73)
|
|
|
|
*/
|
|
|
|
INT WINAPI WSASendDisconnect( SOCKET s, LPWSABUF lpBuffers )
|
|
|
|
{
|
2005-01-14 20:54:38 +01:00
|
|
|
return WS_shutdown( s, SD_SEND );
|
2002-10-29 22:27:20 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-07-18 02:53:06 +02:00
|
|
|
static int WS2_sendto( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount,
|
|
|
|
LPDWORD lpNumberOfBytesSent, DWORD dwFlags,
|
|
|
|
const struct WS_sockaddr *to, int tolen,
|
|
|
|
LPWSAOVERLAPPED lpOverlapped,
|
|
|
|
LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine )
|
2002-04-05 23:22:55 +02:00
|
|
|
{
|
2007-04-10 22:32:46 +02:00
|
|
|
unsigned int i, options;
|
2015-03-29 05:53:30 +02:00
|
|
|
int n, fd, err, overlapped, flags;
|
2014-05-19 23:16:21 +02:00
|
|
|
struct ws2_async *wsa = NULL, localwsa;
|
2008-09-07 12:41:19 +02:00
|
|
|
int totalLength = 0;
|
2011-06-14 10:31:26 +02:00
|
|
|
DWORD bytes_sent;
|
2013-03-22 06:59:50 +01:00
|
|
|
BOOL is_blocking;
|
2001-04-10 23:22:34 +02:00
|
|
|
|
2007-05-24 16:41:17 +02:00
|
|
|
TRACE("socket %04lx, wsabuf %p, nbufs %d, flags %d, to %p, tolen %d, ovl %p, func %p\n",
|
2005-01-14 20:54:38 +01:00
|
|
|
s, lpBuffers, dwBufferCount, dwFlags,
|
|
|
|
to, tolen, lpOverlapped, lpCompletionRoutine);
|
2001-04-10 23:22:34 +02:00
|
|
|
|
2007-04-10 22:32:46 +02:00
|
|
|
fd = get_sock_fd( s, FILE_WRITE_DATA, &options );
|
|
|
|
TRACE( "fd=%d, options=%x\n", fd, options );
|
2003-12-02 05:19:56 +01:00
|
|
|
|
|
|
|
if ( fd == -1 ) return SOCKET_ERROR;
|
2001-04-10 23:22:34 +02:00
|
|
|
|
2011-06-14 10:31:26 +02:00
|
|
|
if (!lpOverlapped && !lpNumberOfBytesSent)
|
|
|
|
{
|
|
|
|
err = WSAEFAULT;
|
|
|
|
goto error;
|
|
|
|
}
|
2014-05-19 23:16:21 +02:00
|
|
|
|
|
|
|
overlapped = (lpOverlapped || lpCompletionRoutine) &&
|
|
|
|
!(options & (FILE_SYNCHRONOUS_IO_ALERT | FILE_SYNCHRONOUS_IO_NONALERT));
|
|
|
|
if (overlapped || dwBufferCount > 1)
|
2003-08-30 02:16:19 +02:00
|
|
|
{
|
2015-03-03 07:30:38 +01:00
|
|
|
if (!(wsa = (struct ws2_async *)alloc_async_io( offsetof(struct ws2_async, iovec[dwBufferCount]))))
|
2014-05-19 23:16:21 +02:00
|
|
|
{
|
|
|
|
err = WSAEFAULT;
|
|
|
|
goto error;
|
|
|
|
}
|
2001-04-10 23:22:34 +02:00
|
|
|
}
|
2014-05-19 23:16:21 +02:00
|
|
|
else
|
|
|
|
wsa = &localwsa;
|
2001-04-10 23:22:34 +02:00
|
|
|
|
2008-10-09 12:57:33 +02:00
|
|
|
wsa->hSocket = SOCKET2HANDLE(s);
|
|
|
|
wsa->addr = (struct WS_sockaddr *)to;
|
|
|
|
wsa->addrlen.val = tolen;
|
|
|
|
wsa->flags = dwFlags;
|
2010-12-06 01:08:54 +01:00
|
|
|
wsa->lpFlags = &wsa->flags;
|
|
|
|
wsa->control = NULL;
|
2008-10-09 12:57:33 +02:00
|
|
|
wsa->n_iovecs = dwBufferCount;
|
|
|
|
wsa->first_iovec = 0;
|
2002-04-05 23:22:55 +02:00
|
|
|
for ( i = 0; i < dwBufferCount; i++ )
|
|
|
|
{
|
2008-10-09 12:57:33 +02:00
|
|
|
wsa->iovec[i].iov_base = lpBuffers[i].buf;
|
|
|
|
wsa->iovec[i].iov_len = lpBuffers[i].len;
|
2008-09-07 12:41:19 +02:00
|
|
|
totalLength += lpBuffers[i].len;
|
2002-04-05 23:22:55 +02:00
|
|
|
}
|
|
|
|
|
2015-03-29 05:53:30 +02:00
|
|
|
flags = convert_flags(dwFlags);
|
|
|
|
n = WS2_send( fd, wsa, flags );
|
2007-06-04 17:44:24 +02:00
|
|
|
if (n == -1 && errno != EAGAIN)
|
2002-04-05 23:22:55 +02:00
|
|
|
{
|
2007-06-04 17:44:24 +02:00
|
|
|
err = wsaErrno();
|
|
|
|
goto error;
|
|
|
|
}
|
|
|
|
|
2014-05-19 23:16:21 +02:00
|
|
|
if (overlapped)
|
2007-06-04 17:44:24 +02:00
|
|
|
{
|
2008-10-09 12:57:33 +02:00
|
|
|
IO_STATUS_BLOCK *iosb = lpOverlapped ? (IO_STATUS_BLOCK *)lpOverlapped : &wsa->local_iosb;
|
2014-05-19 23:16:21 +02:00
|
|
|
ULONG_PTR cvalue = (lpOverlapped && ((ULONG_PTR)lpOverlapped->hEvent & 1) == 0) ? (ULONG_PTR)lpOverlapped : 0;
|
2002-04-05 23:22:55 +02:00
|
|
|
|
2007-06-04 17:44:24 +02:00
|
|
|
wsa->user_overlapped = lpOverlapped;
|
|
|
|
wsa->completion_func = lpCompletionRoutine;
|
2008-10-09 12:57:33 +02:00
|
|
|
release_sock_fd( s, fd );
|
2007-05-31 17:48:07 +02:00
|
|
|
|
2011-01-24 06:19:25 +01:00
|
|
|
if (n == -1 || n < totalLength)
|
2007-06-04 17:44:24 +02:00
|
|
|
{
|
2007-05-31 17:02:21 +02:00
|
|
|
iosb->u.Status = STATUS_PENDING;
|
2011-01-24 06:19:25 +01:00
|
|
|
iosb->Information = n == -1 ? 0 : n;
|
2002-04-25 23:34:24 +02:00
|
|
|
|
2007-05-31 17:02:21 +02:00
|
|
|
SERVER_START_REQ( register_async )
|
|
|
|
{
|
2008-12-26 12:17:20 +01:00
|
|
|
req->type = ASYNC_TYPE_WRITE;
|
|
|
|
req->async.handle = wine_server_obj_handle( wsa->hSocket );
|
2008-12-30 21:09:41 +01:00
|
|
|
req->async.callback = wine_server_client_ptr( WS2_async_send );
|
|
|
|
req->async.iosb = wine_server_client_ptr( iosb );
|
|
|
|
req->async.arg = wine_server_client_ptr( wsa );
|
2008-12-08 16:05:17 +01:00
|
|
|
req->async.event = wine_server_obj_handle( lpCompletionRoutine ? 0 : lpOverlapped->hEvent );
|
2007-11-09 23:11:58 +01:00
|
|
|
req->async.cvalue = cvalue;
|
2007-05-31 17:02:21 +02:00
|
|
|
err = wine_server_call( req );
|
|
|
|
}
|
|
|
|
SERVER_END_REQ;
|
2002-04-25 23:34:24 +02:00
|
|
|
|
2011-01-24 06:19:06 +01:00
|
|
|
/* Enable the event only after starting the async. The server will deliver it as soon as
|
|
|
|
the async is done. */
|
|
|
|
_enable_event(SOCKET2HANDLE(s), FD_WRITE, 0, 0);
|
|
|
|
|
2007-06-04 18:17:16 +02:00
|
|
|
if (err != STATUS_PENDING) HeapFree( GetProcessHeap(), 0, wsa );
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError(NtStatusToWSAError( err ));
|
2007-05-31 17:02:21 +02:00
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
2007-06-04 17:44:24 +02:00
|
|
|
|
|
|
|
iosb->u.Status = STATUS_SUCCESS;
|
|
|
|
iosb->Information = n;
|
2011-06-14 10:31:26 +02:00
|
|
|
if (lpNumberOfBytesSent) *lpNumberOfBytesSent = n;
|
2007-06-04 17:44:24 +02:00
|
|
|
if (!wsa->completion_func)
|
|
|
|
{
|
2007-11-09 23:11:58 +01:00
|
|
|
if (cvalue) WS_AddCompletion( s, cvalue, STATUS_SUCCESS, n );
|
2008-10-28 16:37:43 +01:00
|
|
|
if (lpOverlapped->hEvent) SetEvent( lpOverlapped->hEvent );
|
2007-06-04 17:44:24 +02:00
|
|
|
HeapFree( GetProcessHeap(), 0, wsa );
|
|
|
|
}
|
|
|
|
else NtQueueApcThread( GetCurrentThread(), (PNTAPCFUNC)ws2_async_apc,
|
|
|
|
(ULONG_PTR)wsa, (ULONG_PTR)iosb, 0 );
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError(ERROR_SUCCESS);
|
2007-06-04 17:44:24 +02:00
|
|
|
return 0;
|
2002-04-25 23:34:24 +02:00
|
|
|
}
|
2002-04-05 23:22:55 +02:00
|
|
|
|
2013-03-22 06:59:50 +01:00
|
|
|
if ((err = _is_blocking( s, &is_blocking )))
|
|
|
|
{
|
|
|
|
err = NtStatusToWSAError( err );
|
|
|
|
goto error;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( is_blocking )
|
2002-04-05 23:22:55 +02:00
|
|
|
{
|
2007-03-19 14:42:40 +01:00
|
|
|
/* On a blocking non-overlapped stream socket,
|
|
|
|
* sending blocks until the entire buffer is sent. */
|
2007-05-31 17:02:21 +02:00
|
|
|
DWORD timeout_start = GetTickCount();
|
|
|
|
|
2011-06-14 10:31:26 +02:00
|
|
|
bytes_sent = n == -1 ? 0 : n;
|
2007-05-31 17:02:21 +02:00
|
|
|
|
2011-01-24 06:19:12 +01:00
|
|
|
while (wsa->first_iovec < wsa->n_iovecs)
|
2007-03-19 14:42:40 +01:00
|
|
|
{
|
2007-05-31 17:02:21 +02:00
|
|
|
struct pollfd pfd;
|
2015-04-27 16:00:37 +02:00
|
|
|
int poll_timeout = -1;
|
2015-04-27 16:00:57 +02:00
|
|
|
INT64 timeout = get_rcvsnd_timeo(fd, FALSE);
|
2007-05-31 17:02:21 +02:00
|
|
|
|
2015-04-27 16:00:37 +02:00
|
|
|
if (timeout)
|
2007-05-31 17:02:21 +02:00
|
|
|
{
|
2007-12-24 11:24:09 +01:00
|
|
|
timeout -= GetTickCount() - timeout_start;
|
2015-04-27 16:00:37 +02:00
|
|
|
if (timeout < 0) poll_timeout = 0;
|
|
|
|
else poll_timeout = timeout <= INT_MAX ? timeout : INT_MAX;
|
2007-05-31 17:02:21 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
pfd.fd = fd;
|
|
|
|
pfd.events = POLLOUT;
|
|
|
|
|
2015-04-27 16:00:37 +02:00
|
|
|
if (!poll_timeout || !poll( &pfd, 1, poll_timeout ))
|
2007-05-31 17:02:21 +02:00
|
|
|
{
|
2007-03-19 14:42:40 +01:00
|
|
|
err = WSAETIMEDOUT;
|
2007-05-31 12:15:08 +02:00
|
|
|
goto error; /* msdn says a timeout in send is fatal */
|
2007-03-19 14:42:40 +01:00
|
|
|
}
|
|
|
|
|
2015-03-29 05:53:30 +02:00
|
|
|
n = WS2_send( fd, wsa, flags );
|
2014-05-17 22:42:11 +02:00
|
|
|
if (n == -1 && errno != EAGAIN)
|
2007-03-19 14:42:40 +01:00
|
|
|
{
|
|
|
|
err = wsaErrno();
|
2007-05-31 12:15:08 +02:00
|
|
|
goto error;
|
2007-03-19 14:42:40 +01:00
|
|
|
}
|
2011-01-24 06:19:12 +01:00
|
|
|
|
|
|
|
if (n >= 0)
|
2011-06-14 10:31:26 +02:00
|
|
|
bytes_sent += n;
|
2004-10-04 21:13:26 +02:00
|
|
|
}
|
2002-04-05 23:22:55 +02:00
|
|
|
}
|
2007-05-31 17:02:21 +02:00
|
|
|
else /* non-blocking */
|
2002-04-05 23:22:55 +02:00
|
|
|
{
|
2008-09-07 12:41:19 +02:00
|
|
|
if (n < totalLength)
|
|
|
|
_enable_event(SOCKET2HANDLE(s), FD_WRITE, 0, 0);
|
2007-05-31 17:02:21 +02:00
|
|
|
if (n == -1)
|
2007-03-19 14:42:40 +01:00
|
|
|
{
|
2007-05-31 17:02:21 +02:00
|
|
|
err = WSAEWOULDBLOCK;
|
2007-05-31 12:15:08 +02:00
|
|
|
goto error;
|
2007-03-19 14:42:40 +01:00
|
|
|
}
|
2011-06-14 10:31:26 +02:00
|
|
|
bytes_sent = n;
|
2002-04-05 23:22:55 +02:00
|
|
|
}
|
|
|
|
|
2011-06-14 10:31:26 +02:00
|
|
|
TRACE(" -> %i bytes\n", bytes_sent);
|
2002-04-05 23:22:55 +02:00
|
|
|
|
2011-06-14 10:31:26 +02:00
|
|
|
if (lpNumberOfBytesSent) *lpNumberOfBytesSent = bytes_sent;
|
2014-05-19 23:16:21 +02:00
|
|
|
if (wsa != &localwsa) HeapFree( GetProcessHeap(), 0, wsa );
|
2003-12-02 05:19:56 +01:00
|
|
|
release_sock_fd( s, fd );
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError(ERROR_SUCCESS);
|
2002-04-05 23:22:55 +02:00
|
|
|
return 0;
|
|
|
|
|
|
|
|
error:
|
2014-05-19 23:16:21 +02:00
|
|
|
if (wsa != &localwsa) HeapFree( GetProcessHeap(), 0, wsa );
|
2007-05-31 12:15:08 +02:00
|
|
|
release_sock_fd( s, fd );
|
2005-01-14 20:54:38 +01:00
|
|
|
WARN(" -> ERROR %d\n", err);
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError(err);
|
2002-04-05 23:22:55 +02:00
|
|
|
return SOCKET_ERROR;
|
2001-04-10 23:22:34 +02:00
|
|
|
}
|
|
|
|
|
2010-07-18 02:53:06 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* WSASendTo (WS2_32.74)
|
|
|
|
*/
|
|
|
|
INT WINAPI WSASendTo( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount,
|
|
|
|
LPDWORD lpNumberOfBytesSent, DWORD dwFlags,
|
|
|
|
const struct WS_sockaddr *to, int tolen,
|
|
|
|
LPWSAOVERLAPPED lpOverlapped,
|
|
|
|
LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine )
|
|
|
|
{
|
|
|
|
return WS2_sendto( s, lpBuffers, dwBufferCount,
|
|
|
|
lpNumberOfBytesSent, dwFlags,
|
|
|
|
to, tolen,
|
|
|
|
lpOverlapped, lpCompletionRoutine );
|
|
|
|
}
|
|
|
|
|
1997-08-24 18:00:30 +02:00
|
|
|
/***********************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* sendto (WS2_32.20)
|
1997-08-24 18:00:30 +02:00
|
|
|
*/
|
2001-11-14 22:26:23 +01:00
|
|
|
int WINAPI WS_sendto(SOCKET s, const char *buf, int len, int flags,
|
|
|
|
const struct WS_sockaddr *to, int tolen)
|
1997-08-24 18:00:30 +02:00
|
|
|
{
|
2002-04-05 23:22:55 +02:00
|
|
|
DWORD n;
|
2002-07-03 23:06:58 +02:00
|
|
|
WSABUF wsabuf;
|
|
|
|
|
|
|
|
wsabuf.len = len;
|
|
|
|
wsabuf.buf = (char*) buf;
|
2001-10-08 22:36:03 +02:00
|
|
|
|
2010-07-18 02:53:06 +02:00
|
|
|
if ( WS2_sendto(s, &wsabuf, 1, &n, flags, to, tolen, NULL, NULL) == SOCKET_ERROR )
|
2002-04-05 23:22:55 +02:00
|
|
|
return SOCKET_ERROR;
|
2001-10-08 22:36:03 +02:00
|
|
|
else
|
2002-04-05 23:22:55 +02:00
|
|
|
return n;
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
}
|
|
|
|
|
1997-08-24 18:00:30 +02:00
|
|
|
/***********************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* setsockopt (WS2_32.21)
|
1997-08-24 18:00:30 +02:00
|
|
|
*/
|
2002-06-01 01:06:46 +02:00
|
|
|
int WINAPI WS_setsockopt(SOCKET s, int level, int optname,
|
2010-08-15 18:42:17 +02:00
|
|
|
const char *optval, int optlen)
|
1997-08-24 18:00:30 +02:00
|
|
|
{
|
2001-12-14 23:48:38 +01:00
|
|
|
int fd;
|
2003-12-02 05:19:56 +01:00
|
|
|
int woptval;
|
|
|
|
struct linger linger;
|
|
|
|
struct timeval tval;
|
|
|
|
|
2015-04-02 05:17:39 +02:00
|
|
|
TRACE("(socket %04lx, %s, optval %s, optlen %d)\n", s,
|
|
|
|
debugstr_sockopt(level, optname), debugstr_optval(optval, optlen),
|
|
|
|
optlen);
|
2001-12-14 23:48:38 +01:00
|
|
|
|
2007-11-12 11:42:28 +01:00
|
|
|
/* some broken apps pass the value directly instead of a pointer to it */
|
2010-08-15 18:42:17 +02:00
|
|
|
if(optlen && IS_INTRESOURCE(optval))
|
2007-11-12 11:42:28 +01:00
|
|
|
{
|
|
|
|
SetLastError(WSAEFAULT);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
2006-12-05 11:35:18 +01:00
|
|
|
switch(level)
|
2001-12-14 23:48:38 +01:00
|
|
|
{
|
2006-12-05 11:35:18 +01:00
|
|
|
case WS_SOL_SOCKET:
|
|
|
|
switch(optname)
|
2001-12-14 23:48:38 +01:00
|
|
|
{
|
2006-12-05 11:35:18 +01:00
|
|
|
/* Some options need some conversion before they can be sent to
|
2014-06-29 13:12:33 +02:00
|
|
|
* setsockopt. The conversions are done here, then they will fall through
|
2006-12-05 11:35:18 +01:00
|
|
|
* to the general case. Special options that are not passed to
|
|
|
|
* setsockopt follow below that.*/
|
2004-09-07 22:47:03 +02:00
|
|
|
|
2006-12-05 11:35:18 +01:00
|
|
|
case WS_SO_DONTLINGER:
|
2011-06-20 23:00:03 +02:00
|
|
|
if (!optval)
|
|
|
|
{
|
|
|
|
SetLastError(WSAEFAULT);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
2012-10-03 02:17:43 +02:00
|
|
|
linger.l_onoff = *(const int*)optval == 0;
|
2006-12-05 11:35:18 +01:00
|
|
|
linger.l_linger = 0;
|
|
|
|
level = SOL_SOCKET;
|
|
|
|
optname = SO_LINGER;
|
|
|
|
optval = (char*)&linger;
|
|
|
|
optlen = sizeof(struct linger);
|
|
|
|
break;
|
2000-11-26 23:36:38 +01:00
|
|
|
|
2006-12-05 11:35:18 +01:00
|
|
|
case WS_SO_LINGER:
|
2011-06-20 23:00:03 +02:00
|
|
|
if (!optval)
|
|
|
|
{
|
|
|
|
SetLastError(WSAEFAULT);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
2004-10-06 20:52:51 +02:00
|
|
|
linger.l_onoff = ((LINGER*)optval)->l_onoff;
|
|
|
|
linger.l_linger = ((LINGER*)optval)->l_linger;
|
2006-12-05 11:35:18 +01:00
|
|
|
level = SOL_SOCKET;
|
|
|
|
optname = SO_LINGER;
|
2000-03-04 20:09:16 +01:00
|
|
|
optval = (char*)&linger;
|
|
|
|
optlen = sizeof(struct linger);
|
2006-12-05 11:35:18 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case WS_SO_RCVBUF:
|
|
|
|
if (*(const int*)optval < 2048)
|
|
|
|
{
|
|
|
|
WARN("SO_RCVBF for %d bytes is too small: ignored\n", *(const int*)optval );
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
/* Fall through */
|
|
|
|
|
|
|
|
/* The options listed here don't need any special handling. Thanks to
|
|
|
|
* the conversion happening above, options from there will fall through
|
|
|
|
* to this, too.*/
|
|
|
|
case WS_SO_ACCEPTCONN:
|
|
|
|
case WS_SO_BROADCAST:
|
|
|
|
case WS_SO_ERROR:
|
|
|
|
case WS_SO_KEEPALIVE:
|
|
|
|
case WS_SO_OOBINLINE:
|
2007-11-03 08:45:12 +01:00
|
|
|
/* BSD socket SO_REUSEADDR is not 100% compatible to winsock semantics.
|
|
|
|
* however, using it the BSD way fixes bug 8513 and seems to be what
|
|
|
|
* most programmers assume, anyway */
|
|
|
|
case WS_SO_REUSEADDR:
|
2006-12-05 11:35:18 +01:00
|
|
|
case WS_SO_SNDBUF:
|
|
|
|
case WS_SO_TYPE:
|
|
|
|
convert_sockopt(&level, &optname);
|
|
|
|
break;
|
|
|
|
|
|
|
|
/* SO_DEBUG is a privileged operation, ignore it. */
|
|
|
|
case WS_SO_DEBUG:
|
|
|
|
TRACE("Ignoring SO_DEBUG\n");
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
/* For some reason the game GrandPrixLegends does set SO_DONTROUTE on its
|
|
|
|
* socket. According to MSDN, this option is silently ignored.*/
|
|
|
|
case WS_SO_DONTROUTE:
|
|
|
|
TRACE("Ignoring SO_DONTROUTE\n");
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
/* Stops two sockets from being bound to the same port. Always happens
|
|
|
|
* on unix systems, so just drop it. */
|
|
|
|
case WS_SO_EXCLUSIVEADDRUSE:
|
|
|
|
TRACE("Ignoring SO_EXCLUSIVEADDRUSE, is always set.\n");
|
|
|
|
return 0;
|
|
|
|
|
2010-08-15 18:42:17 +02:00
|
|
|
/* After a ConnectEx call succeeds, the socket can't be used with half of the
|
|
|
|
* normal winsock functions on windows. We don't have that problem. */
|
|
|
|
case WS_SO_UPDATE_CONNECT_CONTEXT:
|
2010-08-24 10:02:21 +02:00
|
|
|
TRACE("Ignoring SO_UPDATE_CONNECT_CONTEXT, since our sockets are normal\n");
|
2010-08-15 18:42:17 +02:00
|
|
|
return 0;
|
|
|
|
|
2010-09-28 04:59:58 +02:00
|
|
|
/* After a AcceptEx call succeeds, the socket can't be used with half of the
|
|
|
|
* normal winsock functions on windows. We don't have that problem. */
|
|
|
|
case WS_SO_UPDATE_ACCEPT_CONTEXT:
|
|
|
|
TRACE("Ignoring SO_UPDATE_ACCEPT_CONTEXT, since our sockets are normal\n");
|
|
|
|
return 0;
|
|
|
|
|
2006-12-05 11:35:18 +01:00
|
|
|
/* SO_OPENTYPE does not require a valid socket handle. */
|
|
|
|
case WS_SO_OPENTYPE:
|
|
|
|
if (!optlen || optlen < sizeof(int) || !optval)
|
|
|
|
{
|
|
|
|
SetLastError(WSAEFAULT);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
get_per_thread_data()->opentype = *(const int *)optval;
|
2010-03-28 16:43:07 +02:00
|
|
|
TRACE("setting global SO_OPENTYPE = 0x%x\n", *((const int*)optval) );
|
2006-12-05 11:35:18 +01:00
|
|
|
return 0;
|
|
|
|
|
|
|
|
#ifdef SO_RCVTIMEO
|
|
|
|
case WS_SO_RCVTIMEO:
|
|
|
|
#endif
|
|
|
|
#ifdef SO_SNDTIMEO
|
|
|
|
case WS_SO_SNDTIMEO:
|
|
|
|
#endif
|
|
|
|
#if defined(SO_RCVTIMEO) || defined(SO_SNDTIMEO)
|
|
|
|
if (optval && optlen == sizeof(UINT32)) {
|
2008-01-03 18:04:28 +01:00
|
|
|
/* WinSock passes milliseconds instead of struct timeval */
|
2006-11-23 23:39:34 +01:00
|
|
|
tval.tv_usec = (*(const UINT32*)optval % 1000) * 1000;
|
|
|
|
tval.tv_sec = *(const UINT32*)optval / 1000;
|
2008-01-03 18:04:28 +01:00
|
|
|
/* min of 500 milliseconds */
|
2010-02-11 22:32:18 +01:00
|
|
|
if (tval.tv_sec == 0 && tval.tv_usec && tval.tv_usec < 500000)
|
2004-10-04 21:13:26 +02:00
|
|
|
tval.tv_usec = 500000;
|
2003-12-02 05:19:56 +01:00
|
|
|
optlen = sizeof(struct timeval);
|
|
|
|
optval = (char*)&tval;
|
|
|
|
} else if (optlen == sizeof(struct timeval)) {
|
|
|
|
WARN("SO_SND/RCVTIMEO for %d bytes: assuming unixism\n", optlen);
|
|
|
|
} else {
|
|
|
|
WARN("SO_SND/RCVTIMEO for %d bytes is weird: ignored\n", optlen);
|
|
|
|
return 0;
|
2000-10-24 23:25:21 +02:00
|
|
|
}
|
2006-12-05 11:35:18 +01:00
|
|
|
convert_sockopt(&level, &optname);
|
|
|
|
break;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
default:
|
|
|
|
TRACE("Unknown SOL_SOCKET optname: 0x%08x\n", optname);
|
|
|
|
SetLastError(WSAENOPROTOOPT);
|
|
|
|
return SOCKET_ERROR;
|
2003-12-02 05:19:56 +01:00
|
|
|
}
|
2006-12-05 11:35:18 +01:00
|
|
|
break; /* case WS_SOL_SOCKET */
|
|
|
|
|
2013-06-17 21:56:52 +02:00
|
|
|
#ifdef HAS_IPX
|
2013-12-27 16:48:40 +01:00
|
|
|
case WS_NSPROTO_IPX:
|
2006-12-05 11:35:18 +01:00
|
|
|
switch(optname)
|
2003-12-02 05:19:56 +01:00
|
|
|
{
|
2015-01-04 19:57:47 +01:00
|
|
|
case WS_IPX_PTYPE:
|
2013-12-31 01:24:56 +01:00
|
|
|
return set_ipx_packettype(s, *(int*)optval);
|
2006-12-05 11:35:18 +01:00
|
|
|
|
2015-01-04 19:57:47 +01:00
|
|
|
case WS_IPX_FILTERPTYPE:
|
2006-12-05 11:35:18 +01:00
|
|
|
/* Sets the receive filter packet type, at the moment we don't support it */
|
|
|
|
FIXME("IPX_FILTERPTYPE: %x\n", *optval);
|
|
|
|
/* Returning 0 is better for now than returning a SOCKET_ERROR */
|
2000-10-13 19:05:35 +02:00
|
|
|
return 0;
|
2006-12-05 11:35:18 +01:00
|
|
|
|
|
|
|
default:
|
|
|
|
FIXME("opt_name:%x\n", optname);
|
|
|
|
return SOCKET_ERROR;
|
2000-10-13 19:05:35 +02:00
|
|
|
}
|
2013-12-27 16:48:40 +01:00
|
|
|
break; /* case WS_NSPROTO_IPX */
|
2006-12-05 11:35:18 +01:00
|
|
|
#endif
|
2000-10-13 19:05:35 +02:00
|
|
|
|
2006-12-05 11:35:18 +01:00
|
|
|
/* Levels WS_IPPROTO_TCP and WS_IPPROTO_IP convert directly */
|
|
|
|
case WS_IPPROTO_TCP:
|
|
|
|
switch(optname)
|
|
|
|
{
|
|
|
|
case WS_TCP_NODELAY:
|
|
|
|
convert_sockopt(&level, &optname);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
FIXME("Unknown IPPROTO_TCP optname 0x%08x\n", optname);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case WS_IPPROTO_IP:
|
|
|
|
switch(optname)
|
|
|
|
{
|
|
|
|
case WS_IP_ADD_MEMBERSHIP:
|
|
|
|
case WS_IP_DROP_MEMBERSHIP:
|
|
|
|
#ifdef IP_HDRINCL
|
|
|
|
case WS_IP_HDRINCL:
|
|
|
|
#endif
|
|
|
|
case WS_IP_MULTICAST_IF:
|
|
|
|
case WS_IP_MULTICAST_LOOP:
|
|
|
|
case WS_IP_MULTICAST_TTL:
|
|
|
|
case WS_IP_OPTIONS:
|
2010-12-06 01:08:54 +01:00
|
|
|
#ifdef IP_PKTINFO
|
|
|
|
case WS_IP_PKTINFO:
|
|
|
|
#endif
|
2006-12-05 11:35:18 +01:00
|
|
|
case WS_IP_TOS:
|
|
|
|
case WS_IP_TTL:
|
2012-04-09 21:06:08 +02:00
|
|
|
#ifdef IP_UNICAST_IF
|
|
|
|
case WS_IP_UNICAST_IF:
|
|
|
|
#endif
|
2006-12-05 11:35:18 +01:00
|
|
|
convert_sockopt(&level, &optname);
|
|
|
|
break;
|
2007-10-04 08:48:57 +02:00
|
|
|
case WS_IP_DONTFRAGMENT:
|
|
|
|
FIXME("IP_DONTFRAGMENT is silently ignored!\n");
|
|
|
|
return 0;
|
2006-12-05 11:35:18 +01:00
|
|
|
default:
|
|
|
|
FIXME("Unknown IPPROTO_IP optname 0x%08x\n", optname);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2010-03-31 00:07:24 +02:00
|
|
|
case WS_IPPROTO_IPV6:
|
|
|
|
switch(optname)
|
|
|
|
{
|
2010-04-02 19:54:44 +02:00
|
|
|
#ifdef IPV6_ADD_MEMBERSHIP
|
2010-03-31 00:07:24 +02:00
|
|
|
case WS_IPV6_ADD_MEMBERSHIP:
|
2010-04-02 19:54:44 +02:00
|
|
|
#endif
|
|
|
|
#ifdef IPV6_DROP_MEMBERSHIP
|
2010-03-31 00:07:24 +02:00
|
|
|
case WS_IPV6_DROP_MEMBERSHIP:
|
2010-04-02 19:54:44 +02:00
|
|
|
#endif
|
2010-03-31 00:07:24 +02:00
|
|
|
case WS_IPV6_MULTICAST_IF:
|
|
|
|
case WS_IPV6_MULTICAST_HOPS:
|
|
|
|
case WS_IPV6_MULTICAST_LOOP:
|
|
|
|
case WS_IPV6_UNICAST_HOPS:
|
|
|
|
case WS_IPV6_V6ONLY:
|
2012-04-09 21:06:30 +02:00
|
|
|
#ifdef IPV6_UNICAST_IF
|
|
|
|
case WS_IPV6_UNICAST_IF:
|
|
|
|
#endif
|
2010-03-31 00:07:24 +02:00
|
|
|
convert_sockopt(&level, &optname);
|
|
|
|
break;
|
|
|
|
case WS_IPV6_DONTFRAG:
|
|
|
|
FIXME("IPV6_DONTFRAG is silently ignored!\n");
|
|
|
|
return 0;
|
2012-04-01 10:23:17 +02:00
|
|
|
case WS_IPV6_PROTECTION_LEVEL:
|
|
|
|
FIXME("IPV6_PROTECTION_LEVEL is ignored!\n");
|
|
|
|
return 0;
|
2010-03-31 00:07:24 +02:00
|
|
|
default:
|
|
|
|
FIXME("Unknown IPPROTO_IPV6 optname 0x%08x\n", optname);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2006-12-05 11:35:18 +01:00
|
|
|
default:
|
2009-08-24 23:39:18 +02:00
|
|
|
WARN("Unknown level: 0x%08x\n", level);
|
|
|
|
SetLastError(WSAEINVAL);
|
2006-12-05 11:35:18 +01:00
|
|
|
return SOCKET_ERROR;
|
|
|
|
} /* end switch(level) */
|
2003-12-02 05:19:56 +01:00
|
|
|
|
2006-12-05 11:35:18 +01:00
|
|
|
/* avoid endianness issues if argument is a 16-bit int */
|
|
|
|
if (optval && optlen < sizeof(int))
|
|
|
|
{
|
|
|
|
woptval= *((const INT16 *) optval);
|
|
|
|
optval= (char*) &woptval;
|
2014-12-05 05:26:34 +01:00
|
|
|
woptval&= (1 << optlen * 8) - 1;
|
2006-12-05 11:35:18 +01:00
|
|
|
optlen=sizeof(int);
|
|
|
|
}
|
2003-12-02 05:19:56 +01:00
|
|
|
fd = get_sock_fd( s, 0, NULL );
|
|
|
|
if (fd == -1) return SOCKET_ERROR;
|
|
|
|
|
|
|
|
if (setsockopt(fd, level, optname, optval, optlen) == 0)
|
|
|
|
{
|
2013-01-11 17:22:59 +01:00
|
|
|
#ifdef __APPLE__
|
|
|
|
if (level == SOL_SOCKET && optname == SO_REUSEADDR &&
|
|
|
|
setsockopt(fd, level, SO_REUSEPORT, optval, optlen) != 0)
|
|
|
|
{
|
|
|
|
SetLastError(wsaErrno());
|
|
|
|
release_sock_fd( s, fd );
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
#endif
|
2003-12-02 05:19:56 +01:00
|
|
|
release_sock_fd( s, fd );
|
|
|
|
return 0;
|
1997-08-24 18:00:30 +02:00
|
|
|
}
|
2003-12-02 05:19:56 +01:00
|
|
|
TRACE("Setting socket error, %d\n", wsaErrno());
|
|
|
|
SetLastError(wsaErrno());
|
|
|
|
release_sock_fd( s, fd );
|
2006-12-05 11:35:18 +01:00
|
|
|
|
1997-08-24 18:00:30 +02:00
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* shutdown (WS2_32.22)
|
1997-08-24 18:00:30 +02:00
|
|
|
*/
|
2001-11-14 22:26:23 +01:00
|
|
|
int WINAPI WS_shutdown(SOCKET s, int how)
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
{
|
2007-04-10 22:32:46 +02:00
|
|
|
int fd, err = WSAENOTSOCK;
|
2015-04-07 01:56:12 +02:00
|
|
|
unsigned int options = 0, clear_flags = 0;
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
|
2007-04-10 22:32:46 +02:00
|
|
|
fd = get_sock_fd( s, 0, &options );
|
2015-04-07 01:56:12 +02:00
|
|
|
TRACE("socket %04lx, how 0x%x, options 0x%x\n", s, how, options );
|
2002-04-25 23:34:24 +02:00
|
|
|
|
|
|
|
if (fd == -1)
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
|
|
|
|
switch( how )
|
1997-08-24 18:00:30 +02:00
|
|
|
{
|
2014-05-12 06:21:54 +02:00
|
|
|
case SD_RECEIVE: /* drop receives */
|
2002-04-25 23:34:24 +02:00
|
|
|
clear_flags |= FD_READ;
|
|
|
|
break;
|
2014-05-12 06:21:54 +02:00
|
|
|
case SD_SEND: /* drop sends */
|
2002-04-25 23:34:24 +02:00
|
|
|
clear_flags |= FD_WRITE;
|
|
|
|
break;
|
2014-05-12 06:21:54 +02:00
|
|
|
case SD_BOTH: /* drop all */
|
2002-04-25 23:34:24 +02:00
|
|
|
clear_flags |= FD_READ|FD_WRITE;
|
2011-10-20 22:37:04 +02:00
|
|
|
/*fall through */
|
2002-04-25 23:34:24 +02:00
|
|
|
default:
|
2003-01-28 01:24:04 +01:00
|
|
|
clear_flags |= FD_WINE_LISTENING;
|
2002-04-25 23:34:24 +02:00
|
|
|
}
|
1997-08-24 18:00:30 +02:00
|
|
|
|
2007-04-10 22:32:46 +02:00
|
|
|
if (!(options & (FILE_SYNCHRONOUS_IO_ALERT | FILE_SYNCHRONOUS_IO_NONALERT)))
|
|
|
|
{
|
2002-04-25 23:34:24 +02:00
|
|
|
switch ( how )
|
|
|
|
{
|
|
|
|
case SD_RECEIVE:
|
2007-05-31 17:51:18 +02:00
|
|
|
err = WS2_register_async_shutdown( s, ASYNC_TYPE_READ );
|
2002-04-25 23:34:24 +02:00
|
|
|
break;
|
|
|
|
case SD_SEND:
|
2007-05-31 17:51:18 +02:00
|
|
|
err = WS2_register_async_shutdown( s, ASYNC_TYPE_WRITE );
|
2002-04-25 23:34:24 +02:00
|
|
|
break;
|
|
|
|
case SD_BOTH:
|
|
|
|
default:
|
2007-05-31 17:51:18 +02:00
|
|
|
err = WS2_register_async_shutdown( s, ASYNC_TYPE_READ );
|
|
|
|
if (!err) err = WS2_register_async_shutdown( s, ASYNC_TYPE_WRITE );
|
2003-12-02 05:19:56 +01:00
|
|
|
break;
|
2002-04-25 23:34:24 +02:00
|
|
|
}
|
2006-11-03 12:03:14 +01:00
|
|
|
if (err) goto error;
|
2002-04-25 23:34:24 +02:00
|
|
|
}
|
|
|
|
else /* non-overlapped mode */
|
|
|
|
{
|
|
|
|
if ( shutdown( fd, how ) )
|
|
|
|
{
|
2005-01-14 20:54:38 +01:00
|
|
|
err = wsaErrno();
|
2002-04-25 23:34:24 +02:00
|
|
|
goto error;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-11-03 12:03:14 +01:00
|
|
|
release_sock_fd( s, fd );
|
2002-10-30 21:26:32 +01:00
|
|
|
_enable_event( SOCKET2HANDLE(s), 0, 0, clear_flags );
|
2002-04-25 23:34:24 +02:00
|
|
|
if ( how > 1) WSAAsyncSelect( s, 0, 0, 0 );
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
error:
|
2006-11-03 12:03:14 +01:00
|
|
|
release_sock_fd( s, fd );
|
2002-10-30 21:26:32 +01:00
|
|
|
_enable_event( SOCKET2HANDLE(s), 0, 0, clear_flags );
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError( err );
|
1997-08-24 18:00:30 +02:00
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* socket (WS2_32.23)
|
1997-08-24 18:00:30 +02:00
|
|
|
*/
|
2001-11-14 22:26:23 +01:00
|
|
|
SOCKET WINAPI WS_socket(int af, int type, int protocol)
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
{
|
2001-02-20 02:57:13 +01:00
|
|
|
TRACE("af=%d type=%d protocol=%d\n", af, type, protocol);
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
|
2015-04-07 01:56:29 +02:00
|
|
|
return WSASocketW( af, type, protocol, NULL, 0,
|
2005-01-14 20:54:38 +01:00
|
|
|
get_per_thread_data()->opentype ? 0 : WSA_FLAG_OVERLAPPED );
|
1997-08-24 18:00:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
2003-11-29 00:14:02 +01:00
|
|
|
* gethostbyaddr (WS2_32.51)
|
1997-08-24 18:00:30 +02:00
|
|
|
*/
|
2003-11-29 00:14:02 +01:00
|
|
|
struct WS_hostent* WINAPI WS_gethostbyaddr(const char *addr, int len, int type)
|
1997-08-24 18:00:30 +02:00
|
|
|
{
|
2003-11-29 00:14:02 +01:00
|
|
|
struct WS_hostent *retval = NULL;
|
2001-02-20 02:57:13 +01:00
|
|
|
struct hostent* host;
|
2014-04-15 05:43:53 +02:00
|
|
|
int unixtype = convert_af_w2u(type);
|
2014-04-18 01:45:47 +02:00
|
|
|
const char *paddr = addr;
|
|
|
|
unsigned long loopback;
|
2003-09-30 02:33:47 +02:00
|
|
|
#ifdef HAVE_LINUX_GETHOSTBYNAME_R_6
|
2001-02-20 02:57:13 +01:00
|
|
|
char *extrabuf;
|
2014-04-18 01:45:47 +02:00
|
|
|
int ebufsize = 1024;
|
2001-02-20 02:57:13 +01:00
|
|
|
struct hostent hostentry;
|
2014-04-18 01:45:47 +02:00
|
|
|
int locerr = ENOBUFS;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* convert back the magic loopback address if necessary */
|
|
|
|
if (unixtype == AF_INET && len == 4 && !memcmp(addr, magic_loopback_addr, 4))
|
|
|
|
{
|
|
|
|
loopback = htonl(INADDR_LOOPBACK);
|
|
|
|
paddr = (char*) &loopback;
|
|
|
|
}
|
|
|
|
|
|
|
|
#ifdef HAVE_LINUX_GETHOSTBYNAME_R_6
|
2001-02-20 02:57:13 +01:00
|
|
|
host = NULL;
|
|
|
|
extrabuf=HeapAlloc(GetProcessHeap(),0,ebufsize) ;
|
2002-06-01 01:06:46 +02:00
|
|
|
while(extrabuf) {
|
2014-04-18 01:45:47 +02:00
|
|
|
int res = gethostbyaddr_r(paddr, len, unixtype,
|
2001-02-20 02:57:13 +01:00
|
|
|
&hostentry, extrabuf, ebufsize, &host, &locerr);
|
2014-04-18 01:45:47 +02:00
|
|
|
if (res != ERANGE) break;
|
2001-02-20 02:57:13 +01:00
|
|
|
ebufsize *=2;
|
|
|
|
extrabuf=HeapReAlloc(GetProcessHeap(),0,extrabuf,ebufsize) ;
|
|
|
|
}
|
2014-04-18 01:45:47 +02:00
|
|
|
if (host) retval = WS_dup_he(host);
|
|
|
|
else SetLastError((locerr < 0) ? wsaErrno() : wsaHerrno(locerr));
|
2001-02-20 02:57:13 +01:00
|
|
|
HeapFree(GetProcessHeap(),0,extrabuf);
|
2000-09-24 21:41:57 +02:00
|
|
|
#else
|
2014-04-18 01:45:47 +02:00
|
|
|
EnterCriticalSection( &csWSgetXXXbyYYY );
|
|
|
|
host = gethostbyaddr(paddr, len, unixtype);
|
|
|
|
if (host) retval = WS_dup_he(host);
|
|
|
|
else SetLastError((h_errno < 0) ? wsaErrno() : wsaHerrno(h_errno));
|
2001-02-20 02:57:13 +01:00
|
|
|
LeaveCriticalSection( &csWSgetXXXbyYYY );
|
2000-09-24 21:41:57 +02:00
|
|
|
#endif
|
2003-11-29 00:14:02 +01:00
|
|
|
TRACE("ptr %p, len %d, type %d ret %p\n", addr, len, type, retval);
|
2000-09-24 21:41:57 +02:00
|
|
|
return retval;
|
1997-08-24 18:00:30 +02:00
|
|
|
}
|
|
|
|
|
2014-12-02 10:24:11 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* WS_compare_routes_by_metric_asc (INTERNAL)
|
|
|
|
*
|
|
|
|
* Comparison function for qsort(), for sorting two routes (struct route)
|
|
|
|
* by metric in ascending order.
|
|
|
|
*/
|
|
|
|
static int WS_compare_routes_by_metric_asc(const void *left, const void *right)
|
|
|
|
{
|
|
|
|
return ((const struct route*)left)->metric - ((const struct route*)right)->metric;
|
|
|
|
}
|
|
|
|
|
2009-12-06 03:26:56 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* WS_get_local_ips (INTERNAL)
|
|
|
|
*
|
|
|
|
* Returns the list of local IP addresses by going through the network
|
|
|
|
* adapters and using the local routing table to sort the addresses
|
|
|
|
* from highest routing priority to lowest routing priority. This
|
|
|
|
* functionality is inferred from the description for obtaining local
|
|
|
|
* IP addresses given in the Knowledge Base Article Q160215.
|
|
|
|
*
|
|
|
|
* Please note that the returned hostent is only freed when the thread
|
|
|
|
* closes and is replaced if another hostent is requested.
|
|
|
|
*/
|
|
|
|
static struct WS_hostent* WS_get_local_ips( char *hostname )
|
|
|
|
{
|
2014-12-02 10:24:11 +01:00
|
|
|
int numroutes = 0, i, j;
|
2013-03-07 23:22:31 +01:00
|
|
|
DWORD n;
|
2009-12-06 03:26:56 +01:00
|
|
|
PIP_ADAPTER_INFO adapters = NULL, k;
|
|
|
|
struct WS_hostent *hostlist = NULL;
|
|
|
|
PMIB_IPFORWARDTABLE routes = NULL;
|
|
|
|
struct route *route_addrs = NULL;
|
|
|
|
DWORD adap_size, route_size;
|
|
|
|
|
|
|
|
/* Obtain the size of the adapter list and routing table, also allocate memory */
|
|
|
|
if (GetAdaptersInfo(NULL, &adap_size) != ERROR_BUFFER_OVERFLOW)
|
|
|
|
return NULL;
|
|
|
|
if (GetIpForwardTable(NULL, &route_size, FALSE) != ERROR_INSUFFICIENT_BUFFER)
|
|
|
|
return NULL;
|
|
|
|
adapters = HeapAlloc(GetProcessHeap(), 0, adap_size);
|
|
|
|
routes = HeapAlloc(GetProcessHeap(), 0, route_size);
|
|
|
|
route_addrs = HeapAlloc(GetProcessHeap(), 0, 0); /* HeapReAlloc doesn't work on NULL */
|
|
|
|
if (adapters == NULL || routes == NULL || route_addrs == NULL)
|
|
|
|
goto cleanup;
|
|
|
|
/* Obtain the adapter list and the full routing table */
|
|
|
|
if (GetAdaptersInfo(adapters, &adap_size) != NO_ERROR)
|
|
|
|
goto cleanup;
|
|
|
|
if (GetIpForwardTable(routes, &route_size, FALSE) != NO_ERROR)
|
|
|
|
goto cleanup;
|
|
|
|
/* Store the interface associated with each route */
|
2013-03-07 23:22:31 +01:00
|
|
|
for (n = 0; n < routes->dwNumEntries; n++)
|
2009-12-06 03:26:56 +01:00
|
|
|
{
|
2011-12-15 10:06:24 +01:00
|
|
|
IF_INDEX ifindex;
|
2013-10-07 22:49:40 +02:00
|
|
|
DWORD ifmetric;
|
|
|
|
BOOL exists = FALSE;
|
2009-12-06 03:26:56 +01:00
|
|
|
|
2013-03-07 23:22:31 +01:00
|
|
|
if (routes->table[n].u1.ForwardType != MIB_IPROUTE_TYPE_DIRECT)
|
2009-12-06 03:26:56 +01:00
|
|
|
continue;
|
2013-03-07 23:22:31 +01:00
|
|
|
ifindex = routes->table[n].dwForwardIfIndex;
|
|
|
|
ifmetric = routes->table[n].dwForwardMetric1;
|
2009-12-06 03:26:56 +01:00
|
|
|
/* Only store the lowest valued metric for an interface */
|
|
|
|
for (j = 0; j < numroutes; j++)
|
|
|
|
{
|
|
|
|
if (route_addrs[j].interface == ifindex)
|
|
|
|
{
|
|
|
|
if (route_addrs[j].metric > ifmetric)
|
|
|
|
route_addrs[j].metric = ifmetric;
|
|
|
|
exists = TRUE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (exists)
|
|
|
|
continue;
|
|
|
|
route_addrs = HeapReAlloc(GetProcessHeap(), 0, route_addrs, (numroutes+1)*sizeof(struct route));
|
|
|
|
if (route_addrs == NULL)
|
|
|
|
goto cleanup; /* Memory allocation error, fail gracefully */
|
|
|
|
route_addrs[numroutes].interface = ifindex;
|
|
|
|
route_addrs[numroutes].metric = ifmetric;
|
|
|
|
/* If no IP is found in the next step (for whatever reason)
|
|
|
|
* then fall back to the magic loopback address.
|
|
|
|
*/
|
|
|
|
memcpy(&(route_addrs[numroutes].addr.s_addr), magic_loopback_addr, 4);
|
|
|
|
numroutes++;
|
|
|
|
}
|
|
|
|
if (numroutes == 0)
|
|
|
|
goto cleanup; /* No routes, fall back to the Magic IP */
|
|
|
|
/* Find the IP address associated with each found interface */
|
|
|
|
for (i = 0; i < numroutes; i++)
|
|
|
|
{
|
|
|
|
for (k = adapters; k != NULL; k = k->Next)
|
|
|
|
{
|
|
|
|
char *ip = k->IpAddressList.IpAddress.String;
|
|
|
|
|
|
|
|
if (route_addrs[i].interface == k->Index)
|
|
|
|
route_addrs[i].addr.s_addr = (in_addr_t) inet_addr(ip);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/* Allocate a hostent and enough memory for all the IPs,
|
|
|
|
* including the NULL at the end of the list.
|
|
|
|
*/
|
2012-06-09 19:34:59 +02:00
|
|
|
hostlist = WS_create_he(hostname, 1, 0, numroutes+1, sizeof(struct in_addr));
|
2009-12-14 16:30:14 +01:00
|
|
|
if (hostlist == NULL)
|
|
|
|
goto cleanup; /* Failed to allocate a hostent for the list of IPs */
|
|
|
|
hostlist->h_addr_list[numroutes] = NULL; /* NULL-terminate the address list */
|
|
|
|
hostlist->h_aliases[0] = NULL; /* NULL-terminate the alias list */
|
2009-12-06 03:26:56 +01:00
|
|
|
hostlist->h_addrtype = AF_INET;
|
|
|
|
hostlist->h_length = sizeof(struct in_addr); /* = 4 */
|
2014-12-02 10:24:11 +01:00
|
|
|
/* Reorder the entries before placing them in the host list. Windows expects
|
2009-12-06 03:26:56 +01:00
|
|
|
* the IP list in order from highest priority to lowest (the critical thing
|
|
|
|
* is that most applications expect the first IP to be the default route).
|
|
|
|
*/
|
2014-12-02 10:24:11 +01:00
|
|
|
if (numroutes > 1)
|
|
|
|
qsort(route_addrs, numroutes, sizeof(struct route), WS_compare_routes_by_metric_asc);
|
2009-12-06 03:26:56 +01:00
|
|
|
|
2014-12-02 10:24:11 +01:00
|
|
|
for (i = 0; i < numroutes; i++)
|
|
|
|
(*(struct in_addr *) hostlist->h_addr_list[i]) = route_addrs[i].addr;
|
2009-12-06 03:26:56 +01:00
|
|
|
|
|
|
|
/* Cleanup all allocated memory except the address list,
|
|
|
|
* the address list is used by the calling app.
|
|
|
|
*/
|
|
|
|
cleanup:
|
|
|
|
HeapFree(GetProcessHeap(), 0, route_addrs);
|
|
|
|
HeapFree(GetProcessHeap(), 0, adapters);
|
|
|
|
HeapFree(GetProcessHeap(), 0, routes);
|
|
|
|
return hostlist;
|
|
|
|
}
|
|
|
|
|
2001-07-02 21:59:40 +02:00
|
|
|
/***********************************************************************
|
2003-11-29 00:14:02 +01:00
|
|
|
* gethostbyname (WS2_32.52)
|
1997-08-24 18:00:30 +02:00
|
|
|
*/
|
2003-11-29 00:14:02 +01:00
|
|
|
struct WS_hostent* WINAPI WS_gethostbyname(const char* name)
|
1997-08-24 18:00:30 +02:00
|
|
|
{
|
2003-11-29 00:14:02 +01:00
|
|
|
struct WS_hostent *retval = NULL;
|
2001-02-20 02:57:13 +01:00
|
|
|
struct hostent* host;
|
2000-09-24 21:41:57 +02:00
|
|
|
#ifdef HAVE_LINUX_GETHOSTBYNAME_R_6
|
2001-02-20 02:57:13 +01:00
|
|
|
char *extrabuf;
|
|
|
|
int ebufsize=1024;
|
|
|
|
struct hostent hostentry;
|
|
|
|
int locerr = ENOBUFS;
|
2003-09-02 20:12:20 +02:00
|
|
|
#endif
|
2009-12-06 03:26:56 +01:00
|
|
|
char hostname[100];
|
2011-02-22 21:02:22 +01:00
|
|
|
if(!num_startup) {
|
|
|
|
SetLastError(WSANOTINITIALISED);
|
|
|
|
return NULL;
|
|
|
|
}
|
2009-12-06 03:26:56 +01:00
|
|
|
if( gethostname( hostname, 100) == -1) {
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError(WSAENOBUFS); /* appropriate ? */
|
2009-12-06 03:26:56 +01:00
|
|
|
return retval;
|
|
|
|
}
|
2007-06-01 09:13:19 +02:00
|
|
|
if( !name || !name[0]) {
|
2009-12-06 03:26:56 +01:00
|
|
|
name = hostname;
|
2003-09-02 20:12:20 +02:00
|
|
|
}
|
2009-12-06 03:26:56 +01:00
|
|
|
/* If the hostname of the local machine is requested then return the
|
|
|
|
* complete list of local IP addresses */
|
|
|
|
if(strcmp(name, hostname) == 0)
|
|
|
|
retval = WS_get_local_ips(hostname);
|
|
|
|
/* If any other hostname was requested (or the routing table lookup failed)
|
|
|
|
* then return the IP found by the host OS */
|
|
|
|
if(retval == NULL)
|
|
|
|
{
|
2003-09-02 20:12:20 +02:00
|
|
|
#ifdef HAVE_LINUX_GETHOSTBYNAME_R_6
|
2009-12-06 03:26:56 +01:00
|
|
|
host = NULL;
|
|
|
|
extrabuf=HeapAlloc(GetProcessHeap(),0,ebufsize) ;
|
|
|
|
while(extrabuf) {
|
|
|
|
int res = gethostbyname_r(name, &hostentry, extrabuf, ebufsize, &host, &locerr);
|
|
|
|
if( res != ERANGE) break;
|
|
|
|
ebufsize *=2;
|
|
|
|
extrabuf=HeapReAlloc(GetProcessHeap(),0,extrabuf,ebufsize) ;
|
|
|
|
}
|
|
|
|
if (!host) SetLastError((locerr < 0) ? wsaErrno() : wsaHerrno(locerr));
|
2000-09-24 21:41:57 +02:00
|
|
|
#else
|
2009-12-06 03:26:56 +01:00
|
|
|
EnterCriticalSection( &csWSgetXXXbyYYY );
|
|
|
|
host = gethostbyname(name);
|
|
|
|
if (!host) SetLastError((h_errno < 0) ? wsaErrno() : wsaHerrno(h_errno));
|
2000-09-24 21:41:57 +02:00
|
|
|
#endif
|
2009-12-06 03:26:56 +01:00
|
|
|
if (host) retval = WS_dup_he(host);
|
2000-09-24 21:41:57 +02:00
|
|
|
#ifdef HAVE_LINUX_GETHOSTBYNAME_R_6
|
2009-12-06 03:26:56 +01:00
|
|
|
HeapFree(GetProcessHeap(),0,extrabuf);
|
2000-09-24 21:41:57 +02:00
|
|
|
#else
|
2009-12-06 03:26:56 +01:00
|
|
|
LeaveCriticalSection( &csWSgetXXXbyYYY );
|
2000-09-24 21:41:57 +02:00
|
|
|
#endif
|
2009-12-06 03:26:56 +01:00
|
|
|
}
|
2008-04-28 10:37:39 +02:00
|
|
|
if (retval && retval->h_addr_list[0][0] == 127 &&
|
2008-04-24 13:45:10 +02:00
|
|
|
strcmp(name, "localhost") != 0)
|
|
|
|
{
|
|
|
|
/* hostname != "localhost" but has loopback address. replace by our
|
|
|
|
* special address.*/
|
|
|
|
memcpy(retval->h_addr_list[0], magic_loopback_addr, 4);
|
|
|
|
}
|
2003-11-29 00:14:02 +01:00
|
|
|
TRACE( "%s ret %p\n", debugstr_a(name), retval );
|
2000-09-24 21:41:57 +02:00
|
|
|
return retval;
|
1997-08-24 18:00:30 +02:00
|
|
|
}
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
|
Release 971101
Thu Oct 30 21:52:23 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [windows/nonclient.c]
Changed NC_TrackSysMenu to give the same behaviour as MS-Windows,
i.e. system menu already appears when mouse button is depressed.
Changed NC_HandleNCLButtonDblClk so that double clicks on scroll
bar arrows are handled the same way as single clicks.
* [windows/winpos.c]
Fixed SetWindowPos32 to clear WIN_NO_REDRAW when SWP_SHOWWINDOW is
set; this is the way MS-Windows behaves.
Thu Oct 30 21:08:57 1997 Morten Welinder <terra@diku.dk>
* [controls/status.c]
In SW_SetText, fix condition, I hope.
* [controls/menu.c]
(GetMenuState32): Don't mask return value. Print more debug info.
(MENU_MenuBarCalcSize): Be more careful when printing debug
information.
(MENU_SetItemData): Empty strings are separators.
* [graphics/x11drv/text.c]
Don't prototype CLIPPING_IntersectClipRect.
* [include/dc.h]
Prototype CLIPPING_IntersectClipRect.
* [objects/font.c]
Remove non-portable (and faulty) smartness in FONT_TextMetric*to*.
In CreateFont32W and CreateFont16, handle null font name.
* [objects/text.c]
(TEXT_NextLine): Fix end-of-line bug.
* [if1632/shell32.spec]
Activate existing implementation of ExtractIconA.
* [misc/shell.c]
For Control_RunDLL, add types for parameters.
Thu Oct 30 14:54:11 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [controls/static.c] [include/windows.h] [misc/spy.c]
Added some win32 defines to static controls, basic SS_BITMAP style
handling implemented. [please add more, I am lacking knowledge and
time]
* [controls/status.c]
part_num 255 seems to indicate whole statusline (win95 cdplayer.exe)
* [if1632/thunk.c] [tools/build.c]
Support lret and 0x66 lret calls for CallTo16_regs
(needed for KERNEL32_45)
Fixed KERNEL32_45, QT_Thunk (should work now).
* [if1632/relay.c][if1632/builtin.c][tools/build.c][if1632/*32.spec]
Added string dumping to relay debugging for win32 apifuncs.
* [misc/ver.c]
Fixed and cleaned up VerQueryValue*.
* [multimedia/*.c][include/mmsystem.h][if1632/mmsystem.spec]
[if1632/winmm.spec]
Win32 support for lowlevel multimedia functions.
Added some mixer* lowlevel functions.
Some small fixes in the audio lowlevel queue handling, code
reformatting/cleanups.
* [debugger/hash.c]
Don't show difference between 16bit symbols if they are in
different segments.
* [objects/cursoricon.c]
Added GetIconInfo (partial) and CreateIconIndirect.
* [windows/mdi.c]
Fixed some "bad class" problems and crashes in MDICreateChild,
which happen in Win32 (jwp32.exe).
Wed Oct 29 00:57:27 1997 Bruce Milner <Bruce.Milner@genetics.utah.edu>
* [if1632/winaspi.spec] [misc/aspi.c] [include/aspi.c]
[documentation/aspi] [include/callback.h]
Added support for 16 bit ASPI calls to linux generic SCSI.
The support is not complete, but appears to run my Mustek
scanner from within ipplus.exe.
Mon Oct 27 00:59:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [windows/dce.c]
DC reuse framework.
Sun Oct 26 18:41:21 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/x11drv/xfont.c]
Substituted fonts are removed from the alias table. References to
the old name are also updated.
* [controls/combo.c]
LB_SELECTSTRING32 not CB_SELECTSTRING32 should be sent to
ComboLBox.
Sun Oct 26 14:25:00 1997 Nikita V. Youshchenko <yoush@cs.msu.su>
* [include/drive.h] [files/drive.c] [msdos/int21.c]
Partially implemented DOS drive mapping (int21 AX=440F).
Sat Oct 25 13:03:29 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [debugger/debug.l]
Support '.' in identifiers. Use "x . y" to access structure
fields.
* [debugger/hash.c] [loader/pe_image.c]
Load entry points of Win32 modules only when entering the
debugger.
* [debugger/break.c]
New function DEBUG_AddModuleBreakpoint() to set a breakpoint at
the start of every module.
* [files/file.c]
FILE_mmap() can now fake mmap() for unaligned offsets or broken
filesystems.
* [include/callback.h] [misc/callback.c] [if1632/thunk.c]
Use a table of callbacks instead of macros to differentiate
between emulator and Winelib.
* [loader/task.c]
Initialize current directory from cwd, not from module path.
* [tools/build.c]
Read CallTo16 prototypes directly from thunk.c source file.
* [windows/winproc.c] [windows/mdi.c]
Added translation for WM_MDIACTIVATE and WM_MDIGETACTIVE.
Fri Oct 24 21:41:25 1997 Uwe Bonnes <bon@elektron.ikp.tu-darmstadt.de>
* [files/drive.c]
Allow arguments like "a" for the drive related apis.
* [memory/global.c]
Keep the calculation for dwMemoryLoad in range.
* [misc/crtdll.c]
Make CRTDLL_getcwd use GetCurrentDirectory32A and alloc
its memory if requested.
Implemented CRTDLL_rename and CRTDLL_stat needed for
lcc-win32:wedit.exe.
Implemented CRTDLL__fullpath.
* [misc/comm.c]
High speed modes for the 16-bit mode Comm functions.
* [misc/cpu.c]
As applications may treat lpMaximumApplicationAddress as long,
use a valid long number.
* [misc/main.c]
In SystemParametersInfo16 ignore SPI_GETHIGHCONTRAST too.
* [misc/ole2nls.c]
Implement LCMAP_UPPERCASE for LCMapString32.
* [misc/wsprintf]
Made WPRINTF_ParseFormatA understand %ws.
* [win32/file.c]
Ignore FILE_ATTRIBUTE_NORMAL.
Stub for ReadFileEx.
Fri Oct 24 15:36:02 1997 Doug Ridgway <ridgway@routh.ucsd.edu>
* [memory/local.c]
Local heap exhaustion message now prints which builtin heap filled.
Fri Oct 24 00:46:34 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/dialog.c]
Reversed CreateFont16/32W typo.
Thu Oct 23 23:44:20 1997 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [if1632/user.spec]
Fixed argument list for ChangeClipboardChain.
* [windows/mdi.c]
Pass correct hInstance to CreateWindow16() in MDICreateChild().
Mon Oct 20 11:51:24 1997 Carsten Fallesen <cf@it.dtu.dk>
* [objects/metafile.c]
Added support for META_SETTEXTCHAREXTRA.
* [objects/region.c]
Fixed crash in XPolygonRegion if there is only one point in
in the region.
* [if1632/gdi32.spec][include/gdi.h][include/windows.h]
[objects/gdiobj.c]
Completed OBJ_XXX defines in gdi.h, removed OBJ_XXX in gdiobj.c
and included gdi.h instead. Implemented GetObjectType32().
Thu Oct 16 17:21:32 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [documentation/wine.texinfo]
Fixed WIN32 and Makefiles entries of Reference manual node, that
made makeinfo dump core.
Mon Oct 13 17:15:57 1997 Robert Wilhelm <robert@physiol.med.tu-muenchen.de>
* [if1632/crtdll.spec]
Added missing math functions y0(), y1(), y2(), floor(), frexp(),
ldexp(), modf().
1997-11-01 20:08:16 +01:00
|
|
|
|
1997-08-24 18:00:30 +02:00
|
|
|
/***********************************************************************
|
2003-11-29 00:14:02 +01:00
|
|
|
* getprotobyname (WS2_32.53)
|
1997-08-24 18:00:30 +02:00
|
|
|
*/
|
2003-11-29 00:14:02 +01:00
|
|
|
struct WS_protoent* WINAPI WS_getprotobyname(const char* name)
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
{
|
2003-11-29 00:14:02 +01:00
|
|
|
struct WS_protoent* retval = NULL;
|
2002-08-01 01:20:47 +02:00
|
|
|
#ifdef HAVE_GETPROTOBYNAME
|
2001-02-20 02:57:13 +01:00
|
|
|
struct protoent* proto;
|
|
|
|
EnterCriticalSection( &csWSgetXXXbyYYY );
|
|
|
|
if( (proto = getprotobyname(name)) != NULL )
|
1997-08-24 18:00:30 +02:00
|
|
|
{
|
2003-11-29 00:14:02 +01:00
|
|
|
retval = WS_dup_pe(proto);
|
2001-02-20 02:57:13 +01:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
MESSAGE("protocol %s not found; You might want to add "
|
|
|
|
"this to /etc/protocols\n", debugstr_a(name) );
|
|
|
|
SetLastError(WSANO_DATA);
|
|
|
|
}
|
|
|
|
LeaveCriticalSection( &csWSgetXXXbyYYY );
|
2002-08-01 01:20:47 +02:00
|
|
|
#endif
|
2003-11-29 00:14:02 +01:00
|
|
|
TRACE( "%s ret %p\n", debugstr_a(name), retval );
|
2000-09-24 21:41:57 +02:00
|
|
|
return retval;
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
}
|
|
|
|
|
1997-08-24 18:00:30 +02:00
|
|
|
|
|
|
|
/***********************************************************************
|
2003-11-29 00:14:02 +01:00
|
|
|
* getprotobynumber (WS2_32.54)
|
1997-08-24 18:00:30 +02:00
|
|
|
*/
|
2003-11-29 00:14:02 +01:00
|
|
|
struct WS_protoent* WINAPI WS_getprotobynumber(int number)
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
{
|
2003-11-29 00:14:02 +01:00
|
|
|
struct WS_protoent* retval = NULL;
|
2002-08-01 01:20:47 +02:00
|
|
|
#ifdef HAVE_GETPROTOBYNUMBER
|
2001-02-20 02:57:13 +01:00
|
|
|
struct protoent* proto;
|
|
|
|
EnterCriticalSection( &csWSgetXXXbyYYY );
|
|
|
|
if( (proto = getprotobynumber(number)) != NULL )
|
1997-08-24 18:00:30 +02:00
|
|
|
{
|
2003-11-29 00:14:02 +01:00
|
|
|
retval = WS_dup_pe(proto);
|
2001-02-20 02:57:13 +01:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
MESSAGE("protocol number %d not found; You might want to add "
|
|
|
|
"this to /etc/protocols\n", number );
|
|
|
|
SetLastError(WSANO_DATA);
|
|
|
|
}
|
|
|
|
LeaveCriticalSection( &csWSgetXXXbyYYY );
|
2002-08-01 01:20:47 +02:00
|
|
|
#endif
|
2003-11-29 00:14:02 +01:00
|
|
|
TRACE("%i ret %p\n", number, retval);
|
2000-09-24 21:41:57 +02:00
|
|
|
return retval;
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
}
|
|
|
|
|
Release 971101
Thu Oct 30 21:52:23 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [windows/nonclient.c]
Changed NC_TrackSysMenu to give the same behaviour as MS-Windows,
i.e. system menu already appears when mouse button is depressed.
Changed NC_HandleNCLButtonDblClk so that double clicks on scroll
bar arrows are handled the same way as single clicks.
* [windows/winpos.c]
Fixed SetWindowPos32 to clear WIN_NO_REDRAW when SWP_SHOWWINDOW is
set; this is the way MS-Windows behaves.
Thu Oct 30 21:08:57 1997 Morten Welinder <terra@diku.dk>
* [controls/status.c]
In SW_SetText, fix condition, I hope.
* [controls/menu.c]
(GetMenuState32): Don't mask return value. Print more debug info.
(MENU_MenuBarCalcSize): Be more careful when printing debug
information.
(MENU_SetItemData): Empty strings are separators.
* [graphics/x11drv/text.c]
Don't prototype CLIPPING_IntersectClipRect.
* [include/dc.h]
Prototype CLIPPING_IntersectClipRect.
* [objects/font.c]
Remove non-portable (and faulty) smartness in FONT_TextMetric*to*.
In CreateFont32W and CreateFont16, handle null font name.
* [objects/text.c]
(TEXT_NextLine): Fix end-of-line bug.
* [if1632/shell32.spec]
Activate existing implementation of ExtractIconA.
* [misc/shell.c]
For Control_RunDLL, add types for parameters.
Thu Oct 30 14:54:11 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [controls/static.c] [include/windows.h] [misc/spy.c]
Added some win32 defines to static controls, basic SS_BITMAP style
handling implemented. [please add more, I am lacking knowledge and
time]
* [controls/status.c]
part_num 255 seems to indicate whole statusline (win95 cdplayer.exe)
* [if1632/thunk.c] [tools/build.c]
Support lret and 0x66 lret calls for CallTo16_regs
(needed for KERNEL32_45)
Fixed KERNEL32_45, QT_Thunk (should work now).
* [if1632/relay.c][if1632/builtin.c][tools/build.c][if1632/*32.spec]
Added string dumping to relay debugging for win32 apifuncs.
* [misc/ver.c]
Fixed and cleaned up VerQueryValue*.
* [multimedia/*.c][include/mmsystem.h][if1632/mmsystem.spec]
[if1632/winmm.spec]
Win32 support for lowlevel multimedia functions.
Added some mixer* lowlevel functions.
Some small fixes in the audio lowlevel queue handling, code
reformatting/cleanups.
* [debugger/hash.c]
Don't show difference between 16bit symbols if they are in
different segments.
* [objects/cursoricon.c]
Added GetIconInfo (partial) and CreateIconIndirect.
* [windows/mdi.c]
Fixed some "bad class" problems and crashes in MDICreateChild,
which happen in Win32 (jwp32.exe).
Wed Oct 29 00:57:27 1997 Bruce Milner <Bruce.Milner@genetics.utah.edu>
* [if1632/winaspi.spec] [misc/aspi.c] [include/aspi.c]
[documentation/aspi] [include/callback.h]
Added support for 16 bit ASPI calls to linux generic SCSI.
The support is not complete, but appears to run my Mustek
scanner from within ipplus.exe.
Mon Oct 27 00:59:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [windows/dce.c]
DC reuse framework.
Sun Oct 26 18:41:21 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/x11drv/xfont.c]
Substituted fonts are removed from the alias table. References to
the old name are also updated.
* [controls/combo.c]
LB_SELECTSTRING32 not CB_SELECTSTRING32 should be sent to
ComboLBox.
Sun Oct 26 14:25:00 1997 Nikita V. Youshchenko <yoush@cs.msu.su>
* [include/drive.h] [files/drive.c] [msdos/int21.c]
Partially implemented DOS drive mapping (int21 AX=440F).
Sat Oct 25 13:03:29 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [debugger/debug.l]
Support '.' in identifiers. Use "x . y" to access structure
fields.
* [debugger/hash.c] [loader/pe_image.c]
Load entry points of Win32 modules only when entering the
debugger.
* [debugger/break.c]
New function DEBUG_AddModuleBreakpoint() to set a breakpoint at
the start of every module.
* [files/file.c]
FILE_mmap() can now fake mmap() for unaligned offsets or broken
filesystems.
* [include/callback.h] [misc/callback.c] [if1632/thunk.c]
Use a table of callbacks instead of macros to differentiate
between emulator and Winelib.
* [loader/task.c]
Initialize current directory from cwd, not from module path.
* [tools/build.c]
Read CallTo16 prototypes directly from thunk.c source file.
* [windows/winproc.c] [windows/mdi.c]
Added translation for WM_MDIACTIVATE and WM_MDIGETACTIVE.
Fri Oct 24 21:41:25 1997 Uwe Bonnes <bon@elektron.ikp.tu-darmstadt.de>
* [files/drive.c]
Allow arguments like "a" for the drive related apis.
* [memory/global.c]
Keep the calculation for dwMemoryLoad in range.
* [misc/crtdll.c]
Make CRTDLL_getcwd use GetCurrentDirectory32A and alloc
its memory if requested.
Implemented CRTDLL_rename and CRTDLL_stat needed for
lcc-win32:wedit.exe.
Implemented CRTDLL__fullpath.
* [misc/comm.c]
High speed modes for the 16-bit mode Comm functions.
* [misc/cpu.c]
As applications may treat lpMaximumApplicationAddress as long,
use a valid long number.
* [misc/main.c]
In SystemParametersInfo16 ignore SPI_GETHIGHCONTRAST too.
* [misc/ole2nls.c]
Implement LCMAP_UPPERCASE for LCMapString32.
* [misc/wsprintf]
Made WPRINTF_ParseFormatA understand %ws.
* [win32/file.c]
Ignore FILE_ATTRIBUTE_NORMAL.
Stub for ReadFileEx.
Fri Oct 24 15:36:02 1997 Doug Ridgway <ridgway@routh.ucsd.edu>
* [memory/local.c]
Local heap exhaustion message now prints which builtin heap filled.
Fri Oct 24 00:46:34 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/dialog.c]
Reversed CreateFont16/32W typo.
Thu Oct 23 23:44:20 1997 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [if1632/user.spec]
Fixed argument list for ChangeClipboardChain.
* [windows/mdi.c]
Pass correct hInstance to CreateWindow16() in MDICreateChild().
Mon Oct 20 11:51:24 1997 Carsten Fallesen <cf@it.dtu.dk>
* [objects/metafile.c]
Added support for META_SETTEXTCHAREXTRA.
* [objects/region.c]
Fixed crash in XPolygonRegion if there is only one point in
in the region.
* [if1632/gdi32.spec][include/gdi.h][include/windows.h]
[objects/gdiobj.c]
Completed OBJ_XXX defines in gdi.h, removed OBJ_XXX in gdiobj.c
and included gdi.h instead. Implemented GetObjectType32().
Thu Oct 16 17:21:32 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [documentation/wine.texinfo]
Fixed WIN32 and Makefiles entries of Reference manual node, that
made makeinfo dump core.
Mon Oct 13 17:15:57 1997 Robert Wilhelm <robert@physiol.med.tu-muenchen.de>
* [if1632/crtdll.spec]
Added missing math functions y0(), y1(), y2(), floor(), frexp(),
ldexp(), modf().
1997-11-01 20:08:16 +01:00
|
|
|
|
1997-08-24 18:00:30 +02:00
|
|
|
/***********************************************************************
|
2003-11-29 00:14:02 +01:00
|
|
|
* getservbyname (WS2_32.55)
|
1997-08-24 18:00:30 +02:00
|
|
|
*/
|
2003-11-29 00:14:02 +01:00
|
|
|
struct WS_servent* WINAPI WS_getservbyname(const char *name, const char *proto)
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
{
|
2003-11-29 00:14:02 +01:00
|
|
|
struct WS_servent* retval = NULL;
|
2001-02-20 02:57:13 +01:00
|
|
|
struct servent* serv;
|
2003-11-29 00:14:02 +01:00
|
|
|
char *name_str;
|
|
|
|
char *proto_str = NULL;
|
|
|
|
|
|
|
|
if (!(name_str = strdup_lower(name))) return NULL;
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
|
2003-11-29 00:14:02 +01:00
|
|
|
if (proto && *proto)
|
|
|
|
{
|
|
|
|
if (!(proto_str = strdup_lower(proto)))
|
2001-02-20 02:57:13 +01:00
|
|
|
{
|
2003-11-29 00:14:02 +01:00
|
|
|
HeapFree( GetProcessHeap(), 0, name_str );
|
|
|
|
return NULL;
|
2001-02-20 02:57:13 +01:00
|
|
|
}
|
|
|
|
}
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
|
2003-11-29 00:14:02 +01:00
|
|
|
EnterCriticalSection( &csWSgetXXXbyYYY );
|
|
|
|
serv = getservbyname(name_str, proto_str);
|
|
|
|
if( serv != NULL )
|
|
|
|
{
|
|
|
|
retval = WS_dup_se(serv);
|
|
|
|
}
|
2003-11-30 03:54:25 +01:00
|
|
|
else SetLastError(WSANO_DATA);
|
2003-11-29 00:14:02 +01:00
|
|
|
LeaveCriticalSection( &csWSgetXXXbyYYY );
|
2004-12-23 18:06:43 +01:00
|
|
|
HeapFree( GetProcessHeap(), 0, proto_str );
|
2003-11-29 00:14:02 +01:00
|
|
|
HeapFree( GetProcessHeap(), 0, name_str );
|
|
|
|
TRACE( "%s, %s ret %p\n", debugstr_a(name), debugstr_a(proto), retval );
|
|
|
|
return retval;
|
1997-08-24 18:00:30 +02:00
|
|
|
}
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
|
2005-11-17 13:58:35 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* freeaddrinfo (WS2_32.@)
|
|
|
|
*/
|
|
|
|
void WINAPI WS_freeaddrinfo(struct WS_addrinfo *res)
|
|
|
|
{
|
|
|
|
while (res) {
|
|
|
|
struct WS_addrinfo *next;
|
|
|
|
|
|
|
|
HeapFree(GetProcessHeap(),0,res->ai_canonname);
|
|
|
|
HeapFree(GetProcessHeap(),0,res->ai_addr);
|
|
|
|
next = res->ai_next;
|
|
|
|
HeapFree(GetProcessHeap(),0,res);
|
|
|
|
res = next;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2007-12-17 15:40:02 +01:00
|
|
|
/* helper functions for getaddrinfo()/getnameinfo() */
|
2005-11-17 13:58:35 +01:00
|
|
|
static int convert_aiflag_w2u(int winflags) {
|
2008-12-10 22:55:35 +01:00
|
|
|
unsigned int i;
|
|
|
|
int unixflags = 0;
|
2005-11-17 13:58:35 +01:00
|
|
|
|
2005-12-05 11:59:43 +01:00
|
|
|
for (i=0;i<sizeof(ws_aiflag_map)/sizeof(ws_aiflag_map[0]);i++)
|
2005-11-17 13:58:35 +01:00
|
|
|
if (ws_aiflag_map[i][0] & winflags) {
|
|
|
|
unixflags |= ws_aiflag_map[i][1];
|
|
|
|
winflags &= ~ws_aiflag_map[i][0];
|
|
|
|
}
|
|
|
|
if (winflags)
|
|
|
|
FIXME("Unhandled windows AI_xxx flags %x\n", winflags);
|
|
|
|
return unixflags;
|
|
|
|
}
|
|
|
|
|
2007-12-17 15:40:02 +01:00
|
|
|
static int convert_niflag_w2u(int winflags) {
|
2008-12-10 22:55:35 +01:00
|
|
|
unsigned int i;
|
|
|
|
int unixflags = 0;
|
2007-12-17 15:40:02 +01:00
|
|
|
|
|
|
|
for (i=0;i<sizeof(ws_niflag_map)/sizeof(ws_niflag_map[0]);i++)
|
|
|
|
if (ws_niflag_map[i][0] & winflags) {
|
|
|
|
unixflags |= ws_niflag_map[i][1];
|
|
|
|
winflags &= ~ws_niflag_map[i][0];
|
|
|
|
}
|
|
|
|
if (winflags)
|
|
|
|
FIXME("Unhandled windows NI_xxx flags %x\n", winflags);
|
|
|
|
return unixflags;
|
|
|
|
}
|
|
|
|
|
2005-11-17 13:58:35 +01:00
|
|
|
static int convert_aiflag_u2w(int unixflags) {
|
2008-12-10 22:55:35 +01:00
|
|
|
unsigned int i;
|
|
|
|
int winflags = 0;
|
2005-11-17 13:58:35 +01:00
|
|
|
|
2005-12-05 11:59:43 +01:00
|
|
|
for (i=0;i<sizeof(ws_aiflag_map)/sizeof(ws_aiflag_map[0]);i++)
|
2005-11-17 13:58:35 +01:00
|
|
|
if (ws_aiflag_map[i][1] & unixflags) {
|
|
|
|
winflags |= ws_aiflag_map[i][0];
|
|
|
|
unixflags &= ~ws_aiflag_map[i][1];
|
|
|
|
}
|
|
|
|
if (unixflags) /* will warn usually */
|
|
|
|
WARN("Unhandled UNIX AI_xxx flags %x\n", unixflags);
|
|
|
|
return winflags;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int convert_eai_u2w(int unixret) {
|
|
|
|
int i;
|
|
|
|
|
2013-12-26 20:57:05 +01:00
|
|
|
if (!unixret) return 0;
|
|
|
|
|
2005-11-17 13:58:35 +01:00
|
|
|
for (i=0;ws_eai_map[i][0];i++)
|
2005-12-12 11:55:11 +01:00
|
|
|
if (ws_eai_map[i][1] == unixret)
|
|
|
|
return ws_eai_map[i][0];
|
2013-12-11 09:01:02 +01:00
|
|
|
|
|
|
|
if (unixret == EAI_SYSTEM)
|
|
|
|
/* There are broken versions of glibc which return EAI_SYSTEM
|
|
|
|
* and set errno to 0 instead of returning EAI_NONAME.
|
|
|
|
*/
|
|
|
|
return errno ? sock_get_error( errno ) : WS_EAI_NONAME;
|
|
|
|
|
|
|
|
FIXME("Unhandled unix EAI_xxx ret %d\n", unixret);
|
2005-11-17 13:58:35 +01:00
|
|
|
return unixret;
|
|
|
|
}
|
|
|
|
|
2011-11-15 11:38:20 +01:00
|
|
|
static char *get_hostname(void)
|
|
|
|
{
|
|
|
|
char *ret;
|
|
|
|
DWORD size = 0;
|
|
|
|
|
|
|
|
GetComputerNameExA( ComputerNamePhysicalDnsHostname, NULL, &size );
|
|
|
|
if (GetLastError() != ERROR_MORE_DATA) return NULL;
|
|
|
|
if (!(ret = HeapAlloc( GetProcessHeap(), 0, size ))) return NULL;
|
|
|
|
if (!GetComputerNameExA( ComputerNamePhysicalDnsHostname, ret, &size ))
|
|
|
|
{
|
|
|
|
HeapFree( GetProcessHeap(), 0, ret );
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2005-11-17 13:58:35 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* getaddrinfo (WS2_32.@)
|
|
|
|
*/
|
2005-11-23 19:43:50 +01:00
|
|
|
int WINAPI WS_getaddrinfo(LPCSTR nodename, LPCSTR servname, const struct WS_addrinfo *hints, struct WS_addrinfo **res)
|
2005-11-17 13:58:35 +01:00
|
|
|
{
|
2008-03-06 12:33:25 +01:00
|
|
|
#ifdef HAVE_GETADDRINFO
|
2005-11-17 13:58:35 +01:00
|
|
|
struct addrinfo *unixaires = NULL;
|
|
|
|
int result;
|
|
|
|
struct addrinfo unixhints, *punixhints = NULL;
|
2015-09-08 05:14:32 +02:00
|
|
|
char *hostname;
|
2011-11-15 11:38:20 +01:00
|
|
|
const char *node;
|
2005-11-17 13:58:35 +01:00
|
|
|
|
2013-10-02 16:05:15 +02:00
|
|
|
*res = NULL;
|
2015-01-20 00:23:36 +01:00
|
|
|
if (!nodename && !servname)
|
|
|
|
{
|
|
|
|
SetLastError(WSAHOST_NOT_FOUND);
|
|
|
|
return WSAHOST_NOT_FOUND;
|
|
|
|
}
|
2005-11-17 13:58:35 +01:00
|
|
|
|
2015-09-08 05:14:32 +02:00
|
|
|
hostname = get_hostname();
|
|
|
|
if (!hostname) return WSA_NOT_ENOUGH_MEMORY;
|
|
|
|
|
2011-11-15 11:38:20 +01:00
|
|
|
if (!nodename)
|
2011-11-24 11:31:35 +01:00
|
|
|
node = NULL;
|
2011-11-15 11:38:20 +01:00
|
|
|
else if (!nodename[0])
|
2015-09-08 05:14:32 +02:00
|
|
|
node = hostname;
|
2011-11-15 11:38:20 +01:00
|
|
|
else
|
|
|
|
node = nodename;
|
|
|
|
|
2014-02-14 11:44:21 +01:00
|
|
|
/* servname tweak required by OSX and BSD kernels */
|
|
|
|
if (servname && !servname[0]) servname = "0";
|
|
|
|
|
2005-11-17 13:58:35 +01:00
|
|
|
if (hints) {
|
|
|
|
punixhints = &unixhints;
|
|
|
|
|
|
|
|
memset(&unixhints, 0, sizeof(unixhints));
|
2013-12-31 02:45:07 +01:00
|
|
|
punixhints->ai_flags = convert_aiflag_w2u(hints->ai_flags);
|
|
|
|
|
|
|
|
/* zero is a wildcard, no need to convert */
|
|
|
|
if (hints->ai_family)
|
2006-02-25 20:31:32 +01:00
|
|
|
punixhints->ai_family = convert_af_w2u(hints->ai_family);
|
2013-12-31 02:45:07 +01:00
|
|
|
if (hints->ai_socktype)
|
2006-01-04 15:07:34 +01:00
|
|
|
punixhints->ai_socktype = convert_socktype_w2u(hints->ai_socktype);
|
2013-12-31 02:45:07 +01:00
|
|
|
if (hints->ai_protocol)
|
|
|
|
punixhints->ai_protocol = max(convert_proto_w2u(hints->ai_protocol), 0);
|
|
|
|
|
|
|
|
if (punixhints->ai_socktype < 0)
|
|
|
|
{
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError(WSAESOCKTNOSUPPORT);
|
2014-01-04 18:36:34 +01:00
|
|
|
HeapFree(GetProcessHeap(), 0, hostname);
|
2013-12-31 02:45:07 +01:00
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* windows allows invalid combinations of socket type and protocol, unix does not.
|
|
|
|
* fix the parameters here to make getaddrinfo call always work */
|
|
|
|
if (punixhints->ai_protocol == IPPROTO_TCP &&
|
|
|
|
punixhints->ai_socktype != SOCK_STREAM && punixhints->ai_socktype != SOCK_SEQPACKET)
|
|
|
|
punixhints->ai_socktype = 0;
|
|
|
|
|
|
|
|
else if (punixhints->ai_protocol == IPPROTO_UDP && punixhints->ai_socktype != SOCK_DGRAM)
|
|
|
|
punixhints->ai_socktype = 0;
|
|
|
|
|
|
|
|
else if (IS_IPX_PROTO(punixhints->ai_protocol) && punixhints->ai_socktype != SOCK_DGRAM)
|
|
|
|
punixhints->ai_socktype = 0;
|
2005-11-17 13:58:35 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/* getaddrinfo(3) is thread safe, no need to wrap in CS */
|
2011-11-15 11:38:20 +01:00
|
|
|
result = getaddrinfo(node, servname, punixhints, &unixaires);
|
2005-11-17 13:58:35 +01:00
|
|
|
|
2015-09-08 05:14:32 +02:00
|
|
|
if (result && !strcmp(hostname, node))
|
|
|
|
{
|
|
|
|
/* If it didn't work it means the host name IP is not in /etc/hosts, try again
|
|
|
|
* by sending a NULL host and avoid sending a NULL servname too because that
|
|
|
|
* is invalid */
|
|
|
|
ERR_(winediag)("Failed to resolve your host name IP\n");
|
|
|
|
result = getaddrinfo(NULL, servname ? servname : "0", punixhints, &unixaires);
|
|
|
|
}
|
2008-06-15 09:01:20 +02:00
|
|
|
TRACE("%s, %s %p -> %p %d\n", debugstr_a(nodename), debugstr_a(servname), hints, res, result);
|
2011-11-15 11:38:20 +01:00
|
|
|
HeapFree(GetProcessHeap(), 0, hostname);
|
2005-11-17 13:58:35 +01:00
|
|
|
|
|
|
|
if (!result) {
|
|
|
|
struct addrinfo *xuai = unixaires;
|
|
|
|
struct WS_addrinfo **xai = res;
|
|
|
|
|
|
|
|
*xai = NULL;
|
|
|
|
while (xuai) {
|
|
|
|
struct WS_addrinfo *ai = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY, sizeof(struct WS_addrinfo));
|
2013-12-11 09:02:42 +01:00
|
|
|
SIZE_T len;
|
2005-11-17 13:58:35 +01:00
|
|
|
|
|
|
|
if (!ai)
|
|
|
|
goto outofmem;
|
|
|
|
|
|
|
|
*xai = ai;xai = &ai->ai_next;
|
|
|
|
ai->ai_flags = convert_aiflag_u2w(xuai->ai_flags);
|
|
|
|
ai->ai_family = convert_af_u2w(xuai->ai_family);
|
2013-12-31 02:45:07 +01:00
|
|
|
/* copy whatever was sent in the hints */
|
|
|
|
if(hints) {
|
|
|
|
ai->ai_socktype = hints->ai_socktype;
|
|
|
|
ai->ai_protocol = hints->ai_protocol;
|
|
|
|
} else {
|
|
|
|
ai->ai_socktype = convert_socktype_u2w(xuai->ai_socktype);
|
|
|
|
ai->ai_protocol = convert_proto_u2w(xuai->ai_protocol);
|
|
|
|
}
|
2005-11-17 13:58:35 +01:00
|
|
|
if (xuai->ai_canonname) {
|
|
|
|
TRACE("canon name - %s\n",debugstr_a(xuai->ai_canonname));
|
|
|
|
ai->ai_canonname = HeapAlloc(GetProcessHeap(),0,strlen(xuai->ai_canonname)+1);
|
|
|
|
if (!ai->ai_canonname)
|
|
|
|
goto outofmem;
|
|
|
|
strcpy(ai->ai_canonname,xuai->ai_canonname);
|
|
|
|
}
|
|
|
|
len = xuai->ai_addrlen;
|
|
|
|
ai->ai_addr = HeapAlloc(GetProcessHeap(),0,len);
|
|
|
|
if (!ai->ai_addr)
|
|
|
|
goto outofmem;
|
|
|
|
ai->ai_addrlen = len;
|
|
|
|
do {
|
|
|
|
int winlen = ai->ai_addrlen;
|
|
|
|
|
2007-05-30 20:11:58 +02:00
|
|
|
if (!ws_sockaddr_u2ws(xuai->ai_addr, ai->ai_addr, &winlen)) {
|
2005-11-17 13:58:35 +01:00
|
|
|
ai->ai_addrlen = winlen;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
len = 2*len;
|
|
|
|
ai->ai_addr = HeapReAlloc(GetProcessHeap(),0,ai->ai_addr,len);
|
|
|
|
if (!ai->ai_addr)
|
|
|
|
goto outofmem;
|
|
|
|
ai->ai_addrlen = len;
|
|
|
|
} while (1);
|
|
|
|
xuai = xuai->ai_next;
|
|
|
|
}
|
|
|
|
freeaddrinfo(unixaires);
|
2013-12-11 09:02:42 +01:00
|
|
|
|
|
|
|
if (TRACE_ON(winsock))
|
|
|
|
{
|
|
|
|
struct WS_addrinfo *ai = *res;
|
|
|
|
while (ai)
|
|
|
|
{
|
|
|
|
TRACE("=> %p, flags %#x, family %d, type %d, protocol %d, len %ld, name %s, addr %s\n",
|
|
|
|
ai, ai->ai_flags, ai->ai_family, ai->ai_socktype, ai->ai_protocol, ai->ai_addrlen,
|
|
|
|
ai->ai_canonname, debugstr_sockaddr(ai->ai_addr));
|
|
|
|
ai = ai->ai_next;
|
|
|
|
}
|
|
|
|
}
|
2013-10-02 16:05:15 +02:00
|
|
|
} else
|
2005-11-17 13:58:35 +01:00
|
|
|
result = convert_eai_u2w(result);
|
2013-10-02 16:05:15 +02:00
|
|
|
|
2015-01-20 00:23:36 +01:00
|
|
|
SetLastError(result);
|
2005-11-17 13:58:35 +01:00
|
|
|
return result;
|
|
|
|
|
|
|
|
outofmem:
|
|
|
|
if (*res) WS_freeaddrinfo(*res);
|
|
|
|
if (unixaires) freeaddrinfo(unixaires);
|
|
|
|
return WSA_NOT_ENOUGH_MEMORY;
|
|
|
|
#else
|
|
|
|
FIXME("getaddrinfo() failed, not found during buildtime.\n");
|
|
|
|
return EAI_FAIL;
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2009-04-24 16:01:56 +02:00
|
|
|
static struct WS_addrinfoW *addrinfo_AtoW(const struct WS_addrinfo *ai)
|
|
|
|
{
|
|
|
|
struct WS_addrinfoW *ret;
|
|
|
|
|
|
|
|
if (!(ret = HeapAlloc(GetProcessHeap(), 0, sizeof(struct WS_addrinfoW)))) return NULL;
|
|
|
|
ret->ai_flags = ai->ai_flags;
|
|
|
|
ret->ai_family = ai->ai_family;
|
|
|
|
ret->ai_socktype = ai->ai_socktype;
|
|
|
|
ret->ai_protocol = ai->ai_protocol;
|
|
|
|
ret->ai_addrlen = ai->ai_addrlen;
|
|
|
|
ret->ai_canonname = NULL;
|
|
|
|
ret->ai_addr = NULL;
|
|
|
|
ret->ai_next = NULL;
|
|
|
|
if (ai->ai_canonname)
|
|
|
|
{
|
|
|
|
int len = MultiByteToWideChar(CP_ACP, 0, ai->ai_canonname, -1, NULL, 0);
|
2015-05-08 18:01:58 +02:00
|
|
|
if (!(ret->ai_canonname = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR))))
|
2009-04-24 16:01:56 +02:00
|
|
|
{
|
|
|
|
HeapFree(GetProcessHeap(), 0, ret);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
MultiByteToWideChar(CP_ACP, 0, ai->ai_canonname, -1, ret->ai_canonname, len);
|
|
|
|
}
|
|
|
|
if (ai->ai_addr)
|
|
|
|
{
|
2014-02-18 05:24:09 +01:00
|
|
|
if (!(ret->ai_addr = HeapAlloc(GetProcessHeap(), 0, ai->ai_addrlen)))
|
2009-04-24 16:01:56 +02:00
|
|
|
{
|
|
|
|
HeapFree(GetProcessHeap(), 0, ret->ai_canonname);
|
|
|
|
HeapFree(GetProcessHeap(), 0, ret);
|
|
|
|
return NULL;
|
|
|
|
}
|
2014-02-18 05:24:09 +01:00
|
|
|
memcpy(ret->ai_addr, ai->ai_addr, ai->ai_addrlen);
|
2009-04-24 16:01:56 +02:00
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
static struct WS_addrinfoW *addrinfo_list_AtoW(const struct WS_addrinfo *info)
|
|
|
|
{
|
|
|
|
struct WS_addrinfoW *ret, *infoW;
|
|
|
|
|
|
|
|
if (!(ret = infoW = addrinfo_AtoW(info))) return NULL;
|
|
|
|
while (info->ai_next)
|
|
|
|
{
|
|
|
|
if (!(infoW->ai_next = addrinfo_AtoW(info->ai_next)))
|
|
|
|
{
|
|
|
|
FreeAddrInfoW(ret);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
infoW = infoW->ai_next;
|
|
|
|
info = info->ai_next;
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
static struct WS_addrinfo *addrinfo_WtoA(const struct WS_addrinfoW *ai)
|
|
|
|
{
|
|
|
|
struct WS_addrinfo *ret;
|
|
|
|
|
|
|
|
if (!(ret = HeapAlloc(GetProcessHeap(), 0, sizeof(struct WS_addrinfo)))) return NULL;
|
|
|
|
ret->ai_flags = ai->ai_flags;
|
|
|
|
ret->ai_family = ai->ai_family;
|
|
|
|
ret->ai_socktype = ai->ai_socktype;
|
|
|
|
ret->ai_protocol = ai->ai_protocol;
|
|
|
|
ret->ai_addrlen = ai->ai_addrlen;
|
|
|
|
ret->ai_canonname = NULL;
|
|
|
|
ret->ai_addr = NULL;
|
|
|
|
ret->ai_next = NULL;
|
|
|
|
if (ai->ai_canonname)
|
|
|
|
{
|
|
|
|
int len = WideCharToMultiByte(CP_ACP, 0, ai->ai_canonname, -1, NULL, 0, NULL, NULL);
|
|
|
|
if (!(ret->ai_canonname = HeapAlloc(GetProcessHeap(), 0, len)))
|
|
|
|
{
|
|
|
|
HeapFree(GetProcessHeap(), 0, ret);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
WideCharToMultiByte(CP_ACP, 0, ai->ai_canonname, -1, ret->ai_canonname, len, NULL, NULL);
|
|
|
|
}
|
|
|
|
if (ai->ai_addr)
|
|
|
|
{
|
|
|
|
if (!(ret->ai_addr = HeapAlloc(GetProcessHeap(), 0, sizeof(struct WS_sockaddr))))
|
|
|
|
{
|
|
|
|
HeapFree(GetProcessHeap(), 0, ret->ai_canonname);
|
|
|
|
HeapFree(GetProcessHeap(), 0, ret);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
memcpy(ret->ai_addr, ai->ai_addr, sizeof(struct WS_sockaddr));
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2015-10-28 16:51:51 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* GetAddrInfoExW (WS2_32.@)
|
|
|
|
*/
|
|
|
|
int WINAPI GetAddrInfoExW(const WCHAR *name, const WCHAR *servname, DWORD namespace, GUID *namespace_id,
|
|
|
|
const ADDRINFOEXW *hints, ADDRINFOEXW **result, struct timeval *timeout, OVERLAPPED *overlapped,
|
|
|
|
LPLOOKUPSERVICE_COMPLETION_ROUTINE completion_routine, HANDLE *handle)
|
|
|
|
{
|
|
|
|
FIXME("(%s %s %x %s %p %p %p %p %p %p)\n", debugstr_w(name), debugstr_w(servname), namespace,
|
|
|
|
debugstr_guid(namespace_id), hints, result, timeout, overlapped, completion_routine, handle);
|
|
|
|
return WSAHOST_NOT_FOUND;
|
|
|
|
}
|
|
|
|
|
2005-11-17 13:58:35 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* GetAddrInfoW (WS2_32.@)
|
|
|
|
*/
|
2005-11-23 19:43:50 +01:00
|
|
|
int WINAPI GetAddrInfoW(LPCWSTR nodename, LPCWSTR servname, const ADDRINFOW *hints, PADDRINFOW *res)
|
2005-11-17 13:58:35 +01:00
|
|
|
{
|
2009-04-24 16:01:56 +02:00
|
|
|
int ret, len;
|
2011-11-15 11:38:20 +01:00
|
|
|
char *nodenameA = NULL, *servnameA = NULL;
|
2009-04-24 16:01:56 +02:00
|
|
|
struct WS_addrinfo *resA, *hintsA = NULL;
|
|
|
|
|
2013-10-02 16:05:15 +02:00
|
|
|
*res = NULL;
|
2011-11-15 11:38:20 +01:00
|
|
|
if (nodename)
|
|
|
|
{
|
|
|
|
len = WideCharToMultiByte(CP_ACP, 0, nodename, -1, NULL, 0, NULL, NULL);
|
|
|
|
if (!(nodenameA = HeapAlloc(GetProcessHeap(), 0, len))) return EAI_MEMORY;
|
|
|
|
WideCharToMultiByte(CP_ACP, 0, nodename, -1, nodenameA, len, NULL, NULL);
|
|
|
|
}
|
2009-04-24 16:01:56 +02:00
|
|
|
if (servname)
|
|
|
|
{
|
|
|
|
len = WideCharToMultiByte(CP_ACP, 0, servname, -1, NULL, 0, NULL, NULL);
|
|
|
|
if (!(servnameA = HeapAlloc(GetProcessHeap(), 0, len)))
|
|
|
|
{
|
|
|
|
HeapFree(GetProcessHeap(), 0, nodenameA);
|
|
|
|
return EAI_MEMORY;
|
|
|
|
}
|
|
|
|
WideCharToMultiByte(CP_ACP, 0, servname, -1, servnameA, len, NULL, NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (hints) hintsA = addrinfo_WtoA(hints);
|
|
|
|
ret = WS_getaddrinfo(nodenameA, servnameA, hintsA, &resA);
|
|
|
|
WS_freeaddrinfo(hintsA);
|
|
|
|
|
|
|
|
if (!ret)
|
|
|
|
{
|
|
|
|
*res = addrinfo_list_AtoW(resA);
|
|
|
|
WS_freeaddrinfo(resA);
|
|
|
|
}
|
|
|
|
|
|
|
|
HeapFree(GetProcessHeap(), 0, nodenameA);
|
|
|
|
HeapFree(GetProcessHeap(), 0, servnameA);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* FreeAddrInfoW (WS2_32.@)
|
|
|
|
*/
|
|
|
|
void WINAPI FreeAddrInfoW(PADDRINFOW ai)
|
|
|
|
{
|
|
|
|
while (ai)
|
|
|
|
{
|
|
|
|
ADDRINFOW *next;
|
|
|
|
HeapFree(GetProcessHeap(), 0, ai->ai_canonname);
|
|
|
|
HeapFree(GetProcessHeap(), 0, ai->ai_addr);
|
|
|
|
next = ai->ai_next;
|
|
|
|
HeapFree(GetProcessHeap(), 0, ai);
|
|
|
|
ai = next;
|
|
|
|
}
|
2005-11-17 13:58:35 +01:00
|
|
|
}
|
Release 971101
Thu Oct 30 21:52:23 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [windows/nonclient.c]
Changed NC_TrackSysMenu to give the same behaviour as MS-Windows,
i.e. system menu already appears when mouse button is depressed.
Changed NC_HandleNCLButtonDblClk so that double clicks on scroll
bar arrows are handled the same way as single clicks.
* [windows/winpos.c]
Fixed SetWindowPos32 to clear WIN_NO_REDRAW when SWP_SHOWWINDOW is
set; this is the way MS-Windows behaves.
Thu Oct 30 21:08:57 1997 Morten Welinder <terra@diku.dk>
* [controls/status.c]
In SW_SetText, fix condition, I hope.
* [controls/menu.c]
(GetMenuState32): Don't mask return value. Print more debug info.
(MENU_MenuBarCalcSize): Be more careful when printing debug
information.
(MENU_SetItemData): Empty strings are separators.
* [graphics/x11drv/text.c]
Don't prototype CLIPPING_IntersectClipRect.
* [include/dc.h]
Prototype CLIPPING_IntersectClipRect.
* [objects/font.c]
Remove non-portable (and faulty) smartness in FONT_TextMetric*to*.
In CreateFont32W and CreateFont16, handle null font name.
* [objects/text.c]
(TEXT_NextLine): Fix end-of-line bug.
* [if1632/shell32.spec]
Activate existing implementation of ExtractIconA.
* [misc/shell.c]
For Control_RunDLL, add types for parameters.
Thu Oct 30 14:54:11 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [controls/static.c] [include/windows.h] [misc/spy.c]
Added some win32 defines to static controls, basic SS_BITMAP style
handling implemented. [please add more, I am lacking knowledge and
time]
* [controls/status.c]
part_num 255 seems to indicate whole statusline (win95 cdplayer.exe)
* [if1632/thunk.c] [tools/build.c]
Support lret and 0x66 lret calls for CallTo16_regs
(needed for KERNEL32_45)
Fixed KERNEL32_45, QT_Thunk (should work now).
* [if1632/relay.c][if1632/builtin.c][tools/build.c][if1632/*32.spec]
Added string dumping to relay debugging for win32 apifuncs.
* [misc/ver.c]
Fixed and cleaned up VerQueryValue*.
* [multimedia/*.c][include/mmsystem.h][if1632/mmsystem.spec]
[if1632/winmm.spec]
Win32 support for lowlevel multimedia functions.
Added some mixer* lowlevel functions.
Some small fixes in the audio lowlevel queue handling, code
reformatting/cleanups.
* [debugger/hash.c]
Don't show difference between 16bit symbols if they are in
different segments.
* [objects/cursoricon.c]
Added GetIconInfo (partial) and CreateIconIndirect.
* [windows/mdi.c]
Fixed some "bad class" problems and crashes in MDICreateChild,
which happen in Win32 (jwp32.exe).
Wed Oct 29 00:57:27 1997 Bruce Milner <Bruce.Milner@genetics.utah.edu>
* [if1632/winaspi.spec] [misc/aspi.c] [include/aspi.c]
[documentation/aspi] [include/callback.h]
Added support for 16 bit ASPI calls to linux generic SCSI.
The support is not complete, but appears to run my Mustek
scanner from within ipplus.exe.
Mon Oct 27 00:59:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [windows/dce.c]
DC reuse framework.
Sun Oct 26 18:41:21 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/x11drv/xfont.c]
Substituted fonts are removed from the alias table. References to
the old name are also updated.
* [controls/combo.c]
LB_SELECTSTRING32 not CB_SELECTSTRING32 should be sent to
ComboLBox.
Sun Oct 26 14:25:00 1997 Nikita V. Youshchenko <yoush@cs.msu.su>
* [include/drive.h] [files/drive.c] [msdos/int21.c]
Partially implemented DOS drive mapping (int21 AX=440F).
Sat Oct 25 13:03:29 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [debugger/debug.l]
Support '.' in identifiers. Use "x . y" to access structure
fields.
* [debugger/hash.c] [loader/pe_image.c]
Load entry points of Win32 modules only when entering the
debugger.
* [debugger/break.c]
New function DEBUG_AddModuleBreakpoint() to set a breakpoint at
the start of every module.
* [files/file.c]
FILE_mmap() can now fake mmap() for unaligned offsets or broken
filesystems.
* [include/callback.h] [misc/callback.c] [if1632/thunk.c]
Use a table of callbacks instead of macros to differentiate
between emulator and Winelib.
* [loader/task.c]
Initialize current directory from cwd, not from module path.
* [tools/build.c]
Read CallTo16 prototypes directly from thunk.c source file.
* [windows/winproc.c] [windows/mdi.c]
Added translation for WM_MDIACTIVATE and WM_MDIGETACTIVE.
Fri Oct 24 21:41:25 1997 Uwe Bonnes <bon@elektron.ikp.tu-darmstadt.de>
* [files/drive.c]
Allow arguments like "a" for the drive related apis.
* [memory/global.c]
Keep the calculation for dwMemoryLoad in range.
* [misc/crtdll.c]
Make CRTDLL_getcwd use GetCurrentDirectory32A and alloc
its memory if requested.
Implemented CRTDLL_rename and CRTDLL_stat needed for
lcc-win32:wedit.exe.
Implemented CRTDLL__fullpath.
* [misc/comm.c]
High speed modes for the 16-bit mode Comm functions.
* [misc/cpu.c]
As applications may treat lpMaximumApplicationAddress as long,
use a valid long number.
* [misc/main.c]
In SystemParametersInfo16 ignore SPI_GETHIGHCONTRAST too.
* [misc/ole2nls.c]
Implement LCMAP_UPPERCASE for LCMapString32.
* [misc/wsprintf]
Made WPRINTF_ParseFormatA understand %ws.
* [win32/file.c]
Ignore FILE_ATTRIBUTE_NORMAL.
Stub for ReadFileEx.
Fri Oct 24 15:36:02 1997 Doug Ridgway <ridgway@routh.ucsd.edu>
* [memory/local.c]
Local heap exhaustion message now prints which builtin heap filled.
Fri Oct 24 00:46:34 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/dialog.c]
Reversed CreateFont16/32W typo.
Thu Oct 23 23:44:20 1997 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [if1632/user.spec]
Fixed argument list for ChangeClipboardChain.
* [windows/mdi.c]
Pass correct hInstance to CreateWindow16() in MDICreateChild().
Mon Oct 20 11:51:24 1997 Carsten Fallesen <cf@it.dtu.dk>
* [objects/metafile.c]
Added support for META_SETTEXTCHAREXTRA.
* [objects/region.c]
Fixed crash in XPolygonRegion if there is only one point in
in the region.
* [if1632/gdi32.spec][include/gdi.h][include/windows.h]
[objects/gdiobj.c]
Completed OBJ_XXX defines in gdi.h, removed OBJ_XXX in gdiobj.c
and included gdi.h instead. Implemented GetObjectType32().
Thu Oct 16 17:21:32 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [documentation/wine.texinfo]
Fixed WIN32 and Makefiles entries of Reference manual node, that
made makeinfo dump core.
Mon Oct 13 17:15:57 1997 Robert Wilhelm <robert@physiol.med.tu-muenchen.de>
* [if1632/crtdll.spec]
Added missing math functions y0(), y1(), y2(), floor(), frexp(),
ldexp(), modf().
1997-11-01 20:08:16 +01:00
|
|
|
|
2006-07-13 14:06:30 +02:00
|
|
|
int WINAPI WS_getnameinfo(const SOCKADDR *sa, WS_socklen_t salen, PCHAR host,
|
2006-02-24 15:58:09 +01:00
|
|
|
DWORD hostlen, PCHAR serv, DWORD servlen, INT flags)
|
2006-02-20 14:16:38 +01:00
|
|
|
{
|
2008-03-06 12:33:25 +01:00
|
|
|
#ifdef HAVE_GETNAMEINFO
|
2006-02-20 14:16:38 +01:00
|
|
|
int ret;
|
2007-05-30 20:11:58 +02:00
|
|
|
union generic_unix_sockaddr sa_u;
|
2006-02-20 14:16:38 +01:00
|
|
|
unsigned int size;
|
|
|
|
|
2006-10-12 14:53:44 +02:00
|
|
|
TRACE("%s %d %p %d %p %d %d\n", debugstr_sockaddr(sa), salen, host, hostlen,
|
2006-02-20 14:16:38 +01:00
|
|
|
serv, servlen, flags);
|
|
|
|
|
2007-05-30 20:11:58 +02:00
|
|
|
size = ws_sockaddr_ws2u(sa, salen, &sa_u);
|
|
|
|
if (!size)
|
2006-02-20 14:16:38 +01:00
|
|
|
{
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError(WSAEFAULT);
|
2006-02-20 14:16:38 +01:00
|
|
|
return WSA_NOT_ENOUGH_MEMORY;
|
|
|
|
}
|
2007-12-17 15:40:02 +01:00
|
|
|
ret = getnameinfo(&sa_u.addr, size, host, hostlen, serv, servlen, convert_niflag_w2u(flags));
|
2006-02-20 14:16:38 +01:00
|
|
|
return convert_eai_u2w(ret);
|
|
|
|
#else
|
|
|
|
FIXME("getnameinfo() failed, not found during buildtime.\n");
|
|
|
|
return EAI_FAIL;
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2011-03-29 13:03:24 +02:00
|
|
|
int WINAPI GetNameInfoW(const SOCKADDR *sa, WS_socklen_t salen, PWCHAR host,
|
|
|
|
DWORD hostlen, PWCHAR serv, DWORD servlen, INT flags)
|
|
|
|
{
|
|
|
|
int ret;
|
|
|
|
char *hostA = NULL, *servA = NULL;
|
|
|
|
|
|
|
|
if (host && (!(hostA = HeapAlloc(GetProcessHeap(), 0, hostlen)))) return EAI_MEMORY;
|
|
|
|
if (serv && (!(servA = HeapAlloc(GetProcessHeap(), 0, servlen))))
|
|
|
|
{
|
|
|
|
HeapFree(GetProcessHeap(), 0, hostA);
|
|
|
|
return EAI_MEMORY;
|
|
|
|
}
|
|
|
|
|
|
|
|
ret = WS_getnameinfo(sa, salen, hostA, hostlen, servA, servlen, flags);
|
|
|
|
if (!ret)
|
|
|
|
{
|
|
|
|
if (host) MultiByteToWideChar(CP_ACP, 0, hostA, -1, host, hostlen);
|
|
|
|
if (serv) MultiByteToWideChar(CP_ACP, 0, servA, -1, serv, servlen);
|
|
|
|
}
|
|
|
|
|
|
|
|
HeapFree(GetProcessHeap(), 0, hostA);
|
|
|
|
HeapFree(GetProcessHeap(), 0, servA);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
1997-08-24 18:00:30 +02:00
|
|
|
/***********************************************************************
|
2003-11-29 00:14:02 +01:00
|
|
|
* getservbyport (WS2_32.56)
|
1997-08-24 18:00:30 +02:00
|
|
|
*/
|
2003-11-29 00:14:02 +01:00
|
|
|
struct WS_servent* WINAPI WS_getservbyport(int port, const char *proto)
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
{
|
2003-11-29 00:14:02 +01:00
|
|
|
struct WS_servent* retval = NULL;
|
2002-08-01 01:20:47 +02:00
|
|
|
#ifdef HAVE_GETSERVBYPORT
|
2001-02-20 02:57:13 +01:00
|
|
|
struct servent* serv;
|
2003-11-29 00:14:02 +01:00
|
|
|
char *proto_str = NULL;
|
|
|
|
|
|
|
|
if (proto && *proto)
|
|
|
|
{
|
|
|
|
if (!(proto_str = strdup_lower(proto))) return NULL;
|
2001-02-20 02:57:13 +01:00
|
|
|
}
|
2003-11-29 00:14:02 +01:00
|
|
|
EnterCriticalSection( &csWSgetXXXbyYYY );
|
|
|
|
if( (serv = getservbyport(port, proto_str)) != NULL ) {
|
|
|
|
retval = WS_dup_se(serv);
|
|
|
|
}
|
2003-11-30 03:54:25 +01:00
|
|
|
else SetLastError(WSANO_DATA);
|
2003-11-29 00:14:02 +01:00
|
|
|
LeaveCriticalSection( &csWSgetXXXbyYYY );
|
2004-12-23 18:06:43 +01:00
|
|
|
HeapFree( GetProcessHeap(), 0, proto_str );
|
2002-08-01 01:20:47 +02:00
|
|
|
#endif
|
2003-11-29 00:14:02 +01:00
|
|
|
TRACE("%d (i.e. port %d), %s ret %p\n", port, (int)ntohl(port), debugstr_a(proto), retval);
|
2000-09-24 21:41:57 +02:00
|
|
|
return retval;
|
Release 971101
Thu Oct 30 21:52:23 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [windows/nonclient.c]
Changed NC_TrackSysMenu to give the same behaviour as MS-Windows,
i.e. system menu already appears when mouse button is depressed.
Changed NC_HandleNCLButtonDblClk so that double clicks on scroll
bar arrows are handled the same way as single clicks.
* [windows/winpos.c]
Fixed SetWindowPos32 to clear WIN_NO_REDRAW when SWP_SHOWWINDOW is
set; this is the way MS-Windows behaves.
Thu Oct 30 21:08:57 1997 Morten Welinder <terra@diku.dk>
* [controls/status.c]
In SW_SetText, fix condition, I hope.
* [controls/menu.c]
(GetMenuState32): Don't mask return value. Print more debug info.
(MENU_MenuBarCalcSize): Be more careful when printing debug
information.
(MENU_SetItemData): Empty strings are separators.
* [graphics/x11drv/text.c]
Don't prototype CLIPPING_IntersectClipRect.
* [include/dc.h]
Prototype CLIPPING_IntersectClipRect.
* [objects/font.c]
Remove non-portable (and faulty) smartness in FONT_TextMetric*to*.
In CreateFont32W and CreateFont16, handle null font name.
* [objects/text.c]
(TEXT_NextLine): Fix end-of-line bug.
* [if1632/shell32.spec]
Activate existing implementation of ExtractIconA.
* [misc/shell.c]
For Control_RunDLL, add types for parameters.
Thu Oct 30 14:54:11 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [controls/static.c] [include/windows.h] [misc/spy.c]
Added some win32 defines to static controls, basic SS_BITMAP style
handling implemented. [please add more, I am lacking knowledge and
time]
* [controls/status.c]
part_num 255 seems to indicate whole statusline (win95 cdplayer.exe)
* [if1632/thunk.c] [tools/build.c]
Support lret and 0x66 lret calls for CallTo16_regs
(needed for KERNEL32_45)
Fixed KERNEL32_45, QT_Thunk (should work now).
* [if1632/relay.c][if1632/builtin.c][tools/build.c][if1632/*32.spec]
Added string dumping to relay debugging for win32 apifuncs.
* [misc/ver.c]
Fixed and cleaned up VerQueryValue*.
* [multimedia/*.c][include/mmsystem.h][if1632/mmsystem.spec]
[if1632/winmm.spec]
Win32 support for lowlevel multimedia functions.
Added some mixer* lowlevel functions.
Some small fixes in the audio lowlevel queue handling, code
reformatting/cleanups.
* [debugger/hash.c]
Don't show difference between 16bit symbols if they are in
different segments.
* [objects/cursoricon.c]
Added GetIconInfo (partial) and CreateIconIndirect.
* [windows/mdi.c]
Fixed some "bad class" problems and crashes in MDICreateChild,
which happen in Win32 (jwp32.exe).
Wed Oct 29 00:57:27 1997 Bruce Milner <Bruce.Milner@genetics.utah.edu>
* [if1632/winaspi.spec] [misc/aspi.c] [include/aspi.c]
[documentation/aspi] [include/callback.h]
Added support for 16 bit ASPI calls to linux generic SCSI.
The support is not complete, but appears to run my Mustek
scanner from within ipplus.exe.
Mon Oct 27 00:59:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [windows/dce.c]
DC reuse framework.
Sun Oct 26 18:41:21 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/x11drv/xfont.c]
Substituted fonts are removed from the alias table. References to
the old name are also updated.
* [controls/combo.c]
LB_SELECTSTRING32 not CB_SELECTSTRING32 should be sent to
ComboLBox.
Sun Oct 26 14:25:00 1997 Nikita V. Youshchenko <yoush@cs.msu.su>
* [include/drive.h] [files/drive.c] [msdos/int21.c]
Partially implemented DOS drive mapping (int21 AX=440F).
Sat Oct 25 13:03:29 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [debugger/debug.l]
Support '.' in identifiers. Use "x . y" to access structure
fields.
* [debugger/hash.c] [loader/pe_image.c]
Load entry points of Win32 modules only when entering the
debugger.
* [debugger/break.c]
New function DEBUG_AddModuleBreakpoint() to set a breakpoint at
the start of every module.
* [files/file.c]
FILE_mmap() can now fake mmap() for unaligned offsets or broken
filesystems.
* [include/callback.h] [misc/callback.c] [if1632/thunk.c]
Use a table of callbacks instead of macros to differentiate
between emulator and Winelib.
* [loader/task.c]
Initialize current directory from cwd, not from module path.
* [tools/build.c]
Read CallTo16 prototypes directly from thunk.c source file.
* [windows/winproc.c] [windows/mdi.c]
Added translation for WM_MDIACTIVATE and WM_MDIGETACTIVE.
Fri Oct 24 21:41:25 1997 Uwe Bonnes <bon@elektron.ikp.tu-darmstadt.de>
* [files/drive.c]
Allow arguments like "a" for the drive related apis.
* [memory/global.c]
Keep the calculation for dwMemoryLoad in range.
* [misc/crtdll.c]
Make CRTDLL_getcwd use GetCurrentDirectory32A and alloc
its memory if requested.
Implemented CRTDLL_rename and CRTDLL_stat needed for
lcc-win32:wedit.exe.
Implemented CRTDLL__fullpath.
* [misc/comm.c]
High speed modes for the 16-bit mode Comm functions.
* [misc/cpu.c]
As applications may treat lpMaximumApplicationAddress as long,
use a valid long number.
* [misc/main.c]
In SystemParametersInfo16 ignore SPI_GETHIGHCONTRAST too.
* [misc/ole2nls.c]
Implement LCMAP_UPPERCASE for LCMapString32.
* [misc/wsprintf]
Made WPRINTF_ParseFormatA understand %ws.
* [win32/file.c]
Ignore FILE_ATTRIBUTE_NORMAL.
Stub for ReadFileEx.
Fri Oct 24 15:36:02 1997 Doug Ridgway <ridgway@routh.ucsd.edu>
* [memory/local.c]
Local heap exhaustion message now prints which builtin heap filled.
Fri Oct 24 00:46:34 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/dialog.c]
Reversed CreateFont16/32W typo.
Thu Oct 23 23:44:20 1997 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [if1632/user.spec]
Fixed argument list for ChangeClipboardChain.
* [windows/mdi.c]
Pass correct hInstance to CreateWindow16() in MDICreateChild().
Mon Oct 20 11:51:24 1997 Carsten Fallesen <cf@it.dtu.dk>
* [objects/metafile.c]
Added support for META_SETTEXTCHAREXTRA.
* [objects/region.c]
Fixed crash in XPolygonRegion if there is only one point in
in the region.
* [if1632/gdi32.spec][include/gdi.h][include/windows.h]
[objects/gdiobj.c]
Completed OBJ_XXX defines in gdi.h, removed OBJ_XXX in gdiobj.c
and included gdi.h instead. Implemented GetObjectType32().
Thu Oct 16 17:21:32 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [documentation/wine.texinfo]
Fixed WIN32 and Makefiles entries of Reference manual node, that
made makeinfo dump core.
Mon Oct 13 17:15:57 1997 Robert Wilhelm <robert@physiol.med.tu-muenchen.de>
* [if1632/crtdll.spec]
Added missing math functions y0(), y1(), y2(), floor(), frexp(),
ldexp(), modf().
1997-11-01 20:08:16 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
1997-08-24 18:00:30 +02:00
|
|
|
/***********************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* gethostname (WS2_32.57)
|
1997-08-24 18:00:30 +02:00
|
|
|
*/
|
2001-11-14 22:26:23 +01:00
|
|
|
int WINAPI WS_gethostname(char *name, int namelen)
|
1997-08-24 18:00:30 +02:00
|
|
|
{
|
2015-03-11 18:08:09 +01:00
|
|
|
char buf[256];
|
|
|
|
int len;
|
|
|
|
|
2001-02-20 02:57:13 +01:00
|
|
|
TRACE("name %p, len %d\n", name, namelen);
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
|
2015-03-11 18:08:09 +01:00
|
|
|
if (!name)
|
1997-08-24 18:00:30 +02:00
|
|
|
{
|
2015-03-11 18:08:09 +01:00
|
|
|
SetLastError(WSAEFAULT);
|
|
|
|
return SOCKET_ERROR;
|
1997-08-24 18:00:30 +02:00
|
|
|
}
|
2015-03-11 18:08:09 +01:00
|
|
|
|
|
|
|
if (gethostname(buf, sizeof(buf)) != 0)
|
|
|
|
{
|
|
|
|
SetLastError(wsaErrno());
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
TRACE("<- '%s'\n", buf);
|
|
|
|
len = strlen(buf);
|
|
|
|
if (len > 15)
|
|
|
|
WARN("Windows supports NetBIOS name length up to 15 bytes!\n");
|
|
|
|
if (namelen <= len)
|
|
|
|
{
|
|
|
|
SetLastError(WSAEFAULT);
|
|
|
|
WARN("<- not enough space for hostname, required %d, got %d!\n", len + 1, namelen);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
strcpy(name, buf);
|
|
|
|
return 0;
|
Release 971101
Thu Oct 30 21:52:23 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [windows/nonclient.c]
Changed NC_TrackSysMenu to give the same behaviour as MS-Windows,
i.e. system menu already appears when mouse button is depressed.
Changed NC_HandleNCLButtonDblClk so that double clicks on scroll
bar arrows are handled the same way as single clicks.
* [windows/winpos.c]
Fixed SetWindowPos32 to clear WIN_NO_REDRAW when SWP_SHOWWINDOW is
set; this is the way MS-Windows behaves.
Thu Oct 30 21:08:57 1997 Morten Welinder <terra@diku.dk>
* [controls/status.c]
In SW_SetText, fix condition, I hope.
* [controls/menu.c]
(GetMenuState32): Don't mask return value. Print more debug info.
(MENU_MenuBarCalcSize): Be more careful when printing debug
information.
(MENU_SetItemData): Empty strings are separators.
* [graphics/x11drv/text.c]
Don't prototype CLIPPING_IntersectClipRect.
* [include/dc.h]
Prototype CLIPPING_IntersectClipRect.
* [objects/font.c]
Remove non-portable (and faulty) smartness in FONT_TextMetric*to*.
In CreateFont32W and CreateFont16, handle null font name.
* [objects/text.c]
(TEXT_NextLine): Fix end-of-line bug.
* [if1632/shell32.spec]
Activate existing implementation of ExtractIconA.
* [misc/shell.c]
For Control_RunDLL, add types for parameters.
Thu Oct 30 14:54:11 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [controls/static.c] [include/windows.h] [misc/spy.c]
Added some win32 defines to static controls, basic SS_BITMAP style
handling implemented. [please add more, I am lacking knowledge and
time]
* [controls/status.c]
part_num 255 seems to indicate whole statusline (win95 cdplayer.exe)
* [if1632/thunk.c] [tools/build.c]
Support lret and 0x66 lret calls for CallTo16_regs
(needed for KERNEL32_45)
Fixed KERNEL32_45, QT_Thunk (should work now).
* [if1632/relay.c][if1632/builtin.c][tools/build.c][if1632/*32.spec]
Added string dumping to relay debugging for win32 apifuncs.
* [misc/ver.c]
Fixed and cleaned up VerQueryValue*.
* [multimedia/*.c][include/mmsystem.h][if1632/mmsystem.spec]
[if1632/winmm.spec]
Win32 support for lowlevel multimedia functions.
Added some mixer* lowlevel functions.
Some small fixes in the audio lowlevel queue handling, code
reformatting/cleanups.
* [debugger/hash.c]
Don't show difference between 16bit symbols if they are in
different segments.
* [objects/cursoricon.c]
Added GetIconInfo (partial) and CreateIconIndirect.
* [windows/mdi.c]
Fixed some "bad class" problems and crashes in MDICreateChild,
which happen in Win32 (jwp32.exe).
Wed Oct 29 00:57:27 1997 Bruce Milner <Bruce.Milner@genetics.utah.edu>
* [if1632/winaspi.spec] [misc/aspi.c] [include/aspi.c]
[documentation/aspi] [include/callback.h]
Added support for 16 bit ASPI calls to linux generic SCSI.
The support is not complete, but appears to run my Mustek
scanner from within ipplus.exe.
Mon Oct 27 00:59:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [windows/dce.c]
DC reuse framework.
Sun Oct 26 18:41:21 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/x11drv/xfont.c]
Substituted fonts are removed from the alias table. References to
the old name are also updated.
* [controls/combo.c]
LB_SELECTSTRING32 not CB_SELECTSTRING32 should be sent to
ComboLBox.
Sun Oct 26 14:25:00 1997 Nikita V. Youshchenko <yoush@cs.msu.su>
* [include/drive.h] [files/drive.c] [msdos/int21.c]
Partially implemented DOS drive mapping (int21 AX=440F).
Sat Oct 25 13:03:29 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [debugger/debug.l]
Support '.' in identifiers. Use "x . y" to access structure
fields.
* [debugger/hash.c] [loader/pe_image.c]
Load entry points of Win32 modules only when entering the
debugger.
* [debugger/break.c]
New function DEBUG_AddModuleBreakpoint() to set a breakpoint at
the start of every module.
* [files/file.c]
FILE_mmap() can now fake mmap() for unaligned offsets or broken
filesystems.
* [include/callback.h] [misc/callback.c] [if1632/thunk.c]
Use a table of callbacks instead of macros to differentiate
between emulator and Winelib.
* [loader/task.c]
Initialize current directory from cwd, not from module path.
* [tools/build.c]
Read CallTo16 prototypes directly from thunk.c source file.
* [windows/winproc.c] [windows/mdi.c]
Added translation for WM_MDIACTIVATE and WM_MDIGETACTIVE.
Fri Oct 24 21:41:25 1997 Uwe Bonnes <bon@elektron.ikp.tu-darmstadt.de>
* [files/drive.c]
Allow arguments like "a" for the drive related apis.
* [memory/global.c]
Keep the calculation for dwMemoryLoad in range.
* [misc/crtdll.c]
Make CRTDLL_getcwd use GetCurrentDirectory32A and alloc
its memory if requested.
Implemented CRTDLL_rename and CRTDLL_stat needed for
lcc-win32:wedit.exe.
Implemented CRTDLL__fullpath.
* [misc/comm.c]
High speed modes for the 16-bit mode Comm functions.
* [misc/cpu.c]
As applications may treat lpMaximumApplicationAddress as long,
use a valid long number.
* [misc/main.c]
In SystemParametersInfo16 ignore SPI_GETHIGHCONTRAST too.
* [misc/ole2nls.c]
Implement LCMAP_UPPERCASE for LCMapString32.
* [misc/wsprintf]
Made WPRINTF_ParseFormatA understand %ws.
* [win32/file.c]
Ignore FILE_ATTRIBUTE_NORMAL.
Stub for ReadFileEx.
Fri Oct 24 15:36:02 1997 Doug Ridgway <ridgway@routh.ucsd.edu>
* [memory/local.c]
Local heap exhaustion message now prints which builtin heap filled.
Fri Oct 24 00:46:34 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/dialog.c]
Reversed CreateFont16/32W typo.
Thu Oct 23 23:44:20 1997 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [if1632/user.spec]
Fixed argument list for ChangeClipboardChain.
* [windows/mdi.c]
Pass correct hInstance to CreateWindow16() in MDICreateChild().
Mon Oct 20 11:51:24 1997 Carsten Fallesen <cf@it.dtu.dk>
* [objects/metafile.c]
Added support for META_SETTEXTCHAREXTRA.
* [objects/region.c]
Fixed crash in XPolygonRegion if there is only one point in
in the region.
* [if1632/gdi32.spec][include/gdi.h][include/windows.h]
[objects/gdiobj.c]
Completed OBJ_XXX defines in gdi.h, removed OBJ_XXX in gdiobj.c
and included gdi.h instead. Implemented GetObjectType32().
Thu Oct 16 17:21:32 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [documentation/wine.texinfo]
Fixed WIN32 and Makefiles entries of Reference manual node, that
made makeinfo dump core.
Mon Oct 13 17:15:57 1997 Robert Wilhelm <robert@physiol.med.tu-muenchen.de>
* [if1632/crtdll.spec]
Added missing math functions y0(), y1(), y2(), floor(), frexp(),
ldexp(), modf().
1997-11-01 20:08:16 +01:00
|
|
|
}
|
|
|
|
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
|
1997-08-24 18:00:30 +02:00
|
|
|
/* ------------------------------------- Windows sockets extensions -- *
|
|
|
|
* *
|
|
|
|
* ------------------------------------------------------------------- */
|
|
|
|
|
2000-06-23 17:47:36 +02:00
|
|
|
/***********************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WSAEnumNetworkEvents (WS2_32.36)
|
2000-06-23 17:47:36 +02:00
|
|
|
*/
|
1999-10-23 18:53:34 +02:00
|
|
|
int WINAPI WSAEnumNetworkEvents(SOCKET s, WSAEVENT hEvent, LPWSANETWORKEVENTS lpEvent)
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
{
|
2001-02-20 02:57:13 +01:00
|
|
|
int ret;
|
2010-03-22 19:56:21 +01:00
|
|
|
int i;
|
|
|
|
int errors[FD_MAX_EVENTS];
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
|
2015-03-11 01:41:21 +01:00
|
|
|
TRACE("%04lx, hEvent %p, lpEvent %p\n", s, hEvent, lpEvent );
|
2001-02-20 02:57:13 +01:00
|
|
|
|
2001-11-30 19:46:42 +01:00
|
|
|
SERVER_START_REQ( get_socket_event )
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
{
|
2008-12-08 16:05:17 +01:00
|
|
|
req->handle = wine_server_obj_handle( SOCKET2HANDLE(s) );
|
2001-02-20 02:57:13 +01:00
|
|
|
req->service = TRUE;
|
2008-12-08 16:05:17 +01:00
|
|
|
req->c_event = wine_server_obj_handle( hEvent );
|
2010-03-22 19:56:21 +01:00
|
|
|
wine_server_set_reply( req, errors, sizeof(errors) );
|
2001-11-30 19:46:42 +01:00
|
|
|
if (!(ret = wine_server_call(req))) lpEvent->lNetworkEvents = reply->pmask & reply->mask;
|
1999-10-23 18:53:34 +02:00
|
|
|
}
|
2001-11-30 19:46:42 +01:00
|
|
|
SERVER_END_REQ;
|
2010-03-22 19:56:21 +01:00
|
|
|
if (!ret)
|
|
|
|
{
|
|
|
|
for (i = 0; i < FD_MAX_EVENTS; i++)
|
|
|
|
lpEvent->iErrorCode[i] = NtStatusToWSAError(errors[i]);
|
|
|
|
return 0;
|
|
|
|
}
|
2001-02-20 02:57:13 +01:00
|
|
|
SetLastError(WSAEINVAL);
|
|
|
|
return SOCKET_ERROR;
|
1999-10-23 18:53:34 +02:00
|
|
|
}
|
1997-08-24 18:00:30 +02:00
|
|
|
|
2000-06-23 17:47:36 +02:00
|
|
|
/***********************************************************************
|
2001-06-19 20:20:47 +02:00
|
|
|
* WSAEventSelect (WS2_32.39)
|
2000-06-23 17:47:36 +02:00
|
|
|
*/
|
2007-06-01 12:10:32 +02:00
|
|
|
int WINAPI WSAEventSelect(SOCKET s, WSAEVENT hEvent, LONG lEvent)
|
1999-10-23 18:53:34 +02:00
|
|
|
{
|
2001-02-20 02:57:13 +01:00
|
|
|
int ret;
|
1997-08-24 18:00:30 +02:00
|
|
|
|
2015-03-11 01:41:21 +01:00
|
|
|
TRACE("%04lx, hEvent %p, event %08x\n", s, hEvent, lEvent);
|
2001-02-20 02:57:13 +01:00
|
|
|
|
2001-02-27 03:09:16 +01:00
|
|
|
SERVER_START_REQ( set_socket_event )
|
1999-10-23 18:53:34 +02:00
|
|
|
{
|
2008-12-08 16:05:17 +01:00
|
|
|
req->handle = wine_server_obj_handle( SOCKET2HANDLE(s) );
|
2001-02-20 02:57:13 +01:00
|
|
|
req->mask = lEvent;
|
2008-12-08 16:05:17 +01:00
|
|
|
req->event = wine_server_obj_handle( hEvent );
|
2002-03-23 21:43:52 +01:00
|
|
|
req->window = 0;
|
|
|
|
req->msg = 0;
|
2001-11-30 19:46:42 +01:00
|
|
|
ret = wine_server_call( req );
|
1999-10-23 18:53:34 +02:00
|
|
|
}
|
2001-02-20 02:57:13 +01:00
|
|
|
SERVER_END_REQ;
|
|
|
|
if (!ret) return 0;
|
|
|
|
SetLastError(WSAEINVAL);
|
|
|
|
return SOCKET_ERROR;
|
1999-10-23 18:53:34 +02:00
|
|
|
}
|
1997-08-24 18:00:30 +02:00
|
|
|
|
2002-04-25 23:34:24 +02:00
|
|
|
/**********************************************************************
|
|
|
|
* WSAGetOverlappedResult (WS2_32.40)
|
|
|
|
*/
|
2005-01-14 20:54:38 +01:00
|
|
|
BOOL WINAPI WSAGetOverlappedResult( SOCKET s, LPWSAOVERLAPPED lpOverlapped,
|
|
|
|
LPDWORD lpcbTransfer, BOOL fWait,
|
|
|
|
LPDWORD lpdwFlags )
|
2002-04-25 23:34:24 +02:00
|
|
|
{
|
2007-06-04 23:03:20 +02:00
|
|
|
NTSTATUS status;
|
2002-04-25 23:34:24 +02:00
|
|
|
|
2007-05-24 16:41:17 +02:00
|
|
|
TRACE( "socket %04lx ovl %p trans %p, wait %d flags %p\n",
|
2005-01-14 20:54:38 +01:00
|
|
|
s, lpOverlapped, lpcbTransfer, fWait, lpdwFlags );
|
2002-04-25 23:34:24 +02:00
|
|
|
|
2005-01-14 20:54:38 +01:00
|
|
|
if ( lpOverlapped == NULL )
|
2002-04-25 23:34:24 +02:00
|
|
|
{
|
2005-01-14 20:54:38 +01:00
|
|
|
ERR( "Invalid pointer\n" );
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError(WSA_INVALID_PARAMETER);
|
2002-04-25 23:34:24 +02:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2007-06-04 23:03:20 +02:00
|
|
|
status = lpOverlapped->Internal;
|
|
|
|
if (status == STATUS_PENDING)
|
2002-09-12 19:56:30 +02:00
|
|
|
{
|
2007-06-04 23:03:20 +02:00
|
|
|
if (!fWait)
|
|
|
|
{
|
|
|
|
SetLastError( WSA_IO_INCOMPLETE );
|
|
|
|
return FALSE;
|
|
|
|
}
|
2005-01-14 20:54:38 +01:00
|
|
|
|
2007-06-04 23:03:20 +02:00
|
|
|
if (WaitForSingleObject( lpOverlapped->hEvent ? lpOverlapped->hEvent : SOCKET2HANDLE(s),
|
|
|
|
INFINITE ) == WAIT_FAILED)
|
|
|
|
return FALSE;
|
|
|
|
status = lpOverlapped->Internal;
|
2002-09-12 19:56:30 +02:00
|
|
|
}
|
2002-10-30 21:26:32 +01:00
|
|
|
|
2002-04-25 23:34:24 +02:00
|
|
|
if ( lpcbTransfer )
|
|
|
|
*lpcbTransfer = lpOverlapped->InternalHigh;
|
|
|
|
|
|
|
|
if ( lpdwFlags )
|
2005-03-17 20:00:08 +01:00
|
|
|
*lpdwFlags = lpOverlapped->u.s.Offset;
|
2002-04-25 23:34:24 +02:00
|
|
|
|
2007-06-04 23:03:20 +02:00
|
|
|
if (status) SetLastError( RtlNtStatusToDosError(status) );
|
|
|
|
return !status;
|
2002-04-25 23:34:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-07-02 21:59:40 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* WSAAsyncSelect (WS2_32.101)
|
|
|
|
*/
|
2007-06-01 12:10:32 +02:00
|
|
|
INT WINAPI WSAAsyncSelect(SOCKET s, HWND hWnd, UINT uMsg, LONG lEvent)
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
{
|
2002-03-23 21:43:52 +01:00
|
|
|
int ret;
|
1997-08-24 18:00:30 +02:00
|
|
|
|
2015-03-11 01:41:21 +01:00
|
|
|
TRACE("%04lx, hWnd %p, uMsg %08x, event %08x\n", s, hWnd, uMsg, lEvent);
|
1997-08-24 18:00:30 +02:00
|
|
|
|
2002-03-23 21:43:52 +01:00
|
|
|
SERVER_START_REQ( set_socket_event )
|
|
|
|
{
|
2008-12-08 16:05:17 +01:00
|
|
|
req->handle = wine_server_obj_handle( SOCKET2HANDLE(s) );
|
2002-03-23 21:43:52 +01:00
|
|
|
req->mask = lEvent;
|
|
|
|
req->event = 0;
|
2008-12-08 16:58:20 +01:00
|
|
|
req->window = wine_server_user_handle( hWnd );
|
2002-03-23 21:43:52 +01:00
|
|
|
req->msg = uMsg;
|
|
|
|
ret = wine_server_call( req );
|
|
|
|
}
|
|
|
|
SERVER_END_REQ;
|
|
|
|
if (!ret) return 0;
|
|
|
|
SetLastError(WSAEINVAL);
|
|
|
|
return SOCKET_ERROR;
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
}
|
|
|
|
|
2000-06-18 19:23:17 +02:00
|
|
|
/***********************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* WSACreateEvent (WS2_32.31)
|
2000-06-18 19:23:17 +02:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
WSAEVENT WINAPI WSACreateEvent(void)
|
|
|
|
{
|
2004-12-20 20:27:06 +01:00
|
|
|
/* Create a manual-reset event, with initial state: unsignaled */
|
2000-06-18 19:23:17 +02:00
|
|
|
TRACE("\n");
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2005-01-07 16:40:09 +01:00
|
|
|
return CreateEventW(NULL, TRUE, FALSE, NULL);
|
2000-06-18 19:23:17 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* WSACloseEvent (WS2_32.29)
|
2000-06-18 19:23:17 +02:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
BOOL WINAPI WSACloseEvent(WSAEVENT event)
|
|
|
|
{
|
2002-10-30 21:26:32 +01:00
|
|
|
TRACE ("event=%p\n", event);
|
2000-06-18 19:23:17 +02:00
|
|
|
|
|
|
|
return CloseHandle(event);
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* WSASocketA (WS2_32.78)
|
2000-06-18 19:23:17 +02:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
SOCKET WINAPI WSASocketA(int af, int type, int protocol,
|
|
|
|
LPWSAPROTOCOL_INFOA lpProtocolInfo,
|
|
|
|
GROUP g, DWORD dwFlags)
|
Stub implementations for WPUCompleteOverlappedRequest,
WSADuplicateSocketW, WSAEnumNameSpaceProviders{A,W}, WSAGetQOSByName,
WSAGetServiceClassInfo{A,W}, WSAGetServiceClassNameByClassId{A,W},
WSALookupServiceEnd, WSALookupServiceNext{A,W},
WSAProviderConfigChange, WSASetService{A,W}, WSCEnableNSProvider,
WSCGetProviderPath, WSCInstallNameSpace, WSCWriteProviderOrder.
Implementations for WSANtohl, WSANtohs, WSASocketA->W crosscall.
Avoid NULL dereferences in WSAStringToAddress{A,W} and
WSAAddressToString{A,W}.
2005-01-10 15:34:15 +01:00
|
|
|
{
|
|
|
|
INT len;
|
|
|
|
WSAPROTOCOL_INFOW info;
|
|
|
|
|
2006-10-12 14:53:44 +02:00
|
|
|
TRACE("af=%d type=%d protocol=%d protocol_info=%p group=%d flags=0x%x\n",
|
Stub implementations for WPUCompleteOverlappedRequest,
WSADuplicateSocketW, WSAEnumNameSpaceProviders{A,W}, WSAGetQOSByName,
WSAGetServiceClassInfo{A,W}, WSAGetServiceClassNameByClassId{A,W},
WSALookupServiceEnd, WSALookupServiceNext{A,W},
WSAProviderConfigChange, WSASetService{A,W}, WSCEnableNSProvider,
WSCGetProviderPath, WSCInstallNameSpace, WSCWriteProviderOrder.
Implementations for WSANtohl, WSANtohs, WSASocketA->W crosscall.
Avoid NULL dereferences in WSAStringToAddress{A,W} and
WSAAddressToString{A,W}.
2005-01-10 15:34:15 +01:00
|
|
|
af, type, protocol, lpProtocolInfo, g, dwFlags);
|
|
|
|
|
|
|
|
if (!lpProtocolInfo) return WSASocketW(af, type, protocol, NULL, g, dwFlags);
|
|
|
|
|
|
|
|
memcpy(&info, lpProtocolInfo, FIELD_OFFSET(WSAPROTOCOL_INFOW, szProtocol));
|
|
|
|
len = MultiByteToWideChar(CP_ACP, 0, lpProtocolInfo->szProtocol, -1,
|
2005-09-13 00:07:53 +02:00
|
|
|
info.szProtocol, WSAPROTOCOL_LEN + 1);
|
Stub implementations for WPUCompleteOverlappedRequest,
WSADuplicateSocketW, WSAEnumNameSpaceProviders{A,W}, WSAGetQOSByName,
WSAGetServiceClassInfo{A,W}, WSAGetServiceClassNameByClassId{A,W},
WSALookupServiceEnd, WSALookupServiceNext{A,W},
WSAProviderConfigChange, WSASetService{A,W}, WSCEnableNSProvider,
WSCGetProviderPath, WSCInstallNameSpace, WSCWriteProviderOrder.
Implementations for WSANtohl, WSANtohs, WSASocketA->W crosscall.
Avoid NULL dereferences in WSAStringToAddress{A,W} and
WSAAddressToString{A,W}.
2005-01-10 15:34:15 +01:00
|
|
|
|
|
|
|
if (!len)
|
|
|
|
{
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError(WSAEINVAL);
|
Stub implementations for WPUCompleteOverlappedRequest,
WSADuplicateSocketW, WSAEnumNameSpaceProviders{A,W}, WSAGetQOSByName,
WSAGetServiceClassInfo{A,W}, WSAGetServiceClassNameByClassId{A,W},
WSALookupServiceEnd, WSALookupServiceNext{A,W},
WSAProviderConfigChange, WSASetService{A,W}, WSCEnableNSProvider,
WSCGetProviderPath, WSCInstallNameSpace, WSCWriteProviderOrder.
Implementations for WSANtohl, WSANtohs, WSASocketA->W crosscall.
Avoid NULL dereferences in WSAStringToAddress{A,W} and
WSAAddressToString{A,W}.
2005-01-10 15:34:15 +01:00
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
return WSASocketW(af, type, protocol, &info, g, dwFlags);
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* WSASocketW (WS2_32.79)
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
SOCKET WINAPI WSASocketW(int af, int type, int protocol,
|
|
|
|
LPWSAPROTOCOL_INFOW lpProtocolInfo,
|
|
|
|
GROUP g, DWORD dwFlags)
|
2000-06-18 19:23:17 +02:00
|
|
|
{
|
2002-01-09 22:17:16 +01:00
|
|
|
SOCKET ret;
|
2013-09-16 06:44:22 +02:00
|
|
|
DWORD err;
|
2013-12-31 01:25:09 +01:00
|
|
|
int unixaf, unixtype, ipxptype = -1;
|
2002-01-09 22:17:16 +01:00
|
|
|
|
2002-06-01 01:06:46 +02:00
|
|
|
/*
|
Stub implementations for WPUCompleteOverlappedRequest,
WSADuplicateSocketW, WSAEnumNameSpaceProviders{A,W}, WSAGetQOSByName,
WSAGetServiceClassInfo{A,W}, WSAGetServiceClassNameByClassId{A,W},
WSALookupServiceEnd, WSALookupServiceNext{A,W},
WSAProviderConfigChange, WSASetService{A,W}, WSCEnableNSProvider,
WSCGetProviderPath, WSCInstallNameSpace, WSCWriteProviderOrder.
Implementations for WSANtohl, WSANtohs, WSASocketA->W crosscall.
Avoid NULL dereferences in WSAStringToAddress{A,W} and
WSAAddressToString{A,W}.
2005-01-10 15:34:15 +01:00
|
|
|
FIXME: The "advanced" parameters of WSASocketW (lpProtocolInfo,
|
2002-01-09 22:17:16 +01:00
|
|
|
g, dwFlags except WSA_FLAG_OVERLAPPED) are ignored.
|
2000-06-18 19:23:17 +02:00
|
|
|
*/
|
2002-01-09 22:17:16 +01:00
|
|
|
|
2006-10-12 14:53:44 +02:00
|
|
|
TRACE("af=%d type=%d protocol=%d protocol_info=%p group=%d flags=0x%x\n",
|
2000-06-18 19:23:17 +02:00
|
|
|
af, type, protocol, lpProtocolInfo, g, dwFlags );
|
|
|
|
|
2013-09-17 15:01:07 +02:00
|
|
|
if (!num_startup)
|
|
|
|
{
|
|
|
|
err = WSANOTINITIALISED;
|
|
|
|
goto done;
|
|
|
|
}
|
|
|
|
|
2002-06-13 21:09:55 +02:00
|
|
|
/* hack for WSADuplicateSocket */
|
|
|
|
if (lpProtocolInfo && lpProtocolInfo->dwServiceFlags4 == 0xff00ff00) {
|
2013-09-11 15:05:18 +02:00
|
|
|
ret = lpProtocolInfo->dwServiceFlags3;
|
2007-05-24 16:41:17 +02:00
|
|
|
TRACE("\tgot duplicate %04lx\n", ret);
|
2002-06-13 21:09:55 +02:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2008-05-26 10:02:42 +02:00
|
|
|
if (lpProtocolInfo)
|
2002-01-09 22:17:16 +01:00
|
|
|
{
|
2013-09-17 15:00:24 +02:00
|
|
|
if (af == FROM_PROTOCOL_INFO || !af)
|
2008-05-26 10:02:42 +02:00
|
|
|
af = lpProtocolInfo->iAddressFamily;
|
2013-09-17 15:00:24 +02:00
|
|
|
if (type == FROM_PROTOCOL_INFO || !type)
|
2008-05-26 10:02:42 +02:00
|
|
|
type = lpProtocolInfo->iSocketType;
|
2013-09-17 15:00:24 +02:00
|
|
|
if (protocol == FROM_PROTOCOL_INFO || !protocol)
|
2008-05-26 10:02:42 +02:00
|
|
|
protocol = lpProtocolInfo->iProtocol;
|
2002-01-09 22:17:16 +01:00
|
|
|
}
|
|
|
|
|
2013-09-17 15:00:37 +02:00
|
|
|
if (!type && (af || protocol))
|
2011-10-20 22:37:09 +02:00
|
|
|
{
|
2013-12-31 01:25:09 +01:00
|
|
|
int autoproto = protocol;
|
2013-09-17 15:00:37 +02:00
|
|
|
WSAPROTOCOL_INFOW infow;
|
|
|
|
|
|
|
|
/* default to the first valid protocol */
|
2013-12-31 01:25:09 +01:00
|
|
|
if (!autoproto)
|
|
|
|
autoproto = valid_protocols[0];
|
|
|
|
else if(IS_IPX_PROTO(autoproto))
|
|
|
|
autoproto = WS_NSPROTO_IPX;
|
2013-09-17 15:00:37 +02:00
|
|
|
|
2013-12-31 01:25:09 +01:00
|
|
|
if (WS_EnterSingleProtocolW(autoproto, &infow))
|
2011-10-20 22:37:09 +02:00
|
|
|
{
|
2013-09-17 15:00:37 +02:00
|
|
|
type = infow.iSocketType;
|
|
|
|
|
|
|
|
/* after win2003 it's no longer possible to pass AF_UNSPEC
|
|
|
|
using the protocol info struct */
|
|
|
|
if (!lpProtocolInfo && af == WS_AF_UNSPEC)
|
|
|
|
af = infow.iAddressFamily;
|
2011-10-20 22:37:09 +02:00
|
|
|
}
|
|
|
|
}
|
2002-01-09 22:17:16 +01:00
|
|
|
|
2013-12-31 01:25:09 +01:00
|
|
|
/*
|
2014-01-30 14:31:52 +01:00
|
|
|
Windows has an extension to the IPX protocol that allows one to create sockets
|
2013-12-31 01:25:09 +01:00
|
|
|
and set the IPX packet type at the same time, to do that a caller will use
|
|
|
|
a protocol like NSPROTO_IPX + <PACKET TYPE>
|
|
|
|
*/
|
|
|
|
if (IS_IPX_PROTO(protocol))
|
|
|
|
ipxptype = protocol - WS_NSPROTO_IPX;
|
|
|
|
|
2013-09-17 15:00:52 +02:00
|
|
|
/* convert the socket family, type and protocol */
|
|
|
|
unixaf = convert_af_w2u(af);
|
|
|
|
unixtype = convert_socktype_w2u(type);
|
|
|
|
protocol = convert_proto_w2u(protocol);
|
|
|
|
if (unixaf == AF_UNSPEC) unixaf = -1;
|
|
|
|
|
|
|
|
/* filter invalid parameters */
|
|
|
|
if (protocol < 0)
|
|
|
|
{
|
|
|
|
/* the type could not be converted */
|
|
|
|
if (type && unixtype < 0)
|
|
|
|
{
|
|
|
|
err = WSAESOCKTNOSUPPORT;
|
|
|
|
goto done;
|
|
|
|
}
|
|
|
|
|
|
|
|
err = WSAEPROTONOSUPPORT;
|
|
|
|
goto done;
|
|
|
|
}
|
|
|
|
if (unixaf < 0)
|
|
|
|
{
|
|
|
|
/* both family and protocol can't be invalid */
|
|
|
|
if (protocol <= 0)
|
|
|
|
{
|
|
|
|
err = WSAEINVAL;
|
|
|
|
goto done;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* family could not be converted and neither socket type */
|
|
|
|
if (unixtype < 0 && af >= 0)
|
|
|
|
{
|
|
|
|
|
|
|
|
err = WSAESOCKTNOSUPPORT;
|
|
|
|
goto done;
|
|
|
|
}
|
|
|
|
|
|
|
|
err = WSAEAFNOSUPPORT;
|
|
|
|
goto done;
|
|
|
|
}
|
2013-09-17 15:00:37 +02:00
|
|
|
|
2002-01-09 22:17:16 +01:00
|
|
|
SERVER_START_REQ( create_socket )
|
|
|
|
{
|
2013-09-17 15:00:52 +02:00
|
|
|
req->family = unixaf;
|
|
|
|
req->type = unixtype;
|
2005-12-09 11:58:55 +01:00
|
|
|
req->protocol = protocol;
|
|
|
|
req->access = GENERIC_READ|GENERIC_WRITE|SYNCHRONIZE;
|
2015-03-16 17:45:40 +01:00
|
|
|
req->attributes = (dwFlags & WSA_FLAG_NO_HANDLE_INHERIT) ? 0 : OBJ_INHERIT;
|
|
|
|
req->flags = dwFlags & ~WSA_FLAG_NO_HANDLE_INHERIT;
|
2002-01-09 22:17:16 +01:00
|
|
|
set_error( wine_server_call( req ) );
|
2008-12-08 16:05:17 +01:00
|
|
|
ret = HANDLE2SOCKET( wine_server_ptr_handle( reply->handle ));
|
2002-01-09 22:17:16 +01:00
|
|
|
}
|
|
|
|
SERVER_END_REQ;
|
|
|
|
if (ret)
|
|
|
|
{
|
2007-05-24 16:41:17 +02:00
|
|
|
TRACE("\tcreated %04lx\n", ret );
|
2013-12-31 01:25:09 +01:00
|
|
|
if (ipxptype > 0)
|
|
|
|
set_ipx_packettype(ret, ipxptype);
|
|
|
|
return ret;
|
2002-01-09 22:17:16 +01:00
|
|
|
}
|
|
|
|
|
2013-09-16 06:44:22 +02:00
|
|
|
err = GetLastError();
|
|
|
|
if (err == WSAEACCES) /* raw socket denied */
|
2002-01-09 22:17:16 +01:00
|
|
|
{
|
|
|
|
if (type == SOCK_RAW)
|
2009-12-08 14:09:05 +01:00
|
|
|
ERR_(winediag)("Failed to create a socket of type SOCK_RAW, this requires special permissions.\n");
|
2002-01-09 22:17:16 +01:00
|
|
|
else
|
2009-12-08 14:09:05 +01:00
|
|
|
ERR_(winediag)("Failed to create socket, this requires special permissions.\n");
|
2013-09-16 06:44:22 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* invalid combination of valid parameters, like SOCK_STREAM + IPPROTO_UDP */
|
|
|
|
if (err == WSAEINVAL)
|
|
|
|
err = WSAESOCKTNOSUPPORT;
|
|
|
|
else if (err == WSAEOPNOTSUPP)
|
|
|
|
err = WSAEPROTONOSUPPORT;
|
2002-01-09 22:17:16 +01:00
|
|
|
}
|
|
|
|
|
2013-09-17 15:00:52 +02:00
|
|
|
done:
|
2013-09-16 06:44:22 +02:00
|
|
|
WARN("\t\tfailed, error %d!\n", err);
|
|
|
|
SetLastError(err);
|
2002-01-09 22:17:16 +01:00
|
|
|
return INVALID_SOCKET;
|
2000-06-18 19:23:17 +02:00
|
|
|
}
|
|
|
|
|
2003-12-11 06:16:48 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* WSAJoinLeaf (WS2_32.58)
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
SOCKET WINAPI WSAJoinLeaf(
|
|
|
|
SOCKET s,
|
|
|
|
const struct WS_sockaddr *addr,
|
|
|
|
int addrlen,
|
|
|
|
LPWSABUF lpCallerData,
|
|
|
|
LPWSABUF lpCalleeData,
|
|
|
|
LPQOS lpSQOS,
|
|
|
|
LPQOS lpGQOS,
|
|
|
|
DWORD dwFlags)
|
|
|
|
{
|
|
|
|
FIXME("stub.\n");
|
|
|
|
return INVALID_SOCKET;
|
|
|
|
}
|
2000-06-18 19:23:17 +02:00
|
|
|
|
1997-08-24 18:00:30 +02:00
|
|
|
/***********************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* __WSAFDIsSet (WS2_32.151)
|
1997-08-24 18:00:30 +02:00
|
|
|
*/
|
2001-11-14 22:26:23 +01:00
|
|
|
int WINAPI __WSAFDIsSet(SOCKET s, WS_fd_set *set)
|
1997-08-24 18:00:30 +02:00
|
|
|
{
|
2015-01-02 17:07:15 +01:00
|
|
|
int i = set->fd_count, ret = 0;
|
Release 971221
Fri Dec 19 10:50:46 1997 Douglas Ridgway <ridgway@winehq.com>
* [Make.rules.in] [Makefile.in] [documentation/Makefile.in]
[documentation/README.documentation]
First cut at Wine API documentation. No longer install reference
manual by default.
Wed Dec 17 21:32:23 1997 Andreas Mohr <100.30936@germany.net>
* [files/file.c]
Fixed GetTempFileName16() to use current path of requested drive
as needed.
* [if1632/Makefile.in] [if1632/builtin.c] [if1632/dciman32.spec]
[if1632/msvfw32.spec] [if1632/tapi32.spec] [if1632/wow32.spec]
Added misc DLLs needed by various apps.
Wed Dec 17 12:01:50 1997 Morten Eriksen <mortene@sim.no>
* [if1632/gdi32.spec] [include/windows.h] [objects/palette.c]
Inserted empty stub for CreateHalftonePalette.
Tue Dec 16 22:08:06 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/mdi.c]
Use VK_TAB instead of VK_SEPARATOR in TranslateMDISysAccel().
* [graphics/metafiledrv/init.c]
DeleteDC() on a MetaDC doesn't do anything - it shouldn't. Therefore
fix cleanup of MetaDCs in CloseMetaFile(); they now actually get
removed from the GDI heap!
* [graphics/x11drv/xfont.c]
Preserve FO_MATCH_XYINDEP flag in XFONT_MatchFIList(). Should reduce
the number of bold-italic matches.
Tue Dec 16 20:11:43 1997 Bertho Stultiens <bertho@panter.soci.aau.dk>
* [graphics/painting.c]
Included an implementation of DrawState
* [if1632/thunk.c]
Changed many fprintfs into dprintf_thunk
* [include/cache.h] [graphics/cache.c]
New files to hold cached handles to regulary used GDI object.
* [include/windows.h]
Added DRAWSTATExx typedefs
Added DSS_DEFAULT define for DrawState
* [objects/text.c]
New implementation of GrayString()
* [controls/uitools.c]
Implemented DrawFrameControl() functions
Changed DrawEdge() behaviour to win95 implementation
Mon Dec 15 23:43:01 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [graphics/path.c] [include/path.h] [graphics/painting.c]
[if1632/gdi32.spec] [include/gdi.h] [include/windows.h]
[objects/dc.c]
Added preliminary support for GDI paths.
* [objects/dc.c]
Added DC_Init_DC_INFO function for initializing WIN_DC_INFO
structure.
* [include/windows.h] [include/gdi.h] [objects/gdiobj.c]
Added DEFAULT_GUI_FONT.
* [include/winerror.h]
Added a few error codes.
* [memory/heap.c]
Changed HeapAlloc to make the correct calls to SetLastError
(now conforms to NT's behaviour).
* [windows/win.c]
Changed WIN_CreateWindowEx to allow child windows with zero
width / height.
Sun Dec 14 12:01:07 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [if1632/*] [relay32/*]
Moved all 32-bit relay stuff to relay32/
* [fi1632/thunk.c] [win32/kernel32.c]
Moved all KERNEL32 ordinal functions to kernel32.c
* [memory/selector.c]
Initialize selectors in AllocSelectorArray.
* [tools/build.c]
Generate C instead of assembly for Win32 relays.
Fixed stack corruption in CallTo16 functions, found by Bertho
Stultiens.
Sun Dec 14 10:55:00 1997 Andreas Mohr <100.30936@germany.net>
* [if1632/Makefile.in] [if1632/builtin.c] [if1632/ole2thk.spec]
Added built-in OLE2THK.DLL.
* [if1632/toolhelp.spec] [include/toolhelp.h] [memory/selector.c]
[misc/toolhelp.c]
Added stubs for StackTraceFirst(), StackTraceCSIPFirst(),
StackTraceNext(), UTSelectorOffsetToLinear()
and UTLinearToSelectorOffset().
Sat Dec 13 17:26:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [misc/winsock.c]
32-bit API fixes for reported problems (thanks to Marcus
and David).
* [graphics/x11drv/xfont.c]
Little tweak in point size calculation.
* [windows/defwnd.c] [windows/dce.c] [windows/winhelp.c]
[windows/winproc.c] [windows/win.c]
Bug fixes.
Sat Dec 13 16:35:14 1997 Kai Morich <kai.morich@rhein-neckar.netsurf.de>
* [files/dos_fs.c]
OpenFile with empty filename and OF_PARSE returns current dir.
* [misc/commdlg.c]
Ignore initial dir if bogus.
* [files/file.c]
Locking an identic region in a file must not be an error.
* [misc/lstr.c]
Use wide char ctype functions.
Fri Dec 12 23:46:22 1997 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [file/drive.c]
First attempt for GetDiskFreeSpaceEx.
Fri Dec 12 23:18:41 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [loader/pe_resource.c]
Fixed wrongly appearing menus problem (only use default lookups in
last resource subtree).
* [multimedia/*.c]
Added win32 support for time* and joy* lowlevel drivers,
(not excessively tested), some misc fixes and cleanups.
* [misc/shellord.c][misc/shell.c][ole/folders.c][ole/ifs.c]
[include/interfaces.h][include/shlobj.h]
Added some more undocumented SHELL32 functions, some shell folder
interface stubs added, SHGetMalloc, SHGetDesktopFolder,
SHGetSpecialFolderLocation, SHGetPathFromIDList stubs added,
IMalloc, IUnknown implemented.
* [windows/msgbox.c]
Implemented MessageBoxIndirect*, some internal changes.
* [if1632/thunk.c]
KERNEL_431 implemented.
* [objects/gdiobj.c]
GetCurrentObject implemented.
Wed Dec 3 01:09:17 1997 Gordon Chaffee <chaffee@apu.cs.berkeley.edu>
* [objects/dib.c]
Fix a couple small DIB problems.
* [controls/edit.c]
Fix a typo.
* [files/dos_fs.c]
Try normal readdir in case fs is specified as vfat but isn't.
* [files/profile.c]
Implementation of WritePrivateProfileSection32A from Uwe Bonnes.
* [misc/printdrv.c]
OpenPrinter32A stub, helps Word97 start.
* [objects/text.c]
Fixup implementation of GetTextCharsetInfo.
* [scheduler/process.c]
Fix environment variable expansion.
* [win32/code_page.c]
Make MultiByteToWideChar and WideCharToMultiByte conform in return
values and error conditions to those in Windows NT 4.0.
* [windows/message.c]
Fix broadcasting problems in Win32. The Win32 docs say to use
HWND_TOPMOST to broadcast to all Win32 Windows.
* [memory/virtual.c] [loader/pe_image.c]
Do not map in VirtualAlloc if address is specified and space is
not available. This is required by Win32.
* [include/pen.h] [include/x11drv.h] [objects/dc.c]
[objects/pen.c] [graphics/x11drv/pen.c]
Support for ExtCreatePen.
Tue Dec 2 20:22:06 1997 Morten Welinder <terra@diku.dk>
* [*/*.c] [*/*.h]
Add lots of prototypes.
* [if1632/kernel32.spec][include/windows.h][include/winnt.h]
[misc/cpu.c]
Define IsProcessorFeaturePresent.
* [misc/crtdll.c]
(CRTDLL__getcwd): Allocate enough memory for the terminating zero.
* [misc/ver.c]
Improve check for null component in _find_data[AW]. Plug leaks
in VerQueryValue*.
* [win32/console.c][if1632/kernel32.spec]
Add stubs for GetConsoleCursorInfo32, SetConsoleCursorInfo32.
* [windows/message.c][if1632/user32.spec][include/windows.h]
Define SendMessageTimeout*.
* [graphics/x11drv/xfont.c]
Change algorithm of __genericCheckSum to be alignment safe.
* [misc/main.c] [misc/winsock.c] [misc/winsock_dns.c]
Include winsock.h early to avoid Solaris problem.
* [include/windows.h]
Undef FSHIFT before we define it.
* [rc/winerc.c]
Include <fcntl.h> instead of <sys/fcntl.h>.
* [files/file.c]
Use strerror in FILE_SetDosError if available.
* [include/config.h.in] [configure.in]
Check for strerror.
* [objects/gdiobj.c]
Make static font structures aligned.
Mon Dec 1 10:10:21 1997 Karl Garrison <karlos@eznet.net>
* [win32/console.c] [if1632/kernel32.spec] [include/windows.h]
Added stub for GetNumberOfConsoleMouseButtons.
Added stub for PeekConsoleInput(A,W).
Fixed parameter list for WriteConsole(A,W).
GetNumberOfConsoleInputEvents now returns 0 events instead of 1
(since low-level console functions are not yet supported).
GetConsoleMode no longer returns ENABLE_WINDOW_INPUT and
ENABLE_MOUSE_INPUT since these are not currently implemented.
1997-12-21 20:17:50 +01:00
|
|
|
|
|
|
|
while (i--)
|
2015-01-02 17:07:15 +01:00
|
|
|
if (set->fd_array[i] == s)
|
|
|
|
{
|
|
|
|
ret = 1;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2015-01-09 00:48:11 +01:00
|
|
|
TRACE("(socket %04lx, fd_set %p, count %i) <- %d\n", s, set, set->fd_count, ret);
|
2015-01-02 17:07:15 +01:00
|
|
|
return ret;
|
1997-08-24 18:00:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* WSAIsBlocking (WS2_32.114)
|
1997-08-24 18:00:30 +02:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
BOOL WINAPI WSAIsBlocking(void)
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
{
|
|
|
|
/* By default WinSock should set all its sockets to non-blocking mode
|
2002-06-01 01:06:46 +02:00
|
|
|
* and poll in PeekMessage loop when processing "blocking" ones. This
|
|
|
|
* function is supposed to tell if the program is in this loop. Our
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
* blocking calls are truly blocking so we always return FALSE.
|
|
|
|
*
|
|
|
|
* Note: It is allowed to call this function without prior WSAStartup().
|
|
|
|
*/
|
|
|
|
|
1999-06-26 21:09:08 +02:00
|
|
|
TRACE("\n");
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
1997-08-24 18:00:30 +02:00
|
|
|
/***********************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* WSACancelBlockingCall (WS2_32.113)
|
1997-08-24 18:00:30 +02:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
INT WINAPI WSACancelBlockingCall(void)
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
{
|
2001-02-20 02:57:13 +01:00
|
|
|
TRACE("\n");
|
|
|
|
return 0;
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
}
|
|
|
|
|
2003-07-22 02:58:44 +02:00
|
|
|
static INT WINAPI WSA_DefaultBlockingHook( FARPROC x )
|
|
|
|
{
|
|
|
|
FIXME("How was this called?\n");
|
|
|
|
return x();
|
|
|
|
}
|
|
|
|
|
1997-08-24 18:00:30 +02:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-11 20:56:41 +02:00
|
|
|
* WSASetBlockingHook (WS2_32.109)
|
1997-08-24 18:00:30 +02:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
FARPROC WINAPI WSASetBlockingHook(FARPROC lpBlockFunc)
|
1997-05-25 15:58:18 +02:00
|
|
|
{
|
2001-02-20 02:57:13 +01:00
|
|
|
FARPROC prev = blocking_hook;
|
|
|
|
blocking_hook = lpBlockFunc;
|
|
|
|
TRACE("hook %p\n", lpBlockFunc);
|
|
|
|
return prev;
|
1997-05-25 15:58:18 +02:00
|
|
|
}
|
|
|
|
|
1997-08-24 18:00:30 +02:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-11 20:56:41 +02:00
|
|
|
* WSAUnhookBlockingHook (WS2_32.110)
|
1997-08-24 18:00:30 +02:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
INT WINAPI WSAUnhookBlockingHook(void)
|
1997-06-16 19:43:53 +02:00
|
|
|
{
|
2007-05-24 16:41:17 +02:00
|
|
|
blocking_hook = (FARPROC)WSA_DefaultBlockingHook;
|
2001-02-20 02:57:13 +01:00
|
|
|
return 0;
|
1997-06-16 19:43:53 +02:00
|
|
|
}
|
|
|
|
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
|
Release 971221
Fri Dec 19 10:50:46 1997 Douglas Ridgway <ridgway@winehq.com>
* [Make.rules.in] [Makefile.in] [documentation/Makefile.in]
[documentation/README.documentation]
First cut at Wine API documentation. No longer install reference
manual by default.
Wed Dec 17 21:32:23 1997 Andreas Mohr <100.30936@germany.net>
* [files/file.c]
Fixed GetTempFileName16() to use current path of requested drive
as needed.
* [if1632/Makefile.in] [if1632/builtin.c] [if1632/dciman32.spec]
[if1632/msvfw32.spec] [if1632/tapi32.spec] [if1632/wow32.spec]
Added misc DLLs needed by various apps.
Wed Dec 17 12:01:50 1997 Morten Eriksen <mortene@sim.no>
* [if1632/gdi32.spec] [include/windows.h] [objects/palette.c]
Inserted empty stub for CreateHalftonePalette.
Tue Dec 16 22:08:06 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/mdi.c]
Use VK_TAB instead of VK_SEPARATOR in TranslateMDISysAccel().
* [graphics/metafiledrv/init.c]
DeleteDC() on a MetaDC doesn't do anything - it shouldn't. Therefore
fix cleanup of MetaDCs in CloseMetaFile(); they now actually get
removed from the GDI heap!
* [graphics/x11drv/xfont.c]
Preserve FO_MATCH_XYINDEP flag in XFONT_MatchFIList(). Should reduce
the number of bold-italic matches.
Tue Dec 16 20:11:43 1997 Bertho Stultiens <bertho@panter.soci.aau.dk>
* [graphics/painting.c]
Included an implementation of DrawState
* [if1632/thunk.c]
Changed many fprintfs into dprintf_thunk
* [include/cache.h] [graphics/cache.c]
New files to hold cached handles to regulary used GDI object.
* [include/windows.h]
Added DRAWSTATExx typedefs
Added DSS_DEFAULT define for DrawState
* [objects/text.c]
New implementation of GrayString()
* [controls/uitools.c]
Implemented DrawFrameControl() functions
Changed DrawEdge() behaviour to win95 implementation
Mon Dec 15 23:43:01 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [graphics/path.c] [include/path.h] [graphics/painting.c]
[if1632/gdi32.spec] [include/gdi.h] [include/windows.h]
[objects/dc.c]
Added preliminary support for GDI paths.
* [objects/dc.c]
Added DC_Init_DC_INFO function for initializing WIN_DC_INFO
structure.
* [include/windows.h] [include/gdi.h] [objects/gdiobj.c]
Added DEFAULT_GUI_FONT.
* [include/winerror.h]
Added a few error codes.
* [memory/heap.c]
Changed HeapAlloc to make the correct calls to SetLastError
(now conforms to NT's behaviour).
* [windows/win.c]
Changed WIN_CreateWindowEx to allow child windows with zero
width / height.
Sun Dec 14 12:01:07 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [if1632/*] [relay32/*]
Moved all 32-bit relay stuff to relay32/
* [fi1632/thunk.c] [win32/kernel32.c]
Moved all KERNEL32 ordinal functions to kernel32.c
* [memory/selector.c]
Initialize selectors in AllocSelectorArray.
* [tools/build.c]
Generate C instead of assembly for Win32 relays.
Fixed stack corruption in CallTo16 functions, found by Bertho
Stultiens.
Sun Dec 14 10:55:00 1997 Andreas Mohr <100.30936@germany.net>
* [if1632/Makefile.in] [if1632/builtin.c] [if1632/ole2thk.spec]
Added built-in OLE2THK.DLL.
* [if1632/toolhelp.spec] [include/toolhelp.h] [memory/selector.c]
[misc/toolhelp.c]
Added stubs for StackTraceFirst(), StackTraceCSIPFirst(),
StackTraceNext(), UTSelectorOffsetToLinear()
and UTLinearToSelectorOffset().
Sat Dec 13 17:26:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [misc/winsock.c]
32-bit API fixes for reported problems (thanks to Marcus
and David).
* [graphics/x11drv/xfont.c]
Little tweak in point size calculation.
* [windows/defwnd.c] [windows/dce.c] [windows/winhelp.c]
[windows/winproc.c] [windows/win.c]
Bug fixes.
Sat Dec 13 16:35:14 1997 Kai Morich <kai.morich@rhein-neckar.netsurf.de>
* [files/dos_fs.c]
OpenFile with empty filename and OF_PARSE returns current dir.
* [misc/commdlg.c]
Ignore initial dir if bogus.
* [files/file.c]
Locking an identic region in a file must not be an error.
* [misc/lstr.c]
Use wide char ctype functions.
Fri Dec 12 23:46:22 1997 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [file/drive.c]
First attempt for GetDiskFreeSpaceEx.
Fri Dec 12 23:18:41 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [loader/pe_resource.c]
Fixed wrongly appearing menus problem (only use default lookups in
last resource subtree).
* [multimedia/*.c]
Added win32 support for time* and joy* lowlevel drivers,
(not excessively tested), some misc fixes and cleanups.
* [misc/shellord.c][misc/shell.c][ole/folders.c][ole/ifs.c]
[include/interfaces.h][include/shlobj.h]
Added some more undocumented SHELL32 functions, some shell folder
interface stubs added, SHGetMalloc, SHGetDesktopFolder,
SHGetSpecialFolderLocation, SHGetPathFromIDList stubs added,
IMalloc, IUnknown implemented.
* [windows/msgbox.c]
Implemented MessageBoxIndirect*, some internal changes.
* [if1632/thunk.c]
KERNEL_431 implemented.
* [objects/gdiobj.c]
GetCurrentObject implemented.
Wed Dec 3 01:09:17 1997 Gordon Chaffee <chaffee@apu.cs.berkeley.edu>
* [objects/dib.c]
Fix a couple small DIB problems.
* [controls/edit.c]
Fix a typo.
* [files/dos_fs.c]
Try normal readdir in case fs is specified as vfat but isn't.
* [files/profile.c]
Implementation of WritePrivateProfileSection32A from Uwe Bonnes.
* [misc/printdrv.c]
OpenPrinter32A stub, helps Word97 start.
* [objects/text.c]
Fixup implementation of GetTextCharsetInfo.
* [scheduler/process.c]
Fix environment variable expansion.
* [win32/code_page.c]
Make MultiByteToWideChar and WideCharToMultiByte conform in return
values and error conditions to those in Windows NT 4.0.
* [windows/message.c]
Fix broadcasting problems in Win32. The Win32 docs say to use
HWND_TOPMOST to broadcast to all Win32 Windows.
* [memory/virtual.c] [loader/pe_image.c]
Do not map in VirtualAlloc if address is specified and space is
not available. This is required by Win32.
* [include/pen.h] [include/x11drv.h] [objects/dc.c]
[objects/pen.c] [graphics/x11drv/pen.c]
Support for ExtCreatePen.
Tue Dec 2 20:22:06 1997 Morten Welinder <terra@diku.dk>
* [*/*.c] [*/*.h]
Add lots of prototypes.
* [if1632/kernel32.spec][include/windows.h][include/winnt.h]
[misc/cpu.c]
Define IsProcessorFeaturePresent.
* [misc/crtdll.c]
(CRTDLL__getcwd): Allocate enough memory for the terminating zero.
* [misc/ver.c]
Improve check for null component in _find_data[AW]. Plug leaks
in VerQueryValue*.
* [win32/console.c][if1632/kernel32.spec]
Add stubs for GetConsoleCursorInfo32, SetConsoleCursorInfo32.
* [windows/message.c][if1632/user32.spec][include/windows.h]
Define SendMessageTimeout*.
* [graphics/x11drv/xfont.c]
Change algorithm of __genericCheckSum to be alignment safe.
* [misc/main.c] [misc/winsock.c] [misc/winsock_dns.c]
Include winsock.h early to avoid Solaris problem.
* [include/windows.h]
Undef FSHIFT before we define it.
* [rc/winerc.c]
Include <fcntl.h> instead of <sys/fcntl.h>.
* [files/file.c]
Use strerror in FILE_SetDosError if available.
* [include/config.h.in] [configure.in]
Check for strerror.
* [objects/gdiobj.c]
Make static font structures aligned.
Mon Dec 1 10:10:21 1997 Karl Garrison <karlos@eznet.net>
* [win32/console.c] [if1632/kernel32.spec] [include/windows.h]
Added stub for GetNumberOfConsoleMouseButtons.
Added stub for PeekConsoleInput(A,W).
Fixed parameter list for WriteConsole(A,W).
GetNumberOfConsoleInputEvents now returns 0 events instead of 1
(since low-level console functions are not yet supported).
GetConsoleMode no longer returns ENABLE_WINDOW_INPUT and
ENABLE_MOUSE_INPUT since these are not currently implemented.
1997-12-21 20:17:50 +01:00
|
|
|
/* ----------------------------------- end of API stuff */
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
|
Release 971221
Fri Dec 19 10:50:46 1997 Douglas Ridgway <ridgway@winehq.com>
* [Make.rules.in] [Makefile.in] [documentation/Makefile.in]
[documentation/README.documentation]
First cut at Wine API documentation. No longer install reference
manual by default.
Wed Dec 17 21:32:23 1997 Andreas Mohr <100.30936@germany.net>
* [files/file.c]
Fixed GetTempFileName16() to use current path of requested drive
as needed.
* [if1632/Makefile.in] [if1632/builtin.c] [if1632/dciman32.spec]
[if1632/msvfw32.spec] [if1632/tapi32.spec] [if1632/wow32.spec]
Added misc DLLs needed by various apps.
Wed Dec 17 12:01:50 1997 Morten Eriksen <mortene@sim.no>
* [if1632/gdi32.spec] [include/windows.h] [objects/palette.c]
Inserted empty stub for CreateHalftonePalette.
Tue Dec 16 22:08:06 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/mdi.c]
Use VK_TAB instead of VK_SEPARATOR in TranslateMDISysAccel().
* [graphics/metafiledrv/init.c]
DeleteDC() on a MetaDC doesn't do anything - it shouldn't. Therefore
fix cleanup of MetaDCs in CloseMetaFile(); they now actually get
removed from the GDI heap!
* [graphics/x11drv/xfont.c]
Preserve FO_MATCH_XYINDEP flag in XFONT_MatchFIList(). Should reduce
the number of bold-italic matches.
Tue Dec 16 20:11:43 1997 Bertho Stultiens <bertho@panter.soci.aau.dk>
* [graphics/painting.c]
Included an implementation of DrawState
* [if1632/thunk.c]
Changed many fprintfs into dprintf_thunk
* [include/cache.h] [graphics/cache.c]
New files to hold cached handles to regulary used GDI object.
* [include/windows.h]
Added DRAWSTATExx typedefs
Added DSS_DEFAULT define for DrawState
* [objects/text.c]
New implementation of GrayString()
* [controls/uitools.c]
Implemented DrawFrameControl() functions
Changed DrawEdge() behaviour to win95 implementation
Mon Dec 15 23:43:01 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [graphics/path.c] [include/path.h] [graphics/painting.c]
[if1632/gdi32.spec] [include/gdi.h] [include/windows.h]
[objects/dc.c]
Added preliminary support for GDI paths.
* [objects/dc.c]
Added DC_Init_DC_INFO function for initializing WIN_DC_INFO
structure.
* [include/windows.h] [include/gdi.h] [objects/gdiobj.c]
Added DEFAULT_GUI_FONT.
* [include/winerror.h]
Added a few error codes.
* [memory/heap.c]
Changed HeapAlloc to make the correct calls to SetLastError
(now conforms to NT's behaviour).
* [windows/win.c]
Changed WIN_CreateWindowEx to allow child windows with zero
width / height.
Sun Dec 14 12:01:07 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [if1632/*] [relay32/*]
Moved all 32-bit relay stuff to relay32/
* [fi1632/thunk.c] [win32/kernel32.c]
Moved all KERNEL32 ordinal functions to kernel32.c
* [memory/selector.c]
Initialize selectors in AllocSelectorArray.
* [tools/build.c]
Generate C instead of assembly for Win32 relays.
Fixed stack corruption in CallTo16 functions, found by Bertho
Stultiens.
Sun Dec 14 10:55:00 1997 Andreas Mohr <100.30936@germany.net>
* [if1632/Makefile.in] [if1632/builtin.c] [if1632/ole2thk.spec]
Added built-in OLE2THK.DLL.
* [if1632/toolhelp.spec] [include/toolhelp.h] [memory/selector.c]
[misc/toolhelp.c]
Added stubs for StackTraceFirst(), StackTraceCSIPFirst(),
StackTraceNext(), UTSelectorOffsetToLinear()
and UTLinearToSelectorOffset().
Sat Dec 13 17:26:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [misc/winsock.c]
32-bit API fixes for reported problems (thanks to Marcus
and David).
* [graphics/x11drv/xfont.c]
Little tweak in point size calculation.
* [windows/defwnd.c] [windows/dce.c] [windows/winhelp.c]
[windows/winproc.c] [windows/win.c]
Bug fixes.
Sat Dec 13 16:35:14 1997 Kai Morich <kai.morich@rhein-neckar.netsurf.de>
* [files/dos_fs.c]
OpenFile with empty filename and OF_PARSE returns current dir.
* [misc/commdlg.c]
Ignore initial dir if bogus.
* [files/file.c]
Locking an identic region in a file must not be an error.
* [misc/lstr.c]
Use wide char ctype functions.
Fri Dec 12 23:46:22 1997 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [file/drive.c]
First attempt for GetDiskFreeSpaceEx.
Fri Dec 12 23:18:41 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [loader/pe_resource.c]
Fixed wrongly appearing menus problem (only use default lookups in
last resource subtree).
* [multimedia/*.c]
Added win32 support for time* and joy* lowlevel drivers,
(not excessively tested), some misc fixes and cleanups.
* [misc/shellord.c][misc/shell.c][ole/folders.c][ole/ifs.c]
[include/interfaces.h][include/shlobj.h]
Added some more undocumented SHELL32 functions, some shell folder
interface stubs added, SHGetMalloc, SHGetDesktopFolder,
SHGetSpecialFolderLocation, SHGetPathFromIDList stubs added,
IMalloc, IUnknown implemented.
* [windows/msgbox.c]
Implemented MessageBoxIndirect*, some internal changes.
* [if1632/thunk.c]
KERNEL_431 implemented.
* [objects/gdiobj.c]
GetCurrentObject implemented.
Wed Dec 3 01:09:17 1997 Gordon Chaffee <chaffee@apu.cs.berkeley.edu>
* [objects/dib.c]
Fix a couple small DIB problems.
* [controls/edit.c]
Fix a typo.
* [files/dos_fs.c]
Try normal readdir in case fs is specified as vfat but isn't.
* [files/profile.c]
Implementation of WritePrivateProfileSection32A from Uwe Bonnes.
* [misc/printdrv.c]
OpenPrinter32A stub, helps Word97 start.
* [objects/text.c]
Fixup implementation of GetTextCharsetInfo.
* [scheduler/process.c]
Fix environment variable expansion.
* [win32/code_page.c]
Make MultiByteToWideChar and WideCharToMultiByte conform in return
values and error conditions to those in Windows NT 4.0.
* [windows/message.c]
Fix broadcasting problems in Win32. The Win32 docs say to use
HWND_TOPMOST to broadcast to all Win32 Windows.
* [memory/virtual.c] [loader/pe_image.c]
Do not map in VirtualAlloc if address is specified and space is
not available. This is required by Win32.
* [include/pen.h] [include/x11drv.h] [objects/dc.c]
[objects/pen.c] [graphics/x11drv/pen.c]
Support for ExtCreatePen.
Tue Dec 2 20:22:06 1997 Morten Welinder <terra@diku.dk>
* [*/*.c] [*/*.h]
Add lots of prototypes.
* [if1632/kernel32.spec][include/windows.h][include/winnt.h]
[misc/cpu.c]
Define IsProcessorFeaturePresent.
* [misc/crtdll.c]
(CRTDLL__getcwd): Allocate enough memory for the terminating zero.
* [misc/ver.c]
Improve check for null component in _find_data[AW]. Plug leaks
in VerQueryValue*.
* [win32/console.c][if1632/kernel32.spec]
Add stubs for GetConsoleCursorInfo32, SetConsoleCursorInfo32.
* [windows/message.c][if1632/user32.spec][include/windows.h]
Define SendMessageTimeout*.
* [graphics/x11drv/xfont.c]
Change algorithm of __genericCheckSum to be alignment safe.
* [misc/main.c] [misc/winsock.c] [misc/winsock_dns.c]
Include winsock.h early to avoid Solaris problem.
* [include/windows.h]
Undef FSHIFT before we define it.
* [rc/winerc.c]
Include <fcntl.h> instead of <sys/fcntl.h>.
* [files/file.c]
Use strerror in FILE_SetDosError if available.
* [include/config.h.in] [configure.in]
Check for strerror.
* [objects/gdiobj.c]
Make static font structures aligned.
Mon Dec 1 10:10:21 1997 Karl Garrison <karlos@eznet.net>
* [win32/console.c] [if1632/kernel32.spec] [include/windows.h]
Added stub for GetNumberOfConsoleMouseButtons.
Added stub for PeekConsoleInput(A,W).
Fixed parameter list for WriteConsole(A,W).
GetNumberOfConsoleInputEvents now returns 0 events instead of 1
(since low-level console functions are not yet supported).
GetConsoleMode no longer returns ENABLE_WINDOW_INPUT and
ENABLE_MOUSE_INPUT since these are not currently implemented.
1997-12-21 20:17:50 +01:00
|
|
|
/* ----------------------------------- helper functions -
|
|
|
|
*
|
|
|
|
* TODO: Merge WS_dup_..() stuff into one function that
|
|
|
|
* would operate with a generic structure containing internal
|
Release 980201
Sun Feb 1 13:24:54 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [files/drive.c]
Added Device= parameter to drive configuration.
* [if1632/relay.c]
Throw() and Catch() now use the correct CATCHBUF layout (untested).
* [tools/build.c] [include/stackframe.h] [loader/task.c]
Moved 16-bit stack pointer into thread database.
Save current %fs while running 16-bit code.
Fri Jan 30 09:25:49 1998 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [graphics/mapping.c]
Made DPtoLP32 and LPtoDP32 respect world transforms.
* [graphics/path.c] [graphics/painting.c] [if1632/gdi.spec]
[include/path.h]
More path support.
* [include/gdi.h] [include/windows.h] [objects/dc.c]
[relay/gdi32.spec]
Support for Get/SetArcDirection and Get/SetWorldTransform
* [windows/hook.c]
Fixed a bug in HOOK_Map16To32Common.
Thu Jan 29 23:43:18 1998 Douglas Ridgway <ridgway@taiga.gmcl.com>
* [graphics/metafiledrv/init.c] [objects/metafile.c]
Documentation for metafile related API calls. Fixed a bug to avoid
documenting it.
* [include/windows.h]
Declaration for LoadImage.
Thu Jan 29 21:44:45 1998 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/win16drv/*]
Changes to printing code to enable use of printer fonts with the
win3.1 postscript driver. Remember to add printer=on to [wine]
section of wine.conf . You will also need to disable truetype
fonts from control panel. Winword 6.0 and Write seem to be happy
with this...
* [include/bitmap.h]
Fix Widthbytes for 15bpp displays.
Tue Jan 27 20:54:08 1998 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [tsx11/*] [include/ts*] [tools/make_X11wrappers]
Implemented thread-safe X11 wrappers.
Tue Jan 27 13:54:09 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu>
* [windows/queue.c]
Forgot to convert thdb to thread_id.
* [misc/registry.c]
Sped up Windows 95 registry reading. Changed code to traverse
registry as a tree rather than read in all possible keys
(including dead ones).
Tue Jan 27 12:46:09 1998 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [loader/pe_image.c][Makefile.in][scheduler/thread.c]
[libtest/hello5.c]
Don't exit() on failed to load referenced dlls.
Fixed static tls allocation for multiple threads.
WINELIB should now be able to load PE dlls. A sample
winelib program, that dynamically loads a internal dll
is included.
* [graphics/ddraw.c][include/ddraw.h][include/d3d.h]
Cleaned up and enhanced further. Added several DirectX5
interface definitions and DirectSurface3 implementation.
Stubs for D3D (NOT coming soon, just there so it fails safely).
* [multimedia/dsound.c][include/dsound.h]
Actually works now for a lot of cases. Some DirectX5 stuff
added. Still lacking several features.
* [windows/dinput.c][include/dinput.h]
Started implementing DirectInput. Doesn't work yet, don't
know why.
* [if1632/thunk.c][misc/callbacks.c]
[win32/kernel.c][include/callbacks.h]
Added WOWCallback16Ex, WOWHandle32.
* [misc/cpu.c]
Fixed GetSystemInfo, IsProcessorFeaturePresent.
* [multimedia/joystick.c][multimedia/time.c]
Several fixes. Small hack to get timerevents in timeGetTime() loops.
Tue Jan 20 11:26:27 1998 Slaven Rezic <eserte@cs.tu-berlin.de>
* [configure.in]
Fixed check for union semun on FreeBSD systems.
Sun Jan 18 23:05:04 1998 Karl Backstrm <karl_b@geocities.com>
* [misc/ole2nls.c] [programs/progman/Sw.rc] [programs/winhelp/Sw.rc]
[resources/sysres_Sw.rc]
Added/updated Swedish language support.
Sun Jan 18 18:49:01 1998 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [misc/winsock.c] [misc/winsock_dns.c] [windows/event.c]
[windows/win.c] [windows/dce.c] [windows/winpos.c]
Bug fixes.
Sun Jan 18 12:45:23 1997 Andreas Mohr <100.30936@germany.net>
* [msdos/int25.c] [msdos/int26.c]
Implemented "native" absolute disk read/write access.
* [msdos/int13.c] [msdos/ioports.c]
Enhanced GET DRIVE PARAMETERS (int13 AH=08).
* [graphics/win16drv/prtdrv.c] [if1632/gdi.spec]
Fixed typos, implemented dmEnumDFonts,
Started implementation of dmRealizeObject.
* [if1632/compobj.spec] [ole/compobj.c] [relay32/ole32.spec]
Stubs CoCreateInstance, CoFreeUnusedLibraries, implemented
CoFileTimeNow.
* [if1632/kernel.spec] [include/windows.h] [memory/global.c]
[memory/string.c] [misc/kernel.c] [misc/Makefile.in]
[misc/toolhelp.c] [msdos/int21.c]
Implemented GlobalHandleNoRIP, GetFreeMemInfo, DebugFillBuffer,
stubs GetSetKernelDOSProc, DiagQuery, DiagOutput, ToolHelpHook
(Undocumented Windows).
* [if1632/user.spec] [if1632/win32s16.spec] [misc/win32s16.c]
Misc stubs.
* [if1632/winaspi.spec] [misc/aspi.c]
Implemented GetASPIDLLVersion.
* [if1632/wprocs.spec] [msdos/int20.c] [msdos/Makefile.in]
Added handler for Int 0x20 (terminate program, _very_ old-fashioned).
* [misc/w32scomb.c]
Implemented Get16DLLAddress() partially
(big thanks to Marcus and Alexandre).
* [relay32/Makefile.in] [relay32/builtin32.c] [relay32/dplay.spec]
Added built-in DPLAY.DLL.
* [relay32/winmm.spec] [multimedia/joystick.c]
Added joySetThreshold.
* [misc/windebug.c]
Added WinNotify.
* [win32/console.c]
Stubs CreateConsoleScreenBuffer, SetConsoleActiveScreenBuffer,
WriteConsoleOutput32A.
* [windows/user.c]
Stub SetEventHook.
Sat Jan 17 19:30:35 1998 Matthew Toseland <Paul.Toseland@btinternet.com>
* [windows/painting.c]
Fixed broken restore-to-maximized.
Mon Jan 12 21:25:32 1998 Perceval - Marc Huguet Puig <mhp@tinet.fut.es>
* [documentation/wine.man] [include/options.h]
[misc/main.c] [ole/ole2nls.c] [resources/sysres.c]
[resources/sysres_Ca.rc] [resources/Makefile.in]
Added language catalan. (Afegit l'idioma catal).
1998-02-01 19:33:27 +01:00
|
|
|
* pointers (via a template of some kind).
|
Release 971221
Fri Dec 19 10:50:46 1997 Douglas Ridgway <ridgway@winehq.com>
* [Make.rules.in] [Makefile.in] [documentation/Makefile.in]
[documentation/README.documentation]
First cut at Wine API documentation. No longer install reference
manual by default.
Wed Dec 17 21:32:23 1997 Andreas Mohr <100.30936@germany.net>
* [files/file.c]
Fixed GetTempFileName16() to use current path of requested drive
as needed.
* [if1632/Makefile.in] [if1632/builtin.c] [if1632/dciman32.spec]
[if1632/msvfw32.spec] [if1632/tapi32.spec] [if1632/wow32.spec]
Added misc DLLs needed by various apps.
Wed Dec 17 12:01:50 1997 Morten Eriksen <mortene@sim.no>
* [if1632/gdi32.spec] [include/windows.h] [objects/palette.c]
Inserted empty stub for CreateHalftonePalette.
Tue Dec 16 22:08:06 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/mdi.c]
Use VK_TAB instead of VK_SEPARATOR in TranslateMDISysAccel().
* [graphics/metafiledrv/init.c]
DeleteDC() on a MetaDC doesn't do anything - it shouldn't. Therefore
fix cleanup of MetaDCs in CloseMetaFile(); they now actually get
removed from the GDI heap!
* [graphics/x11drv/xfont.c]
Preserve FO_MATCH_XYINDEP flag in XFONT_MatchFIList(). Should reduce
the number of bold-italic matches.
Tue Dec 16 20:11:43 1997 Bertho Stultiens <bertho@panter.soci.aau.dk>
* [graphics/painting.c]
Included an implementation of DrawState
* [if1632/thunk.c]
Changed many fprintfs into dprintf_thunk
* [include/cache.h] [graphics/cache.c]
New files to hold cached handles to regulary used GDI object.
* [include/windows.h]
Added DRAWSTATExx typedefs
Added DSS_DEFAULT define for DrawState
* [objects/text.c]
New implementation of GrayString()
* [controls/uitools.c]
Implemented DrawFrameControl() functions
Changed DrawEdge() behaviour to win95 implementation
Mon Dec 15 23:43:01 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [graphics/path.c] [include/path.h] [graphics/painting.c]
[if1632/gdi32.spec] [include/gdi.h] [include/windows.h]
[objects/dc.c]
Added preliminary support for GDI paths.
* [objects/dc.c]
Added DC_Init_DC_INFO function for initializing WIN_DC_INFO
structure.
* [include/windows.h] [include/gdi.h] [objects/gdiobj.c]
Added DEFAULT_GUI_FONT.
* [include/winerror.h]
Added a few error codes.
* [memory/heap.c]
Changed HeapAlloc to make the correct calls to SetLastError
(now conforms to NT's behaviour).
* [windows/win.c]
Changed WIN_CreateWindowEx to allow child windows with zero
width / height.
Sun Dec 14 12:01:07 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [if1632/*] [relay32/*]
Moved all 32-bit relay stuff to relay32/
* [fi1632/thunk.c] [win32/kernel32.c]
Moved all KERNEL32 ordinal functions to kernel32.c
* [memory/selector.c]
Initialize selectors in AllocSelectorArray.
* [tools/build.c]
Generate C instead of assembly for Win32 relays.
Fixed stack corruption in CallTo16 functions, found by Bertho
Stultiens.
Sun Dec 14 10:55:00 1997 Andreas Mohr <100.30936@germany.net>
* [if1632/Makefile.in] [if1632/builtin.c] [if1632/ole2thk.spec]
Added built-in OLE2THK.DLL.
* [if1632/toolhelp.spec] [include/toolhelp.h] [memory/selector.c]
[misc/toolhelp.c]
Added stubs for StackTraceFirst(), StackTraceCSIPFirst(),
StackTraceNext(), UTSelectorOffsetToLinear()
and UTLinearToSelectorOffset().
Sat Dec 13 17:26:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [misc/winsock.c]
32-bit API fixes for reported problems (thanks to Marcus
and David).
* [graphics/x11drv/xfont.c]
Little tweak in point size calculation.
* [windows/defwnd.c] [windows/dce.c] [windows/winhelp.c]
[windows/winproc.c] [windows/win.c]
Bug fixes.
Sat Dec 13 16:35:14 1997 Kai Morich <kai.morich@rhein-neckar.netsurf.de>
* [files/dos_fs.c]
OpenFile with empty filename and OF_PARSE returns current dir.
* [misc/commdlg.c]
Ignore initial dir if bogus.
* [files/file.c]
Locking an identic region in a file must not be an error.
* [misc/lstr.c]
Use wide char ctype functions.
Fri Dec 12 23:46:22 1997 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [file/drive.c]
First attempt for GetDiskFreeSpaceEx.
Fri Dec 12 23:18:41 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [loader/pe_resource.c]
Fixed wrongly appearing menus problem (only use default lookups in
last resource subtree).
* [multimedia/*.c]
Added win32 support for time* and joy* lowlevel drivers,
(not excessively tested), some misc fixes and cleanups.
* [misc/shellord.c][misc/shell.c][ole/folders.c][ole/ifs.c]
[include/interfaces.h][include/shlobj.h]
Added some more undocumented SHELL32 functions, some shell folder
interface stubs added, SHGetMalloc, SHGetDesktopFolder,
SHGetSpecialFolderLocation, SHGetPathFromIDList stubs added,
IMalloc, IUnknown implemented.
* [windows/msgbox.c]
Implemented MessageBoxIndirect*, some internal changes.
* [if1632/thunk.c]
KERNEL_431 implemented.
* [objects/gdiobj.c]
GetCurrentObject implemented.
Wed Dec 3 01:09:17 1997 Gordon Chaffee <chaffee@apu.cs.berkeley.edu>
* [objects/dib.c]
Fix a couple small DIB problems.
* [controls/edit.c]
Fix a typo.
* [files/dos_fs.c]
Try normal readdir in case fs is specified as vfat but isn't.
* [files/profile.c]
Implementation of WritePrivateProfileSection32A from Uwe Bonnes.
* [misc/printdrv.c]
OpenPrinter32A stub, helps Word97 start.
* [objects/text.c]
Fixup implementation of GetTextCharsetInfo.
* [scheduler/process.c]
Fix environment variable expansion.
* [win32/code_page.c]
Make MultiByteToWideChar and WideCharToMultiByte conform in return
values and error conditions to those in Windows NT 4.0.
* [windows/message.c]
Fix broadcasting problems in Win32. The Win32 docs say to use
HWND_TOPMOST to broadcast to all Win32 Windows.
* [memory/virtual.c] [loader/pe_image.c]
Do not map in VirtualAlloc if address is specified and space is
not available. This is required by Win32.
* [include/pen.h] [include/x11drv.h] [objects/dc.c]
[objects/pen.c] [graphics/x11drv/pen.c]
Support for ExtCreatePen.
Tue Dec 2 20:22:06 1997 Morten Welinder <terra@diku.dk>
* [*/*.c] [*/*.h]
Add lots of prototypes.
* [if1632/kernel32.spec][include/windows.h][include/winnt.h]
[misc/cpu.c]
Define IsProcessorFeaturePresent.
* [misc/crtdll.c]
(CRTDLL__getcwd): Allocate enough memory for the terminating zero.
* [misc/ver.c]
Improve check for null component in _find_data[AW]. Plug leaks
in VerQueryValue*.
* [win32/console.c][if1632/kernel32.spec]
Add stubs for GetConsoleCursorInfo32, SetConsoleCursorInfo32.
* [windows/message.c][if1632/user32.spec][include/windows.h]
Define SendMessageTimeout*.
* [graphics/x11drv/xfont.c]
Change algorithm of __genericCheckSum to be alignment safe.
* [misc/main.c] [misc/winsock.c] [misc/winsock_dns.c]
Include winsock.h early to avoid Solaris problem.
* [include/windows.h]
Undef FSHIFT before we define it.
* [rc/winerc.c]
Include <fcntl.h> instead of <sys/fcntl.h>.
* [files/file.c]
Use strerror in FILE_SetDosError if available.
* [include/config.h.in] [configure.in]
Check for strerror.
* [objects/gdiobj.c]
Make static font structures aligned.
Mon Dec 1 10:10:21 1997 Karl Garrison <karlos@eznet.net>
* [win32/console.c] [if1632/kernel32.spec] [include/windows.h]
Added stub for GetNumberOfConsoleMouseButtons.
Added stub for PeekConsoleInput(A,W).
Fixed parameter list for WriteConsole(A,W).
GetNumberOfConsoleInputEvents now returns 0 events instead of 1
(since low-level console functions are not yet supported).
GetConsoleMode no longer returns ENABLE_WINDOW_INPUT and
ENABLE_MOUSE_INPUT since these are not currently implemented.
1997-12-21 20:17:50 +01:00
|
|
|
*/
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
|
|
|
|
static int list_size(char** l, int item_size)
|
|
|
|
{
|
|
|
|
int i,j = 0;
|
|
|
|
if(l)
|
2002-06-01 01:06:46 +02:00
|
|
|
{ for(i=0;l[i];i++)
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
j += (item_size) ? item_size : strlen(l[i]) + 1;
|
|
|
|
j += (i + 1) * sizeof(char*); }
|
|
|
|
return j;
|
|
|
|
}
|
|
|
|
|
2003-11-29 00:14:02 +01:00
|
|
|
static int list_dup(char** l_src, char** l_to, int item_size)
|
2002-06-01 01:06:46 +02:00
|
|
|
{
|
2003-11-29 00:14:02 +01:00
|
|
|
char *p;
|
|
|
|
int i;
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
|
2003-11-29 00:14:02 +01:00
|
|
|
for (i = 0; l_src[i]; i++) ;
|
|
|
|
p = (char *)(l_to + i + 1);
|
|
|
|
for (i = 0; l_src[i]; i++)
|
|
|
|
{
|
|
|
|
int count = ( item_size ) ? item_size : strlen(l_src[i]) + 1;
|
|
|
|
memcpy(p, l_src[i], count);
|
|
|
|
l_to[i] = p;
|
|
|
|
p += count;
|
|
|
|
}
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
l_to[i] = NULL;
|
2005-01-14 20:54:38 +01:00
|
|
|
return p - (char *)l_to;
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/* ----- hostent */
|
|
|
|
|
2009-12-06 03:26:33 +01:00
|
|
|
/* create a hostent entry
|
|
|
|
*
|
|
|
|
* Creates the entry with enough memory for the name, aliases
|
|
|
|
* addresses, and the address pointers. Also copies the name
|
2012-06-09 19:34:59 +02:00
|
|
|
* and sets up all the pointers.
|
2009-12-14 16:30:14 +01:00
|
|
|
*
|
|
|
|
* NOTE: The alias and address lists must be allocated with room
|
|
|
|
* for the NULL item terminating the list. This is true even if
|
|
|
|
* the list has no items ("aliases" and "addresses" must be
|
|
|
|
* at least "1", a truly empty list is invalid).
|
2000-08-04 00:19:09 +02:00
|
|
|
*/
|
2012-06-09 19:34:59 +02:00
|
|
|
static struct WS_hostent *WS_create_he(char *name, int aliases, int aliases_size, int addresses, int address_length)
|
2003-11-29 00:14:02 +01:00
|
|
|
{
|
|
|
|
struct WS_hostent *p_to;
|
2009-12-06 03:26:33 +01:00
|
|
|
char *p;
|
|
|
|
int size = (sizeof(struct WS_hostent) +
|
|
|
|
strlen(name) + 1 +
|
2012-06-09 19:34:59 +02:00
|
|
|
sizeof(char *) * aliases +
|
|
|
|
aliases_size +
|
|
|
|
sizeof(char *) * addresses +
|
|
|
|
address_length * (addresses - 1)), i;
|
2009-12-06 03:26:56 +01:00
|
|
|
|
2003-11-29 00:14:02 +01:00
|
|
|
if (!(p_to = check_buffer_he(size))) return NULL;
|
2009-12-06 03:26:33 +01:00
|
|
|
memset(p_to, 0, size);
|
2003-11-29 00:14:02 +01:00
|
|
|
|
2012-06-09 19:34:59 +02:00
|
|
|
/* Use the memory in the same way winsock does.
|
2012-07-03 09:13:55 +02:00
|
|
|
* First set the pointer for aliases, second set the pointers for addresses.
|
2012-06-09 19:34:59 +02:00
|
|
|
* Third fill the addresses indexes, fourth jump aliases names size.
|
|
|
|
* Fifth fill the hostname.
|
|
|
|
* NOTE: This method is valid for OS version's >= XP.
|
|
|
|
*/
|
2003-11-29 00:14:02 +01:00
|
|
|
p = (char *)(p_to + 1);
|
2009-12-14 16:30:14 +01:00
|
|
|
p_to->h_aliases = (char **)p;
|
|
|
|
p += sizeof(char *)*aliases;
|
2012-06-09 19:34:59 +02:00
|
|
|
|
2009-12-14 16:30:14 +01:00
|
|
|
p_to->h_addr_list = (char **)p;
|
|
|
|
p += sizeof(char *)*addresses;
|
2009-12-06 03:26:56 +01:00
|
|
|
|
2012-06-09 19:34:59 +02:00
|
|
|
for (i = 0, addresses--; i < addresses; i++, p += address_length)
|
|
|
|
p_to->h_addr_list[i] = p;
|
|
|
|
|
|
|
|
/* NOTE: h_aliases must be filled in manually because we don't know each string
|
|
|
|
* size, leave these pointers NULL (already set to NULL by memset earlier).
|
|
|
|
*/
|
|
|
|
p += aliases_size;
|
|
|
|
|
|
|
|
p_to->h_name = p;
|
|
|
|
strcpy(p, name);
|
2009-12-14 16:30:14 +01:00
|
|
|
|
2009-12-06 03:26:33 +01:00
|
|
|
return p_to;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* duplicate hostent entry
|
|
|
|
* and handle all Win16/Win32 dependent things (struct size, ...) *correctly*.
|
|
|
|
* Ditto for protoent and servent.
|
|
|
|
*/
|
|
|
|
static struct WS_hostent *WS_dup_he(const struct hostent* p_he)
|
|
|
|
{
|
2012-06-09 19:34:59 +02:00
|
|
|
int i, addresses = 0, alias_size = 0;
|
2009-12-06 03:26:33 +01:00
|
|
|
struct WS_hostent *p_to;
|
2012-06-09 19:34:59 +02:00
|
|
|
char *p;
|
2009-12-06 03:26:33 +01:00
|
|
|
|
2012-06-09 19:34:59 +02:00
|
|
|
for( i = 0; p_he->h_aliases[i]; i++) alias_size += strlen(p_he->h_aliases[i]) + 1;
|
|
|
|
while (p_he->h_addr_list[addresses]) addresses++;
|
|
|
|
|
|
|
|
p_to = WS_create_he(p_he->h_name, i + 1, alias_size, addresses + 1, p_he->h_length);
|
2009-12-06 03:26:33 +01:00
|
|
|
|
|
|
|
if (!p_to) return NULL;
|
2014-04-15 05:43:53 +02:00
|
|
|
p_to->h_addrtype = convert_af_u2w(p_he->h_addrtype);
|
2009-12-06 03:26:33 +01:00
|
|
|
p_to->h_length = p_he->h_length;
|
2003-11-29 00:14:02 +01:00
|
|
|
|
2012-06-09 19:34:59 +02:00
|
|
|
for(i = 0, p = p_to->h_addr_list[0]; p_he->h_addr_list[i]; i++, p += p_to->h_length)
|
|
|
|
memcpy(p, p_he->h_addr_list[i], p_to->h_length);
|
|
|
|
|
|
|
|
/* Fill the aliases after the IP data */
|
|
|
|
for(i = 0; p_he->h_aliases[i]; i++)
|
|
|
|
{
|
|
|
|
p_to->h_aliases[i] = p;
|
|
|
|
strcpy(p, p_he->h_aliases[i]);
|
|
|
|
p += strlen(p) + 1;
|
|
|
|
}
|
|
|
|
|
2003-11-29 00:14:02 +01:00
|
|
|
return p_to;
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/* ----- protoent */
|
|
|
|
|
2003-11-29 00:14:02 +01:00
|
|
|
static struct WS_protoent *WS_dup_pe(const struct protoent* p_pe)
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
{
|
2003-11-29 00:14:02 +01:00
|
|
|
char *p;
|
|
|
|
struct WS_protoent *p_to;
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
|
2003-11-29 00:14:02 +01:00
|
|
|
int size = (sizeof(*p_pe) +
|
|
|
|
strlen(p_pe->p_name) + 1 +
|
|
|
|
list_size(p_pe->p_aliases, 0));
|
2000-08-04 00:19:09 +02:00
|
|
|
|
2003-11-29 00:14:02 +01:00
|
|
|
if (!(p_to = check_buffer_pe(size))) return NULL;
|
|
|
|
p_to->p_proto = p_pe->p_proto;
|
2000-08-04 00:19:09 +02:00
|
|
|
|
2003-11-29 00:14:02 +01:00
|
|
|
p = (char *)(p_to + 1);
|
|
|
|
p_to->p_name = p;
|
|
|
|
strcpy(p, p_pe->p_name);
|
|
|
|
p += strlen(p) + 1;
|
|
|
|
|
|
|
|
p_to->p_aliases = (char **)p;
|
|
|
|
list_dup(p_pe->p_aliases, p_to->p_aliases, 0);
|
|
|
|
return p_to;
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/* ----- servent */
|
|
|
|
|
2003-11-29 00:14:02 +01:00
|
|
|
static struct WS_servent *WS_dup_se(const struct servent* p_se)
|
|
|
|
{
|
|
|
|
char *p;
|
|
|
|
struct WS_servent *p_to;
|
|
|
|
|
|
|
|
int size = (sizeof(*p_se) +
|
|
|
|
strlen(p_se->s_proto) + 1 +
|
|
|
|
strlen(p_se->s_name) + 1 +
|
|
|
|
list_size(p_se->s_aliases, 0));
|
|
|
|
|
|
|
|
if (!(p_to = check_buffer_se(size))) return NULL;
|
|
|
|
p_to->s_port = p_se->s_port;
|
|
|
|
|
|
|
|
p = (char *)(p_to + 1);
|
|
|
|
p_to->s_name = p;
|
|
|
|
strcpy(p, p_se->s_name);
|
|
|
|
p += strlen(p) + 1;
|
|
|
|
|
|
|
|
p_to->s_proto = p;
|
|
|
|
strcpy(p, p_se->s_proto);
|
|
|
|
p += strlen(p) + 1;
|
|
|
|
|
|
|
|
p_to->s_aliases = (char **)p;
|
|
|
|
list_dup(p_se->s_aliases, p_to->s_aliases, 0);
|
|
|
|
return p_to;
|
Release 961201
Sat Nov 30 19:21:17 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure]
Re-generated with autoconf 2.11. Let me know if you have
problems.
* [controls/listbox.c] [controls/oldlbox.c]
Listboxes rewritten from scratch. Moved old code still used by
comboboxes to oldlbox.c
* [misc/registry.c]
Use temporary file when saving registry.
* [windows/dialog.c]
Implemented Win32 version of DlgDirList() and DlgDirListComboBox().
* [windows/winproc.c]
Added translation for listbox Win32 messages.
Sat Nov 30 21:00:00 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [controls/widgets.c] [controls/button.c]
Fixed some incompatibilities with CTL3D DLL.
* [windows/dialog.c]
Made dialog windows fit into the desktop.
* [misc/winsock.c] [misc/winsock_async.c]
New Winsock engine.
* [windows/message.c]
GetMessage() fixes.
* [windows/queue.c] [windows/hook.c] [windows/win.c]
SetMessageQueue() fixes.
Fri Nov 29 10:25:12 1996 Slaven Rezic <eserte@cs.tu-berlin.de>
* [objects/text.c]
DrawText16(): Fixed return value.
Tue Nov 26 14:47:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/profile.c] [*/*]
Added Win32 profile functions, updated to new naming standard.
* [objects/font.c] [if1632/thunk.c] [include/windows.h]
Added EnumFonts32*, EnumFontFamiliesEx*, changed prototypes and
structures.
* [misc/ole2nls.c] [if1632/thunk.c]
Added EnumSystemLocales() (winhelp.exe).
* [misc/registry.c]
Added Windows 3.1 registry loader supplied by Tor Sjxwall, tor@sn.no
* [win32/file.c]
Partially fixed CreateFileMapping(), added UnmapViewOfFile().
Sat Nov 23 23:36:05 1996 Ronan Waide <waider@waider.ie>
* [misc/shell.c]
Fixed some FIXMEs relating to ShellExec() and FindExecutable().
* [misc/main.c]
Implemented a few more of the SystemParametersInfo() cases.
Tue Nov 19 01:24:34 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* [include/keyboard.h]
New file, new macro WINE_VKEY_MAPPINGS (using code taken from event.c).
* [include/windows.h]
New [VK_A, VK_Z] and [VK_0, VK9] macros.
* [misc/keyboard.c]
Fixes in KeyTable and ToAscii.
* [objects/font.c]
FONT_init : Give default value for MSWIN "system" font.
FONT_MatchFont : Do not try every size of a font family if the
family does not exist.
* [windows/event.c]
lastEventChar hack removed.
KeyStateTable replaced by InputKeyStateTable (maintained in event.c)
and QueueKeyStateTable (maintained in message.c).
EVENT_key : Corrections to the extended bit setting.
* [windows/message.c] [windows/keyboard.c]
Implementation of a new QueueKeyStateTable : table of key states
valid when messages are retrieved by GetMessage or PeekMessage,
and valid for TranslateMessage.
TranslateMessage : Convert WM*KEY messages using QueueKeyStateTable
and ToAscii.
Mon Nov 18 16:59:01 1996 Robert Pouliot <krynos@clic.net>
* [graphics/Makefile.in] [graphics/wing.c]
[if1632/wing.spec]
Some functions for WinG support, mostly empty stubs.
* [misc/crtdll.c] [if1632/crtdll.spec]
Many functions added to CRTDLL, mostly calls to Unix C library.
1996-12-01 18:17:47 +01:00
|
|
|
}
|
|
|
|
|
2001-07-10 21:09:59 +02:00
|
|
|
|
2002-04-05 23:22:55 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* WSARecv (WS2_32.67)
|
|
|
|
*/
|
2005-01-14 20:54:38 +01:00
|
|
|
int WINAPI WSARecv(SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount,
|
|
|
|
LPDWORD NumberOfBytesReceived, LPDWORD lpFlags,
|
|
|
|
LPWSAOVERLAPPED lpOverlapped,
|
|
|
|
LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine)
|
2002-04-05 23:22:55 +02:00
|
|
|
{
|
2010-12-06 01:08:54 +01:00
|
|
|
return WS2_recv_base(s, lpBuffers, dwBufferCount, NumberOfBytesReceived, lpFlags,
|
|
|
|
NULL, NULL, lpOverlapped, lpCompletionRoutine, NULL);
|
2002-04-05 23:22:55 +02:00
|
|
|
}
|
|
|
|
|
2010-12-06 01:08:54 +01:00
|
|
|
static int WS2_recv_base( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount,
|
|
|
|
LPDWORD lpNumberOfBytesRecvd, LPDWORD lpFlags,
|
|
|
|
struct WS_sockaddr *lpFrom,
|
|
|
|
LPINT lpFromlen, LPWSAOVERLAPPED lpOverlapped,
|
|
|
|
LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine,
|
|
|
|
LPWSABUF lpControlBuffer )
|
2001-07-10 21:09:59 +02:00
|
|
|
{
|
2007-04-10 22:32:46 +02:00
|
|
|
unsigned int i, options;
|
2015-03-29 05:53:30 +02:00
|
|
|
int n, fd, err, overlapped, flags;
|
2015-03-29 05:53:11 +02:00
|
|
|
struct ws2_async *wsa = NULL, localwsa;
|
2013-03-22 06:59:50 +01:00
|
|
|
BOOL is_blocking;
|
2007-05-31 11:55:38 +02:00
|
|
|
DWORD timeout_start = GetTickCount();
|
2007-11-09 23:11:58 +01:00
|
|
|
ULONG_PTR cvalue = (lpOverlapped && ((ULONG_PTR)lpOverlapped->hEvent & 1) == 0) ? (ULONG_PTR)lpOverlapped : 0;
|
2001-07-10 21:09:59 +02:00
|
|
|
|
2007-05-24 16:41:17 +02:00
|
|
|
TRACE("socket %04lx, wsabuf %p, nbufs %d, flags %d, from %p, fromlen %d, ovl %p, func %p\n",
|
2002-04-05 23:22:55 +02:00
|
|
|
s, lpBuffers, dwBufferCount, *lpFlags, lpFrom,
|
2007-03-08 15:31:00 +01:00
|
|
|
(lpFromlen ? *lpFromlen : -1),
|
2002-04-05 23:22:55 +02:00
|
|
|
lpOverlapped, lpCompletionRoutine);
|
|
|
|
|
2007-04-10 22:32:46 +02:00
|
|
|
fd = get_sock_fd( s, FILE_READ_DATA, &options );
|
|
|
|
TRACE( "fd=%d, options=%x\n", fd, options );
|
2001-07-10 21:09:59 +02:00
|
|
|
|
2003-12-02 05:19:56 +01:00
|
|
|
if (fd == -1) return SOCKET_ERROR;
|
|
|
|
|
2015-03-29 05:53:11 +02:00
|
|
|
if (*lpFlags & WS_MSG_OOB)
|
|
|
|
{
|
|
|
|
/* It's invalid to receive OOB data from an OOBINLINED socket
|
|
|
|
* as OOB data is turned into normal data. */
|
|
|
|
i = sizeof(n);
|
|
|
|
if (!getsockopt(fd, SOL_SOCKET, SO_OOBINLINE, (char*) &n, &i) && n)
|
|
|
|
{
|
|
|
|
err = WSAEINVAL;
|
|
|
|
goto error;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-05-19 23:16:39 +02:00
|
|
|
overlapped = (lpOverlapped || lpCompletionRoutine) &&
|
|
|
|
!(options & (FILE_SYNCHRONOUS_IO_ALERT | FILE_SYNCHRONOUS_IO_NONALERT));
|
|
|
|
if (overlapped || dwBufferCount > 1)
|
2008-10-09 12:57:33 +02:00
|
|
|
{
|
2015-03-03 07:30:38 +01:00
|
|
|
if (!(wsa = (struct ws2_async *)alloc_async_io( offsetof(struct ws2_async, iovec[dwBufferCount]))))
|
2014-05-19 23:16:39 +02:00
|
|
|
{
|
|
|
|
err = WSAEFAULT;
|
|
|
|
goto error;
|
|
|
|
}
|
2008-10-09 12:57:33 +02:00
|
|
|
}
|
2014-05-19 23:16:39 +02:00
|
|
|
else
|
|
|
|
wsa = &localwsa;
|
2008-10-09 12:57:33 +02:00
|
|
|
|
|
|
|
wsa->hSocket = SOCKET2HANDLE(s);
|
|
|
|
wsa->flags = *lpFlags;
|
2010-12-06 01:08:54 +01:00
|
|
|
wsa->lpFlags = lpFlags;
|
2008-10-09 12:57:33 +02:00
|
|
|
wsa->addr = lpFrom;
|
|
|
|
wsa->addrlen.ptr = lpFromlen;
|
2010-12-06 01:08:54 +01:00
|
|
|
wsa->control = lpControlBuffer;
|
2008-10-09 12:57:33 +02:00
|
|
|
wsa->n_iovecs = dwBufferCount;
|
|
|
|
wsa->first_iovec = 0;
|
2002-04-05 23:22:55 +02:00
|
|
|
for (i = 0; i < dwBufferCount; i++)
|
|
|
|
{
|
2009-07-09 15:21:30 +02:00
|
|
|
/* check buffer first to trigger write watches */
|
|
|
|
if (IsBadWritePtr( lpBuffers[i].buf, lpBuffers[i].len ))
|
|
|
|
{
|
|
|
|
err = WSAEFAULT;
|
|
|
|
goto error;
|
|
|
|
}
|
2008-10-09 12:57:33 +02:00
|
|
|
wsa->iovec[i].iov_base = lpBuffers[i].buf;
|
|
|
|
wsa->iovec[i].iov_len = lpBuffers[i].len;
|
2002-04-05 23:22:55 +02:00
|
|
|
}
|
|
|
|
|
2015-03-29 05:53:30 +02:00
|
|
|
flags = convert_flags(wsa->flags);
|
2007-05-31 11:55:38 +02:00
|
|
|
for (;;)
|
2002-04-05 23:22:55 +02:00
|
|
|
{
|
2015-03-29 05:53:30 +02:00
|
|
|
n = WS2_recv( fd, wsa, flags );
|
2007-06-04 17:44:24 +02:00
|
|
|
if (n == -1)
|
2002-04-25 23:34:24 +02:00
|
|
|
{
|
2015-03-31 05:06:52 +02:00
|
|
|
/* Unix-like systems return EINVAL when attempting to read OOB data from
|
|
|
|
* an empty socket buffer, convert that to a Windows expected return. */
|
|
|
|
if ((flags & MSG_OOB) && errno == EINVAL)
|
|
|
|
errno = EWOULDBLOCK;
|
|
|
|
|
2007-06-04 17:44:24 +02:00
|
|
|
if (errno != EAGAIN)
|
|
|
|
{
|
2010-03-22 19:56:21 +01:00
|
|
|
int loc_errno = errno;
|
2007-06-04 17:44:24 +02:00
|
|
|
err = wsaErrno();
|
2010-03-22 19:56:21 +01:00
|
|
|
if (cvalue) WS_AddCompletion( s, cvalue, sock_get_ntstatus(loc_errno), 0 );
|
2007-06-04 17:44:24 +02:00
|
|
|
goto error;
|
|
|
|
}
|
2002-04-25 23:34:24 +02:00
|
|
|
}
|
2011-09-14 12:04:39 +02:00
|
|
|
else if (lpNumberOfBytesRecvd) *lpNumberOfBytesRecvd = n;
|
2001-10-02 19:46:59 +02:00
|
|
|
|
2014-05-19 23:16:39 +02:00
|
|
|
if (overlapped)
|
2002-04-25 23:34:24 +02:00
|
|
|
{
|
2008-10-09 12:57:33 +02:00
|
|
|
IO_STATUS_BLOCK *iosb = lpOverlapped ? (IO_STATUS_BLOCK *)lpOverlapped : &wsa->local_iosb;
|
2002-04-05 23:22:55 +02:00
|
|
|
|
2007-05-31 17:48:07 +02:00
|
|
|
wsa->user_overlapped = lpOverlapped;
|
|
|
|
wsa->completion_func = lpCompletionRoutine;
|
2008-10-09 12:57:33 +02:00
|
|
|
release_sock_fd( s, fd );
|
2007-05-31 11:55:38 +02:00
|
|
|
|
2007-06-04 17:44:24 +02:00
|
|
|
if (n == -1)
|
2007-05-31 11:55:38 +02:00
|
|
|
{
|
2007-06-04 17:44:24 +02:00
|
|
|
iosb->u.Status = STATUS_PENDING;
|
|
|
|
iosb->Information = 0;
|
|
|
|
|
|
|
|
SERVER_START_REQ( register_async )
|
|
|
|
{
|
2008-12-26 12:17:20 +01:00
|
|
|
req->type = ASYNC_TYPE_READ;
|
|
|
|
req->async.handle = wine_server_obj_handle( wsa->hSocket );
|
2008-12-30 21:09:41 +01:00
|
|
|
req->async.callback = wine_server_client_ptr( WS2_async_recv );
|
|
|
|
req->async.iosb = wine_server_client_ptr( iosb );
|
|
|
|
req->async.arg = wine_server_client_ptr( wsa );
|
2008-12-08 16:05:17 +01:00
|
|
|
req->async.event = wine_server_obj_handle( lpCompletionRoutine ? 0 : lpOverlapped->hEvent );
|
2007-11-09 23:11:58 +01:00
|
|
|
req->async.cvalue = cvalue;
|
2007-06-04 17:44:24 +02:00
|
|
|
err = wine_server_call( req );
|
|
|
|
}
|
|
|
|
SERVER_END_REQ;
|
|
|
|
|
2007-06-04 18:17:16 +02:00
|
|
|
if (err != STATUS_PENDING) HeapFree( GetProcessHeap(), 0, wsa );
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError(NtStatusToWSAError( err ));
|
2007-06-04 17:44:24 +02:00
|
|
|
return SOCKET_ERROR;
|
2007-05-31 11:55:38 +02:00
|
|
|
}
|
|
|
|
|
2007-06-04 17:44:24 +02:00
|
|
|
iosb->u.Status = STATUS_SUCCESS;
|
|
|
|
iosb->Information = n;
|
|
|
|
if (!wsa->completion_func)
|
|
|
|
{
|
2007-11-09 23:11:58 +01:00
|
|
|
if (cvalue) WS_AddCompletion( s, cvalue, STATUS_SUCCESS, n );
|
2008-10-28 16:37:43 +01:00
|
|
|
if (lpOverlapped->hEvent) SetEvent( lpOverlapped->hEvent );
|
2007-05-31 17:48:07 +02:00
|
|
|
HeapFree( GetProcessHeap(), 0, wsa );
|
2007-06-04 17:44:24 +02:00
|
|
|
}
|
|
|
|
else NtQueueApcThread( GetCurrentThread(), (PNTAPCFUNC)ws2_async_apc,
|
|
|
|
(ULONG_PTR)wsa, (ULONG_PTR)iosb, 0 );
|
|
|
|
_enable_event(SOCKET2HANDLE(s), FD_READ, 0, 0);
|
|
|
|
return 0;
|
2002-04-25 23:34:24 +02:00
|
|
|
}
|
2002-04-05 23:22:55 +02:00
|
|
|
|
2007-06-04 17:44:24 +02:00
|
|
|
if (n != -1) break;
|
|
|
|
|
2013-03-22 06:59:50 +01:00
|
|
|
if ((err = _is_blocking( s, &is_blocking )))
|
|
|
|
{
|
|
|
|
err = NtStatusToWSAError( err );
|
|
|
|
goto error;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( is_blocking )
|
2002-04-25 23:34:24 +02:00
|
|
|
{
|
2007-05-31 11:55:38 +02:00
|
|
|
struct pollfd pfd;
|
2015-04-27 16:00:37 +02:00
|
|
|
int poll_timeout = -1;
|
2015-04-27 16:00:57 +02:00
|
|
|
INT64 timeout = get_rcvsnd_timeo(fd, TRUE);
|
2015-04-27 16:00:37 +02:00
|
|
|
|
|
|
|
if (timeout)
|
2007-05-31 11:55:38 +02:00
|
|
|
{
|
|
|
|
timeout -= GetTickCount() - timeout_start;
|
2015-04-27 16:00:37 +02:00
|
|
|
if (timeout < 0) poll_timeout = 0;
|
|
|
|
else poll_timeout = timeout <= INT_MAX ? timeout : INT_MAX;
|
2007-05-31 11:55:38 +02:00
|
|
|
}
|
2002-04-25 23:34:24 +02:00
|
|
|
|
2007-05-31 11:55:38 +02:00
|
|
|
pfd.fd = fd;
|
|
|
|
pfd.events = POLLIN;
|
|
|
|
if (*lpFlags & WS_MSG_OOB) pfd.events |= POLLPRI;
|
|
|
|
|
2015-04-27 16:00:37 +02:00
|
|
|
if (!poll_timeout || !poll( &pfd, 1, poll_timeout ))
|
2007-05-31 11:55:38 +02:00
|
|
|
{
|
|
|
|
err = WSAETIMEDOUT;
|
|
|
|
/* a timeout is not fatal */
|
|
|
|
_enable_event(SOCKET2HANDLE(s), FD_READ, 0, 0);
|
2002-04-25 23:34:24 +02:00
|
|
|
goto error;
|
2007-05-31 11:55:38 +02:00
|
|
|
}
|
2002-04-25 23:34:24 +02:00
|
|
|
}
|
2007-05-31 11:55:38 +02:00
|
|
|
else
|
|
|
|
{
|
2007-06-01 11:14:44 +02:00
|
|
|
_enable_event(SOCKET2HANDLE(s), FD_READ, 0, 0);
|
2007-05-31 11:55:38 +02:00
|
|
|
err = WSAEWOULDBLOCK;
|
|
|
|
goto error;
|
2004-10-04 21:13:26 +02:00
|
|
|
}
|
2002-04-05 23:22:55 +02:00
|
|
|
}
|
|
|
|
|
2002-04-25 23:34:24 +02:00
|
|
|
TRACE(" -> %i bytes\n", n);
|
2014-05-19 23:16:39 +02:00
|
|
|
if (wsa != &localwsa) HeapFree( GetProcessHeap(), 0, wsa );
|
2003-12-02 05:19:56 +01:00
|
|
|
release_sock_fd( s, fd );
|
2002-10-30 21:26:32 +01:00
|
|
|
_enable_event(SOCKET2HANDLE(s), FD_READ, 0, 0);
|
2015-01-11 23:20:28 +01:00
|
|
|
SetLastError(ERROR_SUCCESS);
|
2002-04-05 23:22:55 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
2007-05-31 11:55:38 +02:00
|
|
|
error:
|
2014-05-19 23:16:39 +02:00
|
|
|
if (wsa != &localwsa) HeapFree( GetProcessHeap(), 0, wsa );
|
2003-12-02 05:19:56 +01:00
|
|
|
release_sock_fd( s, fd );
|
2002-04-05 23:22:55 +02:00
|
|
|
WARN(" -> ERROR %d\n", err);
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError( err );
|
2002-04-05 23:22:55 +02:00
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
2001-10-02 19:46:59 +02:00
|
|
|
|
2010-07-18 02:53:06 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* WSARecvFrom (WS2_32.69)
|
|
|
|
*/
|
|
|
|
INT WINAPI WSARecvFrom( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount,
|
|
|
|
LPDWORD lpNumberOfBytesRecvd, LPDWORD lpFlags, struct WS_sockaddr *lpFrom,
|
|
|
|
LPINT lpFromlen, LPWSAOVERLAPPED lpOverlapped,
|
|
|
|
LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine )
|
|
|
|
|
|
|
|
{
|
2010-12-06 01:08:54 +01:00
|
|
|
return WS2_recv_base( s, lpBuffers, dwBufferCount,
|
2010-07-18 02:53:06 +02:00
|
|
|
lpNumberOfBytesRecvd, lpFlags,
|
|
|
|
lpFrom, lpFromlen,
|
2010-12-06 01:08:54 +01:00
|
|
|
lpOverlapped, lpCompletionRoutine, NULL );
|
2010-07-18 02:53:06 +02:00
|
|
|
}
|
|
|
|
|
2001-10-02 19:46:59 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* WSCInstallProvider (WS2_32.88)
|
|
|
|
*/
|
|
|
|
INT WINAPI WSCInstallProvider( const LPGUID lpProviderId,
|
|
|
|
LPCWSTR lpszProviderDllPath,
|
|
|
|
const LPWSAPROTOCOL_INFOW lpProtocolInfoList,
|
|
|
|
DWORD dwNumberOfEntries,
|
|
|
|
LPINT lpErrno )
|
|
|
|
{
|
2006-10-12 14:53:44 +02:00
|
|
|
FIXME("(%s, %s, %p, %d, %p): stub !\n", debugstr_guid(lpProviderId),
|
2001-10-02 19:46:59 +02:00
|
|
|
debugstr_w(lpszProviderDllPath), lpProtocolInfoList,
|
|
|
|
dwNumberOfEntries, lpErrno);
|
|
|
|
*lpErrno = 0;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* WSCDeinstallProvider (WS2_32.83)
|
|
|
|
*/
|
|
|
|
INT WINAPI WSCDeinstallProvider(LPGUID lpProviderId, LPINT lpErrno)
|
|
|
|
{
|
|
|
|
FIXME("(%s, %p): stub !\n", debugstr_guid(lpProviderId), lpErrno);
|
|
|
|
*lpErrno = 0;
|
|
|
|
return 0;
|
|
|
|
}
|
2002-01-14 19:33:44 +01:00
|
|
|
|
|
|
|
|
2002-01-18 19:57:43 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* WSAAccept (WS2_32.26)
|
|
|
|
*/
|
2002-01-14 19:33:44 +01:00
|
|
|
SOCKET WINAPI WSAAccept( SOCKET s, struct WS_sockaddr *addr, LPINT addrlen,
|
2011-06-03 14:36:54 +02:00
|
|
|
LPCONDITIONPROC lpfnCondition, DWORD_PTR dwCallbackData)
|
2002-01-14 19:33:44 +01:00
|
|
|
{
|
|
|
|
|
2013-10-02 16:07:02 +02:00
|
|
|
int ret = 0, size;
|
2002-01-14 19:33:44 +01:00
|
|
|
WSABUF CallerId, CallerData, CalleeId, CalleeData;
|
|
|
|
/* QOS SQOS, GQOS; */
|
|
|
|
GROUP g;
|
|
|
|
SOCKET cs;
|
2002-01-29 03:55:24 +01:00
|
|
|
SOCKADDR src_addr, dst_addr;
|
2002-01-14 19:33:44 +01:00
|
|
|
|
2015-03-11 01:41:21 +01:00
|
|
|
TRACE("socket %04lx, sockaddr %p, addrlen %p, fnCondition %p, dwCallbackData %ld\n",
|
2002-01-14 19:33:44 +01:00
|
|
|
s, addr, addrlen, lpfnCondition, dwCallbackData);
|
|
|
|
|
2013-10-02 16:07:02 +02:00
|
|
|
cs = WS_accept(s, addr, addrlen);
|
2002-01-14 19:33:44 +01:00
|
|
|
if (cs == SOCKET_ERROR) return SOCKET_ERROR;
|
2008-11-06 09:35:43 +01:00
|
|
|
if (!lpfnCondition) return cs;
|
|
|
|
|
2013-10-02 16:07:02 +02:00
|
|
|
if (addr && addrlen)
|
|
|
|
{
|
|
|
|
CallerId.buf = (char *)addr;
|
|
|
|
CallerId.len = *addrlen;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
size = sizeof(src_addr);
|
|
|
|
WS_getpeername(cs, &src_addr, &size);
|
|
|
|
CallerId.buf = (char *)&src_addr;
|
|
|
|
CallerId.len = size;
|
|
|
|
}
|
2002-01-14 19:33:44 +01:00
|
|
|
CallerData.buf = NULL;
|
2008-11-02 00:27:00 +01:00
|
|
|
CallerData.len = 0;
|
2002-01-14 19:33:44 +01:00
|
|
|
|
2013-10-02 16:07:02 +02:00
|
|
|
size = sizeof(dst_addr);
|
2002-01-29 03:55:24 +01:00
|
|
|
WS_getsockname(cs, &dst_addr, &size);
|
2002-01-14 19:33:44 +01:00
|
|
|
|
2002-01-29 03:55:24 +01:00
|
|
|
CalleeId.buf = (char *)&dst_addr;
|
2002-06-01 01:06:46 +02:00
|
|
|
CalleeId.len = sizeof(dst_addr);
|
|
|
|
|
2002-01-14 19:33:44 +01:00
|
|
|
ret = (*lpfnCondition)(&CallerId, &CallerData, NULL, NULL,
|
2002-06-01 01:06:46 +02:00
|
|
|
&CalleeId, &CalleeData, &g, dwCallbackData);
|
2002-01-14 19:33:44 +01:00
|
|
|
|
|
|
|
switch (ret)
|
|
|
|
{
|
|
|
|
case CF_ACCEPT:
|
|
|
|
return cs;
|
|
|
|
case CF_DEFER:
|
2005-01-14 20:54:38 +01:00
|
|
|
SERVER_START_REQ( set_socket_deferred )
|
2002-04-24 00:03:42 +02:00
|
|
|
{
|
2008-12-08 16:05:17 +01:00
|
|
|
req->handle = wine_server_obj_handle( SOCKET2HANDLE(s) );
|
|
|
|
req->deferred = wine_server_obj_handle( SOCKET2HANDLE(cs) );
|
2002-04-24 00:03:42 +02:00
|
|
|
if ( !wine_server_call_err ( req ) )
|
|
|
|
{
|
2005-01-14 20:54:38 +01:00
|
|
|
SetLastError( WSATRY_AGAIN );
|
|
|
|
WS_closesocket( cs );
|
2002-04-24 00:03:42 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
SERVER_END_REQ;
|
2002-01-14 19:33:44 +01:00
|
|
|
return SOCKET_ERROR;
|
|
|
|
case CF_REJECT:
|
|
|
|
WS_closesocket(cs);
|
|
|
|
SetLastError(WSAECONNREFUSED);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
default:
|
|
|
|
FIXME("Unknown return type from Condition function\n");
|
|
|
|
SetLastError(WSAENOTSOCK);
|
|
|
|
return SOCKET_ERROR;
|
2008-11-06 09:35:43 +01:00
|
|
|
}
|
2002-01-14 19:33:44 +01:00
|
|
|
}
|
|
|
|
|
2002-06-13 21:09:55 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* WSADuplicateSocketA (WS2_32.32)
|
|
|
|
*/
|
|
|
|
int WINAPI WSADuplicateSocketA( SOCKET s, DWORD dwProcessId, LPWSAPROTOCOL_INFOA lpProtocolInfo )
|
|
|
|
{
|
2013-09-08 06:47:46 +02:00
|
|
|
return WS_DuplicateSocket(FALSE, s, dwProcessId, (LPWSAPROTOCOL_INFOW) lpProtocolInfo);
|
2002-06-13 21:09:55 +02:00
|
|
|
}
|
2002-11-13 20:42:23 +01:00
|
|
|
|
Stub implementations for WPUCompleteOverlappedRequest,
WSADuplicateSocketW, WSAEnumNameSpaceProviders{A,W}, WSAGetQOSByName,
WSAGetServiceClassInfo{A,W}, WSAGetServiceClassNameByClassId{A,W},
WSALookupServiceEnd, WSALookupServiceNext{A,W},
WSAProviderConfigChange, WSASetService{A,W}, WSCEnableNSProvider,
WSCGetProviderPath, WSCInstallNameSpace, WSCWriteProviderOrder.
Implementations for WSANtohl, WSANtohs, WSASocketA->W crosscall.
Avoid NULL dereferences in WSAStringToAddress{A,W} and
WSAAddressToString{A,W}.
2005-01-10 15:34:15 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* WSADuplicateSocketW (WS2_32.33)
|
|
|
|
*/
|
|
|
|
int WINAPI WSADuplicateSocketW( SOCKET s, DWORD dwProcessId, LPWSAPROTOCOL_INFOW lpProtocolInfo )
|
|
|
|
{
|
2013-09-08 06:47:46 +02:00
|
|
|
return WS_DuplicateSocket(TRUE, s, dwProcessId, lpProtocolInfo);
|
Stub implementations for WPUCompleteOverlappedRequest,
WSADuplicateSocketW, WSAEnumNameSpaceProviders{A,W}, WSAGetQOSByName,
WSAGetServiceClassInfo{A,W}, WSAGetServiceClassNameByClassId{A,W},
WSALookupServiceEnd, WSALookupServiceNext{A,W},
WSAProviderConfigChange, WSASetService{A,W}, WSCEnableNSProvider,
WSCGetProviderPath, WSCInstallNameSpace, WSCWriteProviderOrder.
Implementations for WSANtohl, WSANtohs, WSASocketA->W crosscall.
Avoid NULL dereferences in WSAStringToAddress{A,W} and
WSAAddressToString{A,W}.
2005-01-10 15:34:15 +01:00
|
|
|
}
|
|
|
|
|
2002-11-13 20:42:23 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* WSAInstallServiceClassA (WS2_32.48)
|
|
|
|
*/
|
|
|
|
int WINAPI WSAInstallServiceClassA(LPWSASERVICECLASSINFOA info)
|
|
|
|
{
|
|
|
|
FIXME("Request to install service %s\n",debugstr_a(info->lpszServiceClassName));
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError(WSAEACCES);
|
2003-04-10 01:33:35 +02:00
|
|
|
return SOCKET_ERROR;
|
2002-11-13 20:42:23 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* WSAInstallServiceClassW (WS2_32.49)
|
|
|
|
*/
|
|
|
|
int WINAPI WSAInstallServiceClassW(LPWSASERVICECLASSINFOW info)
|
|
|
|
{
|
|
|
|
FIXME("Request to install service %s\n",debugstr_w(info->lpszServiceClassName));
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError(WSAEACCES);
|
2003-04-10 01:33:35 +02:00
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* WSARemoveServiceClass (WS2_32.70)
|
|
|
|
*/
|
|
|
|
int WINAPI WSARemoveServiceClass(LPGUID info)
|
|
|
|
{
|
|
|
|
FIXME("Request to remove service %p\n",info);
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError(WSATYPE_NOT_FOUND);
|
2003-04-10 01:33:35 +02:00
|
|
|
return SOCKET_ERROR;
|
2002-11-13 20:42:23 +01:00
|
|
|
}
|
2004-01-28 21:07:24 +01:00
|
|
|
|
2008-12-22 19:40:08 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* inet_ntop (WS2_32.@)
|
|
|
|
*/
|
2009-04-29 15:52:29 +02:00
|
|
|
PCSTR WINAPI WS_inet_ntop( INT family, PVOID addr, PSTR buffer, SIZE_T len )
|
2008-12-22 19:40:08 +01:00
|
|
|
{
|
|
|
|
#ifdef HAVE_INET_NTOP
|
2009-04-24 16:30:22 +02:00
|
|
|
struct WS_in6_addr *in6;
|
|
|
|
struct WS_in_addr *in;
|
2009-08-09 02:35:46 +02:00
|
|
|
PCSTR pdst;
|
2008-12-22 19:40:08 +01:00
|
|
|
|
2009-04-29 15:52:29 +02:00
|
|
|
TRACE("family %d, addr (%p), buffer (%p), len %ld\n", family, addr, buffer, len);
|
2009-08-09 02:35:46 +02:00
|
|
|
if (!buffer)
|
|
|
|
{
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError( STATUS_INVALID_PARAMETER );
|
2009-08-09 02:35:46 +02:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2008-12-22 19:40:08 +01:00
|
|
|
switch (family)
|
|
|
|
{
|
|
|
|
case WS_AF_INET:
|
2009-08-09 02:35:46 +02:00
|
|
|
{
|
2009-04-24 16:30:22 +02:00
|
|
|
in = addr;
|
2009-08-09 02:35:46 +02:00
|
|
|
pdst = inet_ntop( AF_INET, &in->WS_s_addr, buffer, len );
|
|
|
|
break;
|
|
|
|
}
|
2008-12-22 19:40:08 +01:00
|
|
|
case WS_AF_INET6:
|
2009-08-09 02:35:46 +02:00
|
|
|
{
|
2009-04-24 16:30:22 +02:00
|
|
|
in6 = addr;
|
2009-08-09 02:35:46 +02:00
|
|
|
pdst = inet_ntop( AF_INET6, in6->WS_s6_addr, buffer, len );
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
default:
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError( WSAEAFNOSUPPORT );
|
2009-08-09 02:35:46 +02:00
|
|
|
return NULL;
|
2008-12-22 19:40:08 +01:00
|
|
|
}
|
2009-08-09 02:35:46 +02:00
|
|
|
|
2015-01-10 02:49:46 +01:00
|
|
|
if (!pdst) SetLastError( STATUS_INVALID_PARAMETER );
|
2009-08-09 02:35:46 +02:00
|
|
|
return pdst;
|
2008-12-22 19:40:08 +01:00
|
|
|
#else
|
|
|
|
FIXME( "not supported on this platform\n" );
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError( WSAEAFNOSUPPORT );
|
2008-12-22 19:40:08 +01:00
|
|
|
return NULL;
|
2009-08-09 02:35:46 +02:00
|
|
|
#endif
|
2008-12-22 19:40:08 +01:00
|
|
|
}
|
|
|
|
|
2014-11-03 22:16:14 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* inet_pton (WS2_32.@)
|
|
|
|
*/
|
|
|
|
INT WINAPI WS_inet_pton( INT family, PCSTR addr, PVOID buffer)
|
|
|
|
{
|
|
|
|
#ifdef HAVE_INET_PTON
|
|
|
|
int unixaf, ret;
|
|
|
|
|
2015-10-05 04:57:34 +02:00
|
|
|
TRACE("family %d, addr %s, buffer (%p)\n", family, debugstr_a(addr), buffer);
|
2014-11-03 22:16:14 +01:00
|
|
|
|
|
|
|
if (!addr || !buffer)
|
|
|
|
{
|
|
|
|
SetLastError(WSAEFAULT);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
unixaf = convert_af_w2u(family);
|
|
|
|
if (unixaf != AF_INET && unixaf != AF_INET6)
|
|
|
|
{
|
|
|
|
SetLastError(WSAEAFNOSUPPORT);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
ret = inet_pton(unixaf, addr, buffer);
|
|
|
|
if (ret == -1) SetLastError(wsaErrno());
|
|
|
|
return ret;
|
|
|
|
#else
|
|
|
|
FIXME( "not supported on this platform\n" );
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError( WSAEAFNOSUPPORT );
|
2014-11-03 22:16:14 +01:00
|
|
|
return SOCKET_ERROR;
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2015-10-05 04:57:53 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* InetPtonW (WS2_32.@)
|
|
|
|
*/
|
|
|
|
INT WINAPI InetPtonW(INT family, PCWSTR addr, PVOID buffer)
|
|
|
|
{
|
|
|
|
char *addrA;
|
|
|
|
int len;
|
|
|
|
INT ret;
|
|
|
|
|
|
|
|
TRACE("family %d, addr %s, buffer (%p)\n", family, debugstr_w(addr), buffer);
|
|
|
|
|
|
|
|
if (!addr)
|
|
|
|
{
|
|
|
|
SetLastError(WSAEFAULT);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
len = WideCharToMultiByte(CP_ACP, 0, addr, -1, NULL, 0, NULL, NULL);
|
|
|
|
if (!(addrA = HeapAlloc(GetProcessHeap(), 0, len)))
|
|
|
|
{
|
|
|
|
SetLastError(WSA_NOT_ENOUGH_MEMORY);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
WideCharToMultiByte(CP_ACP, 0, addr, -1, addrA, len, NULL, NULL);
|
|
|
|
|
|
|
|
ret = WS_inet_pton(family, addrA, buffer);
|
|
|
|
|
|
|
|
HeapFree(GetProcessHeap(), 0, addrA);
|
|
|
|
return ret;
|
|
|
|
}
|
2014-11-03 22:16:14 +01:00
|
|
|
|
2004-01-28 21:07:24 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* WSAStringToAddressA (WS2_32.80)
|
|
|
|
*/
|
|
|
|
INT WINAPI WSAStringToAddressA(LPSTR AddressString,
|
|
|
|
INT AddressFamily,
|
2004-09-14 01:18:19 +02:00
|
|
|
LPWSAPROTOCOL_INFOA lpProtocolInfo,
|
2004-01-28 21:07:24 +01:00
|
|
|
LPSOCKADDR lpAddress,
|
|
|
|
LPINT lpAddressLength)
|
|
|
|
{
|
2004-09-14 01:18:19 +02:00
|
|
|
INT res=0;
|
|
|
|
LPSTR workBuffer=NULL,ptrPort;
|
|
|
|
|
2008-07-03 19:52:14 +02:00
|
|
|
TRACE( "(%s, %x, %p, %p, %p)\n", debugstr_a(AddressString), AddressFamily,
|
|
|
|
lpProtocolInfo, lpAddress, lpAddressLength );
|
Stub implementations for WPUCompleteOverlappedRequest,
WSADuplicateSocketW, WSAEnumNameSpaceProviders{A,W}, WSAGetQOSByName,
WSAGetServiceClassInfo{A,W}, WSAGetServiceClassNameByClassId{A,W},
WSALookupServiceEnd, WSALookupServiceNext{A,W},
WSAProviderConfigChange, WSASetService{A,W}, WSCEnableNSProvider,
WSCGetProviderPath, WSCInstallNameSpace, WSCWriteProviderOrder.
Implementations for WSANtohl, WSANtohs, WSASocketA->W crosscall.
Avoid NULL dereferences in WSAStringToAddress{A,W} and
WSAAddressToString{A,W}.
2005-01-10 15:34:15 +01:00
|
|
|
|
|
|
|
if (!lpAddressLength || !lpAddress) return SOCKET_ERROR;
|
2004-11-04 22:05:48 +01:00
|
|
|
|
2007-06-29 12:41:28 +02:00
|
|
|
if (!AddressString)
|
2004-09-14 01:18:19 +02:00
|
|
|
{
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError(WSAEINVAL);
|
2007-06-29 12:41:28 +02:00
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (lpProtocolInfo)
|
|
|
|
FIXME("ProtocolInfo not implemented.\n");
|
|
|
|
|
|
|
|
workBuffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
|
|
|
|
strlen(AddressString) + 1);
|
|
|
|
if (!workBuffer)
|
|
|
|
{
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError(WSA_NOT_ENOUGH_MEMORY);
|
2007-06-29 12:41:28 +02:00
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
strcpy(workBuffer, AddressString);
|
|
|
|
|
|
|
|
switch(AddressFamily)
|
|
|
|
{
|
2007-06-29 23:39:20 +02:00
|
|
|
case WS_AF_INET:
|
2007-06-29 12:41:28 +02:00
|
|
|
{
|
|
|
|
struct in_addr inetaddr;
|
|
|
|
|
|
|
|
/* If lpAddressLength is too small, tell caller the size we need */
|
|
|
|
if (*lpAddressLength < sizeof(SOCKADDR_IN))
|
2004-09-14 01:18:19 +02:00
|
|
|
{
|
2007-06-29 12:41:28 +02:00
|
|
|
*lpAddressLength = sizeof(SOCKADDR_IN);
|
|
|
|
res = WSAEFAULT;
|
|
|
|
break;
|
|
|
|
}
|
2010-12-03 00:28:23 +01:00
|
|
|
*lpAddressLength = sizeof(SOCKADDR_IN);
|
2007-06-29 12:41:28 +02:00
|
|
|
memset(lpAddress, 0, sizeof(SOCKADDR_IN));
|
2004-09-14 01:18:19 +02:00
|
|
|
|
2014-01-18 22:03:27 +01:00
|
|
|
((LPSOCKADDR_IN)lpAddress)->sin_family = WS_AF_INET;
|
2007-06-29 12:41:28 +02:00
|
|
|
|
|
|
|
ptrPort = strchr(workBuffer, ':');
|
|
|
|
if(ptrPort)
|
|
|
|
{
|
2014-12-31 04:59:52 +01:00
|
|
|
/* User may have entered an IPv6 and asked to parse as IPv4 */
|
|
|
|
if(strchr(ptrPort + 1, ':'))
|
|
|
|
{
|
|
|
|
res = WSAEINVAL;
|
|
|
|
break;
|
|
|
|
}
|
2009-09-13 23:54:54 +02:00
|
|
|
((LPSOCKADDR_IN)lpAddress)->sin_port = htons(atoi(ptrPort+1));
|
2007-06-29 12:41:28 +02:00
|
|
|
*ptrPort = '\0';
|
2004-09-14 01:18:19 +02:00
|
|
|
}
|
|
|
|
else
|
2007-06-29 12:41:28 +02:00
|
|
|
{
|
|
|
|
((LPSOCKADDR_IN)lpAddress)->sin_port = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
if(inet_aton(workBuffer, &inetaddr) > 0)
|
|
|
|
{
|
|
|
|
((LPSOCKADDR_IN)lpAddress)->sin_addr.WS_s_addr = inetaddr.s_addr;
|
|
|
|
res = 0;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
res = WSAEINVAL;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
2004-09-14 01:18:19 +02:00
|
|
|
}
|
2007-06-29 23:39:20 +02:00
|
|
|
case WS_AF_INET6:
|
2007-06-29 12:41:28 +02:00
|
|
|
{
|
2007-06-29 23:39:20 +02:00
|
|
|
struct in6_addr inetaddr;
|
2007-06-29 12:41:28 +02:00
|
|
|
/* If lpAddressLength is too small, tell caller the size we need */
|
|
|
|
if (*lpAddressLength < sizeof(SOCKADDR_IN6))
|
|
|
|
{
|
|
|
|
*lpAddressLength = sizeof(SOCKADDR_IN6);
|
|
|
|
res = WSAEFAULT;
|
|
|
|
break;
|
|
|
|
}
|
2007-06-29 23:39:20 +02:00
|
|
|
#ifdef HAVE_INET_PTON
|
2010-12-03 00:28:23 +01:00
|
|
|
*lpAddressLength = sizeof(SOCKADDR_IN6);
|
2007-06-29 23:39:20 +02:00
|
|
|
memset(lpAddress, 0, sizeof(SOCKADDR_IN6));
|
|
|
|
|
|
|
|
((LPSOCKADDR_IN6)lpAddress)->sin6_family = WS_AF_INET6;
|
|
|
|
|
|
|
|
/* This one is a bit tricky. An IPv6 address contains colons, so the
|
|
|
|
* check from IPv4 doesn't work like that. However, IPv6 addresses that
|
|
|
|
* contain a port are written with braces like [fd12:3456:7890::1]:12345
|
|
|
|
* so what we will do is to look for ']', check if the next char is a
|
|
|
|
* colon, and if it is, parse the port as in IPv4. */
|
|
|
|
|
|
|
|
ptrPort = strchr(workBuffer, ']');
|
|
|
|
if(ptrPort && *(++ptrPort) == ':')
|
|
|
|
{
|
2009-09-13 23:54:54 +02:00
|
|
|
((LPSOCKADDR_IN6)lpAddress)->sin6_port = htons(atoi(ptrPort+1));
|
2007-06-29 23:39:20 +02:00
|
|
|
*ptrPort = '\0';
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
((LPSOCKADDR_IN6)lpAddress)->sin6_port = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
if(inet_pton(AF_INET6, workBuffer, &inetaddr) > 0)
|
|
|
|
{
|
|
|
|
memcpy(&((LPSOCKADDR_IN6)lpAddress)->sin6_addr, &inetaddr,
|
|
|
|
sizeof(struct in6_addr));
|
|
|
|
res = 0;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
#endif /* HAVE_INET_PTON */
|
|
|
|
res = WSAEINVAL;
|
|
|
|
|
2007-06-29 12:41:28 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
/* According to MSDN, only AF_INET and AF_INET6 are supported. */
|
|
|
|
TRACE("Unsupported address family specified: %d.\n", AddressFamily);
|
|
|
|
res = WSAEINVAL;
|
|
|
|
}
|
|
|
|
|
|
|
|
HeapFree(GetProcessHeap(), 0, workBuffer);
|
2004-09-14 01:18:19 +02:00
|
|
|
|
|
|
|
if (!res) return 0;
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError(res);
|
2004-09-14 01:18:19 +02:00
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* WSAStringToAddressW (WS2_32.81)
|
|
|
|
*
|
2012-05-15 10:15:32 +02:00
|
|
|
* FIXME: Does anybody know if this function allows using Hebrew/Arabic/Chinese... digits?
|
2004-09-14 01:18:19 +02:00
|
|
|
* If this should be the case, it would be required to map these digits
|
|
|
|
* to Unicode digits (0-9) using FoldString first.
|
|
|
|
*/
|
|
|
|
INT WINAPI WSAStringToAddressW(LPWSTR AddressString,
|
|
|
|
INT AddressFamily,
|
|
|
|
LPWSAPROTOCOL_INFOW lpProtocolInfo,
|
|
|
|
LPSOCKADDR lpAddress,
|
|
|
|
LPINT lpAddressLength)
|
|
|
|
{
|
|
|
|
INT sBuffer,res=0;
|
|
|
|
LPSTR workBuffer=NULL;
|
|
|
|
WSAPROTOCOL_INFOA infoA;
|
|
|
|
LPWSAPROTOCOL_INFOA lpProtoInfoA = NULL;
|
|
|
|
|
Stub implementations for WPUCompleteOverlappedRequest,
WSADuplicateSocketW, WSAEnumNameSpaceProviders{A,W}, WSAGetQOSByName,
WSAGetServiceClassInfo{A,W}, WSAGetServiceClassNameByClassId{A,W},
WSALookupServiceEnd, WSALookupServiceNext{A,W},
WSAProviderConfigChange, WSASetService{A,W}, WSCEnableNSProvider,
WSCGetProviderPath, WSCInstallNameSpace, WSCWriteProviderOrder.
Implementations for WSANtohl, WSANtohs, WSASocketA->W crosscall.
Avoid NULL dereferences in WSAStringToAddress{A,W} and
WSAAddressToString{A,W}.
2005-01-10 15:34:15 +01:00
|
|
|
TRACE( "(%s, %x, %p, %p, %p)\n", debugstr_w(AddressString), AddressFamily, lpProtocolInfo,
|
|
|
|
lpAddress, lpAddressLength );
|
|
|
|
|
|
|
|
if (!lpAddressLength || !lpAddress) return SOCKET_ERROR;
|
2004-11-04 22:05:48 +01:00
|
|
|
|
2004-09-14 01:18:19 +02:00
|
|
|
/* if ProtocolInfo is available - convert to ANSI variant */
|
|
|
|
if (lpProtocolInfo)
|
|
|
|
{
|
|
|
|
lpProtoInfoA = &infoA;
|
|
|
|
memcpy( lpProtoInfoA, lpProtocolInfo, FIELD_OFFSET( WSAPROTOCOL_INFOA, szProtocol ) );
|
|
|
|
|
|
|
|
if (!WideCharToMultiByte( CP_ACP, 0, lpProtocolInfo->szProtocol, -1,
|
|
|
|
lpProtoInfoA->szProtocol, WSAPROTOCOL_LEN+1, NULL, NULL ))
|
|
|
|
{
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError(WSAEINVAL);
|
2004-09-14 01:18:19 +02:00
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (AddressString)
|
|
|
|
{
|
|
|
|
/* Translate AddressString to ANSI code page - assumes that only
|
|
|
|
standard digits 0-9 are used with this API call */
|
|
|
|
sBuffer = WideCharToMultiByte( CP_ACP, 0, AddressString, -1, NULL, 0, NULL, NULL );
|
|
|
|
workBuffer = HeapAlloc( GetProcessHeap(), 0, sBuffer );
|
|
|
|
|
|
|
|
if (workBuffer)
|
|
|
|
{
|
|
|
|
WideCharToMultiByte( CP_ACP, 0, AddressString, -1, workBuffer, sBuffer, NULL, NULL );
|
|
|
|
res = WSAStringToAddressA(workBuffer,AddressFamily,lpProtoInfoA,
|
|
|
|
lpAddress,lpAddressLength);
|
|
|
|
HeapFree( GetProcessHeap(), 0, workBuffer );
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
res = WSA_NOT_ENOUGH_MEMORY;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
res = WSAEINVAL;
|
|
|
|
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError(res);
|
2004-09-14 01:18:19 +02:00
|
|
|
return SOCKET_ERROR;
|
2004-01-28 21:07:24 +01:00
|
|
|
}
|
2004-04-06 00:23:05 +02:00
|
|
|
|
2004-11-04 22:05:48 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* WSAAddressToStringA (WS2_32.27)
|
|
|
|
*
|
|
|
|
* See WSAAddressToStringW
|
|
|
|
*/
|
|
|
|
INT WINAPI WSAAddressToStringA( LPSOCKADDR sockaddr, DWORD len,
|
|
|
|
LPWSAPROTOCOL_INFOA info, LPSTR string,
|
|
|
|
LPDWORD lenstr )
|
|
|
|
{
|
2008-12-10 22:55:35 +01:00
|
|
|
DWORD size;
|
2009-04-27 12:49:19 +02:00
|
|
|
CHAR buffer[54]; /* 32 digits + 7':' + '[' + '%" + 5 digits + ']:' + 5 digits + '\0' */
|
2004-11-04 22:05:48 +01:00
|
|
|
CHAR *p;
|
|
|
|
|
2006-10-12 14:53:44 +02:00
|
|
|
TRACE( "(%p, %d, %p, %p, %p)\n", sockaddr, len, info, string, lenstr );
|
2004-11-04 22:05:48 +01:00
|
|
|
|
2009-07-16 17:48:32 +02:00
|
|
|
if (!sockaddr) return SOCKET_ERROR;
|
Stub implementations for WPUCompleteOverlappedRequest,
WSADuplicateSocketW, WSAEnumNameSpaceProviders{A,W}, WSAGetQOSByName,
WSAGetServiceClassInfo{A,W}, WSAGetServiceClassNameByClassId{A,W},
WSALookupServiceEnd, WSALookupServiceNext{A,W},
WSAProviderConfigChange, WSASetService{A,W}, WSCEnableNSProvider,
WSCGetProviderPath, WSCInstallNameSpace, WSCWriteProviderOrder.
Implementations for WSANtohl, WSANtohs, WSASocketA->W crosscall.
Avoid NULL dereferences in WSAStringToAddress{A,W} and
WSAAddressToString{A,W}.
2005-01-10 15:34:15 +01:00
|
|
|
if (!string || !lenstr) return SOCKET_ERROR;
|
2004-11-04 22:05:48 +01:00
|
|
|
|
2009-07-16 17:46:20 +02:00
|
|
|
switch(sockaddr->sa_family)
|
2009-04-27 12:49:19 +02:00
|
|
|
{
|
|
|
|
case WS_AF_INET:
|
2009-07-16 17:48:32 +02:00
|
|
|
if (len < sizeof(SOCKADDR_IN)) return SOCKET_ERROR;
|
2009-04-27 12:49:19 +02:00
|
|
|
sprintf( buffer, "%u.%u.%u.%u:%u",
|
|
|
|
(unsigned int)(ntohl( ((SOCKADDR_IN *)sockaddr)->sin_addr.WS_s_addr ) >> 24 & 0xff),
|
|
|
|
(unsigned int)(ntohl( ((SOCKADDR_IN *)sockaddr)->sin_addr.WS_s_addr ) >> 16 & 0xff),
|
|
|
|
(unsigned int)(ntohl( ((SOCKADDR_IN *)sockaddr)->sin_addr.WS_s_addr ) >> 8 & 0xff),
|
|
|
|
(unsigned int)(ntohl( ((SOCKADDR_IN *)sockaddr)->sin_addr.WS_s_addr ) & 0xff),
|
|
|
|
ntohs( ((SOCKADDR_IN *)sockaddr)->sin_port ) );
|
|
|
|
|
|
|
|
p = strchr( buffer, ':' );
|
|
|
|
if (!((SOCKADDR_IN *)sockaddr)->sin_port) *p = 0;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case WS_AF_INET6:
|
|
|
|
{
|
|
|
|
struct WS_sockaddr_in6 *sockaddr6 = (LPSOCKADDR_IN6) sockaddr;
|
2015-07-19 23:11:52 +02:00
|
|
|
size_t slen;
|
2004-11-04 22:05:48 +01:00
|
|
|
|
2009-07-28 11:39:42 +02:00
|
|
|
buffer[0] = 0;
|
2009-07-16 17:48:32 +02:00
|
|
|
if (len < sizeof(SOCKADDR_IN6)) return SOCKET_ERROR;
|
2009-07-28 11:39:42 +02:00
|
|
|
if ((sockaddr6->sin6_port))
|
|
|
|
strcpy(buffer, "[");
|
2015-07-19 23:11:52 +02:00
|
|
|
slen = strlen(buffer);
|
|
|
|
if (!WS_inet_ntop(WS_AF_INET6, &sockaddr6->sin6_addr, &buffer[slen], sizeof(buffer) - slen))
|
2009-04-27 12:49:19 +02:00
|
|
|
{
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError(WSAEINVAL);
|
2009-04-27 12:49:19 +02:00
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
2009-07-28 11:40:39 +02:00
|
|
|
if ((sockaddr6->sin6_scope_id))
|
|
|
|
sprintf(buffer+strlen(buffer), "%%%u", sockaddr6->sin6_scope_id);
|
2009-07-28 11:39:42 +02:00
|
|
|
if ((sockaddr6->sin6_port))
|
|
|
|
sprintf(buffer+strlen(buffer), "]:%u", ntohs(sockaddr6->sin6_port));
|
2009-04-27 12:49:19 +02:00
|
|
|
break;
|
|
|
|
}
|
2004-11-04 22:05:48 +01:00
|
|
|
|
2009-04-27 12:49:19 +02:00
|
|
|
default:
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError(WSAEINVAL);
|
2009-04-27 12:49:19 +02:00
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
2004-11-04 22:05:48 +01:00
|
|
|
|
2009-04-17 06:29:52 +02:00
|
|
|
size = strlen( buffer ) + 1;
|
2004-11-04 22:05:48 +01:00
|
|
|
|
|
|
|
if (*lenstr < size)
|
|
|
|
{
|
|
|
|
*lenstr = size;
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError(WSAEFAULT);
|
2004-11-04 22:05:48 +01:00
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
2013-12-11 09:02:42 +01:00
|
|
|
TRACE("=> %s,%u bytes\n", debugstr_a(buffer), size);
|
2009-04-17 06:29:52 +02:00
|
|
|
*lenstr = size;
|
2004-11-04 22:05:48 +01:00
|
|
|
strcpy( string, buffer );
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* WSAAddressToStringW (WS2_32.28)
|
|
|
|
*
|
|
|
|
* Convert a sockaddr address into a readable address string.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* sockaddr [I] Pointer to a sockaddr structure.
|
|
|
|
* len [I] Size of the sockaddr structure.
|
|
|
|
* info [I] Pointer to a WSAPROTOCOL_INFOW structure (optional).
|
|
|
|
* string [I/O] Pointer to a buffer to receive the address string.
|
|
|
|
* lenstr [I/O] Size of the receive buffer in WCHARs.
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: 0
|
|
|
|
* Failure: SOCKET_ERROR
|
|
|
|
*
|
|
|
|
* NOTES
|
|
|
|
* The 'info' parameter is ignored.
|
|
|
|
*/
|
|
|
|
INT WINAPI WSAAddressToStringW( LPSOCKADDR sockaddr, DWORD len,
|
|
|
|
LPWSAPROTOCOL_INFOW info, LPWSTR string,
|
|
|
|
LPDWORD lenstr )
|
|
|
|
{
|
2009-07-17 12:25:59 +02:00
|
|
|
INT ret;
|
2009-07-19 15:31:28 +02:00
|
|
|
DWORD size;
|
2009-07-17 12:25:59 +02:00
|
|
|
WCHAR buffer[54]; /* 32 digits + 7':' + '[' + '%" + 5 digits + ']:' + 5 digits + '\0' */
|
|
|
|
CHAR bufAddr[54];
|
2004-11-04 22:05:48 +01:00
|
|
|
|
2009-07-17 12:25:59 +02:00
|
|
|
TRACE( "(%p, %d, %p, %p, %p)\n", sockaddr, len, info, string, lenstr );
|
2004-11-04 22:05:48 +01:00
|
|
|
|
2009-07-17 12:25:59 +02:00
|
|
|
size = *lenstr;
|
|
|
|
ret = WSAAddressToStringA(sockaddr, len, NULL, bufAddr, &size);
|
2004-11-04 22:05:48 +01:00
|
|
|
|
2009-07-17 12:25:59 +02:00
|
|
|
if (ret) return ret;
|
2004-11-04 22:05:48 +01:00
|
|
|
|
2009-07-19 15:31:28 +02:00
|
|
|
MultiByteToWideChar( CP_ACP, 0, bufAddr, size, buffer, sizeof( buffer )/sizeof(WCHAR));
|
2004-11-04 22:05:48 +01:00
|
|
|
|
|
|
|
if (*lenstr < size)
|
|
|
|
{
|
|
|
|
*lenstr = size;
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError(WSAEFAULT);
|
2004-11-04 22:05:48 +01:00
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
2013-12-11 09:02:42 +01:00
|
|
|
TRACE("=> %s,%u bytes\n", debugstr_w(buffer), size);
|
2009-04-17 06:30:53 +02:00
|
|
|
*lenstr = size;
|
2004-11-04 22:05:48 +01:00
|
|
|
lstrcpyW( string, buffer );
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
Stub implementations for WPUCompleteOverlappedRequest,
WSADuplicateSocketW, WSAEnumNameSpaceProviders{A,W}, WSAGetQOSByName,
WSAGetServiceClassInfo{A,W}, WSAGetServiceClassNameByClassId{A,W},
WSALookupServiceEnd, WSALookupServiceNext{A,W},
WSAProviderConfigChange, WSASetService{A,W}, WSCEnableNSProvider,
WSCGetProviderPath, WSCInstallNameSpace, WSCWriteProviderOrder.
Implementations for WSANtohl, WSANtohs, WSASocketA->W crosscall.
Avoid NULL dereferences in WSAStringToAddress{A,W} and
WSAAddressToString{A,W}.
2005-01-10 15:34:15 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* WSAEnumNameSpaceProvidersA (WS2_32.34)
|
|
|
|
*/
|
|
|
|
INT WINAPI WSAEnumNameSpaceProvidersA( LPDWORD len, LPWSANAMESPACE_INFOA buffer )
|
|
|
|
{
|
|
|
|
FIXME( "(%p %p) Stub!\n", len, buffer );
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* WSAEnumNameSpaceProvidersW (WS2_32.35)
|
|
|
|
*/
|
|
|
|
INT WINAPI WSAEnumNameSpaceProvidersW( LPDWORD len, LPWSANAMESPACE_INFOW buffer )
|
|
|
|
{
|
|
|
|
FIXME( "(%p %p) Stub!\n", len, buffer );
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* WSAGetQOSByName (WS2_32.41)
|
|
|
|
*/
|
|
|
|
BOOL WINAPI WSAGetQOSByName( SOCKET s, LPWSABUF lpQOSName, LPQOS lpQOS )
|
|
|
|
{
|
2007-05-24 16:41:17 +02:00
|
|
|
FIXME( "(0x%04lx %p %p) Stub!\n", s, lpQOSName, lpQOS );
|
Stub implementations for WPUCompleteOverlappedRequest,
WSADuplicateSocketW, WSAEnumNameSpaceProviders{A,W}, WSAGetQOSByName,
WSAGetServiceClassInfo{A,W}, WSAGetServiceClassNameByClassId{A,W},
WSALookupServiceEnd, WSALookupServiceNext{A,W},
WSAProviderConfigChange, WSASetService{A,W}, WSCEnableNSProvider,
WSCGetProviderPath, WSCInstallNameSpace, WSCWriteProviderOrder.
Implementations for WSANtohl, WSANtohs, WSASocketA->W crosscall.
Avoid NULL dereferences in WSAStringToAddress{A,W} and
WSAAddressToString{A,W}.
2005-01-10 15:34:15 +01:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* WSAGetServiceClassInfoA (WS2_32.42)
|
|
|
|
*/
|
|
|
|
INT WINAPI WSAGetServiceClassInfoA( LPGUID provider, LPGUID service, LPDWORD len,
|
|
|
|
LPWSASERVICECLASSINFOA info )
|
|
|
|
{
|
|
|
|
FIXME( "(%s %s %p %p) Stub!\n", debugstr_guid(provider), debugstr_guid(service),
|
|
|
|
len, info );
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError(WSA_NOT_ENOUGH_MEMORY);
|
Stub implementations for WPUCompleteOverlappedRequest,
WSADuplicateSocketW, WSAEnumNameSpaceProviders{A,W}, WSAGetQOSByName,
WSAGetServiceClassInfo{A,W}, WSAGetServiceClassNameByClassId{A,W},
WSALookupServiceEnd, WSALookupServiceNext{A,W},
WSAProviderConfigChange, WSASetService{A,W}, WSCEnableNSProvider,
WSCGetProviderPath, WSCInstallNameSpace, WSCWriteProviderOrder.
Implementations for WSANtohl, WSANtohs, WSASocketA->W crosscall.
Avoid NULL dereferences in WSAStringToAddress{A,W} and
WSAAddressToString{A,W}.
2005-01-10 15:34:15 +01:00
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* WSAGetServiceClassInfoW (WS2_32.43)
|
|
|
|
*/
|
|
|
|
INT WINAPI WSAGetServiceClassInfoW( LPGUID provider, LPGUID service, LPDWORD len,
|
|
|
|
LPWSASERVICECLASSINFOW info )
|
|
|
|
{
|
|
|
|
FIXME( "(%s %s %p %p) Stub!\n", debugstr_guid(provider), debugstr_guid(service),
|
|
|
|
len, info );
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError(WSA_NOT_ENOUGH_MEMORY);
|
Stub implementations for WPUCompleteOverlappedRequest,
WSADuplicateSocketW, WSAEnumNameSpaceProviders{A,W}, WSAGetQOSByName,
WSAGetServiceClassInfo{A,W}, WSAGetServiceClassNameByClassId{A,W},
WSALookupServiceEnd, WSALookupServiceNext{A,W},
WSAProviderConfigChange, WSASetService{A,W}, WSCEnableNSProvider,
WSCGetProviderPath, WSCInstallNameSpace, WSCWriteProviderOrder.
Implementations for WSANtohl, WSANtohs, WSASocketA->W crosscall.
Avoid NULL dereferences in WSAStringToAddress{A,W} and
WSAAddressToString{A,W}.
2005-01-10 15:34:15 +01:00
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* WSAGetServiceClassNameByClassIdA (WS2_32.44)
|
|
|
|
*/
|
|
|
|
INT WINAPI WSAGetServiceClassNameByClassIdA( LPGUID class, LPSTR service, LPDWORD len )
|
|
|
|
{
|
|
|
|
FIXME( "(%s %p %p) Stub!\n", debugstr_guid(class), service, len );
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError(WSA_NOT_ENOUGH_MEMORY);
|
Stub implementations for WPUCompleteOverlappedRequest,
WSADuplicateSocketW, WSAEnumNameSpaceProviders{A,W}, WSAGetQOSByName,
WSAGetServiceClassInfo{A,W}, WSAGetServiceClassNameByClassId{A,W},
WSALookupServiceEnd, WSALookupServiceNext{A,W},
WSAProviderConfigChange, WSASetService{A,W}, WSCEnableNSProvider,
WSCGetProviderPath, WSCInstallNameSpace, WSCWriteProviderOrder.
Implementations for WSANtohl, WSANtohs, WSASocketA->W crosscall.
Avoid NULL dereferences in WSAStringToAddress{A,W} and
WSAAddressToString{A,W}.
2005-01-10 15:34:15 +01:00
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* WSAGetServiceClassNameByClassIdW (WS2_32.45)
|
|
|
|
*/
|
|
|
|
INT WINAPI WSAGetServiceClassNameByClassIdW( LPGUID class, LPWSTR service, LPDWORD len )
|
|
|
|
{
|
|
|
|
FIXME( "(%s %p %p) Stub!\n", debugstr_guid(class), service, len );
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError(WSA_NOT_ENOUGH_MEMORY);
|
Stub implementations for WPUCompleteOverlappedRequest,
WSADuplicateSocketW, WSAEnumNameSpaceProviders{A,W}, WSAGetQOSByName,
WSAGetServiceClassInfo{A,W}, WSAGetServiceClassNameByClassId{A,W},
WSALookupServiceEnd, WSALookupServiceNext{A,W},
WSAProviderConfigChange, WSASetService{A,W}, WSCEnableNSProvider,
WSCGetProviderPath, WSCInstallNameSpace, WSCWriteProviderOrder.
Implementations for WSANtohl, WSANtohs, WSASocketA->W crosscall.
Avoid NULL dereferences in WSAStringToAddress{A,W} and
WSAAddressToString{A,W}.
2005-01-10 15:34:15 +01:00
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
2004-04-06 00:23:05 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* WSALookupServiceBeginA (WS2_32.59)
|
|
|
|
*/
|
|
|
|
INT WINAPI WSALookupServiceBeginA( LPWSAQUERYSETA lpqsRestrictions,
|
|
|
|
DWORD dwControlFlags,
|
|
|
|
LPHANDLE lphLookup)
|
|
|
|
{
|
2006-10-12 14:53:44 +02:00
|
|
|
FIXME("(%p 0x%08x %p) Stub!\n", lpqsRestrictions, dwControlFlags,
|
2004-04-06 00:23:05 +02:00
|
|
|
lphLookup);
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError(WSA_NOT_ENOUGH_MEMORY);
|
2004-04-06 00:23:05 +02:00
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* WSALookupServiceBeginW (WS2_32.60)
|
|
|
|
*/
|
|
|
|
INT WINAPI WSALookupServiceBeginW( LPWSAQUERYSETW lpqsRestrictions,
|
|
|
|
DWORD dwControlFlags,
|
|
|
|
LPHANDLE lphLookup)
|
|
|
|
{
|
2006-10-12 14:53:44 +02:00
|
|
|
FIXME("(%p 0x%08x %p) Stub!\n", lpqsRestrictions, dwControlFlags,
|
2004-04-06 00:23:05 +02:00
|
|
|
lphLookup);
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError(WSA_NOT_ENOUGH_MEMORY);
|
2004-04-06 00:23:05 +02:00
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
2004-06-02 23:33:17 +02:00
|
|
|
|
Stub implementations for WPUCompleteOverlappedRequest,
WSADuplicateSocketW, WSAEnumNameSpaceProviders{A,W}, WSAGetQOSByName,
WSAGetServiceClassInfo{A,W}, WSAGetServiceClassNameByClassId{A,W},
WSALookupServiceEnd, WSALookupServiceNext{A,W},
WSAProviderConfigChange, WSASetService{A,W}, WSCEnableNSProvider,
WSCGetProviderPath, WSCInstallNameSpace, WSCWriteProviderOrder.
Implementations for WSANtohl, WSANtohs, WSASocketA->W crosscall.
Avoid NULL dereferences in WSAStringToAddress{A,W} and
WSAAddressToString{A,W}.
2005-01-10 15:34:15 +01:00
|
|
|
/***********************************************************************
|
2011-12-04 00:32:27 +01:00
|
|
|
* WSALookupServiceEnd (WS2_32.61)
|
Stub implementations for WPUCompleteOverlappedRequest,
WSADuplicateSocketW, WSAEnumNameSpaceProviders{A,W}, WSAGetQOSByName,
WSAGetServiceClassInfo{A,W}, WSAGetServiceClassNameByClassId{A,W},
WSALookupServiceEnd, WSALookupServiceNext{A,W},
WSAProviderConfigChange, WSASetService{A,W}, WSCEnableNSProvider,
WSCGetProviderPath, WSCInstallNameSpace, WSCWriteProviderOrder.
Implementations for WSANtohl, WSANtohs, WSASocketA->W crosscall.
Avoid NULL dereferences in WSAStringToAddress{A,W} and
WSAAddressToString{A,W}.
2005-01-10 15:34:15 +01:00
|
|
|
*/
|
|
|
|
INT WINAPI WSALookupServiceEnd( HANDLE lookup )
|
|
|
|
{
|
|
|
|
FIXME("(%p) Stub!\n", lookup );
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* WSALookupServiceNextA (WS2_32.62)
|
|
|
|
*/
|
|
|
|
INT WINAPI WSALookupServiceNextA( HANDLE lookup, DWORD flags, LPDWORD len, LPWSAQUERYSETA results )
|
|
|
|
{
|
2006-10-12 14:53:44 +02:00
|
|
|
FIXME( "(%p 0x%08x %p %p) Stub!\n", lookup, flags, len, results );
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError(WSA_E_NO_MORE);
|
2010-10-27 23:02:46 +02:00
|
|
|
return SOCKET_ERROR;
|
Stub implementations for WPUCompleteOverlappedRequest,
WSADuplicateSocketW, WSAEnumNameSpaceProviders{A,W}, WSAGetQOSByName,
WSAGetServiceClassInfo{A,W}, WSAGetServiceClassNameByClassId{A,W},
WSALookupServiceEnd, WSALookupServiceNext{A,W},
WSAProviderConfigChange, WSASetService{A,W}, WSCEnableNSProvider,
WSCGetProviderPath, WSCInstallNameSpace, WSCWriteProviderOrder.
Implementations for WSANtohl, WSANtohs, WSASocketA->W crosscall.
Avoid NULL dereferences in WSAStringToAddress{A,W} and
WSAAddressToString{A,W}.
2005-01-10 15:34:15 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* WSALookupServiceNextW (WS2_32.63)
|
|
|
|
*/
|
|
|
|
INT WINAPI WSALookupServiceNextW( HANDLE lookup, DWORD flags, LPDWORD len, LPWSAQUERYSETW results )
|
|
|
|
{
|
2006-10-12 14:53:44 +02:00
|
|
|
FIXME( "(%p 0x%08x %p %p) Stub!\n", lookup, flags, len, results );
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError(WSA_E_NO_MORE);
|
2010-10-27 23:02:46 +02:00
|
|
|
return SOCKET_ERROR;
|
Stub implementations for WPUCompleteOverlappedRequest,
WSADuplicateSocketW, WSAEnumNameSpaceProviders{A,W}, WSAGetQOSByName,
WSAGetServiceClassInfo{A,W}, WSAGetServiceClassNameByClassId{A,W},
WSALookupServiceEnd, WSALookupServiceNext{A,W},
WSAProviderConfigChange, WSASetService{A,W}, WSCEnableNSProvider,
WSCGetProviderPath, WSCInstallNameSpace, WSCWriteProviderOrder.
Implementations for WSANtohl, WSANtohs, WSASocketA->W crosscall.
Avoid NULL dereferences in WSAStringToAddress{A,W} and
WSAAddressToString{A,W}.
2005-01-10 15:34:15 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* WSANtohl (WS2_32.64)
|
|
|
|
*/
|
2006-10-12 13:45:39 +02:00
|
|
|
INT WINAPI WSANtohl( SOCKET s, WS_u_long netlong, WS_u_long* lphostlong )
|
Stub implementations for WPUCompleteOverlappedRequest,
WSADuplicateSocketW, WSAEnumNameSpaceProviders{A,W}, WSAGetQOSByName,
WSAGetServiceClassInfo{A,W}, WSAGetServiceClassNameByClassId{A,W},
WSALookupServiceEnd, WSALookupServiceNext{A,W},
WSAProviderConfigChange, WSASetService{A,W}, WSCEnableNSProvider,
WSCGetProviderPath, WSCInstallNameSpace, WSCWriteProviderOrder.
Implementations for WSANtohl, WSANtohs, WSASocketA->W crosscall.
Avoid NULL dereferences in WSAStringToAddress{A,W} and
WSAAddressToString{A,W}.
2005-01-10 15:34:15 +01:00
|
|
|
{
|
2015-03-11 01:41:21 +01:00
|
|
|
TRACE( "(%04lx 0x%08x %p)\n", s, netlong, lphostlong );
|
Stub implementations for WPUCompleteOverlappedRequest,
WSADuplicateSocketW, WSAEnumNameSpaceProviders{A,W}, WSAGetQOSByName,
WSAGetServiceClassInfo{A,W}, WSAGetServiceClassNameByClassId{A,W},
WSALookupServiceEnd, WSALookupServiceNext{A,W},
WSAProviderConfigChange, WSASetService{A,W}, WSCEnableNSProvider,
WSCGetProviderPath, WSCInstallNameSpace, WSCWriteProviderOrder.
Implementations for WSANtohl, WSANtohs, WSASocketA->W crosscall.
Avoid NULL dereferences in WSAStringToAddress{A,W} and
WSAAddressToString{A,W}.
2005-01-10 15:34:15 +01:00
|
|
|
|
|
|
|
if (!lphostlong) return WSAEFAULT;
|
|
|
|
|
|
|
|
*lphostlong = ntohl( netlong );
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* WSANtohs (WS2_32.65)
|
|
|
|
*/
|
2006-10-12 13:45:39 +02:00
|
|
|
INT WINAPI WSANtohs( SOCKET s, WS_u_short netshort, WS_u_short* lphostshort )
|
Stub implementations for WPUCompleteOverlappedRequest,
WSADuplicateSocketW, WSAEnumNameSpaceProviders{A,W}, WSAGetQOSByName,
WSAGetServiceClassInfo{A,W}, WSAGetServiceClassNameByClassId{A,W},
WSALookupServiceEnd, WSALookupServiceNext{A,W},
WSAProviderConfigChange, WSASetService{A,W}, WSCEnableNSProvider,
WSCGetProviderPath, WSCInstallNameSpace, WSCWriteProviderOrder.
Implementations for WSANtohl, WSANtohs, WSASocketA->W crosscall.
Avoid NULL dereferences in WSAStringToAddress{A,W} and
WSAAddressToString{A,W}.
2005-01-10 15:34:15 +01:00
|
|
|
{
|
2015-03-11 01:41:21 +01:00
|
|
|
TRACE( "(%04lx 0x%08x %p)\n", s, netshort, lphostshort );
|
Stub implementations for WPUCompleteOverlappedRequest,
WSADuplicateSocketW, WSAEnumNameSpaceProviders{A,W}, WSAGetQOSByName,
WSAGetServiceClassInfo{A,W}, WSAGetServiceClassNameByClassId{A,W},
WSALookupServiceEnd, WSALookupServiceNext{A,W},
WSAProviderConfigChange, WSASetService{A,W}, WSCEnableNSProvider,
WSCGetProviderPath, WSCInstallNameSpace, WSCWriteProviderOrder.
Implementations for WSANtohl, WSANtohs, WSASocketA->W crosscall.
Avoid NULL dereferences in WSAStringToAddress{A,W} and
WSAAddressToString{A,W}.
2005-01-10 15:34:15 +01:00
|
|
|
|
|
|
|
if (!lphostshort) return WSAEFAULT;
|
|
|
|
|
|
|
|
*lphostshort = ntohs( netshort );
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* WSAProviderConfigChange (WS2_32.66)
|
|
|
|
*/
|
|
|
|
INT WINAPI WSAProviderConfigChange( LPHANDLE handle, LPWSAOVERLAPPED overlapped,
|
|
|
|
LPWSAOVERLAPPED_COMPLETION_ROUTINE completion )
|
|
|
|
{
|
|
|
|
FIXME( "(%p %p %p) Stub!\n", handle, overlapped, completion );
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* WSARecvDisconnect (WS2_32.68)
|
|
|
|
*/
|
|
|
|
INT WINAPI WSARecvDisconnect( SOCKET s, LPWSABUF disconnectdata )
|
|
|
|
{
|
2015-03-11 01:41:21 +01:00
|
|
|
TRACE( "(%04lx %p)\n", s, disconnectdata );
|
Stub implementations for WPUCompleteOverlappedRequest,
WSADuplicateSocketW, WSAEnumNameSpaceProviders{A,W}, WSAGetQOSByName,
WSAGetServiceClassInfo{A,W}, WSAGetServiceClassNameByClassId{A,W},
WSALookupServiceEnd, WSALookupServiceNext{A,W},
WSAProviderConfigChange, WSASetService{A,W}, WSCEnableNSProvider,
WSCGetProviderPath, WSCInstallNameSpace, WSCWriteProviderOrder.
Implementations for WSANtohl, WSANtohs, WSASocketA->W crosscall.
Avoid NULL dereferences in WSAStringToAddress{A,W} and
WSAAddressToString{A,W}.
2005-01-10 15:34:15 +01:00
|
|
|
|
2014-05-12 06:21:54 +02:00
|
|
|
return WS_shutdown( s, SD_RECEIVE );
|
Stub implementations for WPUCompleteOverlappedRequest,
WSADuplicateSocketW, WSAEnumNameSpaceProviders{A,W}, WSAGetQOSByName,
WSAGetServiceClassInfo{A,W}, WSAGetServiceClassNameByClassId{A,W},
WSALookupServiceEnd, WSALookupServiceNext{A,W},
WSAProviderConfigChange, WSASetService{A,W}, WSCEnableNSProvider,
WSCGetProviderPath, WSCInstallNameSpace, WSCWriteProviderOrder.
Implementations for WSANtohl, WSANtohs, WSASocketA->W crosscall.
Avoid NULL dereferences in WSAStringToAddress{A,W} and
WSAAddressToString{A,W}.
2005-01-10 15:34:15 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* WSASetServiceA (WS2_32.76)
|
|
|
|
*/
|
|
|
|
INT WINAPI WSASetServiceA( LPWSAQUERYSETA query, WSAESETSERVICEOP operation, DWORD flags )
|
|
|
|
{
|
2006-10-12 14:53:44 +02:00
|
|
|
FIXME( "(%p 0x%08x 0x%08x) Stub!\n", query, operation, flags );
|
Stub implementations for WPUCompleteOverlappedRequest,
WSADuplicateSocketW, WSAEnumNameSpaceProviders{A,W}, WSAGetQOSByName,
WSAGetServiceClassInfo{A,W}, WSAGetServiceClassNameByClassId{A,W},
WSALookupServiceEnd, WSALookupServiceNext{A,W},
WSAProviderConfigChange, WSASetService{A,W}, WSCEnableNSProvider,
WSCGetProviderPath, WSCInstallNameSpace, WSCWriteProviderOrder.
Implementations for WSANtohl, WSANtohs, WSASocketA->W crosscall.
Avoid NULL dereferences in WSAStringToAddress{A,W} and
WSAAddressToString{A,W}.
2005-01-10 15:34:15 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* WSASetServiceW (WS2_32.77)
|
|
|
|
*/
|
|
|
|
INT WINAPI WSASetServiceW( LPWSAQUERYSETW query, WSAESETSERVICEOP operation, DWORD flags )
|
|
|
|
{
|
2006-10-12 14:53:44 +02:00
|
|
|
FIXME( "(%p 0x%08x 0x%08x) Stub!\n", query, operation, flags );
|
Stub implementations for WPUCompleteOverlappedRequest,
WSADuplicateSocketW, WSAEnumNameSpaceProviders{A,W}, WSAGetQOSByName,
WSAGetServiceClassInfo{A,W}, WSAGetServiceClassNameByClassId{A,W},
WSALookupServiceEnd, WSALookupServiceNext{A,W},
WSAProviderConfigChange, WSASetService{A,W}, WSCEnableNSProvider,
WSCGetProviderPath, WSCInstallNameSpace, WSCWriteProviderOrder.
Implementations for WSANtohl, WSANtohs, WSASocketA->W crosscall.
Avoid NULL dereferences in WSAStringToAddress{A,W} and
WSAAddressToString{A,W}.
2005-01-10 15:34:15 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* WSCEnableNSProvider (WS2_32.84)
|
|
|
|
*/
|
|
|
|
INT WINAPI WSCEnableNSProvider( LPGUID provider, BOOL enable )
|
|
|
|
{
|
|
|
|
FIXME( "(%s 0x%08x) Stub!\n", debugstr_guid(provider), enable );
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* WSCGetProviderPath (WS2_32.86)
|
|
|
|
*/
|
2005-06-25 20:34:32 +02:00
|
|
|
INT WINAPI WSCGetProviderPath( LPGUID provider, LPWSTR path, LPINT len, LPINT errcode )
|
Stub implementations for WPUCompleteOverlappedRequest,
WSADuplicateSocketW, WSAEnumNameSpaceProviders{A,W}, WSAGetQOSByName,
WSAGetServiceClassInfo{A,W}, WSAGetServiceClassNameByClassId{A,W},
WSALookupServiceEnd, WSALookupServiceNext{A,W},
WSAProviderConfigChange, WSASetService{A,W}, WSCEnableNSProvider,
WSCGetProviderPath, WSCInstallNameSpace, WSCWriteProviderOrder.
Implementations for WSANtohl, WSANtohs, WSASocketA->W crosscall.
Avoid NULL dereferences in WSAStringToAddress{A,W} and
WSAAddressToString{A,W}.
2005-01-10 15:34:15 +01:00
|
|
|
{
|
2005-06-25 20:34:32 +02:00
|
|
|
FIXME( "(%s %p %p %p) Stub!\n", debugstr_guid(provider), path, len, errcode );
|
Stub implementations for WPUCompleteOverlappedRequest,
WSADuplicateSocketW, WSAEnumNameSpaceProviders{A,W}, WSAGetQOSByName,
WSAGetServiceClassInfo{A,W}, WSAGetServiceClassNameByClassId{A,W},
WSALookupServiceEnd, WSALookupServiceNext{A,W},
WSAProviderConfigChange, WSASetService{A,W}, WSCEnableNSProvider,
WSCGetProviderPath, WSCInstallNameSpace, WSCWriteProviderOrder.
Implementations for WSANtohl, WSANtohs, WSASocketA->W crosscall.
Avoid NULL dereferences in WSAStringToAddress{A,W} and
WSAAddressToString{A,W}.
2005-01-10 15:34:15 +01:00
|
|
|
|
2005-06-25 20:34:32 +02:00
|
|
|
if (!errcode || !provider || !len) return WSAEFAULT;
|
Stub implementations for WPUCompleteOverlappedRequest,
WSADuplicateSocketW, WSAEnumNameSpaceProviders{A,W}, WSAGetQOSByName,
WSAGetServiceClassInfo{A,W}, WSAGetServiceClassNameByClassId{A,W},
WSALookupServiceEnd, WSALookupServiceNext{A,W},
WSAProviderConfigChange, WSASetService{A,W}, WSCEnableNSProvider,
WSCGetProviderPath, WSCInstallNameSpace, WSCWriteProviderOrder.
Implementations for WSANtohl, WSANtohs, WSASocketA->W crosscall.
Avoid NULL dereferences in WSAStringToAddress{A,W} and
WSAAddressToString{A,W}.
2005-01-10 15:34:15 +01:00
|
|
|
|
2005-06-25 20:34:32 +02:00
|
|
|
*errcode = WSAEINVAL;
|
Stub implementations for WPUCompleteOverlappedRequest,
WSADuplicateSocketW, WSAEnumNameSpaceProviders{A,W}, WSAGetQOSByName,
WSAGetServiceClassInfo{A,W}, WSAGetServiceClassNameByClassId{A,W},
WSALookupServiceEnd, WSALookupServiceNext{A,W},
WSAProviderConfigChange, WSASetService{A,W}, WSCEnableNSProvider,
WSCGetProviderPath, WSCInstallNameSpace, WSCWriteProviderOrder.
Implementations for WSANtohl, WSANtohs, WSASocketA->W crosscall.
Avoid NULL dereferences in WSAStringToAddress{A,W} and
WSAAddressToString{A,W}.
2005-01-10 15:34:15 +01:00
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* WSCInstallNameSpace (WS2_32.87)
|
|
|
|
*/
|
|
|
|
INT WINAPI WSCInstallNameSpace( LPWSTR identifier, LPWSTR path, DWORD namespace,
|
|
|
|
DWORD version, LPGUID provider )
|
|
|
|
{
|
2006-10-12 14:53:44 +02:00
|
|
|
FIXME( "(%s %s 0x%08x 0x%08x %s) Stub!\n", debugstr_w(identifier), debugstr_w(path),
|
Stub implementations for WPUCompleteOverlappedRequest,
WSADuplicateSocketW, WSAEnumNameSpaceProviders{A,W}, WSAGetQOSByName,
WSAGetServiceClassInfo{A,W}, WSAGetServiceClassNameByClassId{A,W},
WSALookupServiceEnd, WSALookupServiceNext{A,W},
WSAProviderConfigChange, WSASetService{A,W}, WSCEnableNSProvider,
WSCGetProviderPath, WSCInstallNameSpace, WSCWriteProviderOrder.
Implementations for WSANtohl, WSANtohs, WSASocketA->W crosscall.
Avoid NULL dereferences in WSAStringToAddress{A,W} and
WSAAddressToString{A,W}.
2005-01-10 15:34:15 +01:00
|
|
|
namespace, version, debugstr_guid(provider) );
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* WSCUnInstallNameSpace (WS2_32.89)
|
|
|
|
*/
|
2004-06-02 23:33:17 +02:00
|
|
|
INT WINAPI WSCUnInstallNameSpace( LPGUID lpProviderId )
|
|
|
|
{
|
|
|
|
FIXME("(%p) Stub!\n", lpProviderId);
|
|
|
|
return NO_ERROR;
|
|
|
|
}
|
Stub implementations for WPUCompleteOverlappedRequest,
WSADuplicateSocketW, WSAEnumNameSpaceProviders{A,W}, WSAGetQOSByName,
WSAGetServiceClassInfo{A,W}, WSAGetServiceClassNameByClassId{A,W},
WSALookupServiceEnd, WSALookupServiceNext{A,W},
WSAProviderConfigChange, WSASetService{A,W}, WSCEnableNSProvider,
WSCGetProviderPath, WSCInstallNameSpace, WSCWriteProviderOrder.
Implementations for WSANtohl, WSANtohs, WSASocketA->W crosscall.
Avoid NULL dereferences in WSAStringToAddress{A,W} and
WSAAddressToString{A,W}.
2005-01-10 15:34:15 +01:00
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* WSCWriteProviderOrder (WS2_32.91)
|
|
|
|
*/
|
|
|
|
INT WINAPI WSCWriteProviderOrder( LPDWORD entry, DWORD number )
|
|
|
|
{
|
2006-10-12 14:53:44 +02:00
|
|
|
FIXME("(%p 0x%08x) Stub!\n", entry, number);
|
Stub implementations for WPUCompleteOverlappedRequest,
WSADuplicateSocketW, WSAEnumNameSpaceProviders{A,W}, WSAGetQOSByName,
WSAGetServiceClassInfo{A,W}, WSAGetServiceClassNameByClassId{A,W},
WSALookupServiceEnd, WSALookupServiceNext{A,W},
WSAProviderConfigChange, WSASetService{A,W}, WSCEnableNSProvider,
WSCGetProviderPath, WSCInstallNameSpace, WSCWriteProviderOrder.
Implementations for WSANtohl, WSANtohs, WSASocketA->W crosscall.
Avoid NULL dereferences in WSAStringToAddress{A,W} and
WSAAddressToString{A,W}.
2005-01-10 15:34:15 +01:00
|
|
|
return 0;
|
|
|
|
}
|
2010-09-09 18:32:56 +02:00
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* WSANSPIoctl (WS2_32.91)
|
|
|
|
*/
|
|
|
|
INT WINAPI WSANSPIoctl( HANDLE hLookup, DWORD dwControlCode, LPVOID lpvInBuffer,
|
|
|
|
DWORD cbInBuffer, LPVOID lpvOutBuffer, DWORD cbOutBuffer,
|
|
|
|
LPDWORD lpcbBytesReturned, LPWSACOMPLETION lpCompletion )
|
|
|
|
{
|
|
|
|
FIXME("(%p, 0x%08x, %p, 0x%08x, %p, 0x%08x, %p, %p) Stub!\n", hLookup, dwControlCode,
|
|
|
|
lpvInBuffer, cbInBuffer, lpvOutBuffer, cbOutBuffer, lpcbBytesReturned, lpCompletion);
|
2015-01-10 02:49:46 +01:00
|
|
|
SetLastError(WSA_NOT_ENOUGH_MEMORY);
|
2010-09-09 18:32:56 +02:00
|
|
|
return SOCKET_ERROR;
|
2012-12-01 17:38:05 +01:00
|
|
|
}
|
2013-09-04 03:51:58 +02:00
|
|
|
|
|
|
|
/*****************************************************************************
|
|
|
|
* WSAEnumProtocolsA [WS2_32.@]
|
|
|
|
*
|
|
|
|
* see function WSAEnumProtocolsW
|
|
|
|
*/
|
|
|
|
INT WINAPI WSAEnumProtocolsA( LPINT protocols, LPWSAPROTOCOL_INFOA buffer, LPDWORD len )
|
|
|
|
{
|
|
|
|
return WS_EnumProtocols( FALSE, protocols, (LPWSAPROTOCOL_INFOW) buffer, len);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*****************************************************************************
|
|
|
|
* WSAEnumProtocolsW [WS2_32.@]
|
|
|
|
*
|
|
|
|
* Retrieves information about specified set of active network protocols.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* protocols [I] Pointer to null-terminated array of protocol id's. NULL
|
|
|
|
* retrieves information on all available protocols.
|
|
|
|
* buffer [I] Pointer to a buffer to be filled with WSAPROTOCOL_INFO
|
|
|
|
* structures.
|
|
|
|
* len [I/O] Pointer to a variable specifying buffer size. On output
|
|
|
|
* the variable holds the number of bytes needed when the
|
|
|
|
* specified size is too small.
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: number of WSAPROTOCOL_INFO structures in buffer.
|
|
|
|
* Failure: SOCKET_ERROR
|
|
|
|
*
|
|
|
|
* NOTES
|
|
|
|
* NT4SP5 does not return SPX if protocols == NULL
|
|
|
|
*
|
|
|
|
* BUGS
|
|
|
|
* - NT4SP5 returns in addition these list of NETBIOS protocols
|
|
|
|
* (address family 17), each entry two times one for socket type 2 and 5
|
|
|
|
*
|
|
|
|
* iProtocol szProtocol
|
|
|
|
* 0x80000000 \Device\NwlnkNb
|
|
|
|
* 0xfffffffa \Device\NetBT_CBENT7
|
|
|
|
* 0xfffffffb \Device\Nbf_CBENT7
|
|
|
|
* 0xfffffffc \Device\NetBT_NdisWan5
|
|
|
|
* 0xfffffffd \Device\NetBT_El9202
|
|
|
|
* 0xfffffffe \Device\Nbf_El9202
|
|
|
|
* 0xffffffff \Device\Nbf_NdisWan4
|
|
|
|
*
|
|
|
|
* - there is no check that the operating system supports the returned
|
|
|
|
* protocols
|
|
|
|
*/
|
|
|
|
INT WINAPI WSAEnumProtocolsW( LPINT protocols, LPWSAPROTOCOL_INFOW buffer, LPDWORD len )
|
|
|
|
{
|
|
|
|
return WS_EnumProtocols( TRUE, protocols, buffer, len);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*****************************************************************************
|
|
|
|
* WSCEnumProtocols [WS2_32.@]
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* protocols [I] Null-terminated array of iProtocol values.
|
|
|
|
* buffer [O] Buffer of WSAPROTOCOL_INFOW structures.
|
|
|
|
* len [I/O] Size of buffer on input/output.
|
|
|
|
* errno [O] Error code.
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: number of protocols to be reported on.
|
|
|
|
* Failure: SOCKET_ERROR. error is in errno.
|
|
|
|
*
|
|
|
|
* BUGS
|
|
|
|
* Doesn't supply info on layered protocols.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
INT WINAPI WSCEnumProtocols( LPINT protocols, LPWSAPROTOCOL_INFOW buffer, LPDWORD len, LPINT err )
|
|
|
|
{
|
|
|
|
INT ret = WSAEnumProtocolsW( protocols, buffer, len );
|
|
|
|
|
|
|
|
if (ret == SOCKET_ERROR) *err = WSAENOBUFS;
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|