Sweden-Number/dlls/kernel32/comm.c

1435 lines
45 KiB
C
Raw Normal View History

2001-01-25 23:22:21 +01:00
/*
Release 941122 Sun Nov 20 18:30:06 1994 Alexandre Julliard (julliard@lamisun.epfl.ch) * [controls/scroll.c] [include/scroll.h] Rewritten most of scroll-bar code for better Windows look & feel. Implemented EnableScrollBar(). Preliminary keyboard support. * [objects/bitblt.c] Fixed BadMatch error for BitBlt() and StretchBlt() when reading bits from outside the visible region. * [objects/oembitmap.c] [include/bitmaps/obm_*] Use XPM symbolic colors to load bitmaps. This allows the colors of the bitmaps to depend on the system colors. * [tools/make_debug] Made the make_debug script more robust. * [windows/dialog.c] Fixed CheckRadioButton(). * [windows/nonclient.c] A few changes to scroll-bar drawing and tracking. * [windows/winpos.c] Renamed NextWindowFromPoint() to WINPOS_NextWindowFromPoint() to avoid confusion, and optimized it somewhat. Nov 19, 94 Martin Ayotte (wine@trgcorp.mksinfo.qc.ca) * [misc/audio.c] * [misc/mcianim.c] more coding but nothing spectacular. * [misc/mmaux.c] some coding to access '/dev/mixer'. * [misc/midi.c] some coding to read .MID files, but it's not playing yet. Sun Nov 13 19:31:03 1994 James Youngman (mbcstjy@afs.man.ac.uk) * [objects/dib.c] Reimplemented DIB_SetImageBits_RLE8() so that it would cope with bitmaps which don't end 0x00, 0x02 (previously it blew up). This includes some bitmaps output by Paint Shop Pro. Implementation is possibly now too lax. Please see the notes on the function about why. * [controls/desktop.c] The desktop pattern should be painted if the wallpaper doesn't cover the whole screen width OR the whole screen height. Sun Nov 13 00:07:11 MET 1994 Erik Bos <erik@xs4all.nl> * [objects/dib.c] Small bug in DIB_SetImageBits() fixed, bitmaps in 16,24 bpp now work. * [loader/ne_resource.c] [include/resource.h] Some cleanup. Thu Nov 10 20:44:58 1994 Martin von Loewis (martin@cs.csufresno.edu) * [Configure] [rc/sysres.rc] Primitive compile-time support for multiple languages * [rc/sysres_De.rc] New file * [loader/resource.c] LoadBitmap: Recognize end of sysresbm properly * [rc/Imakefile] Rules to compile resources simplified, dependencies changed * [rc/sysresbm.rc] Don't use sysresbm if using XPM * [windows/dialog.c] CreateDialogIndirectParam: Reverse Z-order of controls * [windows/message.c] MSG_TranslateMouseMsg: Fix HTTRANSPARENT handling * [windows/winpos.c] NextWindowFromPoint: New function * [controls/button.c] WM_NCHITTEST: Group Box is HTTRANSPARENT BUTTON_CheckAutoRadioButton: New function BM_SETCHECK: Added call to BUTTON_CheckAutoRadioButton Mon Nov 7 11:20:26 1994 Paul Falstad (pf@zoof.cts.com) * [objects/text.c] Fix hang when using DrawText(..., DT_WORDBREAK) with a word that is too long to break. * [objects/font.c] Don't assume helvetica if there is no font family; let the other font attributes decide what font to use. * [controls/widgets.c] Listboxes and combo boxes need to be notified of double-clicks. * [controls/listbox.c] [include/listbox.h] scrolling to bottom of list box should display last item at the bottom, not at the top. list boxes need to allocate a separate heap for their item data, rather than using the user heap. Otherwise, it's very easy to run out of memory for list box items. removed redundant code in ListBoxAddString(). Implemented simple version of LBS_SORT. Don't put [.] in the list box when using DDL_DIRECTORY. * [controls/combo.c] Combos should pass CBS_SORT onto their list box. * [windows/win.c] If window creation is aborted, remove the window from the linked lists. * [controls/static.c] static controls with SS_ICON were always returning 0 from WM_NCCREATE. Make sure static controls have text to draw before drawing it.
1994-11-22 17:31:29 +01:00
* DEC 93 Erik Bos <erik@xs4all.nl>
Release 960728 Sun Jul 28 17:57:19 1996 Alexandre Julliard <julliard@lrc.epfl.ch> * [loader/task.c] [include/task.h] Implemented SwitchStackTo()/SwitchStackBack(). * [include/wintypes.h] [loader/main.c] Added __winelib variable to distinguish between emulator and library at run-time. Later on, this should avoid some recompilations when building Winelib. * [windows/property.c] Implemented Win32 functions for window properties. Fri Jul 26 18:00:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu> * [controls/listbox.c] Implemented LBS_SORT style, WM_COMPAREITEM, and WM_DELETEITEM messages. * [controls/menu.c] Call TranslateMessage() to enable shortcuts (on WM_CHAR). * [include/cursoricon.h] Moved #pragma pack(1) back to where it belongs. * [objects/palette.c] RealizeDefaultPalette() maps to system colors only. Do not broadcast palette notifications when in TrueColor. * [objects/color.c] [include/palette.h] Miscellaneous optimizations. Had to fix several "improvements" made to my patch for previous release. * [objects/dib.c] Reverse dib bits order for 24-bit SetDIBits(). * [objects/dc.c] GetDeviceCaps() does not return RC_PALETTE when in TrueColor. * [windows/scroll.c] Scroll update region too. * [windows/message.c] Include QS_MOUSE into the event mask for nonclient mouse message filter. Fixes problems with Word 6 freezing when mouse hits nonclient area. * [windows/win.c] Allow top-level windows to be linked as HWND_TOP in CreateWindow(). * [windows/winpos.c] [windows/mdi.c] Attempt to fix control menu duplication. Fri Jul 26 09:49:35 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [files/drive.c] GetDriveType32A(): return value for CDROM fixed. * [files/file.c] SearchPath* added. * [if1632/gdi32.spec] [objects/brush.c] SetBrushOrgEx() added. * [loader/pe_resource.c] If even loading the default entry fails, we just use the first entry from the resource directory. [loader/task.c] SetSigHandler() stub added, Paradox 4.5 now starts up. * [misc/comm.c] [include/windows.h] [if1632/kernel32.spec] COMM functions updated to win32, not complete. * [misc/lstr.c] FormatMessageA partially implemented. * [include/miscemu.h] [memory/selector.c] [memory/global.c] [miscemu/dosmem.c] DOS memory handling changed: 1MB preallocated block, real-mode segment handling possible, SetSelectorBase into lower physical 1MB possible. * [miscemu/dpmi.c] Real-mode segments changed, real-mode int 21,ax=6506 added. AX=0x0303 added. * [multimedia/time.c] Fixed bug in killTimer. * [objects/bitmap.c] LoadImageA partially implemented. Wed Jul 24 18:20:24 1996 Albrecht Kleine <kleine@ak.sax.de> * [include/dde_mem.h][include/dde_proc.h] [ipc/dde_atom.c][ipc/dde_proc.c][windows/message.c] [ipc/generic_hash.h][library/miscstubs.c] Changes for error free compilation using "--with-ipc": replaced some names with *16-equivalent (e.g. MSG to MSG16), modified prototype of function DDE_GlobalFree() . * [objects/palette.c] Added check for metafile-DC in GDISelectPalette(), GDIRealizePalette(),RealizeDefaultPalette() and IsDCCurrentPalette(). Tue Jul 23 22:46:53 1996 Andrew Lewycky <plewycky@oise.utoronto.ca> * [controls/edit.c] EDIT_WM_Create: Don't EDIT_EM_ReplaceSel if created with lParam = "", fixes Winhelp. * [windows/dialog.c] DIALOG_CreateIndirect: Initialise dlgProc before creating children.
1996-07-28 20:50:11 +02:00
*
* Copyright 1996 Marcus Meissner
*
* 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
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
Release 0.5 Sun Jan 2 12:38:53 1994 David Metcalfe <david@prism.demon.co.uk> * [windows/class.c] Implemented GetClassName and GetClassInfo. * [windows/caret.c] Various improvements to text caret code. Fri Dec 31 15:22:22 1993 John Brezak <brezak@apollo.hp.com> * [misc/comm.c] Patches to work with NetBSD. Thu Dec 30 12:11:55 1993 John Richardson <jrichard@cs.uml.edu> * [objects/bitblt.c] Added StretchBlt(). Tue Jan 4 05:22:07 1994 julliard@di.epfl.ch (Alexandre Julliard) * [misc/user.c] Added creation of system message queue. * [objects/bitmap.c] [objects/dcvalues.c] [windows/dc.c] Added DC size fields into DC structure. * [objects/clipping.c] Bug fix in CLIPPING_IntersectRect(). * [windows/class.c] Allocate a DCE instead of a DC for CS_CLASSDC classes. * [windows/clipping.c] Fixed GetUpdateRect() and GetUpdateRgn() to clip to the client area. * [windows/dce.c] Implemented GetDCEx() and GetWindowDC(). * [windows/defwnd.c] Implemented WM_WINDOWPOSCHANGED handling. * [windows/event.c] Preliminary support for Xlib event handling instead of Xt callbacks. Changed MSG_AddMsg() calls to hardware_event() or PostMessage(). * [windows/message.c] Preliminary support for multiple message queues. Implemented hardware_event() to store messages into the system queue. Implemented Get/SetTaskQueue(). Better WM_PAINT and WM_TIMER handling. Changes to use Xlib instead of Xt for events. * [windows/painting.c] Use GetDCEx() to retrieve the DC, to get a correct visible region. * [windows/timer.c] Moved the timer procedure callback into DispatchMessage(). Changed implementation to get rid of Xt timeouts. Timer checking is now done inside GetMessage(). * [windows/win.c] Allocate a DCE instead of a DC for CS_OWNDC windows. Replaced Xt calls with Xlib calls. Moved window positioning functions into windows/winpos.c * [windows/winpos.c] (New file) Rewritten most of the window positioning functions. Implemented SetWindowPos() and MapWindowPoints(). Jan 3, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte) * [if1632/user.spec] Bad arguments description for function SetDlgItemText. * [objects/text.c] Function DrawText now handle DT_CALCRECT request. * [misc/message.c] Message boxes now use DrawText with DT_CALCRECT. * [windows/graphics.c] Bug fix in function FrameRect, (it was using PEN instead of BRUSH). * [windows/win.c] Bug fix for flags in function ShowWindow. More accurate WM_SIZE generated by function ShowWindow. * [controls/listbox.c] More code for LBS_MULTIPLESEL. More code for LBS_MULTICOLUMN. * [include/windows.h] Bad define for MF_SEPARATOR. * [controls/menu.c] New functions: PopMenuWndProc() with 'glues', CreatePopupMenu(), AppendMenu(), InsertMenu(), RemoveMenu(), DeleteMenu(), ModifyMenu(), TrackPopupMenu(). Code in stubs: CreateMenu(), DestroyMenu(). Sat Jan 1 10:22:43 1994 Bob Amstadt (bob@pooh) * loader/wine.c: Added support for relocation types 5 and 6. Mon Dec 27 11:06:03 1993 Erik Bos (erik@trashcan.hacktic.nl) * [misc/comm.c] new functions: BuildCommDCB(), OpenComm(), CloseComm(), SetCommBreak(), ClearCommBreak(), EscapeCommFunction(), FlushComm(), GetCommError(), SetCommEventMask(), GetCommEventMask(), SetCommState(), GetCommState(), TransmitCommChar(), ReadComm(), WriteComm(). Wed Dec 22 13:00:15 1993 David Metcalfe <david@prism.demon.co.uk> * [windows/caret.c] Implemented text caret functions. Tue Dec 21 06:13:58 1993 julliard@di.epfl.ch (Alexandre Julliard) * [loader/wine.c] Bug fix in LoadImage(). * [objects/bitblt.c] [objects/clipping.c] [objects/text.c] [windows/dc.c] [windows/dce.c] [windows/graphics.c] Modified graphics calls to take into account the DC origin. * [windows/defwnd.c] Added preliminary WM_NCCALCSIZE handling. * [windows/event.c] Send WM_NCCALCSIZE message on resize event. * [windows/win.c] Send WM_NCCALCSIZE message in CreateWindow(). Realize widgets at creation time (should prevent problems with unrealized widgets). Dec 19, 93 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte) * [controls/static.c] Send mouse & keyboard message received to its parent. * [controls/scroll.c] Send keyboard message received to its parent. * [controls/listbox.c] Add Navigation keys . ListBox now use VSCROLL & HSCROLL instead of children. Alpha version of LBS_MULTIPLESEL. Alpha version of LBS_MULTICOLUMN. * [controls/combo.c] Add Navigation keys on closed ComboBox. Remove useless 'COMBOBOX_CreateComboBox' function. Mon Dec 19 20:39:34 1993 Erik Bos (erik@trashcan.hacktic.nl) * [loader/wine. LoadImage() modified to use FindFile(). * [misc/file.c] SetErrorMode added * [misc/dos_fs.c] bug fixes. Dec 13, 93 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte) * [memory/global.c] bug fix in GlobalGetFreeSegment : good ptr in 'g_prev'. * [sysres.dll] preliminary version of a 'glass of wine' bitmap * [windows/event.c] New function 'GetCapture'. * [controls/scroll.c] Remove useless 'SCROLLBAR_CreateScrollBar' function. * [controls/listbox.c] Remove useless 'LISTBOX_CreateListBox' function. Mon Dec 13 13:51:00 1993 David Metcalfe <david@prism.demon.co.uk> * [objects/font.c] Corrected bugs in GetCharWidth(). * [windows/event.c] Modified EVENT_key to send Windows virtual key codes for WM_KEYDOWN and WM_KEYUP messages, and a WM_CHAR message for printable characters. Wed Dec 08 19:20:00 1993 Karl Guenter Wuensch (hn324wu@unidui.uni-duisburg.de) * [windows/graphics.c] Added Polyline and Polygon Mon Dec 13 14:51:54 1993 Erik Bos (erik@trashcan.hacktic.nl) * [controls/listbox.c] ListBoxDirectory() modified to use dos_fs.c's functions to access files&|drives. Sat Dec 04 17:04:23 1993 Erik Bos (erik@trashcan.hacktic.nl) * [misc/dos_fs.c] Added FindFile() to search a file in a dos/unix style path. * [misc/file.c] New Win31 functions: OpenFile, _lcreate, _llseek, GetTempDrive, GetTempFileName, GetWindowsDirectory, GetSystemDirectory, GetDriveType. * [misc/int21.c] Modified. Wed Dec 1 16:20:45 1993 Miguel de Icaza (miguel@roxanne.nuclecu.unam.mx) * [misc/profile.c] The Profile functions now return the correct values. They now implement all the features described in the SDK. Tue Nov 30 13:55:27 1993 Bob Amstadt (bob at amscons) * [loader/selector.c] Rewrote selector aliasing routines to use System V IPC routine to alias memory segments. Nov 28, 93 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte) * [controls/listbox.c] More consistency in functions using wIndexes * [controls/scroll.c] New function : ShowScrollBar(). * [loader/cursor.c] ... New file Move cursor functions from [loader/resource.c]. New function : ClipCursor(). New function : GetClipCursor(). New function : CreateCursor(). SetCursor() now working using gloabal variable 'winHasCursor'. *[object/palette.c] New stub only : SelectPalette(). New stub only : RealizePalette(). *[win/event.c] New function : EVENT_enter_notify(), update 'winHasCursor' and send WM_SETCURSOR. *[win/defwnd.c] Add processing of WM_SETCURSOR message. *[win/win.c] New members in WND structure : hCursor, hWndVScroll & hWndHScroll. CreateWindowEx() now create children for WM_HSCROLL & WM_VSCROLL. New function ClientToScreen(). New function ScreenToClient(). Mon Nov 25 18:25:40 1993 Erik Bos (erik@trashcan.hacktic.nl) * [files.h / regfunc.h / misc/dos.c] Removed. * [misc/dos_fs.c] Added support for loading dosdrive cfg from wine.ini. * [misc/int21.c] Modified. Wed Nov 24 11:37:33 1993 julliard@disuns2.epfl.ch (Alexandre Julliard) * [include/atom.h] [memory/atom.c] Implemented atoms. * [windows/class.c] Modified RegisterClass() to use atoms. Implemented CS_GLOBALCLASS style. * [windows/message.c] Implemented RegisterWindowMessage(). * [loader/resource.c] Bug fix in LoadResource(). * [windows/dialog.c] Modified CreateDialogParam() to use Find/LoadResource().
1994-01-04 21:14:34 +01:00
*/
#include "config.h"
#include "wine/port.h"
Release 980413 Sun Apr 12 12:22:23 1997 Andreas Mohr <100.30936@germany.net> * [files/drive.c] Fixed "no free space" problem with partition sizes between 1 and 2 GB (cluster_sectors may not exceed 0x40). * [windows/msgbox.c] [if1632/user.spec] [include/windows.h] Implemented MessageBoxIndirect16, corrected MSGBOXPARAMS16. * [loader/task.c] DOS environment strings may never exceed 127 chars -> truncate Unix environment strings if necessary. Sun Apr 12 02:51:44 1998 Dimitrie O. Paun <dimi@mail.cs.toronto.edu> * [files/*.c] All fprintf statements were converted to appropriate debug messages. * [tools/find_debug_channels] Updated comments at the beginning of the file. Sat Apr 11 15:27:21 1998 Alexandre Julliard <julliard@lrc.epfl.ch> * [loader/module.c] [loader/task.c] [scheduler/process.c] Moved some code around to prepare the ground for CreateProcess(). * [memory/environ.c] [loader/task.c] Moved Win32 environment strings functions to environ.c. Unified Win16 and Win32 environment management. * [scheduler/handle.c] [scheduler/k32obj.c] [scheduler/*.c] Implemented handle inheritance and DuplicateHandle(). * [scheduler/thread.c] Create a 16-bit stack for all threads. * [windows/dialog.c] Implemented DIALOGEX resource format. Fri Apr 10 20:21:51 1998 Marcus Meissner <marcus@mud.de> * [configure.in][include/acconfig.h][*/*][multimedia/*] Cleaned up the OSS detection stuff, added some more checks for headerfiles/functions. Removed a lot of OS specific #ifdefs. Lots of dependend multimedia cleanups. * [loader/pe_image.c] Enhanced comment, added missing reference count increase. * [ole/compobj.c] Replaced broken StringFromGUID2 by working one. * [misc/winsock.c] SO_LINGER uses unsigned 16 bit in Win16 and Win32, but unsigned int (32bit) for UNIX. * [memory/global.c] Allow realloc for lockcount 1 too. Fri Apr 10 15:27:34 1998 Morten Welinder <terra@diku.dk> * [graphics/x11drv/text.c] Handle control characters in trace. Ignore terminating newline. * [multimedia/init.c] (MULTIMEDIA_Init): Correct allocations. * [tools/examine-relay] Tidy up. * [windows/syscolor.c] Change highlight colour from lightblue to lightgray. This looks correct for menus. Fri Apr 10 01:49:58 1998 Douglas Ridgway <ridgway@winehq.com> * [configure.in] [Make.rules.in] Add check for c2man before using it. Fri Apr 10 02:59:21 1998 Douglas Ridgway <ridgway@winehq.com> * [DEVELOPERS-HINTS] Simple description of adding API calls. * [include/wintypes.h] [include/windows.h] Get rid of Winelib16, avoid declaring some illegal functions in Winelib, add prototypes for some enhanced metafile functions, fix GetTextExtentPoint32 declarations. * [relay32/gdi32.spec] [objects/enhmetafile.c] Cosmetic and functional improvements. * [include/wincon.h] [programs/view/*] Fixes, improved compatibility with native compilers. Thu Apr 9 15:48:49 1998 Ulrich Weigand <weigand@informatik.uni-erlangen.de> * [win32/kernel32.c] Implemented FT_Thunk / FT_Prolog / FT_Exit / FT_PrologPrime. Fixed Common32ThkLS thunk function. * [tools/build.c] [relay32/relay386.c] [if1632/relay.c] Changed relay code to allow register functions to modify stack layout. * [memory/selector.c] Implemented AllocMappedBuffer / FreeMappedBuffer. * [relay32/kernel32.spec] [if1632/kernel.spec] [win32/ordinals.c] Added names for undocumented functions. * [loader/module.c] Bugfix: LoadLibrary16 should *not* silently load 32-bit DLL. Thu Apr 9 03:54:58 1998 Jim Peterson <jspeter@birch.ee.vt.edu> * [windows/keyboard.c] Fix an erroneous test in TranslateAccelerator{16,32} for the end of the accelerator table. Thu Apr 8 20:36:28 1998 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de> * [misc/crtdll.c] Implement getenv. * [misc/commdlg.c] Make Get[Save/Open]FileName work in most situations. * [misc/lstr.c] Use wvsprintf32A instead of vsprintf in FormatMessage32X * [misc/version] Make NT3.50 a recognised version * [graphics/x11drv/graphics.c] Change the algorithme to draw arcs * [loader/resource.c] Return an empty buffer in LoadString32A if no resource found. * [win32/code_page.c] Try harder to get the right size in MultiByteToWideChar. * [win32/process.c] Call WinExec32 for CreateProcess32A. * [windows/user.c] Install default Int0 Handler in InitApp(). Thu Apr 8 19:29:48 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de> * [misc/imagelist.c] Preliminary fix for drawing selected images. Various improvements. * [controls/progress.c][include/progress.c][include/commctrl.h] Added progress bar messages and styles for IE4.01 (dll version 4.72) compatibility. Fixed led size problem. * [controls/updown.c][include/commctrl.h] Added UDM_GETRANGE32 and UDM_SETRANGE32. * [objects/oembitmaps.c][include/windows.h][include/bitmaps/*] Added Win95 icons and fixed Win95 cursor and restore button bug. Now they should be visible. Sorry!!! * [relay32/comctl32.spec] Added most missing function names. Tue Apr 6 18:48:36 1998 Matthew Becker <mbecker@glasscity.net> * [objects/font.c] [if1632/gdi.spec] GetOutlineTextMetrics: stub * [objects/text.c] GetTextCharset should just call GetTextCharsetInfo. * [misc/mpr.c] [relay32/mpr.spec] WNetCachePassword: stub * [scheduler/thread.c] [relay32/user32.spec] AttachThreadInput: stub Updated documentation. * [objects/palette.c] Updated documentation. Tue Mar 31 17:06:30 1998 James Juran <jrj120@psu.edu> * [*/*.c] Finished fixing USER32 ordinal numbers in function documentation. Mon Mar 30 20:27:38 1998 Morten Welinder <terra@diku.dk> * [misc/debugstr.c] [include/debugstr.h] Moved _dumpstr from relay32/relay386.c. Improved control character handling. * [msdos/int21.c] Implement 215E00 -- get machine name. * [windows/winpos.c] SetWindowPos32: Make an extra sync when mapping managed windows. This makes sure the reconfigure event has been handled. See Mshearts' what's-your-name window. Mon Mar 30 01:13:50 1998 Alexander V. Lukyanov <lav@long.yar.ru> * [Makefile.in] Install includes from TOPSRCDIR.
1998-04-13 14:21:30 +02:00
Release 0.5 Sun Jan 2 12:38:53 1994 David Metcalfe <david@prism.demon.co.uk> * [windows/class.c] Implemented GetClassName and GetClassInfo. * [windows/caret.c] Various improvements to text caret code. Fri Dec 31 15:22:22 1993 John Brezak <brezak@apollo.hp.com> * [misc/comm.c] Patches to work with NetBSD. Thu Dec 30 12:11:55 1993 John Richardson <jrichard@cs.uml.edu> * [objects/bitblt.c] Added StretchBlt(). Tue Jan 4 05:22:07 1994 julliard@di.epfl.ch (Alexandre Julliard) * [misc/user.c] Added creation of system message queue. * [objects/bitmap.c] [objects/dcvalues.c] [windows/dc.c] Added DC size fields into DC structure. * [objects/clipping.c] Bug fix in CLIPPING_IntersectRect(). * [windows/class.c] Allocate a DCE instead of a DC for CS_CLASSDC classes. * [windows/clipping.c] Fixed GetUpdateRect() and GetUpdateRgn() to clip to the client area. * [windows/dce.c] Implemented GetDCEx() and GetWindowDC(). * [windows/defwnd.c] Implemented WM_WINDOWPOSCHANGED handling. * [windows/event.c] Preliminary support for Xlib event handling instead of Xt callbacks. Changed MSG_AddMsg() calls to hardware_event() or PostMessage(). * [windows/message.c] Preliminary support for multiple message queues. Implemented hardware_event() to store messages into the system queue. Implemented Get/SetTaskQueue(). Better WM_PAINT and WM_TIMER handling. Changes to use Xlib instead of Xt for events. * [windows/painting.c] Use GetDCEx() to retrieve the DC, to get a correct visible region. * [windows/timer.c] Moved the timer procedure callback into DispatchMessage(). Changed implementation to get rid of Xt timeouts. Timer checking is now done inside GetMessage(). * [windows/win.c] Allocate a DCE instead of a DC for CS_OWNDC windows. Replaced Xt calls with Xlib calls. Moved window positioning functions into windows/winpos.c * [windows/winpos.c] (New file) Rewritten most of the window positioning functions. Implemented SetWindowPos() and MapWindowPoints(). Jan 3, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte) * [if1632/user.spec] Bad arguments description for function SetDlgItemText. * [objects/text.c] Function DrawText now handle DT_CALCRECT request. * [misc/message.c] Message boxes now use DrawText with DT_CALCRECT. * [windows/graphics.c] Bug fix in function FrameRect, (it was using PEN instead of BRUSH). * [windows/win.c] Bug fix for flags in function ShowWindow. More accurate WM_SIZE generated by function ShowWindow. * [controls/listbox.c] More code for LBS_MULTIPLESEL. More code for LBS_MULTICOLUMN. * [include/windows.h] Bad define for MF_SEPARATOR. * [controls/menu.c] New functions: PopMenuWndProc() with 'glues', CreatePopupMenu(), AppendMenu(), InsertMenu(), RemoveMenu(), DeleteMenu(), ModifyMenu(), TrackPopupMenu(). Code in stubs: CreateMenu(), DestroyMenu(). Sat Jan 1 10:22:43 1994 Bob Amstadt (bob@pooh) * loader/wine.c: Added support for relocation types 5 and 6. Mon Dec 27 11:06:03 1993 Erik Bos (erik@trashcan.hacktic.nl) * [misc/comm.c] new functions: BuildCommDCB(), OpenComm(), CloseComm(), SetCommBreak(), ClearCommBreak(), EscapeCommFunction(), FlushComm(), GetCommError(), SetCommEventMask(), GetCommEventMask(), SetCommState(), GetCommState(), TransmitCommChar(), ReadComm(), WriteComm(). Wed Dec 22 13:00:15 1993 David Metcalfe <david@prism.demon.co.uk> * [windows/caret.c] Implemented text caret functions. Tue Dec 21 06:13:58 1993 julliard@di.epfl.ch (Alexandre Julliard) * [loader/wine.c] Bug fix in LoadImage(). * [objects/bitblt.c] [objects/clipping.c] [objects/text.c] [windows/dc.c] [windows/dce.c] [windows/graphics.c] Modified graphics calls to take into account the DC origin. * [windows/defwnd.c] Added preliminary WM_NCCALCSIZE handling. * [windows/event.c] Send WM_NCCALCSIZE message on resize event. * [windows/win.c] Send WM_NCCALCSIZE message in CreateWindow(). Realize widgets at creation time (should prevent problems with unrealized widgets). Dec 19, 93 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte) * [controls/static.c] Send mouse & keyboard message received to its parent. * [controls/scroll.c] Send keyboard message received to its parent. * [controls/listbox.c] Add Navigation keys . ListBox now use VSCROLL & HSCROLL instead of children. Alpha version of LBS_MULTIPLESEL. Alpha version of LBS_MULTICOLUMN. * [controls/combo.c] Add Navigation keys on closed ComboBox. Remove useless 'COMBOBOX_CreateComboBox' function. Mon Dec 19 20:39:34 1993 Erik Bos (erik@trashcan.hacktic.nl) * [loader/wine. LoadImage() modified to use FindFile(). * [misc/file.c] SetErrorMode added * [misc/dos_fs.c] bug fixes. Dec 13, 93 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte) * [memory/global.c] bug fix in GlobalGetFreeSegment : good ptr in 'g_prev'. * [sysres.dll] preliminary version of a 'glass of wine' bitmap * [windows/event.c] New function 'GetCapture'. * [controls/scroll.c] Remove useless 'SCROLLBAR_CreateScrollBar' function. * [controls/listbox.c] Remove useless 'LISTBOX_CreateListBox' function. Mon Dec 13 13:51:00 1993 David Metcalfe <david@prism.demon.co.uk> * [objects/font.c] Corrected bugs in GetCharWidth(). * [windows/event.c] Modified EVENT_key to send Windows virtual key codes for WM_KEYDOWN and WM_KEYUP messages, and a WM_CHAR message for printable characters. Wed Dec 08 19:20:00 1993 Karl Guenter Wuensch (hn324wu@unidui.uni-duisburg.de) * [windows/graphics.c] Added Polyline and Polygon Mon Dec 13 14:51:54 1993 Erik Bos (erik@trashcan.hacktic.nl) * [controls/listbox.c] ListBoxDirectory() modified to use dos_fs.c's functions to access files&|drives. Sat Dec 04 17:04:23 1993 Erik Bos (erik@trashcan.hacktic.nl) * [misc/dos_fs.c] Added FindFile() to search a file in a dos/unix style path. * [misc/file.c] New Win31 functions: OpenFile, _lcreate, _llseek, GetTempDrive, GetTempFileName, GetWindowsDirectory, GetSystemDirectory, GetDriveType. * [misc/int21.c] Modified. Wed Dec 1 16:20:45 1993 Miguel de Icaza (miguel@roxanne.nuclecu.unam.mx) * [misc/profile.c] The Profile functions now return the correct values. They now implement all the features described in the SDK. Tue Nov 30 13:55:27 1993 Bob Amstadt (bob at amscons) * [loader/selector.c] Rewrote selector aliasing routines to use System V IPC routine to alias memory segments. Nov 28, 93 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte) * [controls/listbox.c] More consistency in functions using wIndexes * [controls/scroll.c] New function : ShowScrollBar(). * [loader/cursor.c] ... New file Move cursor functions from [loader/resource.c]. New function : ClipCursor(). New function : GetClipCursor(). New function : CreateCursor(). SetCursor() now working using gloabal variable 'winHasCursor'. *[object/palette.c] New stub only : SelectPalette(). New stub only : RealizePalette(). *[win/event.c] New function : EVENT_enter_notify(), update 'winHasCursor' and send WM_SETCURSOR. *[win/defwnd.c] Add processing of WM_SETCURSOR message. *[win/win.c] New members in WND structure : hCursor, hWndVScroll & hWndHScroll. CreateWindowEx() now create children for WM_HSCROLL & WM_VSCROLL. New function ClientToScreen(). New function ScreenToClient(). Mon Nov 25 18:25:40 1993 Erik Bos (erik@trashcan.hacktic.nl) * [files.h / regfunc.h / misc/dos.c] Removed. * [misc/dos_fs.c] Added support for loading dosdrive cfg from wine.ini. * [misc/int21.c] Modified. Wed Nov 24 11:37:33 1993 julliard@disuns2.epfl.ch (Alexandre Julliard) * [include/atom.h] [memory/atom.c] Implemented atoms. * [windows/class.c] Modified RegisterClass() to use atoms. Implemented CS_GLOBALCLASS style. * [windows/message.c] Implemented RegisterWindowMessage(). * [loader/resource.c] Bug fix in LoadResource(). * [windows/dialog.c] Modified CreateDialogParam() to use Find/LoadResource().
1994-01-04 21:14:34 +01:00
#include <stdlib.h>
#include <stdarg.h>
#include <stdio.h>
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#include "windef.h"
#include "winbase.h"
#include "winerror.h"
#include "winioctl.h"
#include "ddk/ntddser.h"
#include "wine/server.h"
#include "wine/unicode.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(comm);
/***********************************************************************
* COMM_Parse* (Internal)
*
* The following COMM_Parse* functions are used by the BuildCommDCB
* functions to help parse the various parts of the device control string.
*/
static LPCWSTR COMM_ParseStart(LPCWSTR ptr)
{
static const WCHAR comW[] = {'C','O','M',0};
/* The device control string may optionally start with "COMx" followed
by an optional ':' and spaces. */
if(!strncmpiW(ptr, comW, 3))
{
ptr += 3;
/* Allow any com port above 0 as Win 9x does (NT only allows
values for com ports which are actually present) */
if(*ptr < '1' || *ptr > '9')
return NULL;
/* Advance pointer past port number */
while(*ptr >= '0' && *ptr <= '9') ptr++;
/* The com port number must be followed by a ':' or ' ' */
if(*ptr != ':' && *ptr != ' ')
return NULL;
/* Advance pointer to beginning of next parameter */
while(*ptr == ' ') ptr++;
if(*ptr == ':')
{
ptr++;
while(*ptr == ' ') ptr++;
}
}
/* The device control string must not start with a space. */
else if(*ptr == ' ')
return NULL;
return ptr;
}
static LPCWSTR COMM_ParseNumber(LPCWSTR ptr, LPDWORD lpnumber)
{
if(*ptr < '0' || *ptr > '9') return NULL;
*lpnumber = strtoulW(ptr, NULL, 10);
while(*ptr >= '0' && *ptr <= '9') ptr++;
return ptr;
}
static LPCWSTR COMM_ParseParity(LPCWSTR ptr, LPBYTE lpparity)
{
/* Contrary to what you might expect, Windows only sets the Parity
member of DCB and not fParity even when parity is specified in the
device control string */
switch(toupperW(*ptr++))
{
case 'E':
*lpparity = EVENPARITY;
break;
case 'M':
*lpparity = MARKPARITY;
break;
case 'N':
*lpparity = NOPARITY;
break;
case 'O':
*lpparity = ODDPARITY;
break;
case 'S':
*lpparity = SPACEPARITY;
break;
default:
return NULL;
}
return ptr;
}
static LPCWSTR COMM_ParseByteSize(LPCWSTR ptr, LPBYTE lpbytesize)
{
DWORD temp;
if(!(ptr = COMM_ParseNumber(ptr, &temp)))
return NULL;
if(temp >= 5 && temp <= 8)
{
*lpbytesize = temp;
return ptr;
}
else
return NULL;
}
static LPCWSTR COMM_ParseStopBits(LPCWSTR ptr, LPBYTE lpstopbits)
{
DWORD temp;
static const WCHAR stopbits15W[] = {'1','.','5',0};
if(!strncmpW(stopbits15W, ptr, 3))
{
ptr += 3;
*lpstopbits = ONE5STOPBITS;
}
else
{
if(!(ptr = COMM_ParseNumber(ptr, &temp)))
return NULL;
if(temp == 1)
*lpstopbits = ONESTOPBIT;
else if(temp == 2)
*lpstopbits = TWOSTOPBITS;
else
return NULL;
}
return ptr;
}
static LPCWSTR COMM_ParseOnOff(LPCWSTR ptr, LPDWORD lponoff)
{
static const WCHAR onW[] = {'o','n',0};
static const WCHAR offW[] = {'o','f','f',0};
if(!strncmpiW(onW, ptr, 2))
{
ptr += 2;
*lponoff = 1;
}
else if(!strncmpiW(offW, ptr, 3))
{
ptr += 3;
*lponoff = 0;
}
else
return NULL;
return ptr;
}
/***********************************************************************
* COMM_BuildOldCommDCB (Internal)
*
* Build a DCB using the old style settings string eg: "96,n,8,1"
*/
static BOOL COMM_BuildOldCommDCB(LPCWSTR device, LPDCB lpdcb)
{
WCHAR last = 0;
if(!(device = COMM_ParseNumber(device, &lpdcb->BaudRate)))
return FALSE;
switch(lpdcb->BaudRate)
{
case 11:
case 30:
case 60:
lpdcb->BaudRate *= 10;
break;
case 12:
case 24:
case 48:
case 96:
lpdcb->BaudRate *= 100;
break;
case 19:
lpdcb->BaudRate = 19200;
break;
}
2002-06-01 01:06:46 +02:00
while(*device == ' ') device++;
if(*device++ != ',') return FALSE;
while(*device == ' ') device++;
if(!(device = COMM_ParseParity(device, &lpdcb->Parity)))
return FALSE;
while(*device == ' ') device++;
if(*device++ != ',') return FALSE;
while(*device == ' ') device++;
if(!(device = COMM_ParseByteSize(device, &lpdcb->ByteSize)))
return FALSE;
while(*device == ' ') device++;
if(*device++ != ',') return FALSE;
while(*device == ' ') device++;
if(!(device = COMM_ParseStopBits(device, &lpdcb->StopBits)))
return FALSE;
/* The last parameter for flow control is optional. */
while(*device == ' ') device++;
if(*device == ',')
{
device++;
while(*device == ' ') device++;
if(*device) last = toupperW(*device++);
while(*device == ' ') device++;
}
/* Win NT sets the flow control members based on (or lack of) the last
parameter. Win 9x does not set these members. */
switch(last)
{
case 0:
lpdcb->fInX = FALSE;
lpdcb->fOutX = FALSE;
lpdcb->fOutxCtsFlow = FALSE;
lpdcb->fOutxDsrFlow = FALSE;
lpdcb->fDtrControl = DTR_CONTROL_ENABLE;
lpdcb->fRtsControl = RTS_CONTROL_ENABLE;
2002-06-01 01:06:46 +02:00
break;
case 'X':
lpdcb->fInX = TRUE;
lpdcb->fOutX = TRUE;
lpdcb->fOutxCtsFlow = FALSE;
lpdcb->fOutxDsrFlow = FALSE;
lpdcb->fDtrControl = DTR_CONTROL_ENABLE;
lpdcb->fRtsControl = RTS_CONTROL_ENABLE;
2002-06-01 01:06:46 +02:00
break;
case 'P':
lpdcb->fInX = FALSE;
lpdcb->fOutX = FALSE;
lpdcb->fOutxCtsFlow = TRUE;
lpdcb->fOutxDsrFlow = TRUE;
lpdcb->fDtrControl = DTR_CONTROL_HANDSHAKE;
lpdcb->fRtsControl = RTS_CONTROL_HANDSHAKE;
2002-06-01 01:06:46 +02:00
break;
default:
return FALSE;
}
/* This should be the end of the string. */
if(*device) return FALSE;
return TRUE;
}
/***********************************************************************
* COMM_BuildNewCommDCB (Internal)
*
* Build a DCB using the new style settings string.
* eg: "baud=9600 parity=n data=8 stop=1 xon=on to=on"
*/
static BOOL COMM_BuildNewCommDCB(LPCWSTR device, LPDCB lpdcb, LPCOMMTIMEOUTS lptimeouts)
{
DWORD temp;
BOOL baud = FALSE, stop = FALSE;
static const WCHAR baudW[] = {'b','a','u','d','=',0};
static const WCHAR parityW[] = {'p','a','r','i','t','y','=',0};
static const WCHAR dataW[] = {'d','a','t','a','=',0};
static const WCHAR stopW[] = {'s','t','o','p','=',0};
static const WCHAR toW[] = {'t','o','=',0};
static const WCHAR xonW[] = {'x','o','n','=',0};
static const WCHAR odsrW[] = {'o','d','s','r','=',0};
static const WCHAR octsW[] = {'o','c','t','s','=',0};
static const WCHAR dtrW[] = {'d','t','r','=',0};
static const WCHAR rtsW[] = {'r','t','s','=',0};
static const WCHAR idsrW[] = {'i','d','s','r','=',0};
while(*device)
{
while(*device == ' ') device++;
if(!strncmpiW(baudW, device, 5))
{
baud = TRUE;
if(!(device = COMM_ParseNumber(device + 5, &lpdcb->BaudRate)))
return FALSE;
}
else if(!strncmpiW(parityW, device, 7))
{
if(!(device = COMM_ParseParity(device + 7, &lpdcb->Parity)))
return FALSE;
}
else if(!strncmpiW(dataW, device, 5))
{
if(!(device = COMM_ParseByteSize(device + 5, &lpdcb->ByteSize)))
return FALSE;
}
else if(!strncmpiW(stopW, device, 5))
{
stop = TRUE;
if(!(device = COMM_ParseStopBits(device + 5, &lpdcb->StopBits)))
return FALSE;
}
else if(!strncmpiW(toW, device, 3))
{
if(!(device = COMM_ParseOnOff(device + 3, &temp)))
return FALSE;
lptimeouts->ReadIntervalTimeout = 0;
lptimeouts->ReadTotalTimeoutMultiplier = 0;
lptimeouts->ReadTotalTimeoutConstant = 0;
lptimeouts->WriteTotalTimeoutMultiplier = 0;
lptimeouts->WriteTotalTimeoutConstant = temp ? 60000 : 0;
}
else if(!strncmpiW(xonW, device, 4))
{
if(!(device = COMM_ParseOnOff(device + 4, &temp)))
return FALSE;
lpdcb->fOutX = temp;
lpdcb->fInX = temp;
}
else if(!strncmpiW(odsrW, device, 5))
{
if(!(device = COMM_ParseOnOff(device + 5, &temp)))
return FALSE;
lpdcb->fOutxDsrFlow = temp;
}
else if(!strncmpiW(octsW, device, 5))
{
if(!(device = COMM_ParseOnOff(device + 5, &temp)))
return FALSE;
lpdcb->fOutxCtsFlow = temp;
}
else if(!strncmpiW(dtrW, device, 4))
{
if(!(device = COMM_ParseOnOff(device + 4, &temp)))
return FALSE;
lpdcb->fDtrControl = temp;
}
else if(!strncmpiW(rtsW, device, 4))
{
if(!(device = COMM_ParseOnOff(device + 4, &temp)))
return FALSE;
lpdcb->fRtsControl = temp;
}
else if(!strncmpiW(idsrW, device, 5))
{
if(!(device = COMM_ParseOnOff(device + 5, &temp)))
return FALSE;
/* Win NT sets the fDsrSensitivity member based on the
idsr parameter. Win 9x sets fOutxDsrFlow instead. */
lpdcb->fDsrSensitivity = temp;
}
else
return FALSE;
/* After the above parsing, the next character (if not the end of
the string) should be a space */
if(*device && *device != ' ')
return FALSE;
2002-06-01 01:06:46 +02:00
}
/* If stop bits were not specified, a default is always supplied. */
if(!stop)
{
if(baud && lpdcb->BaudRate == 110)
lpdcb->StopBits = TWOSTOPBITS;
else
lpdcb->StopBits = ONESTOPBIT;
}
return TRUE;
}
/**************************************************************************
* BuildCommDCBA (KERNEL32.@)
2000-12-20 00:33:03 +01:00
*
* Updates a device control block data structure with values from an
* ascii device control string. The device control string has two forms
* normal and extended, it must be exclusively in one or the other form.
*
* RETURNS
*
2002-02-27 22:34:54 +01:00
* True on success, false on a malformed control string.
*/
2000-12-20 00:33:03 +01:00
BOOL WINAPI BuildCommDCBA(
2001-02-12 04:49:57 +01:00
LPCSTR device, /* [in] The ascii device control string used to update the DCB. */
LPDCB lpdcb) /* [out] The device control block to be updated. */
{
return BuildCommDCBAndTimeoutsA(device,lpdcb,NULL);
}
/**************************************************************************
* BuildCommDCBAndTimeoutsA (KERNEL32.@)
2000-12-20 00:33:03 +01:00
*
* Updates a device control block data structure with values from an
2002-02-27 22:34:54 +01:00
* ascii device control string. Taking timeout values from a timeouts
2000-12-20 00:33:03 +01:00
* struct if desired by the control string.
*
* RETURNS
*
* True on success, false bad handles etc.
*/
2000-12-20 00:33:03 +01:00
BOOL WINAPI BuildCommDCBAndTimeoutsA(
2001-02-12 04:49:57 +01:00
LPCSTR device, /* [in] The ascii device control string. */
LPDCB lpdcb, /* [out] The device control block to be updated. */
LPCOMMTIMEOUTS lptimeouts) /* [in] The COMMTIMEOUTS structure to be updated. */
{
BOOL ret = FALSE;
UNICODE_STRING deviceW;
TRACE("(%s,%p,%p)\n",device,lpdcb,lptimeouts);
if(device) RtlCreateUnicodeStringFromAsciiz(&deviceW,device);
else deviceW.Buffer = NULL;
if(deviceW.Buffer) ret = BuildCommDCBAndTimeoutsW(deviceW.Buffer,lpdcb,lptimeouts);
RtlFreeUnicodeString(&deviceW);
return ret;
}
/**************************************************************************
* BuildCommDCBAndTimeoutsW (KERNEL32.@)
*
* Updates a device control block data structure with values from a
* unicode device control string. Taking timeout values from a timeouts
* struct if desired by the control string.
*
* RETURNS
*
* True on success, false bad handles etc
*/
BOOL WINAPI BuildCommDCBAndTimeoutsW(
LPCWSTR devid, /* [in] The unicode device control string. */
LPDCB lpdcb, /* [out] The device control block to be updated. */
LPCOMMTIMEOUTS lptimeouts) /* [in] The COMMTIMEOUTS structure to be updated. */
{
DCB dcb;
COMMTIMEOUTS timeouts;
BOOL result;
LPCWSTR ptr = devid;
TRACE("(%s,%p,%p)\n",debugstr_w(devid),lpdcb,lptimeouts);
memset(&timeouts, 0, sizeof timeouts);
/* Set DCBlength. (Windows NT does not do this, but 9x does) */
lpdcb->DCBlength = sizeof(DCB);
/* Make a copy of the original data structures to work with since if
if there is an error in the device control string the originals
should not be modified (except possibly DCBlength) */
dcb = *lpdcb;
if(lptimeouts) timeouts = *lptimeouts;
ptr = COMM_ParseStart(ptr);
if(ptr == NULL)
result = FALSE;
else if(strchrW(ptr, ','))
result = COMM_BuildOldCommDCB(ptr, &dcb);
else
result = COMM_BuildNewCommDCB(ptr, &dcb, &timeouts);
if(result)
{
*lpdcb = dcb;
if(lptimeouts) *lptimeouts = timeouts;
return TRUE;
}
else
{
WARN("Invalid device control string: %s\n", debugstr_w(devid));
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
}
/**************************************************************************
* BuildCommDCBW (KERNEL32.@)
2000-12-20 00:33:03 +01:00
*
* Updates a device control block structure with values from an
* unicode device control string. The device control string has two forms
* normal and extended, it must be exclusively in one or the other form.
*
* RETURNS
*
2005-03-30 19:08:31 +02:00
* True on success, false on a malformed control string.
*/
2000-12-20 00:33:03 +01:00
BOOL WINAPI BuildCommDCBW(
2001-02-12 04:49:57 +01:00
LPCWSTR devid, /* [in] The unicode device control string. */
LPDCB lpdcb) /* [out] The device control block to be updated. */
{
return BuildCommDCBAndTimeoutsW(devid,lpdcb,NULL);
}
/*****************************************************************************
* SetCommBreak (KERNEL32.@)
2000-12-20 00:33:03 +01:00
*
* Halts the transmission of characters to a communications device.
*
* PARAMS
* handle [in] The communications device to suspend
*
2000-12-20 00:33:03 +01:00
* RETURNS
*
* True on success, and false if the communications device could not be found,
* the control is not supported.
*
* BUGS
*
2002-06-01 01:06:46 +02:00
* Only TIOCSBRK and TIOCCBRK are supported.
*/
BOOL WINAPI SetCommBreak(HANDLE handle)
{
return DeviceIoControl(handle, IOCTL_SERIAL_SET_BREAK_ON, NULL, 0, NULL, 0, NULL, NULL);
}
/*****************************************************************************
* ClearCommBreak (KERNEL32.@)
2000-12-20 00:33:03 +01:00
*
* Resumes character transmission from a communication device.
*
* PARAMS
*
* handle [in] The halted communication device whose character transmission is to be resumed
*
2000-12-20 00:33:03 +01:00
* RETURNS
*
* True on success and false if the communications device could not be found.
*
* BUGS
*
2002-06-01 01:06:46 +02:00
* Only TIOCSBRK and TIOCCBRK are supported.
*/
BOOL WINAPI ClearCommBreak(HANDLE handle)
{
return DeviceIoControl(handle, IOCTL_SERIAL_SET_BREAK_OFF, NULL, 0, NULL, 0, NULL, NULL);
}
/*****************************************************************************
* EscapeCommFunction (KERNEL32.@)
2000-12-20 00:33:03 +01:00
*
* Directs a communication device to perform an extended function.
*
* PARAMS
*
* handle [in] The communication device to perform the extended function
* nFunction [in] The extended function to be performed
*
2000-12-20 00:33:03 +01:00
* RETURNS
*
* True or requested data on successful completion of the command,
* false if the device is not present cannot execute the command
* or the command failed.
*/
BOOL WINAPI EscapeCommFunction(HANDLE handle, UINT func)
{
DWORD ioc;
switch (func)
{
case CLRDTR: ioc = IOCTL_SERIAL_CLR_DTR; break;
case CLRRTS: ioc = IOCTL_SERIAL_CLR_RTS; break;
case SETDTR: ioc = IOCTL_SERIAL_SET_DTR; break;
case SETRTS: ioc = IOCTL_SERIAL_SET_RTS; break;
case SETXOFF: ioc = IOCTL_SERIAL_SET_XOFF; break;
case SETXON: ioc = IOCTL_SERIAL_SET_XON; break;
case SETBREAK: ioc = IOCTL_SERIAL_SET_BREAK_ON; break;
case CLRBREAK: ioc = IOCTL_SERIAL_SET_BREAK_OFF; break;
case RESETDEV: ioc = IOCTL_SERIAL_RESET_DEVICE; break;
default:
ERR("Unknown function code (%u)\n", func);
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
return DeviceIoControl(handle, ioc, NULL, 0, NULL, 0, NULL, NULL);
}
/********************************************************************
* PurgeComm (KERNEL32.@)
2000-12-20 00:33:03 +01:00
*
* Terminates pending operations and/or discards buffers on a
* communication resource.
*
* PARAMS
*
* handle [in] The communication resource to be purged
* flags [in] Flags for clear pending/buffer on input/output
*
2000-12-20 00:33:03 +01:00
* RETURNS
*
* True on success and false if the communications handle is bad.
*/
BOOL WINAPI PurgeComm(HANDLE handle, DWORD flags)
{
return DeviceIoControl(handle, IOCTL_SERIAL_PURGE, &flags, sizeof(flags),
NULL, 0, NULL, NULL);
}
/*****************************************************************************
* ClearCommError (KERNEL32.@)
2000-12-20 00:33:03 +01:00
*
* Enables further I/O operations on a communications resource after
* supplying error and current status information.
*
* PARAMS
*
* handle [in] The communication resource with the error
* errors [out] Flags indicating error the resource experienced
* lpStat [out] The status of the communication resource
2000-12-20 00:33:03 +01:00
* RETURNS
*
* True on success, false if the communication resource handle is bad.
*/
BOOL WINAPI ClearCommError(HANDLE handle, LPDWORD errors, LPCOMSTAT lpStat)
{
SERIAL_STATUS ss;
if (!DeviceIoControl(handle, IOCTL_SERIAL_GET_COMMSTATUS, NULL, 0,
&ss, sizeof(ss), NULL, NULL))
return FALSE;
if (errors)
{
*errors = 0;
if (ss.Errors & SERIAL_ERROR_BREAK) *errors |= CE_BREAK;
if (ss.Errors & SERIAL_ERROR_FRAMING) *errors |= CE_FRAME;
if (ss.Errors & SERIAL_ERROR_OVERRUN) *errors |= CE_OVERRUN;
if (ss.Errors & SERIAL_ERROR_QUEUEOVERRUN) *errors |= CE_RXOVER;
if (ss.Errors & SERIAL_ERROR_PARITY) *errors |= CE_RXPARITY;
}
2002-06-01 01:06:46 +02:00
if (lpStat)
{
memset(lpStat, 0, sizeof(*lpStat));
if (ss.HoldReasons & SERIAL_TX_WAITING_FOR_CTS) lpStat->fCtsHold = TRUE;
if (ss.HoldReasons & SERIAL_TX_WAITING_FOR_DSR) lpStat->fDsrHold = TRUE;
if (ss.HoldReasons & SERIAL_TX_WAITING_FOR_DCD) lpStat->fRlsdHold = TRUE;
if (ss.HoldReasons & SERIAL_TX_WAITING_FOR_XON) lpStat->fXoffHold = TRUE;
if (ss.HoldReasons & SERIAL_TX_WAITING_XOFF_SENT) lpStat->fXoffSent = TRUE;
if (ss.EofReceived) lpStat->fEof = TRUE;
if (ss.WaitForImmediate) lpStat->fTxim = TRUE;
lpStat->cbInQue = ss.AmountInInQueue;
lpStat->cbOutQue = ss.AmountInOutQueue;
}
return TRUE;
}
/*****************************************************************************
* SetupComm (KERNEL32.@)
2000-12-20 00:33:03 +01:00
*
* Called after CreateFile to hint to the communication resource to use
* specified sizes for input and output buffers rather than the default values.
*
* PARAMS
* handle [in] The just created communication resource handle
* insize [in] The suggested size of the communication resources input buffer in bytes
* outsize [in] The suggested size of the communication resources output buffer in bytes
*
2000-12-20 00:33:03 +01:00
* RETURNS
*
* True if successful, false if the communications resource handle is bad.
*
* BUGS
*
* Stub.
*/
BOOL WINAPI SetupComm(HANDLE handle, DWORD insize, DWORD outsize)
{
SERIAL_QUEUE_SIZE sqs;
sqs.InSize = insize;
sqs.OutSize = outsize;
return DeviceIoControl(handle, IOCTL_SERIAL_SET_QUEUE_SIZE,
&sqs, sizeof(sqs), NULL, 0, NULL, NULL);
2002-06-01 01:06:46 +02:00
}
/*****************************************************************************
* GetCommMask (KERNEL32.@)
2000-12-20 00:33:03 +01:00
*
2002-02-27 22:34:54 +01:00
* Obtain the events associated with a communication device that will cause
* a call WaitCommEvent to return.
2000-12-20 00:33:03 +01:00
*
* PARAMS
*
* handle [in] The communications device
* evtmask [out] The events which cause WaitCommEvent to return
*
2000-12-20 00:33:03 +01:00
* RETURNS
*
* True on success, fail on bad device handle etc.
*/
BOOL WINAPI GetCommMask(HANDLE handle, LPDWORD evtmask)
{
2002-10-25 23:02:30 +02:00
TRACE("handle %p, mask %p\n", handle, evtmask);
return DeviceIoControl(handle, IOCTL_SERIAL_GET_WAIT_MASK,
NULL, 0, evtmask, sizeof(*evtmask), NULL, NULL);
}
/*****************************************************************************
* SetCommMask (KERNEL32.@)
2000-12-20 00:33:03 +01:00
*
* There be some things we need to hear about yon there communications device.
* (Set which events associated with a communication device should cause
* a call WaitCommEvent to return.)
*
* PARAMS
*
* handle [in] The communications device
* evtmask [in] The events that are to be monitored
*
2000-12-20 00:33:03 +01:00
* RETURNS
*
* True on success, false on bad handle etc.
*/
BOOL WINAPI SetCommMask(HANDLE handle, DWORD evtmask)
{
TRACE("handle %p, mask %x\n", handle, evtmask);
return DeviceIoControl(handle, IOCTL_SERIAL_SET_WAIT_MASK,
&evtmask, sizeof(evtmask), NULL, 0, NULL, NULL);
Release 0.5 Sun Jan 2 12:38:53 1994 David Metcalfe <david@prism.demon.co.uk> * [windows/class.c] Implemented GetClassName and GetClassInfo. * [windows/caret.c] Various improvements to text caret code. Fri Dec 31 15:22:22 1993 John Brezak <brezak@apollo.hp.com> * [misc/comm.c] Patches to work with NetBSD. Thu Dec 30 12:11:55 1993 John Richardson <jrichard@cs.uml.edu> * [objects/bitblt.c] Added StretchBlt(). Tue Jan 4 05:22:07 1994 julliard@di.epfl.ch (Alexandre Julliard) * [misc/user.c] Added creation of system message queue. * [objects/bitmap.c] [objects/dcvalues.c] [windows/dc.c] Added DC size fields into DC structure. * [objects/clipping.c] Bug fix in CLIPPING_IntersectRect(). * [windows/class.c] Allocate a DCE instead of a DC for CS_CLASSDC classes. * [windows/clipping.c] Fixed GetUpdateRect() and GetUpdateRgn() to clip to the client area. * [windows/dce.c] Implemented GetDCEx() and GetWindowDC(). * [windows/defwnd.c] Implemented WM_WINDOWPOSCHANGED handling. * [windows/event.c] Preliminary support for Xlib event handling instead of Xt callbacks. Changed MSG_AddMsg() calls to hardware_event() or PostMessage(). * [windows/message.c] Preliminary support for multiple message queues. Implemented hardware_event() to store messages into the system queue. Implemented Get/SetTaskQueue(). Better WM_PAINT and WM_TIMER handling. Changes to use Xlib instead of Xt for events. * [windows/painting.c] Use GetDCEx() to retrieve the DC, to get a correct visible region. * [windows/timer.c] Moved the timer procedure callback into DispatchMessage(). Changed implementation to get rid of Xt timeouts. Timer checking is now done inside GetMessage(). * [windows/win.c] Allocate a DCE instead of a DC for CS_OWNDC windows. Replaced Xt calls with Xlib calls. Moved window positioning functions into windows/winpos.c * [windows/winpos.c] (New file) Rewritten most of the window positioning functions. Implemented SetWindowPos() and MapWindowPoints(). Jan 3, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte) * [if1632/user.spec] Bad arguments description for function SetDlgItemText. * [objects/text.c] Function DrawText now handle DT_CALCRECT request. * [misc/message.c] Message boxes now use DrawText with DT_CALCRECT. * [windows/graphics.c] Bug fix in function FrameRect, (it was using PEN instead of BRUSH). * [windows/win.c] Bug fix for flags in function ShowWindow. More accurate WM_SIZE generated by function ShowWindow. * [controls/listbox.c] More code for LBS_MULTIPLESEL. More code for LBS_MULTICOLUMN. * [include/windows.h] Bad define for MF_SEPARATOR. * [controls/menu.c] New functions: PopMenuWndProc() with 'glues', CreatePopupMenu(), AppendMenu(), InsertMenu(), RemoveMenu(), DeleteMenu(), ModifyMenu(), TrackPopupMenu(). Code in stubs: CreateMenu(), DestroyMenu(). Sat Jan 1 10:22:43 1994 Bob Amstadt (bob@pooh) * loader/wine.c: Added support for relocation types 5 and 6. Mon Dec 27 11:06:03 1993 Erik Bos (erik@trashcan.hacktic.nl) * [misc/comm.c] new functions: BuildCommDCB(), OpenComm(), CloseComm(), SetCommBreak(), ClearCommBreak(), EscapeCommFunction(), FlushComm(), GetCommError(), SetCommEventMask(), GetCommEventMask(), SetCommState(), GetCommState(), TransmitCommChar(), ReadComm(), WriteComm(). Wed Dec 22 13:00:15 1993 David Metcalfe <david@prism.demon.co.uk> * [windows/caret.c] Implemented text caret functions. Tue Dec 21 06:13:58 1993 julliard@di.epfl.ch (Alexandre Julliard) * [loader/wine.c] Bug fix in LoadImage(). * [objects/bitblt.c] [objects/clipping.c] [objects/text.c] [windows/dc.c] [windows/dce.c] [windows/graphics.c] Modified graphics calls to take into account the DC origin. * [windows/defwnd.c] Added preliminary WM_NCCALCSIZE handling. * [windows/event.c] Send WM_NCCALCSIZE message on resize event. * [windows/win.c] Send WM_NCCALCSIZE message in CreateWindow(). Realize widgets at creation time (should prevent problems with unrealized widgets). Dec 19, 93 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte) * [controls/static.c] Send mouse & keyboard message received to its parent. * [controls/scroll.c] Send keyboard message received to its parent. * [controls/listbox.c] Add Navigation keys . ListBox now use VSCROLL & HSCROLL instead of children. Alpha version of LBS_MULTIPLESEL. Alpha version of LBS_MULTICOLUMN. * [controls/combo.c] Add Navigation keys on closed ComboBox. Remove useless 'COMBOBOX_CreateComboBox' function. Mon Dec 19 20:39:34 1993 Erik Bos (erik@trashcan.hacktic.nl) * [loader/wine. LoadImage() modified to use FindFile(). * [misc/file.c] SetErrorMode added * [misc/dos_fs.c] bug fixes. Dec 13, 93 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte) * [memory/global.c] bug fix in GlobalGetFreeSegment : good ptr in 'g_prev'. * [sysres.dll] preliminary version of a 'glass of wine' bitmap * [windows/event.c] New function 'GetCapture'. * [controls/scroll.c] Remove useless 'SCROLLBAR_CreateScrollBar' function. * [controls/listbox.c] Remove useless 'LISTBOX_CreateListBox' function. Mon Dec 13 13:51:00 1993 David Metcalfe <david@prism.demon.co.uk> * [objects/font.c] Corrected bugs in GetCharWidth(). * [windows/event.c] Modified EVENT_key to send Windows virtual key codes for WM_KEYDOWN and WM_KEYUP messages, and a WM_CHAR message for printable characters. Wed Dec 08 19:20:00 1993 Karl Guenter Wuensch (hn324wu@unidui.uni-duisburg.de) * [windows/graphics.c] Added Polyline and Polygon Mon Dec 13 14:51:54 1993 Erik Bos (erik@trashcan.hacktic.nl) * [controls/listbox.c] ListBoxDirectory() modified to use dos_fs.c's functions to access files&|drives. Sat Dec 04 17:04:23 1993 Erik Bos (erik@trashcan.hacktic.nl) * [misc/dos_fs.c] Added FindFile() to search a file in a dos/unix style path. * [misc/file.c] New Win31 functions: OpenFile, _lcreate, _llseek, GetTempDrive, GetTempFileName, GetWindowsDirectory, GetSystemDirectory, GetDriveType. * [misc/int21.c] Modified. Wed Dec 1 16:20:45 1993 Miguel de Icaza (miguel@roxanne.nuclecu.unam.mx) * [misc/profile.c] The Profile functions now return the correct values. They now implement all the features described in the SDK. Tue Nov 30 13:55:27 1993 Bob Amstadt (bob at amscons) * [loader/selector.c] Rewrote selector aliasing routines to use System V IPC routine to alias memory segments. Nov 28, 93 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte) * [controls/listbox.c] More consistency in functions using wIndexes * [controls/scroll.c] New function : ShowScrollBar(). * [loader/cursor.c] ... New file Move cursor functions from [loader/resource.c]. New function : ClipCursor(). New function : GetClipCursor(). New function : CreateCursor(). SetCursor() now working using gloabal variable 'winHasCursor'. *[object/palette.c] New stub only : SelectPalette(). New stub only : RealizePalette(). *[win/event.c] New function : EVENT_enter_notify(), update 'winHasCursor' and send WM_SETCURSOR. *[win/defwnd.c] Add processing of WM_SETCURSOR message. *[win/win.c] New members in WND structure : hCursor, hWndVScroll & hWndHScroll. CreateWindowEx() now create children for WM_HSCROLL & WM_VSCROLL. New function ClientToScreen(). New function ScreenToClient(). Mon Nov 25 18:25:40 1993 Erik Bos (erik@trashcan.hacktic.nl) * [files.h / regfunc.h / misc/dos.c] Removed. * [misc/dos_fs.c] Added support for loading dosdrive cfg from wine.ini. * [misc/int21.c] Modified. Wed Nov 24 11:37:33 1993 julliard@disuns2.epfl.ch (Alexandre Julliard) * [include/atom.h] [memory/atom.c] Implemented atoms. * [windows/class.c] Modified RegisterClass() to use atoms. Implemented CS_GLOBALCLASS style. * [windows/message.c] Implemented RegisterWindowMessage(). * [loader/resource.c] Bug fix in LoadResource(). * [windows/dialog.c] Modified CreateDialogParam() to use Find/LoadResource().
1994-01-04 21:14:34 +01:00
}
static void dump_dcb(const DCB* lpdcb)
{
TRACE("bytesize=%d baudrate=%d fParity=%d Parity=%d stopbits=%d\n",
lpdcb->ByteSize, lpdcb->BaudRate, lpdcb->fParity, lpdcb->Parity,
(lpdcb->StopBits == ONESTOPBIT) ? 1 :
(lpdcb->StopBits == TWOSTOPBITS) ? 2 : 0);
TRACE("%sIXON %sIXOFF\n", (lpdcb->fInX) ? "" : "~", (lpdcb->fOutX) ? "" : "~");
TRACE("fOutxCtsFlow=%d fRtsControl=%d\n", lpdcb->fOutxCtsFlow, lpdcb->fRtsControl);
TRACE("fOutxDsrFlow=%d fDtrControl=%d\n", lpdcb->fOutxDsrFlow, lpdcb->fDtrControl);
if (lpdcb->fOutxCtsFlow || lpdcb->fRtsControl == RTS_CONTROL_HANDSHAKE)
TRACE("CRTSCTS\n");
else
TRACE("~CRTSCTS\n");
}
Release 960728 Sun Jul 28 17:57:19 1996 Alexandre Julliard <julliard@lrc.epfl.ch> * [loader/task.c] [include/task.h] Implemented SwitchStackTo()/SwitchStackBack(). * [include/wintypes.h] [loader/main.c] Added __winelib variable to distinguish between emulator and library at run-time. Later on, this should avoid some recompilations when building Winelib. * [windows/property.c] Implemented Win32 functions for window properties. Fri Jul 26 18:00:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu> * [controls/listbox.c] Implemented LBS_SORT style, WM_COMPAREITEM, and WM_DELETEITEM messages. * [controls/menu.c] Call TranslateMessage() to enable shortcuts (on WM_CHAR). * [include/cursoricon.h] Moved #pragma pack(1) back to where it belongs. * [objects/palette.c] RealizeDefaultPalette() maps to system colors only. Do not broadcast palette notifications when in TrueColor. * [objects/color.c] [include/palette.h] Miscellaneous optimizations. Had to fix several "improvements" made to my patch for previous release. * [objects/dib.c] Reverse dib bits order for 24-bit SetDIBits(). * [objects/dc.c] GetDeviceCaps() does not return RC_PALETTE when in TrueColor. * [windows/scroll.c] Scroll update region too. * [windows/message.c] Include QS_MOUSE into the event mask for nonclient mouse message filter. Fixes problems with Word 6 freezing when mouse hits nonclient area. * [windows/win.c] Allow top-level windows to be linked as HWND_TOP in CreateWindow(). * [windows/winpos.c] [windows/mdi.c] Attempt to fix control menu duplication. Fri Jul 26 09:49:35 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [files/drive.c] GetDriveType32A(): return value for CDROM fixed. * [files/file.c] SearchPath* added. * [if1632/gdi32.spec] [objects/brush.c] SetBrushOrgEx() added. * [loader/pe_resource.c] If even loading the default entry fails, we just use the first entry from the resource directory. [loader/task.c] SetSigHandler() stub added, Paradox 4.5 now starts up. * [misc/comm.c] [include/windows.h] [if1632/kernel32.spec] COMM functions updated to win32, not complete. * [misc/lstr.c] FormatMessageA partially implemented. * [include/miscemu.h] [memory/selector.c] [memory/global.c] [miscemu/dosmem.c] DOS memory handling changed: 1MB preallocated block, real-mode segment handling possible, SetSelectorBase into lower physical 1MB possible. * [miscemu/dpmi.c] Real-mode segments changed, real-mode int 21,ax=6506 added. AX=0x0303 added. * [multimedia/time.c] Fixed bug in killTimer. * [objects/bitmap.c] LoadImageA partially implemented. Wed Jul 24 18:20:24 1996 Albrecht Kleine <kleine@ak.sax.de> * [include/dde_mem.h][include/dde_proc.h] [ipc/dde_atom.c][ipc/dde_proc.c][windows/message.c] [ipc/generic_hash.h][library/miscstubs.c] Changes for error free compilation using "--with-ipc": replaced some names with *16-equivalent (e.g. MSG to MSG16), modified prototype of function DDE_GlobalFree() . * [objects/palette.c] Added check for metafile-DC in GDISelectPalette(), GDIRealizePalette(),RealizeDefaultPalette() and IsDCCurrentPalette(). Tue Jul 23 22:46:53 1996 Andrew Lewycky <plewycky@oise.utoronto.ca> * [controls/edit.c] EDIT_WM_Create: Don't EDIT_EM_ReplaceSel if created with lParam = "", fixes Winhelp. * [windows/dialog.c] DIALOG_CreateIndirect: Initialise dlgProc before creating children.
1996-07-28 20:50:11 +02:00
/*****************************************************************************
* SetCommState (KERNEL32.@)
2000-12-20 00:33:03 +01:00
*
* Re-initializes all hardware and control settings of a communications device,
2008-04-23 07:13:32 +02:00
* with values from a device control block without affecting the input and output
2000-12-20 00:33:03 +01:00
* queues.
*
* PARAMS
*
* handle [in] The communications device
* lpdcb [out] The device control block
*
2000-12-20 00:33:03 +01:00
* RETURNS
*
2008-04-23 07:13:32 +02:00
* True on success, false on failure, e.g., if the XonChar is equal to the XoffChar.
Release 960728 Sun Jul 28 17:57:19 1996 Alexandre Julliard <julliard@lrc.epfl.ch> * [loader/task.c] [include/task.h] Implemented SwitchStackTo()/SwitchStackBack(). * [include/wintypes.h] [loader/main.c] Added __winelib variable to distinguish between emulator and library at run-time. Later on, this should avoid some recompilations when building Winelib. * [windows/property.c] Implemented Win32 functions for window properties. Fri Jul 26 18:00:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu> * [controls/listbox.c] Implemented LBS_SORT style, WM_COMPAREITEM, and WM_DELETEITEM messages. * [controls/menu.c] Call TranslateMessage() to enable shortcuts (on WM_CHAR). * [include/cursoricon.h] Moved #pragma pack(1) back to where it belongs. * [objects/palette.c] RealizeDefaultPalette() maps to system colors only. Do not broadcast palette notifications when in TrueColor. * [objects/color.c] [include/palette.h] Miscellaneous optimizations. Had to fix several "improvements" made to my patch for previous release. * [objects/dib.c] Reverse dib bits order for 24-bit SetDIBits(). * [objects/dc.c] GetDeviceCaps() does not return RC_PALETTE when in TrueColor. * [windows/scroll.c] Scroll update region too. * [windows/message.c] Include QS_MOUSE into the event mask for nonclient mouse message filter. Fixes problems with Word 6 freezing when mouse hits nonclient area. * [windows/win.c] Allow top-level windows to be linked as HWND_TOP in CreateWindow(). * [windows/winpos.c] [windows/mdi.c] Attempt to fix control menu duplication. Fri Jul 26 09:49:35 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [files/drive.c] GetDriveType32A(): return value for CDROM fixed. * [files/file.c] SearchPath* added. * [if1632/gdi32.spec] [objects/brush.c] SetBrushOrgEx() added. * [loader/pe_resource.c] If even loading the default entry fails, we just use the first entry from the resource directory. [loader/task.c] SetSigHandler() stub added, Paradox 4.5 now starts up. * [misc/comm.c] [include/windows.h] [if1632/kernel32.spec] COMM functions updated to win32, not complete. * [misc/lstr.c] FormatMessageA partially implemented. * [include/miscemu.h] [memory/selector.c] [memory/global.c] [miscemu/dosmem.c] DOS memory handling changed: 1MB preallocated block, real-mode segment handling possible, SetSelectorBase into lower physical 1MB possible. * [miscemu/dpmi.c] Real-mode segments changed, real-mode int 21,ax=6506 added. AX=0x0303 added. * [multimedia/time.c] Fixed bug in killTimer. * [objects/bitmap.c] LoadImageA partially implemented. Wed Jul 24 18:20:24 1996 Albrecht Kleine <kleine@ak.sax.de> * [include/dde_mem.h][include/dde_proc.h] [ipc/dde_atom.c][ipc/dde_proc.c][windows/message.c] [ipc/generic_hash.h][library/miscstubs.c] Changes for error free compilation using "--with-ipc": replaced some names with *16-equivalent (e.g. MSG to MSG16), modified prototype of function DDE_GlobalFree() . * [objects/palette.c] Added check for metafile-DC in GDISelectPalette(), GDIRealizePalette(),RealizeDefaultPalette() and IsDCCurrentPalette(). Tue Jul 23 22:46:53 1996 Andrew Lewycky <plewycky@oise.utoronto.ca> * [controls/edit.c] EDIT_WM_Create: Don't EDIT_EM_ReplaceSel if created with lParam = "", fixes Winhelp. * [windows/dialog.c] DIALOG_CreateIndirect: Initialise dlgProc before creating children.
1996-07-28 20:50:11 +02:00
*/
BOOL WINAPI SetCommState( HANDLE handle, LPDCB lpdcb)
Release 960728 Sun Jul 28 17:57:19 1996 Alexandre Julliard <julliard@lrc.epfl.ch> * [loader/task.c] [include/task.h] Implemented SwitchStackTo()/SwitchStackBack(). * [include/wintypes.h] [loader/main.c] Added __winelib variable to distinguish between emulator and library at run-time. Later on, this should avoid some recompilations when building Winelib. * [windows/property.c] Implemented Win32 functions for window properties. Fri Jul 26 18:00:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu> * [controls/listbox.c] Implemented LBS_SORT style, WM_COMPAREITEM, and WM_DELETEITEM messages. * [controls/menu.c] Call TranslateMessage() to enable shortcuts (on WM_CHAR). * [include/cursoricon.h] Moved #pragma pack(1) back to where it belongs. * [objects/palette.c] RealizeDefaultPalette() maps to system colors only. Do not broadcast palette notifications when in TrueColor. * [objects/color.c] [include/palette.h] Miscellaneous optimizations. Had to fix several "improvements" made to my patch for previous release. * [objects/dib.c] Reverse dib bits order for 24-bit SetDIBits(). * [objects/dc.c] GetDeviceCaps() does not return RC_PALETTE when in TrueColor. * [windows/scroll.c] Scroll update region too. * [windows/message.c] Include QS_MOUSE into the event mask for nonclient mouse message filter. Fixes problems with Word 6 freezing when mouse hits nonclient area. * [windows/win.c] Allow top-level windows to be linked as HWND_TOP in CreateWindow(). * [windows/winpos.c] [windows/mdi.c] Attempt to fix control menu duplication. Fri Jul 26 09:49:35 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [files/drive.c] GetDriveType32A(): return value for CDROM fixed. * [files/file.c] SearchPath* added. * [if1632/gdi32.spec] [objects/brush.c] SetBrushOrgEx() added. * [loader/pe_resource.c] If even loading the default entry fails, we just use the first entry from the resource directory. [loader/task.c] SetSigHandler() stub added, Paradox 4.5 now starts up. * [misc/comm.c] [include/windows.h] [if1632/kernel32.spec] COMM functions updated to win32, not complete. * [misc/lstr.c] FormatMessageA partially implemented. * [include/miscemu.h] [memory/selector.c] [memory/global.c] [miscemu/dosmem.c] DOS memory handling changed: 1MB preallocated block, real-mode segment handling possible, SetSelectorBase into lower physical 1MB possible. * [miscemu/dpmi.c] Real-mode segments changed, real-mode int 21,ax=6506 added. AX=0x0303 added. * [multimedia/time.c] Fixed bug in killTimer. * [objects/bitmap.c] LoadImageA partially implemented. Wed Jul 24 18:20:24 1996 Albrecht Kleine <kleine@ak.sax.de> * [include/dde_mem.h][include/dde_proc.h] [ipc/dde_atom.c][ipc/dde_proc.c][windows/message.c] [ipc/generic_hash.h][library/miscstubs.c] Changes for error free compilation using "--with-ipc": replaced some names with *16-equivalent (e.g. MSG to MSG16), modified prototype of function DDE_GlobalFree() . * [objects/palette.c] Added check for metafile-DC in GDISelectPalette(), GDIRealizePalette(),RealizeDefaultPalette() and IsDCCurrentPalette(). Tue Jul 23 22:46:53 1996 Andrew Lewycky <plewycky@oise.utoronto.ca> * [controls/edit.c] EDIT_WM_Create: Don't EDIT_EM_ReplaceSel if created with lParam = "", fixes Winhelp. * [windows/dialog.c] DIALOG_CreateIndirect: Initialise dlgProc before creating children.
1996-07-28 20:50:11 +02:00
{
SERIAL_BAUD_RATE sbr;
SERIAL_LINE_CONTROL slc;
SERIAL_HANDFLOW shf;
SERIAL_CHARS sc;
if (lpdcb == NULL)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
dump_dcb(lpdcb);
sbr.BaudRate = lpdcb->BaudRate;
slc.StopBits = lpdcb->StopBits;
slc.Parity = lpdcb->Parity;
slc.WordLength = lpdcb->ByteSize;
shf.ControlHandShake = 0;
shf.FlowReplace = 0;
if (lpdcb->fOutxCtsFlow) shf.ControlHandShake |= SERIAL_CTS_HANDSHAKE;
if (lpdcb->fOutxDsrFlow) shf.ControlHandShake |= SERIAL_DSR_HANDSHAKE;
switch (lpdcb->fDtrControl)
{
case DTR_CONTROL_DISABLE: break;
case DTR_CONTROL_ENABLE: shf.ControlHandShake |= SERIAL_DTR_CONTROL; break;
case DTR_CONTROL_HANDSHAKE: shf.ControlHandShake |= SERIAL_DTR_HANDSHAKE;break;
default:
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
2008-08-14 13:05:40 +02:00
switch (lpdcb->fRtsControl)
{
case RTS_CONTROL_DISABLE: break;
case RTS_CONTROL_ENABLE: shf.FlowReplace |= SERIAL_RTS_CONTROL; break;
case RTS_CONTROL_HANDSHAKE: shf.FlowReplace |= SERIAL_RTS_HANDSHAKE; break;
case RTS_CONTROL_TOGGLE: shf.FlowReplace |= SERIAL_RTS_CONTROL |
SERIAL_RTS_HANDSHAKE; break;
default:
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
if (lpdcb->fDsrSensitivity) shf.ControlHandShake |= SERIAL_DSR_SENSITIVITY;
if (lpdcb->fAbortOnError) shf.ControlHandShake |= SERIAL_ERROR_ABORT;
if (lpdcb->fErrorChar) shf.FlowReplace |= SERIAL_ERROR_CHAR;
if (lpdcb->fNull) shf.FlowReplace |= SERIAL_NULL_STRIPPING;
if (lpdcb->fTXContinueOnXoff) shf.FlowReplace |= SERIAL_XOFF_CONTINUE;
if (lpdcb->fOutX) shf.FlowReplace |= SERIAL_AUTO_TRANSMIT;
if (lpdcb->fInX) shf.FlowReplace |= SERIAL_AUTO_RECEIVE;
shf.XonLimit = lpdcb->XonLim;
shf.XoffLimit = lpdcb->XoffLim;
sc.EofChar = lpdcb->EofChar;
sc.ErrorChar = lpdcb->ErrorChar;
sc.BreakChar = 0;
sc.EventChar = lpdcb->EvtChar;
sc.XonChar = lpdcb->XonChar;
sc.XoffChar = lpdcb->XoffChar;
/* note: change DTR/RTS lines after setting the comm attributes,
* so flow control does not interfere.
*/
return (DeviceIoControl(handle, IOCTL_SERIAL_SET_BAUD_RATE,
&sbr, sizeof(sbr), NULL, 0, NULL, NULL) &&
DeviceIoControl(handle, IOCTL_SERIAL_SET_LINE_CONTROL,
&slc, sizeof(slc), NULL, 0, NULL, NULL) &&
DeviceIoControl(handle, IOCTL_SERIAL_SET_HANDFLOW,
&shf, sizeof(shf), NULL, 0, NULL, NULL) &&
DeviceIoControl(handle, IOCTL_SERIAL_SET_CHARS,
&sc, sizeof(sc), NULL, 0, NULL, NULL));
Release 960728 Sun Jul 28 17:57:19 1996 Alexandre Julliard <julliard@lrc.epfl.ch> * [loader/task.c] [include/task.h] Implemented SwitchStackTo()/SwitchStackBack(). * [include/wintypes.h] [loader/main.c] Added __winelib variable to distinguish between emulator and library at run-time. Later on, this should avoid some recompilations when building Winelib. * [windows/property.c] Implemented Win32 functions for window properties. Fri Jul 26 18:00:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu> * [controls/listbox.c] Implemented LBS_SORT style, WM_COMPAREITEM, and WM_DELETEITEM messages. * [controls/menu.c] Call TranslateMessage() to enable shortcuts (on WM_CHAR). * [include/cursoricon.h] Moved #pragma pack(1) back to where it belongs. * [objects/palette.c] RealizeDefaultPalette() maps to system colors only. Do not broadcast palette notifications when in TrueColor. * [objects/color.c] [include/palette.h] Miscellaneous optimizations. Had to fix several "improvements" made to my patch for previous release. * [objects/dib.c] Reverse dib bits order for 24-bit SetDIBits(). * [objects/dc.c] GetDeviceCaps() does not return RC_PALETTE when in TrueColor. * [windows/scroll.c] Scroll update region too. * [windows/message.c] Include QS_MOUSE into the event mask for nonclient mouse message filter. Fixes problems with Word 6 freezing when mouse hits nonclient area. * [windows/win.c] Allow top-level windows to be linked as HWND_TOP in CreateWindow(). * [windows/winpos.c] [windows/mdi.c] Attempt to fix control menu duplication. Fri Jul 26 09:49:35 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [files/drive.c] GetDriveType32A(): return value for CDROM fixed. * [files/file.c] SearchPath* added. * [if1632/gdi32.spec] [objects/brush.c] SetBrushOrgEx() added. * [loader/pe_resource.c] If even loading the default entry fails, we just use the first entry from the resource directory. [loader/task.c] SetSigHandler() stub added, Paradox 4.5 now starts up. * [misc/comm.c] [include/windows.h] [if1632/kernel32.spec] COMM functions updated to win32, not complete. * [misc/lstr.c] FormatMessageA partially implemented. * [include/miscemu.h] [memory/selector.c] [memory/global.c] [miscemu/dosmem.c] DOS memory handling changed: 1MB preallocated block, real-mode segment handling possible, SetSelectorBase into lower physical 1MB possible. * [miscemu/dpmi.c] Real-mode segments changed, real-mode int 21,ax=6506 added. AX=0x0303 added. * [multimedia/time.c] Fixed bug in killTimer. * [objects/bitmap.c] LoadImageA partially implemented. Wed Jul 24 18:20:24 1996 Albrecht Kleine <kleine@ak.sax.de> * [include/dde_mem.h][include/dde_proc.h] [ipc/dde_atom.c][ipc/dde_proc.c][windows/message.c] [ipc/generic_hash.h][library/miscstubs.c] Changes for error free compilation using "--with-ipc": replaced some names with *16-equivalent (e.g. MSG to MSG16), modified prototype of function DDE_GlobalFree() . * [objects/palette.c] Added check for metafile-DC in GDISelectPalette(), GDIRealizePalette(),RealizeDefaultPalette() and IsDCCurrentPalette(). Tue Jul 23 22:46:53 1996 Andrew Lewycky <plewycky@oise.utoronto.ca> * [controls/edit.c] EDIT_WM_Create: Don't EDIT_EM_ReplaceSel if created with lParam = "", fixes Winhelp. * [windows/dialog.c] DIALOG_CreateIndirect: Initialise dlgProc before creating children.
1996-07-28 20:50:11 +02:00
}
/*****************************************************************************
* GetCommState (KERNEL32.@)
2000-12-20 00:33:03 +01:00
*
* Fills in a device control block with information from a communications device.
*
* PARAMS
* handle [in] The communications device
* lpdcb [out] The device control block
*
2000-12-20 00:33:03 +01:00
* RETURNS
*
* True on success, false if the communication device handle is bad etc
2002-06-01 01:06:46 +02:00
*
2000-12-20 00:33:03 +01:00
* BUGS
*
* XonChar and XoffChar are not set.
Release 960728 Sun Jul 28 17:57:19 1996 Alexandre Julliard <julliard@lrc.epfl.ch> * [loader/task.c] [include/task.h] Implemented SwitchStackTo()/SwitchStackBack(). * [include/wintypes.h] [loader/main.c] Added __winelib variable to distinguish between emulator and library at run-time. Later on, this should avoid some recompilations when building Winelib. * [windows/property.c] Implemented Win32 functions for window properties. Fri Jul 26 18:00:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu> * [controls/listbox.c] Implemented LBS_SORT style, WM_COMPAREITEM, and WM_DELETEITEM messages. * [controls/menu.c] Call TranslateMessage() to enable shortcuts (on WM_CHAR). * [include/cursoricon.h] Moved #pragma pack(1) back to where it belongs. * [objects/palette.c] RealizeDefaultPalette() maps to system colors only. Do not broadcast palette notifications when in TrueColor. * [objects/color.c] [include/palette.h] Miscellaneous optimizations. Had to fix several "improvements" made to my patch for previous release. * [objects/dib.c] Reverse dib bits order for 24-bit SetDIBits(). * [objects/dc.c] GetDeviceCaps() does not return RC_PALETTE when in TrueColor. * [windows/scroll.c] Scroll update region too. * [windows/message.c] Include QS_MOUSE into the event mask for nonclient mouse message filter. Fixes problems with Word 6 freezing when mouse hits nonclient area. * [windows/win.c] Allow top-level windows to be linked as HWND_TOP in CreateWindow(). * [windows/winpos.c] [windows/mdi.c] Attempt to fix control menu duplication. Fri Jul 26 09:49:35 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [files/drive.c] GetDriveType32A(): return value for CDROM fixed. * [files/file.c] SearchPath* added. * [if1632/gdi32.spec] [objects/brush.c] SetBrushOrgEx() added. * [loader/pe_resource.c] If even loading the default entry fails, we just use the first entry from the resource directory. [loader/task.c] SetSigHandler() stub added, Paradox 4.5 now starts up. * [misc/comm.c] [include/windows.h] [if1632/kernel32.spec] COMM functions updated to win32, not complete. * [misc/lstr.c] FormatMessageA partially implemented. * [include/miscemu.h] [memory/selector.c] [memory/global.c] [miscemu/dosmem.c] DOS memory handling changed: 1MB preallocated block, real-mode segment handling possible, SetSelectorBase into lower physical 1MB possible. * [miscemu/dpmi.c] Real-mode segments changed, real-mode int 21,ax=6506 added. AX=0x0303 added. * [multimedia/time.c] Fixed bug in killTimer. * [objects/bitmap.c] LoadImageA partially implemented. Wed Jul 24 18:20:24 1996 Albrecht Kleine <kleine@ak.sax.de> * [include/dde_mem.h][include/dde_proc.h] [ipc/dde_atom.c][ipc/dde_proc.c][windows/message.c] [ipc/generic_hash.h][library/miscstubs.c] Changes for error free compilation using "--with-ipc": replaced some names with *16-equivalent (e.g. MSG to MSG16), modified prototype of function DDE_GlobalFree() . * [objects/palette.c] Added check for metafile-DC in GDISelectPalette(), GDIRealizePalette(),RealizeDefaultPalette() and IsDCCurrentPalette(). Tue Jul 23 22:46:53 1996 Andrew Lewycky <plewycky@oise.utoronto.ca> * [controls/edit.c] EDIT_WM_Create: Don't EDIT_EM_ReplaceSel if created with lParam = "", fixes Winhelp. * [windows/dialog.c] DIALOG_CreateIndirect: Initialise dlgProc before creating children.
1996-07-28 20:50:11 +02:00
*/
BOOL WINAPI GetCommState(HANDLE handle, LPDCB lpdcb)
Release 960728 Sun Jul 28 17:57:19 1996 Alexandre Julliard <julliard@lrc.epfl.ch> * [loader/task.c] [include/task.h] Implemented SwitchStackTo()/SwitchStackBack(). * [include/wintypes.h] [loader/main.c] Added __winelib variable to distinguish between emulator and library at run-time. Later on, this should avoid some recompilations when building Winelib. * [windows/property.c] Implemented Win32 functions for window properties. Fri Jul 26 18:00:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu> * [controls/listbox.c] Implemented LBS_SORT style, WM_COMPAREITEM, and WM_DELETEITEM messages. * [controls/menu.c] Call TranslateMessage() to enable shortcuts (on WM_CHAR). * [include/cursoricon.h] Moved #pragma pack(1) back to where it belongs. * [objects/palette.c] RealizeDefaultPalette() maps to system colors only. Do not broadcast palette notifications when in TrueColor. * [objects/color.c] [include/palette.h] Miscellaneous optimizations. Had to fix several "improvements" made to my patch for previous release. * [objects/dib.c] Reverse dib bits order for 24-bit SetDIBits(). * [objects/dc.c] GetDeviceCaps() does not return RC_PALETTE when in TrueColor. * [windows/scroll.c] Scroll update region too. * [windows/message.c] Include QS_MOUSE into the event mask for nonclient mouse message filter. Fixes problems with Word 6 freezing when mouse hits nonclient area. * [windows/win.c] Allow top-level windows to be linked as HWND_TOP in CreateWindow(). * [windows/winpos.c] [windows/mdi.c] Attempt to fix control menu duplication. Fri Jul 26 09:49:35 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [files/drive.c] GetDriveType32A(): return value for CDROM fixed. * [files/file.c] SearchPath* added. * [if1632/gdi32.spec] [objects/brush.c] SetBrushOrgEx() added. * [loader/pe_resource.c] If even loading the default entry fails, we just use the first entry from the resource directory. [loader/task.c] SetSigHandler() stub added, Paradox 4.5 now starts up. * [misc/comm.c] [include/windows.h] [if1632/kernel32.spec] COMM functions updated to win32, not complete. * [misc/lstr.c] FormatMessageA partially implemented. * [include/miscemu.h] [memory/selector.c] [memory/global.c] [miscemu/dosmem.c] DOS memory handling changed: 1MB preallocated block, real-mode segment handling possible, SetSelectorBase into lower physical 1MB possible. * [miscemu/dpmi.c] Real-mode segments changed, real-mode int 21,ax=6506 added. AX=0x0303 added. * [multimedia/time.c] Fixed bug in killTimer. * [objects/bitmap.c] LoadImageA partially implemented. Wed Jul 24 18:20:24 1996 Albrecht Kleine <kleine@ak.sax.de> * [include/dde_mem.h][include/dde_proc.h] [ipc/dde_atom.c][ipc/dde_proc.c][windows/message.c] [ipc/generic_hash.h][library/miscstubs.c] Changes for error free compilation using "--with-ipc": replaced some names with *16-equivalent (e.g. MSG to MSG16), modified prototype of function DDE_GlobalFree() . * [objects/palette.c] Added check for metafile-DC in GDISelectPalette(), GDIRealizePalette(),RealizeDefaultPalette() and IsDCCurrentPalette(). Tue Jul 23 22:46:53 1996 Andrew Lewycky <plewycky@oise.utoronto.ca> * [controls/edit.c] EDIT_WM_Create: Don't EDIT_EM_ReplaceSel if created with lParam = "", fixes Winhelp. * [windows/dialog.c] DIALOG_CreateIndirect: Initialise dlgProc before creating children.
1996-07-28 20:50:11 +02:00
{
SERIAL_BAUD_RATE sbr;
SERIAL_LINE_CONTROL slc;
SERIAL_HANDFLOW shf;
SERIAL_CHARS sc;
TRACE("handle %p, ptr %p\n", handle, lpdcb);
if (!lpdcb)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
if (!DeviceIoControl(handle, IOCTL_SERIAL_GET_BAUD_RATE,
NULL, 0, &sbr, sizeof(sbr), NULL, NULL) ||
!DeviceIoControl(handle, IOCTL_SERIAL_GET_LINE_CONTROL,
NULL, 0, &slc, sizeof(slc), NULL, NULL) ||
!DeviceIoControl(handle, IOCTL_SERIAL_GET_HANDFLOW,
NULL, 0, &shf, sizeof(shf), NULL, NULL) ||
!DeviceIoControl(handle, IOCTL_SERIAL_GET_CHARS,
NULL, 0, &sc, sizeof(sc), NULL, NULL))
return FALSE;
memset(lpdcb, 0, sizeof(*lpdcb));
lpdcb->DCBlength = sizeof(*lpdcb);
/* yes, they seem no never be (re)set on NT */
lpdcb->fBinary = 1;
lpdcb->fParity = 0;
lpdcb->BaudRate = sbr.BaudRate;
lpdcb->StopBits = slc.StopBits;
lpdcb->Parity = slc.Parity;
lpdcb->ByteSize = slc.WordLength;
if (shf.ControlHandShake & SERIAL_CTS_HANDSHAKE) lpdcb->fOutxCtsFlow = 1;
if (shf.ControlHandShake & SERIAL_DSR_HANDSHAKE) lpdcb->fOutxDsrFlow = 1;
switch (shf.ControlHandShake & (SERIAL_DTR_CONTROL | SERIAL_DTR_HANDSHAKE))
{
case 0: lpdcb->fDtrControl = DTR_CONTROL_DISABLE; break;
case SERIAL_DTR_CONTROL: lpdcb->fDtrControl = DTR_CONTROL_ENABLE; break;
case SERIAL_DTR_HANDSHAKE: lpdcb->fDtrControl = DTR_CONTROL_HANDSHAKE; break;
}
switch (shf.FlowReplace & (SERIAL_RTS_CONTROL | SERIAL_RTS_HANDSHAKE))
{
case 0: lpdcb->fRtsControl = RTS_CONTROL_DISABLE; break;
case SERIAL_RTS_CONTROL: lpdcb->fRtsControl = RTS_CONTROL_ENABLE; break;
case SERIAL_RTS_HANDSHAKE: lpdcb->fRtsControl = RTS_CONTROL_HANDSHAKE; break;
case SERIAL_RTS_CONTROL | SERIAL_RTS_HANDSHAKE:
lpdcb->fRtsControl = RTS_CONTROL_TOGGLE; break;
}
if (shf.ControlHandShake & SERIAL_DSR_SENSITIVITY) lpdcb->fDsrSensitivity = 1;
if (shf.ControlHandShake & SERIAL_ERROR_ABORT) lpdcb->fAbortOnError = 1;
if (shf.FlowReplace & SERIAL_ERROR_CHAR) lpdcb->fErrorChar = 1;
if (shf.FlowReplace & SERIAL_NULL_STRIPPING) lpdcb->fNull = 1;
if (shf.FlowReplace & SERIAL_XOFF_CONTINUE) lpdcb->fTXContinueOnXoff = 1;
lpdcb->XonLim = shf.XonLimit;
lpdcb->XoffLim = shf.XoffLimit;
Release 960728 Sun Jul 28 17:57:19 1996 Alexandre Julliard <julliard@lrc.epfl.ch> * [loader/task.c] [include/task.h] Implemented SwitchStackTo()/SwitchStackBack(). * [include/wintypes.h] [loader/main.c] Added __winelib variable to distinguish between emulator and library at run-time. Later on, this should avoid some recompilations when building Winelib. * [windows/property.c] Implemented Win32 functions for window properties. Fri Jul 26 18:00:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu> * [controls/listbox.c] Implemented LBS_SORT style, WM_COMPAREITEM, and WM_DELETEITEM messages. * [controls/menu.c] Call TranslateMessage() to enable shortcuts (on WM_CHAR). * [include/cursoricon.h] Moved #pragma pack(1) back to where it belongs. * [objects/palette.c] RealizeDefaultPalette() maps to system colors only. Do not broadcast palette notifications when in TrueColor. * [objects/color.c] [include/palette.h] Miscellaneous optimizations. Had to fix several "improvements" made to my patch for previous release. * [objects/dib.c] Reverse dib bits order for 24-bit SetDIBits(). * [objects/dc.c] GetDeviceCaps() does not return RC_PALETTE when in TrueColor. * [windows/scroll.c] Scroll update region too. * [windows/message.c] Include QS_MOUSE into the event mask for nonclient mouse message filter. Fixes problems with Word 6 freezing when mouse hits nonclient area. * [windows/win.c] Allow top-level windows to be linked as HWND_TOP in CreateWindow(). * [windows/winpos.c] [windows/mdi.c] Attempt to fix control menu duplication. Fri Jul 26 09:49:35 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [files/drive.c] GetDriveType32A(): return value for CDROM fixed. * [files/file.c] SearchPath* added. * [if1632/gdi32.spec] [objects/brush.c] SetBrushOrgEx() added. * [loader/pe_resource.c] If even loading the default entry fails, we just use the first entry from the resource directory. [loader/task.c] SetSigHandler() stub added, Paradox 4.5 now starts up. * [misc/comm.c] [include/windows.h] [if1632/kernel32.spec] COMM functions updated to win32, not complete. * [misc/lstr.c] FormatMessageA partially implemented. * [include/miscemu.h] [memory/selector.c] [memory/global.c] [miscemu/dosmem.c] DOS memory handling changed: 1MB preallocated block, real-mode segment handling possible, SetSelectorBase into lower physical 1MB possible. * [miscemu/dpmi.c] Real-mode segments changed, real-mode int 21,ax=6506 added. AX=0x0303 added. * [multimedia/time.c] Fixed bug in killTimer. * [objects/bitmap.c] LoadImageA partially implemented. Wed Jul 24 18:20:24 1996 Albrecht Kleine <kleine@ak.sax.de> * [include/dde_mem.h][include/dde_proc.h] [ipc/dde_atom.c][ipc/dde_proc.c][windows/message.c] [ipc/generic_hash.h][library/miscstubs.c] Changes for error free compilation using "--with-ipc": replaced some names with *16-equivalent (e.g. MSG to MSG16), modified prototype of function DDE_GlobalFree() . * [objects/palette.c] Added check for metafile-DC in GDISelectPalette(), GDIRealizePalette(),RealizeDefaultPalette() and IsDCCurrentPalette(). Tue Jul 23 22:46:53 1996 Andrew Lewycky <plewycky@oise.utoronto.ca> * [controls/edit.c] EDIT_WM_Create: Don't EDIT_EM_ReplaceSel if created with lParam = "", fixes Winhelp. * [windows/dialog.c] DIALOG_CreateIndirect: Initialise dlgProc before creating children.
1996-07-28 20:50:11 +02:00
if (shf.FlowReplace & SERIAL_AUTO_TRANSMIT) lpdcb->fOutX = 1;
if (shf.FlowReplace & SERIAL_AUTO_RECEIVE) lpdcb->fInX = 1;
Release 960728 Sun Jul 28 17:57:19 1996 Alexandre Julliard <julliard@lrc.epfl.ch> * [loader/task.c] [include/task.h] Implemented SwitchStackTo()/SwitchStackBack(). * [include/wintypes.h] [loader/main.c] Added __winelib variable to distinguish between emulator and library at run-time. Later on, this should avoid some recompilations when building Winelib. * [windows/property.c] Implemented Win32 functions for window properties. Fri Jul 26 18:00:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu> * [controls/listbox.c] Implemented LBS_SORT style, WM_COMPAREITEM, and WM_DELETEITEM messages. * [controls/menu.c] Call TranslateMessage() to enable shortcuts (on WM_CHAR). * [include/cursoricon.h] Moved #pragma pack(1) back to where it belongs. * [objects/palette.c] RealizeDefaultPalette() maps to system colors only. Do not broadcast palette notifications when in TrueColor. * [objects/color.c] [include/palette.h] Miscellaneous optimizations. Had to fix several "improvements" made to my patch for previous release. * [objects/dib.c] Reverse dib bits order for 24-bit SetDIBits(). * [objects/dc.c] GetDeviceCaps() does not return RC_PALETTE when in TrueColor. * [windows/scroll.c] Scroll update region too. * [windows/message.c] Include QS_MOUSE into the event mask for nonclient mouse message filter. Fixes problems with Word 6 freezing when mouse hits nonclient area. * [windows/win.c] Allow top-level windows to be linked as HWND_TOP in CreateWindow(). * [windows/winpos.c] [windows/mdi.c] Attempt to fix control menu duplication. Fri Jul 26 09:49:35 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [files/drive.c] GetDriveType32A(): return value for CDROM fixed. * [files/file.c] SearchPath* added. * [if1632/gdi32.spec] [objects/brush.c] SetBrushOrgEx() added. * [loader/pe_resource.c] If even loading the default entry fails, we just use the first entry from the resource directory. [loader/task.c] SetSigHandler() stub added, Paradox 4.5 now starts up. * [misc/comm.c] [include/windows.h] [if1632/kernel32.spec] COMM functions updated to win32, not complete. * [misc/lstr.c] FormatMessageA partially implemented. * [include/miscemu.h] [memory/selector.c] [memory/global.c] [miscemu/dosmem.c] DOS memory handling changed: 1MB preallocated block, real-mode segment handling possible, SetSelectorBase into lower physical 1MB possible. * [miscemu/dpmi.c] Real-mode segments changed, real-mode int 21,ax=6506 added. AX=0x0303 added. * [multimedia/time.c] Fixed bug in killTimer. * [objects/bitmap.c] LoadImageA partially implemented. Wed Jul 24 18:20:24 1996 Albrecht Kleine <kleine@ak.sax.de> * [include/dde_mem.h][include/dde_proc.h] [ipc/dde_atom.c][ipc/dde_proc.c][windows/message.c] [ipc/generic_hash.h][library/miscstubs.c] Changes for error free compilation using "--with-ipc": replaced some names with *16-equivalent (e.g. MSG to MSG16), modified prototype of function DDE_GlobalFree() . * [objects/palette.c] Added check for metafile-DC in GDISelectPalette(), GDIRealizePalette(),RealizeDefaultPalette() and IsDCCurrentPalette(). Tue Jul 23 22:46:53 1996 Andrew Lewycky <plewycky@oise.utoronto.ca> * [controls/edit.c] EDIT_WM_Create: Don't EDIT_EM_ReplaceSel if created with lParam = "", fixes Winhelp. * [windows/dialog.c] DIALOG_CreateIndirect: Initialise dlgProc before creating children.
1996-07-28 20:50:11 +02:00
lpdcb->EofChar = sc.EofChar;
lpdcb->ErrorChar = sc.ErrorChar;
lpdcb->EvtChar = sc.EventChar;
lpdcb->XonChar = sc.XonChar;
lpdcb->XoffChar = sc.XoffChar;
Release 960728 Sun Jul 28 17:57:19 1996 Alexandre Julliard <julliard@lrc.epfl.ch> * [loader/task.c] [include/task.h] Implemented SwitchStackTo()/SwitchStackBack(). * [include/wintypes.h] [loader/main.c] Added __winelib variable to distinguish between emulator and library at run-time. Later on, this should avoid some recompilations when building Winelib. * [windows/property.c] Implemented Win32 functions for window properties. Fri Jul 26 18:00:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu> * [controls/listbox.c] Implemented LBS_SORT style, WM_COMPAREITEM, and WM_DELETEITEM messages. * [controls/menu.c] Call TranslateMessage() to enable shortcuts (on WM_CHAR). * [include/cursoricon.h] Moved #pragma pack(1) back to where it belongs. * [objects/palette.c] RealizeDefaultPalette() maps to system colors only. Do not broadcast palette notifications when in TrueColor. * [objects/color.c] [include/palette.h] Miscellaneous optimizations. Had to fix several "improvements" made to my patch for previous release. * [objects/dib.c] Reverse dib bits order for 24-bit SetDIBits(). * [objects/dc.c] GetDeviceCaps() does not return RC_PALETTE when in TrueColor. * [windows/scroll.c] Scroll update region too. * [windows/message.c] Include QS_MOUSE into the event mask for nonclient mouse message filter. Fixes problems with Word 6 freezing when mouse hits nonclient area. * [windows/win.c] Allow top-level windows to be linked as HWND_TOP in CreateWindow(). * [windows/winpos.c] [windows/mdi.c] Attempt to fix control menu duplication. Fri Jul 26 09:49:35 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [files/drive.c] GetDriveType32A(): return value for CDROM fixed. * [files/file.c] SearchPath* added. * [if1632/gdi32.spec] [objects/brush.c] SetBrushOrgEx() added. * [loader/pe_resource.c] If even loading the default entry fails, we just use the first entry from the resource directory. [loader/task.c] SetSigHandler() stub added, Paradox 4.5 now starts up. * [misc/comm.c] [include/windows.h] [if1632/kernel32.spec] COMM functions updated to win32, not complete. * [misc/lstr.c] FormatMessageA partially implemented. * [include/miscemu.h] [memory/selector.c] [memory/global.c] [miscemu/dosmem.c] DOS memory handling changed: 1MB preallocated block, real-mode segment handling possible, SetSelectorBase into lower physical 1MB possible. * [miscemu/dpmi.c] Real-mode segments changed, real-mode int 21,ax=6506 added. AX=0x0303 added. * [multimedia/time.c] Fixed bug in killTimer. * [objects/bitmap.c] LoadImageA partially implemented. Wed Jul 24 18:20:24 1996 Albrecht Kleine <kleine@ak.sax.de> * [include/dde_mem.h][include/dde_proc.h] [ipc/dde_atom.c][ipc/dde_proc.c][windows/message.c] [ipc/generic_hash.h][library/miscstubs.c] Changes for error free compilation using "--with-ipc": replaced some names with *16-equivalent (e.g. MSG to MSG16), modified prototype of function DDE_GlobalFree() . * [objects/palette.c] Added check for metafile-DC in GDISelectPalette(), GDIRealizePalette(),RealizeDefaultPalette() and IsDCCurrentPalette(). Tue Jul 23 22:46:53 1996 Andrew Lewycky <plewycky@oise.utoronto.ca> * [controls/edit.c] EDIT_WM_Create: Don't EDIT_EM_ReplaceSel if created with lParam = "", fixes Winhelp. * [windows/dialog.c] DIALOG_CreateIndirect: Initialise dlgProc before creating children.
1996-07-28 20:50:11 +02:00
TRACE("OK\n");
dump_dcb(lpdcb);
2002-06-01 01:06:46 +02:00
return TRUE;
Release 960728 Sun Jul 28 17:57:19 1996 Alexandre Julliard <julliard@lrc.epfl.ch> * [loader/task.c] [include/task.h] Implemented SwitchStackTo()/SwitchStackBack(). * [include/wintypes.h] [loader/main.c] Added __winelib variable to distinguish between emulator and library at run-time. Later on, this should avoid some recompilations when building Winelib. * [windows/property.c] Implemented Win32 functions for window properties. Fri Jul 26 18:00:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu> * [controls/listbox.c] Implemented LBS_SORT style, WM_COMPAREITEM, and WM_DELETEITEM messages. * [controls/menu.c] Call TranslateMessage() to enable shortcuts (on WM_CHAR). * [include/cursoricon.h] Moved #pragma pack(1) back to where it belongs. * [objects/palette.c] RealizeDefaultPalette() maps to system colors only. Do not broadcast palette notifications when in TrueColor. * [objects/color.c] [include/palette.h] Miscellaneous optimizations. Had to fix several "improvements" made to my patch for previous release. * [objects/dib.c] Reverse dib bits order for 24-bit SetDIBits(). * [objects/dc.c] GetDeviceCaps() does not return RC_PALETTE when in TrueColor. * [windows/scroll.c] Scroll update region too. * [windows/message.c] Include QS_MOUSE into the event mask for nonclient mouse message filter. Fixes problems with Word 6 freezing when mouse hits nonclient area. * [windows/win.c] Allow top-level windows to be linked as HWND_TOP in CreateWindow(). * [windows/winpos.c] [windows/mdi.c] Attempt to fix control menu duplication. Fri Jul 26 09:49:35 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [files/drive.c] GetDriveType32A(): return value for CDROM fixed. * [files/file.c] SearchPath* added. * [if1632/gdi32.spec] [objects/brush.c] SetBrushOrgEx() added. * [loader/pe_resource.c] If even loading the default entry fails, we just use the first entry from the resource directory. [loader/task.c] SetSigHandler() stub added, Paradox 4.5 now starts up. * [misc/comm.c] [include/windows.h] [if1632/kernel32.spec] COMM functions updated to win32, not complete. * [misc/lstr.c] FormatMessageA partially implemented. * [include/miscemu.h] [memory/selector.c] [memory/global.c] [miscemu/dosmem.c] DOS memory handling changed: 1MB preallocated block, real-mode segment handling possible, SetSelectorBase into lower physical 1MB possible. * [miscemu/dpmi.c] Real-mode segments changed, real-mode int 21,ax=6506 added. AX=0x0303 added. * [multimedia/time.c] Fixed bug in killTimer. * [objects/bitmap.c] LoadImageA partially implemented. Wed Jul 24 18:20:24 1996 Albrecht Kleine <kleine@ak.sax.de> * [include/dde_mem.h][include/dde_proc.h] [ipc/dde_atom.c][ipc/dde_proc.c][windows/message.c] [ipc/generic_hash.h][library/miscstubs.c] Changes for error free compilation using "--with-ipc": replaced some names with *16-equivalent (e.g. MSG to MSG16), modified prototype of function DDE_GlobalFree() . * [objects/palette.c] Added check for metafile-DC in GDISelectPalette(), GDIRealizePalette(),RealizeDefaultPalette() and IsDCCurrentPalette(). Tue Jul 23 22:46:53 1996 Andrew Lewycky <plewycky@oise.utoronto.ca> * [controls/edit.c] EDIT_WM_Create: Don't EDIT_EM_ReplaceSel if created with lParam = "", fixes Winhelp. * [windows/dialog.c] DIALOG_CreateIndirect: Initialise dlgProc before creating children.
1996-07-28 20:50:11 +02:00
}
/*****************************************************************************
* TransmitCommChar (KERNEL32.@)
2000-12-20 00:33:03 +01:00
*
* Transmits a single character in front of any pending characters in the
* output buffer. Usually used to send an interrupt character to a host.
*
* PARAMS
* hComm [in] The communication device in need of a command character
* chTransmit [in] The character to transmit
*
2000-12-20 00:33:03 +01:00
* RETURNS
*
* True if the call succeeded, false if the previous command character to the
* same device has not been sent yet the handle is bad etc.
*
Release 960728 Sun Jul 28 17:57:19 1996 Alexandre Julliard <julliard@lrc.epfl.ch> * [loader/task.c] [include/task.h] Implemented SwitchStackTo()/SwitchStackBack(). * [include/wintypes.h] [loader/main.c] Added __winelib variable to distinguish between emulator and library at run-time. Later on, this should avoid some recompilations when building Winelib. * [windows/property.c] Implemented Win32 functions for window properties. Fri Jul 26 18:00:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu> * [controls/listbox.c] Implemented LBS_SORT style, WM_COMPAREITEM, and WM_DELETEITEM messages. * [controls/menu.c] Call TranslateMessage() to enable shortcuts (on WM_CHAR). * [include/cursoricon.h] Moved #pragma pack(1) back to where it belongs. * [objects/palette.c] RealizeDefaultPalette() maps to system colors only. Do not broadcast palette notifications when in TrueColor. * [objects/color.c] [include/palette.h] Miscellaneous optimizations. Had to fix several "improvements" made to my patch for previous release. * [objects/dib.c] Reverse dib bits order for 24-bit SetDIBits(). * [objects/dc.c] GetDeviceCaps() does not return RC_PALETTE when in TrueColor. * [windows/scroll.c] Scroll update region too. * [windows/message.c] Include QS_MOUSE into the event mask for nonclient mouse message filter. Fixes problems with Word 6 freezing when mouse hits nonclient area. * [windows/win.c] Allow top-level windows to be linked as HWND_TOP in CreateWindow(). * [windows/winpos.c] [windows/mdi.c] Attempt to fix control menu duplication. Fri Jul 26 09:49:35 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [files/drive.c] GetDriveType32A(): return value for CDROM fixed. * [files/file.c] SearchPath* added. * [if1632/gdi32.spec] [objects/brush.c] SetBrushOrgEx() added. * [loader/pe_resource.c] If even loading the default entry fails, we just use the first entry from the resource directory. [loader/task.c] SetSigHandler() stub added, Paradox 4.5 now starts up. * [misc/comm.c] [include/windows.h] [if1632/kernel32.spec] COMM functions updated to win32, not complete. * [misc/lstr.c] FormatMessageA partially implemented. * [include/miscemu.h] [memory/selector.c] [memory/global.c] [miscemu/dosmem.c] DOS memory handling changed: 1MB preallocated block, real-mode segment handling possible, SetSelectorBase into lower physical 1MB possible. * [miscemu/dpmi.c] Real-mode segments changed, real-mode int 21,ax=6506 added. AX=0x0303 added. * [multimedia/time.c] Fixed bug in killTimer. * [objects/bitmap.c] LoadImageA partially implemented. Wed Jul 24 18:20:24 1996 Albrecht Kleine <kleine@ak.sax.de> * [include/dde_mem.h][include/dde_proc.h] [ipc/dde_atom.c][ipc/dde_proc.c][windows/message.c] [ipc/generic_hash.h][library/miscstubs.c] Changes for error free compilation using "--with-ipc": replaced some names with *16-equivalent (e.g. MSG to MSG16), modified prototype of function DDE_GlobalFree() . * [objects/palette.c] Added check for metafile-DC in GDISelectPalette(), GDIRealizePalette(),RealizeDefaultPalette() and IsDCCurrentPalette(). Tue Jul 23 22:46:53 1996 Andrew Lewycky <plewycky@oise.utoronto.ca> * [controls/edit.c] EDIT_WM_Create: Don't EDIT_EM_ReplaceSel if created with lParam = "", fixes Winhelp. * [windows/dialog.c] DIALOG_CreateIndirect: Initialise dlgProc before creating children.
1996-07-28 20:50:11 +02:00
*/
BOOL WINAPI TransmitCommChar(HANDLE hComm, CHAR chTransmit)
Release 960728 Sun Jul 28 17:57:19 1996 Alexandre Julliard <julliard@lrc.epfl.ch> * [loader/task.c] [include/task.h] Implemented SwitchStackTo()/SwitchStackBack(). * [include/wintypes.h] [loader/main.c] Added __winelib variable to distinguish between emulator and library at run-time. Later on, this should avoid some recompilations when building Winelib. * [windows/property.c] Implemented Win32 functions for window properties. Fri Jul 26 18:00:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu> * [controls/listbox.c] Implemented LBS_SORT style, WM_COMPAREITEM, and WM_DELETEITEM messages. * [controls/menu.c] Call TranslateMessage() to enable shortcuts (on WM_CHAR). * [include/cursoricon.h] Moved #pragma pack(1) back to where it belongs. * [objects/palette.c] RealizeDefaultPalette() maps to system colors only. Do not broadcast palette notifications when in TrueColor. * [objects/color.c] [include/palette.h] Miscellaneous optimizations. Had to fix several "improvements" made to my patch for previous release. * [objects/dib.c] Reverse dib bits order for 24-bit SetDIBits(). * [objects/dc.c] GetDeviceCaps() does not return RC_PALETTE when in TrueColor. * [windows/scroll.c] Scroll update region too. * [windows/message.c] Include QS_MOUSE into the event mask for nonclient mouse message filter. Fixes problems with Word 6 freezing when mouse hits nonclient area. * [windows/win.c] Allow top-level windows to be linked as HWND_TOP in CreateWindow(). * [windows/winpos.c] [windows/mdi.c] Attempt to fix control menu duplication. Fri Jul 26 09:49:35 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [files/drive.c] GetDriveType32A(): return value for CDROM fixed. * [files/file.c] SearchPath* added. * [if1632/gdi32.spec] [objects/brush.c] SetBrushOrgEx() added. * [loader/pe_resource.c] If even loading the default entry fails, we just use the first entry from the resource directory. [loader/task.c] SetSigHandler() stub added, Paradox 4.5 now starts up. * [misc/comm.c] [include/windows.h] [if1632/kernel32.spec] COMM functions updated to win32, not complete. * [misc/lstr.c] FormatMessageA partially implemented. * [include/miscemu.h] [memory/selector.c] [memory/global.c] [miscemu/dosmem.c] DOS memory handling changed: 1MB preallocated block, real-mode segment handling possible, SetSelectorBase into lower physical 1MB possible. * [miscemu/dpmi.c] Real-mode segments changed, real-mode int 21,ax=6506 added. AX=0x0303 added. * [multimedia/time.c] Fixed bug in killTimer. * [objects/bitmap.c] LoadImageA partially implemented. Wed Jul 24 18:20:24 1996 Albrecht Kleine <kleine@ak.sax.de> * [include/dde_mem.h][include/dde_proc.h] [ipc/dde_atom.c][ipc/dde_proc.c][windows/message.c] [ipc/generic_hash.h][library/miscstubs.c] Changes for error free compilation using "--with-ipc": replaced some names with *16-equivalent (e.g. MSG to MSG16), modified prototype of function DDE_GlobalFree() . * [objects/palette.c] Added check for metafile-DC in GDISelectPalette(), GDIRealizePalette(),RealizeDefaultPalette() and IsDCCurrentPalette(). Tue Jul 23 22:46:53 1996 Andrew Lewycky <plewycky@oise.utoronto.ca> * [controls/edit.c] EDIT_WM_Create: Don't EDIT_EM_ReplaceSel if created with lParam = "", fixes Winhelp. * [windows/dialog.c] DIALOG_CreateIndirect: Initialise dlgProc before creating children.
1996-07-28 20:50:11 +02:00
{
return DeviceIoControl(hComm, IOCTL_SERIAL_IMMEDIATE_CHAR,
&chTransmit, sizeof(chTransmit), NULL, 0, NULL, NULL);
Release 960728 Sun Jul 28 17:57:19 1996 Alexandre Julliard <julliard@lrc.epfl.ch> * [loader/task.c] [include/task.h] Implemented SwitchStackTo()/SwitchStackBack(). * [include/wintypes.h] [loader/main.c] Added __winelib variable to distinguish between emulator and library at run-time. Later on, this should avoid some recompilations when building Winelib. * [windows/property.c] Implemented Win32 functions for window properties. Fri Jul 26 18:00:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu> * [controls/listbox.c] Implemented LBS_SORT style, WM_COMPAREITEM, and WM_DELETEITEM messages. * [controls/menu.c] Call TranslateMessage() to enable shortcuts (on WM_CHAR). * [include/cursoricon.h] Moved #pragma pack(1) back to where it belongs. * [objects/palette.c] RealizeDefaultPalette() maps to system colors only. Do not broadcast palette notifications when in TrueColor. * [objects/color.c] [include/palette.h] Miscellaneous optimizations. Had to fix several "improvements" made to my patch for previous release. * [objects/dib.c] Reverse dib bits order for 24-bit SetDIBits(). * [objects/dc.c] GetDeviceCaps() does not return RC_PALETTE when in TrueColor. * [windows/scroll.c] Scroll update region too. * [windows/message.c] Include QS_MOUSE into the event mask for nonclient mouse message filter. Fixes problems with Word 6 freezing when mouse hits nonclient area. * [windows/win.c] Allow top-level windows to be linked as HWND_TOP in CreateWindow(). * [windows/winpos.c] [windows/mdi.c] Attempt to fix control menu duplication. Fri Jul 26 09:49:35 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [files/drive.c] GetDriveType32A(): return value for CDROM fixed. * [files/file.c] SearchPath* added. * [if1632/gdi32.spec] [objects/brush.c] SetBrushOrgEx() added. * [loader/pe_resource.c] If even loading the default entry fails, we just use the first entry from the resource directory. [loader/task.c] SetSigHandler() stub added, Paradox 4.5 now starts up. * [misc/comm.c] [include/windows.h] [if1632/kernel32.spec] COMM functions updated to win32, not complete. * [misc/lstr.c] FormatMessageA partially implemented. * [include/miscemu.h] [memory/selector.c] [memory/global.c] [miscemu/dosmem.c] DOS memory handling changed: 1MB preallocated block, real-mode segment handling possible, SetSelectorBase into lower physical 1MB possible. * [miscemu/dpmi.c] Real-mode segments changed, real-mode int 21,ax=6506 added. AX=0x0303 added. * [multimedia/time.c] Fixed bug in killTimer. * [objects/bitmap.c] LoadImageA partially implemented. Wed Jul 24 18:20:24 1996 Albrecht Kleine <kleine@ak.sax.de> * [include/dde_mem.h][include/dde_proc.h] [ipc/dde_atom.c][ipc/dde_proc.c][windows/message.c] [ipc/generic_hash.h][library/miscstubs.c] Changes for error free compilation using "--with-ipc": replaced some names with *16-equivalent (e.g. MSG to MSG16), modified prototype of function DDE_GlobalFree() . * [objects/palette.c] Added check for metafile-DC in GDISelectPalette(), GDIRealizePalette(),RealizeDefaultPalette() and IsDCCurrentPalette(). Tue Jul 23 22:46:53 1996 Andrew Lewycky <plewycky@oise.utoronto.ca> * [controls/edit.c] EDIT_WM_Create: Don't EDIT_EM_ReplaceSel if created with lParam = "", fixes Winhelp. * [windows/dialog.c] DIALOG_CreateIndirect: Initialise dlgProc before creating children.
1996-07-28 20:50:11 +02:00
}
2002-04-26 01:00:45 +02:00
Release 960728 Sun Jul 28 17:57:19 1996 Alexandre Julliard <julliard@lrc.epfl.ch> * [loader/task.c] [include/task.h] Implemented SwitchStackTo()/SwitchStackBack(). * [include/wintypes.h] [loader/main.c] Added __winelib variable to distinguish between emulator and library at run-time. Later on, this should avoid some recompilations when building Winelib. * [windows/property.c] Implemented Win32 functions for window properties. Fri Jul 26 18:00:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu> * [controls/listbox.c] Implemented LBS_SORT style, WM_COMPAREITEM, and WM_DELETEITEM messages. * [controls/menu.c] Call TranslateMessage() to enable shortcuts (on WM_CHAR). * [include/cursoricon.h] Moved #pragma pack(1) back to where it belongs. * [objects/palette.c] RealizeDefaultPalette() maps to system colors only. Do not broadcast palette notifications when in TrueColor. * [objects/color.c] [include/palette.h] Miscellaneous optimizations. Had to fix several "improvements" made to my patch for previous release. * [objects/dib.c] Reverse dib bits order for 24-bit SetDIBits(). * [objects/dc.c] GetDeviceCaps() does not return RC_PALETTE when in TrueColor. * [windows/scroll.c] Scroll update region too. * [windows/message.c] Include QS_MOUSE into the event mask for nonclient mouse message filter. Fixes problems with Word 6 freezing when mouse hits nonclient area. * [windows/win.c] Allow top-level windows to be linked as HWND_TOP in CreateWindow(). * [windows/winpos.c] [windows/mdi.c] Attempt to fix control menu duplication. Fri Jul 26 09:49:35 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [files/drive.c] GetDriveType32A(): return value for CDROM fixed. * [files/file.c] SearchPath* added. * [if1632/gdi32.spec] [objects/brush.c] SetBrushOrgEx() added. * [loader/pe_resource.c] If even loading the default entry fails, we just use the first entry from the resource directory. [loader/task.c] SetSigHandler() stub added, Paradox 4.5 now starts up. * [misc/comm.c] [include/windows.h] [if1632/kernel32.spec] COMM functions updated to win32, not complete. * [misc/lstr.c] FormatMessageA partially implemented. * [include/miscemu.h] [memory/selector.c] [memory/global.c] [miscemu/dosmem.c] DOS memory handling changed: 1MB preallocated block, real-mode segment handling possible, SetSelectorBase into lower physical 1MB possible. * [miscemu/dpmi.c] Real-mode segments changed, real-mode int 21,ax=6506 added. AX=0x0303 added. * [multimedia/time.c] Fixed bug in killTimer. * [objects/bitmap.c] LoadImageA partially implemented. Wed Jul 24 18:20:24 1996 Albrecht Kleine <kleine@ak.sax.de> * [include/dde_mem.h][include/dde_proc.h] [ipc/dde_atom.c][ipc/dde_proc.c][windows/message.c] [ipc/generic_hash.h][library/miscstubs.c] Changes for error free compilation using "--with-ipc": replaced some names with *16-equivalent (e.g. MSG to MSG16), modified prototype of function DDE_GlobalFree() . * [objects/palette.c] Added check for metafile-DC in GDISelectPalette(), GDIRealizePalette(),RealizeDefaultPalette() and IsDCCurrentPalette(). Tue Jul 23 22:46:53 1996 Andrew Lewycky <plewycky@oise.utoronto.ca> * [controls/edit.c] EDIT_WM_Create: Don't EDIT_EM_ReplaceSel if created with lParam = "", fixes Winhelp. * [windows/dialog.c] DIALOG_CreateIndirect: Initialise dlgProc before creating children.
1996-07-28 20:50:11 +02:00
/*****************************************************************************
* GetCommTimeouts (KERNEL32.@)
2000-12-20 00:33:03 +01:00
*
2002-02-27 22:34:54 +01:00
* Obtains the request timeout values for the communications device.
2000-12-20 00:33:03 +01:00
*
* PARAMS
* hComm [in] The communications device
* lptimeouts [out] The struct of request timeouts
*
2000-12-20 00:33:03 +01:00
* RETURNS
*
* True on success, false if communications device handle is bad
* or the target structure is null.
Release 960728 Sun Jul 28 17:57:19 1996 Alexandre Julliard <julliard@lrc.epfl.ch> * [loader/task.c] [include/task.h] Implemented SwitchStackTo()/SwitchStackBack(). * [include/wintypes.h] [loader/main.c] Added __winelib variable to distinguish between emulator and library at run-time. Later on, this should avoid some recompilations when building Winelib. * [windows/property.c] Implemented Win32 functions for window properties. Fri Jul 26 18:00:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu> * [controls/listbox.c] Implemented LBS_SORT style, WM_COMPAREITEM, and WM_DELETEITEM messages. * [controls/menu.c] Call TranslateMessage() to enable shortcuts (on WM_CHAR). * [include/cursoricon.h] Moved #pragma pack(1) back to where it belongs. * [objects/palette.c] RealizeDefaultPalette() maps to system colors only. Do not broadcast palette notifications when in TrueColor. * [objects/color.c] [include/palette.h] Miscellaneous optimizations. Had to fix several "improvements" made to my patch for previous release. * [objects/dib.c] Reverse dib bits order for 24-bit SetDIBits(). * [objects/dc.c] GetDeviceCaps() does not return RC_PALETTE when in TrueColor. * [windows/scroll.c] Scroll update region too. * [windows/message.c] Include QS_MOUSE into the event mask for nonclient mouse message filter. Fixes problems with Word 6 freezing when mouse hits nonclient area. * [windows/win.c] Allow top-level windows to be linked as HWND_TOP in CreateWindow(). * [windows/winpos.c] [windows/mdi.c] Attempt to fix control menu duplication. Fri Jul 26 09:49:35 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [files/drive.c] GetDriveType32A(): return value for CDROM fixed. * [files/file.c] SearchPath* added. * [if1632/gdi32.spec] [objects/brush.c] SetBrushOrgEx() added. * [loader/pe_resource.c] If even loading the default entry fails, we just use the first entry from the resource directory. [loader/task.c] SetSigHandler() stub added, Paradox 4.5 now starts up. * [misc/comm.c] [include/windows.h] [if1632/kernel32.spec] COMM functions updated to win32, not complete. * [misc/lstr.c] FormatMessageA partially implemented. * [include/miscemu.h] [memory/selector.c] [memory/global.c] [miscemu/dosmem.c] DOS memory handling changed: 1MB preallocated block, real-mode segment handling possible, SetSelectorBase into lower physical 1MB possible. * [miscemu/dpmi.c] Real-mode segments changed, real-mode int 21,ax=6506 added. AX=0x0303 added. * [multimedia/time.c] Fixed bug in killTimer. * [objects/bitmap.c] LoadImageA partially implemented. Wed Jul 24 18:20:24 1996 Albrecht Kleine <kleine@ak.sax.de> * [include/dde_mem.h][include/dde_proc.h] [ipc/dde_atom.c][ipc/dde_proc.c][windows/message.c] [ipc/generic_hash.h][library/miscstubs.c] Changes for error free compilation using "--with-ipc": replaced some names with *16-equivalent (e.g. MSG to MSG16), modified prototype of function DDE_GlobalFree() . * [objects/palette.c] Added check for metafile-DC in GDISelectPalette(), GDIRealizePalette(),RealizeDefaultPalette() and IsDCCurrentPalette(). Tue Jul 23 22:46:53 1996 Andrew Lewycky <plewycky@oise.utoronto.ca> * [controls/edit.c] EDIT_WM_Create: Don't EDIT_EM_ReplaceSel if created with lParam = "", fixes Winhelp. * [windows/dialog.c] DIALOG_CreateIndirect: Initialise dlgProc before creating children.
1996-07-28 20:50:11 +02:00
*/
BOOL WINAPI GetCommTimeouts(HANDLE hComm, LPCOMMTIMEOUTS lptimeouts)
Release 970824 Sat Aug 23 00:05:23 1997 Andreas Mohr <100.30936@germany.net> * [if1632/kernel.spec] [if1632/mmsystem.spec] Added some stubs. * [include/neexe.h] [loader/module.c] Added warning for OS/2 executables. * [multimedia/midi.c] Shortened MIDIOUT driver version string to be less than 31 chars. * [objects/gdiobj.c] Fixed DeleteObject32() to react properly when called with stock object. Fri Aug 22 18:03:26 1997 Dimitrie O. Paun <dimi@cs.toronto.edu> * [controls/updown.c] [include/updown.h] First attempt at implementiong the UpDown class. * [controls/widgets.c] Added the UpDown class to be initialized by InitCommonControls(). Wed Aug 20 18:01:33 1997 Doug Ridgway <ridgway@routh.UCSD.EDU> * [graphics/*] [objects/*] [include/gdi.h] Made all GDI objects (except DCs) moveable. Mon Aug 18 03:25:30 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu> * [windows/event.c] [misc/winsock.c] [misc/winsock_dns.c] Removed IPC communication to speed up winsock services (tested only with 16-bit netscape 3.03). * [graphics/x11drv/xfont.c] [documentation/fonts] Miscellaneous improvements. Updated docs. Sun Aug 17 20:39:55 1997 Ingo Schneider <schneidi@informatik.tu-muenchen.de> * [misc/comm.c] A couple of bug fixes. Sun Aug 17 19:29:22 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [debugger/dbg.y] Display next instruction after stepi/nexti. * [if1632/relay.c] [include/callback.h] [tools/build.c] Replaced CallTo32_LargeStack with the CALL_LARGE_STACK macro for better Winelib support. * [include/sigcontext.h] Renamed to sig_context.h to avoid conflicts with libc. * [*/*] All API functions are now prefixed with WINAPI in prevision of future Winelib integration. * [loader/signal.c] [memory/ldt.c] Fixed assembly code to be -fPIC compatible. Thu Aug 14 14:38:15 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [if1632/crtdll.spec][win32/except.c] _global_unwind, _local_unwind stub added. * [objects/dib.c] Don't read memory you don't even need for the target bitmap (fixes one 'lazy' program). * [if1632/relay.c][if1632/thunk.c][if1632/kernel32.spec] [win32/ordinals.c][memory/selector.c][memory/global.c] [include/callback.h] Added/moved some more win95 ordinal stuff. Implemented QT_Thunk (not 100% correct yet) and some friends. * [loader/pe_image.c] Add possibility to break at the DLL entrypoint. * [controls/static.c][misc/commdlg.c][scheduler/thread.c] Misc bugfixes and additions. * [misc/registry.c] The registry seems to be case-preserving but case-insensitive. * [memory/global.c] Adapted to new /proc/meminfo format. * [objects/font.c][graphics/x11drv/xfont.c] FONT_SelectObject and GetTextMetrics* get passed ranges in logical and not device points (thanks to Marion Reyzl for pointing this out). * [windows/caret.c] Use the windows own DC if present (The caret coordinates are logical coordinates based on it). Fixes another AMIPRO problem. Wed Aug 6 18:22:22 1997 Morten Welinder <terra@diku.dk> * [controls/menu.c] General clean-up and Win32 work: split item_flags into fType and fState; split item_id into wID and hSubMenu. Improved debug-printing. Implemented InsertMenuItem32[AW], SetMenuDefaultItem32, and SetMenuItemInfo32[AW]. Fixed GetMenuItemInfo32[AW]. * [if1632/user32.spec] Define above new functions. * [include/windows.h] Define MF_DEFAULT and MF_RIGHTJUSTIFY. Prototype above functions. * [include/menu.h] Don't prototype now-static MENU_InitSysMenuPopup. * [include/comm.h] Reduce MAX_PORTS to 9 (which the profile code can handle). Tue Aug 5 20:16:22 1997 Victor Schneider <vischne@ibm.net> * [library/winestub.c] [libtest/expand.c] These patches let people porting Windows apps compile them using the same conventions regarding global _argc and _argv as those on Windows C/C++ compilers.
1997-08-24 18:00:30 +02:00
{
SERIAL_TIMEOUTS st;
TRACE("(%p, %p)\n", hComm, lptimeouts);
if (!lptimeouts)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
if (!DeviceIoControl(hComm, IOCTL_SERIAL_GET_TIMEOUTS,
NULL, 0, &st, sizeof(st), NULL, NULL))
return FALSE;
lptimeouts->ReadIntervalTimeout = st.ReadIntervalTimeout;
lptimeouts->ReadTotalTimeoutMultiplier = st.ReadTotalTimeoutMultiplier;
lptimeouts->ReadTotalTimeoutConstant = st.ReadTotalTimeoutConstant;
lptimeouts->WriteTotalTimeoutMultiplier = st.WriteTotalTimeoutMultiplier;
lptimeouts->WriteTotalTimeoutConstant = st.WriteTotalTimeoutConstant;
return TRUE;
Release 960728 Sun Jul 28 17:57:19 1996 Alexandre Julliard <julliard@lrc.epfl.ch> * [loader/task.c] [include/task.h] Implemented SwitchStackTo()/SwitchStackBack(). * [include/wintypes.h] [loader/main.c] Added __winelib variable to distinguish between emulator and library at run-time. Later on, this should avoid some recompilations when building Winelib. * [windows/property.c] Implemented Win32 functions for window properties. Fri Jul 26 18:00:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu> * [controls/listbox.c] Implemented LBS_SORT style, WM_COMPAREITEM, and WM_DELETEITEM messages. * [controls/menu.c] Call TranslateMessage() to enable shortcuts (on WM_CHAR). * [include/cursoricon.h] Moved #pragma pack(1) back to where it belongs. * [objects/palette.c] RealizeDefaultPalette() maps to system colors only. Do not broadcast palette notifications when in TrueColor. * [objects/color.c] [include/palette.h] Miscellaneous optimizations. Had to fix several "improvements" made to my patch for previous release. * [objects/dib.c] Reverse dib bits order for 24-bit SetDIBits(). * [objects/dc.c] GetDeviceCaps() does not return RC_PALETTE when in TrueColor. * [windows/scroll.c] Scroll update region too. * [windows/message.c] Include QS_MOUSE into the event mask for nonclient mouse message filter. Fixes problems with Word 6 freezing when mouse hits nonclient area. * [windows/win.c] Allow top-level windows to be linked as HWND_TOP in CreateWindow(). * [windows/winpos.c] [windows/mdi.c] Attempt to fix control menu duplication. Fri Jul 26 09:49:35 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [files/drive.c] GetDriveType32A(): return value for CDROM fixed. * [files/file.c] SearchPath* added. * [if1632/gdi32.spec] [objects/brush.c] SetBrushOrgEx() added. * [loader/pe_resource.c] If even loading the default entry fails, we just use the first entry from the resource directory. [loader/task.c] SetSigHandler() stub added, Paradox 4.5 now starts up. * [misc/comm.c] [include/windows.h] [if1632/kernel32.spec] COMM functions updated to win32, not complete. * [misc/lstr.c] FormatMessageA partially implemented. * [include/miscemu.h] [memory/selector.c] [memory/global.c] [miscemu/dosmem.c] DOS memory handling changed: 1MB preallocated block, real-mode segment handling possible, SetSelectorBase into lower physical 1MB possible. * [miscemu/dpmi.c] Real-mode segments changed, real-mode int 21,ax=6506 added. AX=0x0303 added. * [multimedia/time.c] Fixed bug in killTimer. * [objects/bitmap.c] LoadImageA partially implemented. Wed Jul 24 18:20:24 1996 Albrecht Kleine <kleine@ak.sax.de> * [include/dde_mem.h][include/dde_proc.h] [ipc/dde_atom.c][ipc/dde_proc.c][windows/message.c] [ipc/generic_hash.h][library/miscstubs.c] Changes for error free compilation using "--with-ipc": replaced some names with *16-equivalent (e.g. MSG to MSG16), modified prototype of function DDE_GlobalFree() . * [objects/palette.c] Added check for metafile-DC in GDISelectPalette(), GDIRealizePalette(),RealizeDefaultPalette() and IsDCCurrentPalette(). Tue Jul 23 22:46:53 1996 Andrew Lewycky <plewycky@oise.utoronto.ca> * [controls/edit.c] EDIT_WM_Create: Don't EDIT_EM_ReplaceSel if created with lParam = "", fixes Winhelp. * [windows/dialog.c] DIALOG_CreateIndirect: Initialise dlgProc before creating children.
1996-07-28 20:50:11 +02:00
}
/*****************************************************************************
* SetCommTimeouts (KERNEL32.@)
*
* Sets the timeouts used when reading and writing data to/from COMM ports.
*
* PARAMS
* hComm [in] handle of COMM device
* lptimeouts [in] pointer to COMMTIMEOUTS structure
*
2002-06-01 01:06:46 +02:00
* ReadIntervalTimeout
* - converted and passes to linux kernel as c_cc[VTIME]
* ReadTotalTimeoutMultiplier, ReadTotalTimeoutConstant
* - used in ReadFile to calculate GetOverlappedResult's timeout
* WriteTotalTimeoutMultiplier, WriteTotalTimeoutConstant
* - used in WriteFile to calculate GetOverlappedResult's timeout
2000-12-20 00:33:03 +01:00
*
* RETURNS
*
2002-02-27 22:34:54 +01:00
* True if the timeouts were set, false otherwise.
Release 960728 Sun Jul 28 17:57:19 1996 Alexandre Julliard <julliard@lrc.epfl.ch> * [loader/task.c] [include/task.h] Implemented SwitchStackTo()/SwitchStackBack(). * [include/wintypes.h] [loader/main.c] Added __winelib variable to distinguish between emulator and library at run-time. Later on, this should avoid some recompilations when building Winelib. * [windows/property.c] Implemented Win32 functions for window properties. Fri Jul 26 18:00:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu> * [controls/listbox.c] Implemented LBS_SORT style, WM_COMPAREITEM, and WM_DELETEITEM messages. * [controls/menu.c] Call TranslateMessage() to enable shortcuts (on WM_CHAR). * [include/cursoricon.h] Moved #pragma pack(1) back to where it belongs. * [objects/palette.c] RealizeDefaultPalette() maps to system colors only. Do not broadcast palette notifications when in TrueColor. * [objects/color.c] [include/palette.h] Miscellaneous optimizations. Had to fix several "improvements" made to my patch for previous release. * [objects/dib.c] Reverse dib bits order for 24-bit SetDIBits(). * [objects/dc.c] GetDeviceCaps() does not return RC_PALETTE when in TrueColor. * [windows/scroll.c] Scroll update region too. * [windows/message.c] Include QS_MOUSE into the event mask for nonclient mouse message filter. Fixes problems with Word 6 freezing when mouse hits nonclient area. * [windows/win.c] Allow top-level windows to be linked as HWND_TOP in CreateWindow(). * [windows/winpos.c] [windows/mdi.c] Attempt to fix control menu duplication. Fri Jul 26 09:49:35 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [files/drive.c] GetDriveType32A(): return value for CDROM fixed. * [files/file.c] SearchPath* added. * [if1632/gdi32.spec] [objects/brush.c] SetBrushOrgEx() added. * [loader/pe_resource.c] If even loading the default entry fails, we just use the first entry from the resource directory. [loader/task.c] SetSigHandler() stub added, Paradox 4.5 now starts up. * [misc/comm.c] [include/windows.h] [if1632/kernel32.spec] COMM functions updated to win32, not complete. * [misc/lstr.c] FormatMessageA partially implemented. * [include/miscemu.h] [memory/selector.c] [memory/global.c] [miscemu/dosmem.c] DOS memory handling changed: 1MB preallocated block, real-mode segment handling possible, SetSelectorBase into lower physical 1MB possible. * [miscemu/dpmi.c] Real-mode segments changed, real-mode int 21,ax=6506 added. AX=0x0303 added. * [multimedia/time.c] Fixed bug in killTimer. * [objects/bitmap.c] LoadImageA partially implemented. Wed Jul 24 18:20:24 1996 Albrecht Kleine <kleine@ak.sax.de> * [include/dde_mem.h][include/dde_proc.h] [ipc/dde_atom.c][ipc/dde_proc.c][windows/message.c] [ipc/generic_hash.h][library/miscstubs.c] Changes for error free compilation using "--with-ipc": replaced some names with *16-equivalent (e.g. MSG to MSG16), modified prototype of function DDE_GlobalFree() . * [objects/palette.c] Added check for metafile-DC in GDISelectPalette(), GDIRealizePalette(),RealizeDefaultPalette() and IsDCCurrentPalette(). Tue Jul 23 22:46:53 1996 Andrew Lewycky <plewycky@oise.utoronto.ca> * [controls/edit.c] EDIT_WM_Create: Don't EDIT_EM_ReplaceSel if created with lParam = "", fixes Winhelp. * [windows/dialog.c] DIALOG_CreateIndirect: Initialise dlgProc before creating children.
1996-07-28 20:50:11 +02:00
*/
BOOL WINAPI SetCommTimeouts(HANDLE hComm, LPCOMMTIMEOUTS lptimeouts)
2001-02-12 04:49:57 +01:00
{
SERIAL_TIMEOUTS st;
TRACE("(%p, %p)\n", hComm, lptimeouts);
if (lptimeouts == NULL)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
st.ReadIntervalTimeout = lptimeouts->ReadIntervalTimeout;
st.ReadTotalTimeoutMultiplier = lptimeouts->ReadTotalTimeoutMultiplier;
st.ReadTotalTimeoutConstant = lptimeouts->ReadTotalTimeoutConstant;
st.WriteTotalTimeoutMultiplier = lptimeouts->WriteTotalTimeoutMultiplier;
st.WriteTotalTimeoutConstant = lptimeouts->WriteTotalTimeoutConstant;
return DeviceIoControl(hComm, IOCTL_SERIAL_SET_TIMEOUTS,
&st, sizeof(st), NULL, 0, NULL, NULL);
Release 970804 Sun Aug 3 14:03:43 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [documentation/Makefile.in] Create links for files included from wine.texinfo. * [wine.man] Moved to documentation dir. * [if1632/builtin.c] Made SYSTEM.DLL always loaded by default. * [loader/signal.c] [if1632/signal.c] Split signal.c in generic/emulator-specific parts. * [misc/system.c] [if1632/thunk.c] Implemented system timer functions. Fixed InquireSystem parameters. * [msdos/ioports.c] Defined inb/outb functions to avoid including asm/io.h. Use the right instruction for word and dword direct access. * [multimedia/mmsystem.c] Fixed CallTo16 usage. Sat Aug 2 13:05:23 1997 Andreas Mohr <100.30936@germany.net> * [controls/edit.c] When text is inserted into a newly created editline, the caret is placed after the text. Should be placed before the text. Fixed. * [files/file.c] Removed O_TRUNC flag from OF_WRITE mode in _lopen32(). According to doc _lopen() never truncates files. * [if1632/user.spec] [misc/comm.c] Added stub for EnableCommNotification(). * [misc/ver.c] Fixed problem with VerQueryValue*() running over end of name table in rare cases. * [msdos/int21.c] Enhanced ioctlGetDeviceInfo() to correctly return the current drive. * [multimedia/joystick.c] [windows/message.c] Added joystick support !!! Needs Linux >= 2.1.45 or joystick-0.8.0.tar.gz. Fri Aug 1 18:02:09 1997 Morten Welinder <terra@diku.dk> * [if1632/user32.spec] Define DrawAnimatedRects32. * [graphics/painting.c] (DrawAnimatedRects32): Create stub. * [misc/registry.c] Cope with NULL class in RegQueryInfoKey32A. * [if1632/user32.spec] Add GetMenuItemInfo32[AW]. * [controls/menu.c] (InsertMenu32A): Upgrade flags to 8 hex-digits. (MENUEX_ParseResource): First shot at implementation. (LoadMenuIndirect32A): Handle extended menus. (GetMenuItemInfo32[AW]): First shot at implementation. * [include/windows.h] Define MFT_*, MFS_*, MIIM_* macros. Define MENUITEMINFO[AW] structures and pointers. * [Makefile.in] (etags): Add TAGS as target. * [if1632/comctl32.spec] Use Windows 95's ordinals. Add a few missing stubs. Thu Jul 31 14:01:13 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [objects/color.c] Fix for 16 color mode of XFree. * [if1632/kernel32.spec][win32/ordinals.c] Moved/added some ordinal only exported functions from kernel32.dll (mostly thunking preparation stuff). Wed Jul 30 09:16:38 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/init.c] [include/win16drv.h] Escape(SETABORTPROC) returns success to keep pbrush.exe happy. Escape(NEXTBAND) implemented to make HP PCL printer driver work in word. Stub for PATBLT added to start work on printing more than text. Mon Jul 28 13:14:28 1997 Victor Schneider <vischne@ibm.net> * [libtest/expand.c] New Winelib test program. Wed Jul 23 09:37:13 1997 Adrian Harvey <adrian@select.com.au> * [tools/build.c] [tools/build-spec.txt] [if1632/kernel.spec] [if1632/user.spec] Added ability to set filename wine considers the built-in DLLs to be in to something other than name.DLL with new "file" key in .spec files. Made kernel filename KRNL386.EXE (some programs use this name explicitly - ChemOffice install now starts up). Made user filename USER.EXE (just to be tidy). Sun Jul 20 23:51:02 1997 David A. Cuthbert <dacut@henry.ece.cmu.edu> * [controls/menu.c] [misc/tweak.c] [include/tweak.h] Fixed MENU_KeyLeft and MENU_KeyRight to handle multiple-column menus. Misc menu drawing issues for Win95 tweaks fixed. Misc warnings fixed. * [loader/module.c] Spaces are now permitted in file/path names on the command line. If multiple matches can be made, the preferred match is the path/file with fewer spaces. Tue Jul 29 02:21:15 1997 Bruce Milner <Bruce.Milner@genetics.utah.edu> * [misc/compobj.c] Added CLSIDFromString and StringFromCLSID.
1997-08-04 18:34:36 +02:00
}
/***********************************************************************
* GetCommModemStatus (KERNEL32.@)
2000-12-20 00:33:03 +01:00
*
* Obtains the four control register bits if supported by the hardware.
*
* PARAMS
*
* hFile [in] The communications device
* lpModemStat [out] The control register bits
*
2000-12-20 00:33:03 +01:00
* RETURNS
*
* True if the communications handle was good and for hardware that
* control register access, false otherwise.
*/
BOOL WINAPI GetCommModemStatus(HANDLE hFile, LPDWORD lpModemStat)
{
return DeviceIoControl(hFile, IOCTL_SERIAL_GET_MODEMSTATUS,
NULL, 0, lpModemStat, sizeof(DWORD), NULL, NULL);
}
/***********************************************************************
* WaitCommEvent (KERNEL32.@)
*
* Wait until something interesting happens on a COMM port.
* Interesting things (events) are set by calling SetCommMask before
* this function is called.
*
* RETURNS
* TRUE if successful
* FALSE if failure
*
* The set of detected events will be written to *lpdwEventMask
* ERROR_IO_PENDING will be returned the overlapped structure was passed
*
* BUGS:
* Only supports EV_RXCHAR and EV_TXEMPTY
*/
BOOL WINAPI WaitCommEvent(
HANDLE hFile, /* [in] handle of comm port to wait for */
LPDWORD lpdwEvents, /* [out] event(s) that were detected */
LPOVERLAPPED lpOverlapped) /* [in/out] for Asynchronous waiting */
{
return DeviceIoControl(hFile, IOCTL_SERIAL_WAIT_ON_MASK, NULL, 0,
lpdwEvents, sizeof(DWORD), NULL, lpOverlapped);
}
2002-06-01 01:06:46 +02:00
/***********************************************************************
* GetCommProperties (KERNEL32.@)
*
2002-06-01 01:06:46 +02:00
* This function fills in a structure with the capabilities of the
* communications port driver.
*
* RETURNS
*
* TRUE on success, FALSE on failure
* If successful, the lpCommProp structure be filled in with
* properties of the comm port.
*/
BOOL WINAPI GetCommProperties(
2001-02-12 04:49:57 +01:00
HANDLE hFile, /* [in] handle of the comm port */
LPCOMMPROP lpCommProp) /* [out] pointer to struct to be filled */
{
2002-10-25 23:02:30 +02:00
FIXME("(%p %p )\n",hFile,lpCommProp);
if(!lpCommProp)
return FALSE;
/*
* These values should be valid for LINUX's serial driver
* FIXME: Perhaps they deserve an #ifdef LINUX
*/
memset(lpCommProp,0,sizeof(COMMPROP));
lpCommProp->wPacketLength = 1;
lpCommProp->wPacketVersion = 1;
lpCommProp->dwServiceMask = SP_SERIALCOMM;
lpCommProp->dwReserved1 = 0;
lpCommProp->dwMaxTxQueue = 4096;
lpCommProp->dwMaxRxQueue = 4096;
lpCommProp->dwMaxBaud = BAUD_115200;
lpCommProp->dwProvSubType = PST_RS232;
lpCommProp->dwProvCapabilities = PCF_DTRDSR | PCF_PARITY_CHECK | PCF_RTSCTS | PCF_TOTALTIMEOUTS;
2002-06-01 01:06:46 +02:00
lpCommProp->dwSettableParams = SP_BAUD | SP_DATABITS | SP_HANDSHAKING |
SP_PARITY | SP_PARITY_CHECK | SP_STOPBITS ;
lpCommProp->dwSettableBaud = BAUD_075 | BAUD_110 | BAUD_134_5 | BAUD_150 |
BAUD_300 | BAUD_600 | BAUD_1200 | BAUD_1800 | BAUD_2400 | BAUD_4800 |
BAUD_9600 | BAUD_19200 | BAUD_38400 | BAUD_57600 | BAUD_115200 ;
lpCommProp->wSettableData = DATABITS_5 | DATABITS_6 | DATABITS_7 | DATABITS_8 ;
2002-06-01 01:06:46 +02:00
lpCommProp->wSettableStopParity = STOPBITS_10 | STOPBITS_15 | STOPBITS_20 |
PARITY_NONE | PARITY_ODD |PARITY_EVEN | PARITY_MARK | PARITY_SPACE;
lpCommProp->dwCurrentTxQueue = lpCommProp->dwMaxTxQueue;
lpCommProp->dwCurrentRxQueue = lpCommProp->dwMaxRxQueue;
return TRUE;
}
/***********************************************************************
* FIXME:
* The functionality of CommConfigDialogA, GetDefaultCommConfig and
* SetDefaultCommConfig is implemented in a DLL (usually SERIALUI.DLL).
* This is dependent on the type of COMM port, but since it is doubtful
* anybody will get around to implementing support for fancy serial
2002-06-01 01:06:46 +02:00
* ports in WINE, this is hardcoded for the time being. The name of
* this DLL should be stored in and read from the system registry in
* the hive HKEY_LOCAL_MACHINE, key
* System\\CurrentControlSet\\Services\\Class\\Ports\\????
* where ???? is the port number... that is determined by PNP
2002-06-01 01:06:46 +02:00
* The DLL should be loaded when the COMM port is opened, and closed
* when the COMM port is closed. - MJM 20 June 2000
***********************************************************************/
2006-01-24 14:00:32 +01:00
static const WCHAR lpszSerialUI[] = {
2004-10-26 02:16:39 +02:00
's','e','r','i','a','l','u','i','.','d','l','l',0 };
/***********************************************************************
* CommConfigDialogA (KERNEL32.@)
*
* Raises a dialog that allows the user to configure a comm port.
* Fills the COMMCONFIG struct with information specified by the user.
* This function should call a similar routine in the COMM driver...
*
* RETURNS
*
* TRUE on success, FALSE on failure
* If successful, the lpCommConfig structure will contain a new
* configuration for the comm port, as specified by the user.
*
* BUGS
* The library with the CommConfigDialog code is never unloaded.
* Perhaps this should be done when the comm port is closed?
*/
BOOL WINAPI CommConfigDialogA(
2001-02-12 04:49:57 +01:00
LPCSTR lpszDevice, /* [in] name of communications device */
HWND hWnd, /* [in] parent window for the dialog */
2001-02-12 04:49:57 +01:00
LPCOMMCONFIG lpCommConfig) /* [out] pointer to struct to fill */
{
LPWSTR lpDeviceW = NULL;
DWORD len;
BOOL r;
TRACE("(%s, %p, %p)\n", debugstr_a(lpszDevice), hWnd, lpCommConfig);
if (lpszDevice)
{
len = MultiByteToWideChar( CP_ACP, 0, lpszDevice, -1, NULL, 0 );
lpDeviceW = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
MultiByteToWideChar( CP_ACP, 0, lpszDevice, -1, lpDeviceW, len );
}
r = CommConfigDialogW(lpDeviceW, hWnd, lpCommConfig);
HeapFree( GetProcessHeap(), 0, lpDeviceW );
return r;
}
/***********************************************************************
* CommConfigDialogW (KERNEL32.@)
*
* See CommConfigDialogA.
*/
BOOL WINAPI CommConfigDialogW(
2001-02-12 04:49:57 +01:00
LPCWSTR lpszDevice, /* [in] name of communications device */
HWND hWnd, /* [in] parent window for the dialog */
2001-02-12 04:49:57 +01:00
LPCOMMCONFIG lpCommConfig) /* [out] pointer to struct to fill */
{
FARPROC pCommConfigDialog;
2004-10-26 02:25:58 +02:00
HMODULE hConfigModule;
DWORD res = ERROR_INVALID_PARAMETER;
2004-10-26 02:25:58 +02:00
TRACE("(%s, %p, %p)\n", debugstr_w(lpszDevice), hWnd, lpCommConfig);
2004-10-26 02:25:58 +02:00
hConfigModule = LoadLibraryW(lpszSerialUI);
if (hConfigModule) {
pCommConfigDialog = GetProcAddress(hConfigModule, "drvCommConfigDialogW");
if (pCommConfigDialog) {
res = pCommConfigDialog(lpszDevice, hWnd, lpCommConfig);
}
FreeLibrary(hConfigModule);
}
2004-10-26 02:25:58 +02:00
if (res) SetLastError(res);
return (res == ERROR_SUCCESS);
}
/***********************************************************************
* GetCommConfig (KERNEL32.@)
*
* Fill in the COMMCONFIG structure for the comm port hFile
*
* RETURNS
*
* TRUE on success, FALSE on failure
* If successful, lpCommConfig contains the comm port configuration.
2000-12-20 00:33:03 +01:00
*
* BUGS
*
*/
BOOL WINAPI GetCommConfig(
2001-02-12 04:49:57 +01:00
HANDLE hFile, /* [in] The communications device. */
LPCOMMCONFIG lpCommConfig, /* [out] The communications configuration of the device (if it fits). */
2001-02-12 04:49:57 +01:00
LPDWORD lpdwSize) /* [in/out] Initially the size of the configuration buffer/structure,
2002-06-01 01:06:46 +02:00
afterwards the number of bytes copied to the buffer or
2001-02-12 04:49:57 +01:00
the needed size of the buffer. */
{
BOOL r;
TRACE("(%p, %p, %p) *lpdwSize: %u\n", hFile, lpCommConfig, lpdwSize, lpdwSize ? *lpdwSize : 0 );
if(lpCommConfig == NULL)
return FALSE;
2003-12-11 05:25:00 +01:00
r = *lpdwSize < sizeof(COMMCONFIG); /* TRUE if not enough space */
*lpdwSize = sizeof(COMMCONFIG);
2003-12-11 05:25:00 +01:00
if(r)
return FALSE;
lpCommConfig->dwSize = sizeof(COMMCONFIG);
lpCommConfig->wVersion = 1;
lpCommConfig->wReserved = 0;
r = GetCommState(hFile,&lpCommConfig->dcb);
lpCommConfig->dwProviderSubType = PST_RS232;
lpCommConfig->dwProviderOffset = 0;
lpCommConfig->dwProviderSize = 0;
return r;
}
/***********************************************************************
* SetCommConfig (KERNEL32.@)
*
2002-02-27 22:34:54 +01:00
* Sets the configuration of the communications device.
2000-12-20 00:33:03 +01:00
*
* RETURNS
*
* True on success, false if the handle was bad is not a communications device.
*/
BOOL WINAPI SetCommConfig(
2001-08-06 19:50:42 +02:00
HANDLE hFile, /* [in] The communications device. */
LPCOMMCONFIG lpCommConfig, /* [in] The desired configuration. */
DWORD dwSize) /* [in] size of the lpCommConfig struct */
2001-02-12 04:49:57 +01:00
{
TRACE("(%p, %p, %u)\n", hFile, lpCommConfig, dwSize);
2000-12-20 00:33:03 +01:00
return SetCommState(hFile,&lpCommConfig->dcb);
}
/***********************************************************************
* SetDefaultCommConfigW (KERNEL32.@)
2000-12-20 00:33:03 +01:00
*
* Initializes the default configuration for a communication device.
*
* PARAMS
* lpszDevice [I] Name of the device targeted for configuration
* lpCommConfig [I] PTR to a buffer with the configuration for the device
* dwSize [I] Number of bytes in the buffer
2000-12-20 00:33:03 +01:00
*
* RETURNS
* Failure: FALSE
* Success: TRUE, and default configuration saved
2000-12-20 00:33:03 +01:00
*
*/
BOOL WINAPI SetDefaultCommConfigW(LPCWSTR lpszDevice, LPCOMMCONFIG lpCommConfig, DWORD dwSize)
2001-02-12 04:49:57 +01:00
{
FARPROC lpfnSetDefaultCommConfig;
HMODULE hConfigModule;
2004-10-26 02:16:39 +02:00
BOOL r = FALSE;
TRACE("(%s, %p, %u)\n", debugstr_w(lpszDevice), lpCommConfig, dwSize);
2004-10-26 02:16:39 +02:00
hConfigModule = LoadLibraryW(lpszSerialUI);
if(!hConfigModule)
2004-10-26 02:16:39 +02:00
return r;
2004-10-26 02:16:39 +02:00
lpfnSetDefaultCommConfig = GetProcAddress(hConfigModule, "drvSetDefaultCommConfigW");
if (lpfnSetDefaultCommConfig)
r = lpfnSetDefaultCommConfig(lpszDevice, lpCommConfig, dwSize);
2004-10-26 02:16:39 +02:00
FreeLibrary(hConfigModule);
return r;
}
/***********************************************************************
* SetDefaultCommConfigA (KERNEL32.@)
*
* Initializes the default configuration for a communication device.
2000-12-20 00:33:03 +01:00
*
* See SetDefaultCommConfigW.
2000-12-20 00:33:03 +01:00
*
*/
BOOL WINAPI SetDefaultCommConfigA(LPCSTR lpszDevice, LPCOMMCONFIG lpCommConfig, DWORD dwSize)
2001-02-12 04:49:57 +01:00
{
BOOL r;
2004-10-26 02:16:39 +02:00
LPWSTR lpDeviceW = NULL;
DWORD len;
TRACE("(%s, %p, %u)\n", debugstr_a(lpszDevice), lpCommConfig, dwSize);
2004-10-26 02:16:39 +02:00
if (lpszDevice)
{
len = MultiByteToWideChar( CP_ACP, 0, lpszDevice, -1, NULL, 0 );
lpDeviceW = HeapAlloc( GetProcessHeap(), 0, len*sizeof(WCHAR) );
MultiByteToWideChar( CP_ACP, 0, lpszDevice, -1, lpDeviceW, len );
}
r = SetDefaultCommConfigW(lpDeviceW,lpCommConfig,dwSize);
HeapFree( GetProcessHeap(), 0, lpDeviceW );
return r;
}
/***********************************************************************
* GetDefaultCommConfigW (KERNEL32.@)
2000-12-20 00:33:03 +01:00
*
* Acquires the default configuration of the specified communication device. (unicode)
*
* RETURNS
*
* True on successful reading of the default configuration,
* if the device is not found or the buffer is too small.
*/
BOOL WINAPI GetDefaultCommConfigW(
LPCWSTR lpszName, /* [in] The unicode name of the device targeted for configuration. */
2001-02-12 04:49:57 +01:00
LPCOMMCONFIG lpCC, /* [out] The default configuration for the device. */
LPDWORD lpdwSize) /* [in/out] Initially the size of the default configuration buffer,
afterwards the number of bytes copied to the buffer or
the needed size of the buffer. */
2000-12-20 00:33:03 +01:00
{
FARPROC pGetDefaultCommConfig;
HMODULE hConfigModule;
DWORD res = ERROR_INVALID_PARAMETER;
TRACE("(%s, %p, %p) *lpdwSize: %u\n", debugstr_w(lpszName), lpCC, lpdwSize, lpdwSize ? *lpdwSize : 0 );
hConfigModule = LoadLibraryW(lpszSerialUI);
if (hConfigModule) {
pGetDefaultCommConfig = GetProcAddress(hConfigModule, "drvGetDefaultCommConfigW");
if (pGetDefaultCommConfig) {
res = pGetDefaultCommConfig(lpszName, lpCC, lpdwSize);
}
FreeLibrary(hConfigModule);
}
if (res) SetLastError(res);
return (res == ERROR_SUCCESS);
}
/**************************************************************************
* GetDefaultCommConfigA (KERNEL32.@)
2000-12-20 00:33:03 +01:00
*
* Acquires the default configuration of the specified communication device. (ascii)
2000-12-20 00:33:03 +01:00
*
* RETURNS
*
* True on successful reading of the default configuration,
* if the device is not found or the buffer is too small.
*/
BOOL WINAPI GetDefaultCommConfigA(
LPCSTR lpszName, /* [in] The ascii name of the device targeted for configuration. */
2001-02-12 04:49:57 +01:00
LPCOMMCONFIG lpCC, /* [out] The default configuration for the device. */
LPDWORD lpdwSize) /* [in/out] Initially the size of the default configuration buffer,
afterwards the number of bytes copied to the buffer or
the needed size of the buffer. */
{
2000-12-20 00:33:03 +01:00
BOOL ret = FALSE;
UNICODE_STRING lpszNameW;
TRACE("(%s, %p, %p) *lpdwSize: %u\n", debugstr_a(lpszName), lpCC, lpdwSize, lpdwSize ? *lpdwSize : 0 );
if(lpszName) RtlCreateUnicodeStringFromAsciiz(&lpszNameW,lpszName);
else lpszNameW.Buffer = NULL;
ret = GetDefaultCommConfigW(lpszNameW.Buffer,lpCC,lpdwSize);
RtlFreeUnicodeString(&lpszNameW);
return ret;
}