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
|
1999-03-21 16:45:41 +01:00
|
|
|
*
|
2002-03-10 00:29:33 +01:00
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
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
|
|
|
*/
|
|
|
|
|
2001-11-06 21:57:11 +01:00
|
|
|
#include "config.h"
|
2001-07-26 23:43:56 +02:00
|
|
|
#include "wine/port.h"
|
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>
|
2003-09-06 01:08:26 +02:00
|
|
|
#include <stdarg.h>
|
2000-02-10 20:03:02 +01:00
|
|
|
#include <stdio.h>
|
2001-07-18 23:04:23 +02:00
|
|
|
|
2003-06-26 04:08:17 +02:00
|
|
|
#define NONAMELESSUNION
|
|
|
|
#define NONAMELESSSTRUCT
|
2003-09-06 01:08:26 +02:00
|
|
|
#include "windef.h"
|
2001-07-18 23:04:23 +02:00
|
|
|
#include "winbase.h"
|
1999-03-14 13:25:36 +01:00
|
|
|
#include "winerror.h"
|
2006-01-12 13:32:51 +01:00
|
|
|
#include "winioctl.h"
|
|
|
|
#include "ddk/ntddser.h"
|
2001-07-26 23:43:56 +02:00
|
|
|
|
|
|
|
#include "wine/server.h"
|
2004-01-16 03:14:50 +01:00
|
|
|
#include "wine/unicode.h"
|
1999-03-14 13:25:36 +01:00
|
|
|
|
2002-03-10 00:29:33 +01:00
|
|
|
#include "wine/debug.h"
|
1999-03-16 11:52:17 +01:00
|
|
|
|
2002-03-10 00:29:33 +01:00
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(comm);
|
1999-04-19 16:56:29 +02:00
|
|
|
|
2001-07-23 19:56:33 +02:00
|
|
|
/***********************************************************************
|
2003-09-12 02:26:15 +02:00
|
|
|
* COMM_Parse* (Internal)
|
2001-07-23 19:56:33 +02:00
|
|
|
*
|
2003-09-12 02:26:15 +02:00
|
|
|
* The following COMM_Parse* functions are used by the BuildCommDCB
|
|
|
|
* functions to help parse the various parts of the device control string.
|
2001-07-23 19:56:33 +02:00
|
|
|
*/
|
2004-01-16 03:14:50 +01:00
|
|
|
static LPCWSTR COMM_ParseStart(LPCWSTR ptr)
|
2003-09-12 02:26:15 +02:00
|
|
|
{
|
2004-04-19 22:12:14 +02:00
|
|
|
static const WCHAR comW[] = {'C','O','M',0};
|
2004-01-16 03:14:50 +01:00
|
|
|
|
2003-09-12 02:26:15 +02:00
|
|
|
/* The device control string may optionally start with "COMx" followed
|
|
|
|
by an optional ':' and spaces. */
|
2004-01-16 03:14:50 +01:00
|
|
|
if(!strncmpiW(ptr, comW, 3))
|
2003-09-12 02:26:15 +02:00
|
|
|
{
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2004-01-16 03:14:50 +01:00
|
|
|
static LPCWSTR COMM_ParseNumber(LPCWSTR ptr, LPDWORD lpnumber)
|
2003-09-12 02:26:15 +02:00
|
|
|
{
|
|
|
|
if(*ptr < '0' || *ptr > '9') return NULL;
|
2004-01-16 03:14:50 +01:00
|
|
|
*lpnumber = strtoulW(ptr, NULL, 10);
|
2003-09-12 02:26:15 +02:00
|
|
|
while(*ptr >= '0' && *ptr <= '9') ptr++;
|
|
|
|
return ptr;
|
|
|
|
}
|
|
|
|
|
2004-01-16 03:14:50 +01:00
|
|
|
static LPCWSTR COMM_ParseParity(LPCWSTR ptr, LPBYTE lpparity)
|
2003-09-12 02:26:15 +02:00
|
|
|
{
|
|
|
|
/* 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 */
|
|
|
|
|
2004-01-16 03:14:50 +01:00
|
|
|
switch(toupperW(*ptr++))
|
2003-09-12 02:26:15 +02:00
|
|
|
{
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2004-01-16 03:14:50 +01:00
|
|
|
static LPCWSTR COMM_ParseByteSize(LPCWSTR ptr, LPBYTE lpbytesize)
|
2001-07-23 19:56:33 +02:00
|
|
|
{
|
2003-09-12 02:26:15 +02:00
|
|
|
DWORD temp;
|
|
|
|
|
|
|
|
if(!(ptr = COMM_ParseNumber(ptr, &temp)))
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
if(temp >= 5 && temp <= 8)
|
2001-07-23 19:56:33 +02:00
|
|
|
{
|
2003-09-12 02:26:15 +02:00
|
|
|
*lpbytesize = temp;
|
|
|
|
return ptr;
|
2001-07-23 19:56:33 +02:00
|
|
|
}
|
2003-09-12 02:26:15 +02:00
|
|
|
else
|
|
|
|
return NULL;
|
|
|
|
}
|
2001-07-23 19:56:33 +02:00
|
|
|
|
2004-01-16 03:14:50 +01:00
|
|
|
static LPCWSTR COMM_ParseStopBits(LPCWSTR ptr, LPBYTE lpstopbits)
|
2003-09-12 02:26:15 +02:00
|
|
|
{
|
|
|
|
DWORD temp;
|
2004-04-19 22:12:14 +02:00
|
|
|
static const WCHAR stopbits15W[] = {'1','.','5',0};
|
2003-09-12 02:26:15 +02:00
|
|
|
|
2004-01-16 03:14:50 +01:00
|
|
|
if(!strncmpW(stopbits15W, ptr, 3))
|
2003-09-12 02:26:15 +02:00
|
|
|
{
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2004-01-16 03:14:50 +01:00
|
|
|
static LPCWSTR COMM_ParseOnOff(LPCWSTR ptr, LPDWORD lponoff)
|
2003-09-12 02:26:15 +02:00
|
|
|
{
|
2004-04-19 22:12:14 +02:00
|
|
|
static const WCHAR onW[] = {'o','n',0};
|
|
|
|
static const WCHAR offW[] = {'o','f','f',0};
|
2004-01-16 03:14:50 +01:00
|
|
|
|
|
|
|
if(!strncmpiW(onW, ptr, 2))
|
2003-09-12 02:26:15 +02:00
|
|
|
{
|
|
|
|
ptr += 2;
|
|
|
|
*lponoff = 1;
|
|
|
|
}
|
2004-01-16 03:14:50 +01:00
|
|
|
else if(!strncmpiW(offW, ptr, 3))
|
2003-09-12 02:26:15 +02:00
|
|
|
{
|
|
|
|
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"
|
|
|
|
*/
|
2004-01-16 03:14:50 +01:00
|
|
|
static BOOL COMM_BuildOldCommDCB(LPCWSTR device, LPDCB lpdcb)
|
2003-09-12 02:26:15 +02:00
|
|
|
{
|
2004-01-16 03:14:50 +01:00
|
|
|
WCHAR last = 0;
|
2003-09-12 02:26:15 +02:00
|
|
|
|
|
|
|
if(!(device = COMM_ParseNumber(device, &lpdcb->BaudRate)))
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
switch(lpdcb->BaudRate)
|
|
|
|
{
|
2001-07-23 19:56:33 +02:00
|
|
|
case 11:
|
|
|
|
case 30:
|
|
|
|
case 60:
|
2003-09-12 02:26:15 +02:00
|
|
|
lpdcb->BaudRate *= 10;
|
2001-07-23 19:56:33 +02:00
|
|
|
break;
|
|
|
|
case 12:
|
|
|
|
case 24:
|
|
|
|
case 48:
|
|
|
|
case 96:
|
2003-09-12 02:26:15 +02:00
|
|
|
lpdcb->BaudRate *= 100;
|
2001-07-23 19:56:33 +02:00
|
|
|
break;
|
|
|
|
case 19:
|
2003-09-12 02:26:15 +02:00
|
|
|
lpdcb->BaudRate = 19200;
|
2001-07-23 19:56:33 +02:00
|
|
|
break;
|
|
|
|
}
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2003-09-12 02:26:15 +02:00
|
|
|
while(*device == ' ') device++;
|
|
|
|
if(*device++ != ',') return FALSE;
|
|
|
|
while(*device == ' ') device++;
|
2001-07-23 19:56:33 +02:00
|
|
|
|
2003-09-12 02:26:15 +02:00
|
|
|
if(!(device = COMM_ParseParity(device, &lpdcb->Parity)))
|
|
|
|
return FALSE;
|
2001-07-23 19:56:33 +02:00
|
|
|
|
2003-09-12 02:26:15 +02:00
|
|
|
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++;
|
2004-01-16 03:14:50 +01:00
|
|
|
if(*device) last = toupperW(*device++);
|
2003-09-12 02:26:15 +02:00
|
|
|
while(*device == ' ') device++;
|
|
|
|
}
|
2003-09-15 22:00:54 +02:00
|
|
|
|
|
|
|
/* Win NT sets the flow control members based on (or lack of) the last
|
|
|
|
parameter. Win 9x does not set these members. */
|
2003-09-12 02:26:15 +02:00
|
|
|
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;
|
2003-09-12 02:26:15 +02:00
|
|
|
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;
|
2003-09-12 02:26:15 +02:00
|
|
|
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;
|
2001-07-23 19:56:33 +02:00
|
|
|
default:
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2003-09-12 02:26:15 +02:00
|
|
|
/* This should be the end of the string. */
|
|
|
|
if(*device) return FALSE;
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
2001-07-23 19:56:33 +02:00
|
|
|
|
2003-09-12 02:26:15 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* 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"
|
|
|
|
*/
|
2004-01-16 03:14:50 +01:00
|
|
|
static BOOL COMM_BuildNewCommDCB(LPCWSTR device, LPDCB lpdcb, LPCOMMTIMEOUTS lptimeouts)
|
2003-09-12 02:26:15 +02:00
|
|
|
{
|
|
|
|
DWORD temp;
|
|
|
|
BOOL baud = FALSE, stop = FALSE;
|
2004-04-19 22:12:14 +02:00
|
|
|
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};
|
2003-09-12 02:26:15 +02:00
|
|
|
|
|
|
|
while(*device)
|
|
|
|
{
|
|
|
|
while(*device == ' ') device++;
|
|
|
|
|
2004-01-16 03:14:50 +01:00
|
|
|
if(!strncmpiW(baudW, device, 5))
|
2003-09-12 02:26:15 +02:00
|
|
|
{
|
|
|
|
baud = TRUE;
|
|
|
|
|
|
|
|
if(!(device = COMM_ParseNumber(device + 5, &lpdcb->BaudRate)))
|
|
|
|
return FALSE;
|
|
|
|
}
|
2004-01-16 03:14:50 +01:00
|
|
|
else if(!strncmpiW(parityW, device, 7))
|
2003-09-12 02:26:15 +02:00
|
|
|
{
|
|
|
|
if(!(device = COMM_ParseParity(device + 7, &lpdcb->Parity)))
|
|
|
|
return FALSE;
|
|
|
|
}
|
2004-01-16 03:14:50 +01:00
|
|
|
else if(!strncmpiW(dataW, device, 5))
|
2003-09-12 02:26:15 +02:00
|
|
|
{
|
|
|
|
if(!(device = COMM_ParseByteSize(device + 5, &lpdcb->ByteSize)))
|
|
|
|
return FALSE;
|
|
|
|
}
|
2004-01-16 03:14:50 +01:00
|
|
|
else if(!strncmpiW(stopW, device, 5))
|
2003-09-12 02:26:15 +02:00
|
|
|
{
|
|
|
|
stop = TRUE;
|
|
|
|
|
|
|
|
if(!(device = COMM_ParseStopBits(device + 5, &lpdcb->StopBits)))
|
|
|
|
return FALSE;
|
|
|
|
}
|
2004-01-16 03:14:50 +01:00
|
|
|
else if(!strncmpiW(toW, device, 3))
|
2003-09-12 02:26:15 +02:00
|
|
|
{
|
|
|
|
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;
|
|
|
|
}
|
2004-01-16 03:14:50 +01:00
|
|
|
else if(!strncmpiW(xonW, device, 4))
|
2003-09-12 02:26:15 +02:00
|
|
|
{
|
|
|
|
if(!(device = COMM_ParseOnOff(device + 4, &temp)))
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
lpdcb->fOutX = temp;
|
|
|
|
lpdcb->fInX = temp;
|
|
|
|
}
|
2004-01-16 03:14:50 +01:00
|
|
|
else if(!strncmpiW(odsrW, device, 5))
|
2003-09-12 02:26:15 +02:00
|
|
|
{
|
|
|
|
if(!(device = COMM_ParseOnOff(device + 5, &temp)))
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
lpdcb->fOutxDsrFlow = temp;
|
|
|
|
}
|
2004-01-16 03:14:50 +01:00
|
|
|
else if(!strncmpiW(octsW, device, 5))
|
2003-09-12 02:26:15 +02:00
|
|
|
{
|
|
|
|
if(!(device = COMM_ParseOnOff(device + 5, &temp)))
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
lpdcb->fOutxCtsFlow = temp;
|
|
|
|
}
|
2004-01-16 03:14:50 +01:00
|
|
|
else if(!strncmpiW(dtrW, device, 4))
|
2003-09-12 02:26:15 +02:00
|
|
|
{
|
|
|
|
if(!(device = COMM_ParseOnOff(device + 4, &temp)))
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
lpdcb->fDtrControl = temp;
|
|
|
|
}
|
2004-01-16 03:14:50 +01:00
|
|
|
else if(!strncmpiW(rtsW, device, 4))
|
2003-09-12 02:26:15 +02:00
|
|
|
{
|
|
|
|
if(!(device = COMM_ParseOnOff(device + 4, &temp)))
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
lpdcb->fRtsControl = temp;
|
|
|
|
}
|
2004-01-16 03:14:50 +01:00
|
|
|
else if(!strncmpiW(idsrW, device, 5))
|
2003-09-12 02:26:15 +02:00
|
|
|
{
|
|
|
|
if(!(device = COMM_ParseOnOff(device + 5, &temp)))
|
|
|
|
return FALSE;
|
|
|
|
|
2003-09-15 22:00:54 +02:00
|
|
|
/* Win NT sets the fDsrSensitivity member based on the
|
|
|
|
idsr parameter. Win 9x sets fOutxDsrFlow instead. */
|
2003-09-12 02:26:15 +02:00
|
|
|
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
|
|
|
}
|
2001-07-23 19:56:33 +02:00
|
|
|
|
2003-09-12 02:26:15 +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;
|
2001-07-23 19:56:33 +02:00
|
|
|
}
|
|
|
|
|
2001-10-21 17:01:20 +02:00
|
|
|
return TRUE;
|
2001-07-23 19:56:33 +02:00
|
|
|
}
|
|
|
|
|
1999-03-21 16:45:41 +01:00
|
|
|
/**************************************************************************
|
2001-06-13 22:13:18 +02:00
|
|
|
* 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.
|
1999-03-21 16:45:41 +01:00
|
|
|
*/
|
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. */
|
1999-03-21 16:45:41 +01:00
|
|
|
{
|
|
|
|
return BuildCommDCBAndTimeoutsA(device,lpdcb,NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************
|
2004-01-16 03:14:50 +01:00
|
|
|
* 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
|
|
|
|
*
|
2004-01-16 03:14:50 +01:00
|
|
|
* True on success, false bad handles etc.
|
1999-03-21 16:45:41 +01:00
|
|
|
*/
|
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. */
|
2003-09-12 02:26:15 +02:00
|
|
|
LPCOMMTIMEOUTS lptimeouts) /* [in] The COMMTIMEOUTS structure to be updated. */
|
2004-01-16 03:14:50 +01:00
|
|
|
{
|
|
|
|
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. */
|
1999-03-21 16:45:41 +01:00
|
|
|
{
|
2003-09-12 02:26:15 +02:00
|
|
|
DCB dcb;
|
|
|
|
COMMTIMEOUTS timeouts;
|
|
|
|
BOOL result;
|
2004-01-16 03:14:50 +01:00
|
|
|
LPCWSTR ptr = devid;
|
2008-03-03 23:27:46 +01:00
|
|
|
|
2004-01-16 03:14:50 +01:00
|
|
|
TRACE("(%s,%p,%p)\n",debugstr_w(devid),lpdcb,lptimeouts);
|
1999-03-21 16:45:41 +01:00
|
|
|
|
2008-03-03 23:27:46 +01:00
|
|
|
memset(&timeouts, 0, sizeof timeouts);
|
|
|
|
|
2003-09-12 02:26:15 +02:00
|
|
|
/* Set DCBlength. (Windows NT does not do this, but 9x does) */
|
|
|
|
lpdcb->DCBlength = sizeof(DCB);
|
1999-03-21 16:45:41 +01:00
|
|
|
|
2003-09-12 02:26:15 +02:00
|
|
|
/* 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) */
|
2008-03-03 23:27:46 +01:00
|
|
|
dcb = *lpdcb;
|
|
|
|
if(lptimeouts) timeouts = *lptimeouts;
|
1999-03-21 16:45:41 +01:00
|
|
|
|
2003-09-12 02:26:15 +02:00
|
|
|
ptr = COMM_ParseStart(ptr);
|
|
|
|
|
|
|
|
if(ptr == NULL)
|
|
|
|
result = FALSE;
|
2004-01-16 03:14:50 +01:00
|
|
|
else if(strchrW(ptr, ','))
|
2003-09-12 02:26:15 +02:00
|
|
|
result = COMM_BuildOldCommDCB(ptr, &dcb);
|
|
|
|
else
|
|
|
|
result = COMM_BuildNewCommDCB(ptr, &dcb, &timeouts);
|
|
|
|
|
|
|
|
if(result)
|
|
|
|
{
|
2008-03-03 23:27:46 +01:00
|
|
|
*lpdcb = dcb;
|
|
|
|
if(lptimeouts) *lptimeouts = timeouts;
|
2003-09-12 02:26:15 +02:00
|
|
|
return TRUE;
|
1999-03-21 16:45:41 +01:00
|
|
|
}
|
2003-09-12 02:26:15 +02:00
|
|
|
else
|
|
|
|
{
|
2004-01-16 03:14:50 +01:00
|
|
|
WARN("Invalid device control string: %s\n", debugstr_w(devid));
|
2003-09-12 02:26:15 +02:00
|
|
|
SetLastError(ERROR_INVALID_PARAMETER);
|
|
|
|
return FALSE;
|
|
|
|
}
|
1999-03-21 16:45:41 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************
|
2001-06-13 22:13:18 +02:00
|
|
|
* 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.
|
1999-03-21 16:45:41 +01:00
|
|
|
*/
|
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. */
|
1999-03-21 16:45:41 +01:00
|
|
|
{
|
|
|
|
return BuildCommDCBAndTimeoutsW(devid,lpdcb,NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*****************************************************************************
|
2001-06-13 22:13:18 +02:00
|
|
|
* SetCommBreak (KERNEL32.@)
|
2000-12-20 00:33:03 +01:00
|
|
|
*
|
|
|
|
* Halts the transmission of characters to a communications device.
|
|
|
|
*
|
2006-01-12 13:32:51 +01:00
|
|
|
* 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.
|
1999-03-21 16:45:41 +01:00
|
|
|
*/
|
2006-01-12 13:32:51 +01:00
|
|
|
BOOL WINAPI SetCommBreak(HANDLE handle)
|
1999-03-21 16:45:41 +01:00
|
|
|
{
|
2009-02-05 14:37:46 +01:00
|
|
|
DWORD dwBytesReturned;
|
|
|
|
return DeviceIoControl(handle, IOCTL_SERIAL_SET_BREAK_ON, NULL, 0, NULL, 0, &dwBytesReturned, NULL);
|
1999-03-21 16:45:41 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/*****************************************************************************
|
2001-06-13 22:13:18 +02:00
|
|
|
* ClearCommBreak (KERNEL32.@)
|
2000-12-20 00:33:03 +01:00
|
|
|
*
|
|
|
|
* Resumes character transmission from a communication device.
|
|
|
|
*
|
2006-01-12 13:32:51 +01:00
|
|
|
* 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.
|
1999-03-21 16:45:41 +01:00
|
|
|
*/
|
2006-01-12 13:32:51 +01:00
|
|
|
BOOL WINAPI ClearCommBreak(HANDLE handle)
|
1999-03-21 16:45:41 +01:00
|
|
|
{
|
2009-02-05 14:37:46 +01:00
|
|
|
DWORD dwBytesReturned;
|
|
|
|
return DeviceIoControl(handle, IOCTL_SERIAL_SET_BREAK_OFF, NULL, 0, NULL, 0, &dwBytesReturned, NULL);
|
1999-03-21 16:45:41 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/*****************************************************************************
|
2001-06-13 22:13:18 +02:00
|
|
|
* EscapeCommFunction (KERNEL32.@)
|
2000-12-20 00:33:03 +01:00
|
|
|
*
|
|
|
|
* Directs a communication device to perform an extended function.
|
|
|
|
*
|
2006-05-07 14:11:05 +02:00
|
|
|
* 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.
|
1999-03-21 16:45:41 +01:00
|
|
|
*/
|
2006-05-07 14:11:05 +02:00
|
|
|
BOOL WINAPI EscapeCommFunction(HANDLE handle, UINT func)
|
1999-03-21 16:45:41 +01:00
|
|
|
{
|
2006-05-07 14:11:05 +02:00
|
|
|
DWORD ioc;
|
2009-02-05 14:37:46 +01:00
|
|
|
DWORD dwBytesReturned;
|
1999-03-21 16:45:41 +01:00
|
|
|
|
2006-05-07 14:11:05 +02:00
|
|
|
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;
|
|
|
|
}
|
2009-02-05 14:37:46 +01:00
|
|
|
return DeviceIoControl(handle, ioc, NULL, 0, NULL, 0, &dwBytesReturned, NULL);
|
1999-03-21 16:45:41 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/********************************************************************
|
2001-06-13 22:13:18 +02:00
|
|
|
* PurgeComm (KERNEL32.@)
|
2000-12-20 00:33:03 +01:00
|
|
|
*
|
|
|
|
* Terminates pending operations and/or discards buffers on a
|
|
|
|
* communication resource.
|
|
|
|
*
|
2006-02-06 11:36:19 +01:00
|
|
|
* 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.
|
1999-03-21 16:45:41 +01:00
|
|
|
*/
|
2006-02-06 11:36:19 +01:00
|
|
|
BOOL WINAPI PurgeComm(HANDLE handle, DWORD flags)
|
1999-03-21 16:45:41 +01:00
|
|
|
{
|
2009-02-05 14:37:46 +01:00
|
|
|
DWORD dwBytesReturned;
|
2006-02-06 11:36:19 +01:00
|
|
|
return DeviceIoControl(handle, IOCTL_SERIAL_PURGE, &flags, sizeof(flags),
|
2009-02-05 14:37:46 +01:00
|
|
|
NULL, 0, &dwBytesReturned, NULL);
|
1999-03-21 16:45:41 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/*****************************************************************************
|
2001-06-13 22:13:18 +02:00
|
|
|
* 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.
|
|
|
|
*
|
2006-02-27 22:22:06 +01:00
|
|
|
* 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.
|
1999-03-21 16:45:41 +01:00
|
|
|
*/
|
2006-02-27 22:22:06 +01:00
|
|
|
BOOL WINAPI ClearCommError(HANDLE handle, LPDWORD errors, LPCOMSTAT lpStat)
|
1999-03-21 16:45:41 +01:00
|
|
|
{
|
2006-02-27 22:22:06 +01:00
|
|
|
SERIAL_STATUS ss;
|
2009-02-05 14:37:46 +01:00
|
|
|
DWORD dwBytesReturned;
|
1999-03-21 16:45:41 +01:00
|
|
|
|
2006-02-27 22:22:06 +01:00
|
|
|
if (!DeviceIoControl(handle, IOCTL_SERIAL_GET_COMMSTATUS, NULL, 0,
|
2009-02-05 14:37:46 +01:00
|
|
|
&ss, sizeof(ss), &dwBytesReturned, NULL))
|
2006-02-27 22:22:06 +01:00
|
|
|
return FALSE;
|
1999-03-21 16:45:41 +01:00
|
|
|
|
2006-02-27 22:22:06 +01:00
|
|
|
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)
|
1999-03-21 16:45:41 +01:00
|
|
|
{
|
2006-02-27 22:22:06 +01:00
|
|
|
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;
|
1999-03-21 16:45:41 +01:00
|
|
|
}
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*****************************************************************************
|
2001-06-13 22:13:18 +02:00
|
|
|
* 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.
|
|
|
|
*
|
2006-05-07 14:11:02 +02:00
|
|
|
* 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.
|
1999-03-21 16:45:41 +01:00
|
|
|
*/
|
2006-05-07 14:11:02 +02:00
|
|
|
BOOL WINAPI SetupComm(HANDLE handle, DWORD insize, DWORD outsize)
|
1999-03-21 16:45:41 +01:00
|
|
|
{
|
2006-05-07 14:11:02 +02:00
|
|
|
SERIAL_QUEUE_SIZE sqs;
|
2009-02-05 14:37:46 +01:00
|
|
|
DWORD dwBytesReturned;
|
1999-03-21 16:45:41 +01:00
|
|
|
|
2006-05-07 14:11:02 +02:00
|
|
|
sqs.InSize = insize;
|
|
|
|
sqs.OutSize = outsize;
|
|
|
|
return DeviceIoControl(handle, IOCTL_SERIAL_SET_QUEUE_SIZE,
|
2009-02-05 14:37:46 +01:00
|
|
|
&sqs, sizeof(sqs), NULL, 0, &dwBytesReturned, NULL);
|
2002-06-01 01:06:46 +02:00
|
|
|
}
|
1999-03-21 16:45:41 +01:00
|
|
|
|
|
|
|
/*****************************************************************************
|
2001-06-13 22:13:18 +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
|
|
|
*
|
2006-02-06 11:37:06 +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.
|
1999-03-21 16:45:41 +01:00
|
|
|
*/
|
2006-02-06 11:37:06 +01:00
|
|
|
BOOL WINAPI GetCommMask(HANDLE handle, LPDWORD evtmask)
|
1999-03-21 16:45:41 +01:00
|
|
|
{
|
2009-02-05 14:37:46 +01:00
|
|
|
DWORD dwBytesReturned;
|
2002-10-25 23:02:30 +02:00
|
|
|
TRACE("handle %p, mask %p\n", handle, evtmask);
|
2006-02-06 11:37:06 +01:00
|
|
|
return DeviceIoControl(handle, IOCTL_SERIAL_GET_WAIT_MASK,
|
2009-02-05 14:37:46 +01:00
|
|
|
NULL, 0, evtmask, sizeof(*evtmask), &dwBytesReturned, NULL);
|
1999-03-21 16:45:41 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/*****************************************************************************
|
2001-06-13 22:13:18 +02:00
|
|
|
* 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.)
|
|
|
|
*
|
2006-02-06 11:37:06 +01:00
|
|
|
* 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.
|
1999-03-21 16:45:41 +01:00
|
|
|
*/
|
2006-02-06 11:37:06 +01:00
|
|
|
BOOL WINAPI SetCommMask(HANDLE handle, DWORD evtmask)
|
1999-03-21 16:45:41 +01:00
|
|
|
{
|
2009-02-05 14:37:46 +01:00
|
|
|
DWORD dwBytesReturned;
|
2006-10-12 22:56:29 +02:00
|
|
|
TRACE("handle %p, mask %x\n", handle, evtmask);
|
2006-02-06 11:37:06 +01:00
|
|
|
return DeviceIoControl(handle, IOCTL_SERIAL_SET_WAIT_MASK,
|
2009-02-05 14:37:46 +01:00
|
|
|
&evtmask, sizeof(evtmask), NULL, 0, &dwBytesReturned, 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
|
|
|
}
|
|
|
|
|
2006-05-07 14:10:32 +02:00
|
|
|
static void dump_dcb(const DCB* lpdcb)
|
|
|
|
{
|
2006-10-12 22:56:29 +02:00
|
|
|
TRACE("bytesize=%d baudrate=%d fParity=%d Parity=%d stopbits=%d\n",
|
2006-05-07 14:10:32 +02:00
|
|
|
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
|
|
|
/*****************************************************************************
|
2001-06-13 22:13:18 +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.
|
|
|
|
*
|
2006-05-07 14:10:32 +02:00
|
|
|
* 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
|
|
|
*/
|
2006-05-07 14:10:32 +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
|
|
|
{
|
2006-05-07 14:10:36 +02:00
|
|
|
SERIAL_BAUD_RATE sbr;
|
|
|
|
SERIAL_LINE_CONTROL slc;
|
2006-05-07 14:10:39 +02:00
|
|
|
SERIAL_HANDFLOW shf;
|
2006-05-07 14:10:43 +02:00
|
|
|
SERIAL_CHARS sc;
|
2009-02-05 14:37:46 +01:00
|
|
|
DWORD dwBytesReturned;
|
2006-05-07 14:10:36 +02:00
|
|
|
|
2006-05-07 14:10:32 +02:00
|
|
|
if (lpdcb == NULL)
|
|
|
|
{
|
|
|
|
SetLastError(ERROR_INVALID_PARAMETER);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
dump_dcb(lpdcb);
|
|
|
|
|
|
|
|
sbr.BaudRate = lpdcb->BaudRate;
|
2006-05-07 14:10:36 +02:00
|
|
|
|
|
|
|
slc.StopBits = lpdcb->StopBits;
|
|
|
|
slc.Parity = lpdcb->Parity;
|
|
|
|
slc.WordLength = lpdcb->ByteSize;
|
|
|
|
|
2006-05-07 14:10:39 +02:00
|
|
|
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)
|
2006-05-07 14:10:39 +02:00
|
|
|
{
|
|
|
|
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;
|
|
|
|
|
2006-05-07 14:10:43 +02:00
|
|
|
sc.EofChar = lpdcb->EofChar;
|
|
|
|
sc.ErrorChar = lpdcb->ErrorChar;
|
|
|
|
sc.BreakChar = 0;
|
|
|
|
sc.EventChar = lpdcb->EvtChar;
|
|
|
|
sc.XonChar = lpdcb->XonChar;
|
|
|
|
sc.XoffChar = lpdcb->XoffChar;
|
|
|
|
|
2006-05-07 14:10:39 +02:00
|
|
|
/* note: change DTR/RTS lines after setting the comm attributes,
|
|
|
|
* so flow control does not interfere.
|
|
|
|
*/
|
2006-05-07 14:10:43 +02:00
|
|
|
return (DeviceIoControl(handle, IOCTL_SERIAL_SET_BAUD_RATE,
|
2009-02-05 14:37:46 +01:00
|
|
|
&sbr, sizeof(sbr), NULL, 0, &dwBytesReturned, NULL) &&
|
2006-05-07 14:10:43 +02:00
|
|
|
DeviceIoControl(handle, IOCTL_SERIAL_SET_LINE_CONTROL,
|
2009-02-05 14:37:46 +01:00
|
|
|
&slc, sizeof(slc), NULL, 0, &dwBytesReturned, NULL) &&
|
2006-05-07 14:10:43 +02:00
|
|
|
DeviceIoControl(handle, IOCTL_SERIAL_SET_HANDFLOW,
|
2009-02-05 14:37:46 +01:00
|
|
|
&shf, sizeof(shf), NULL, 0, &dwBytesReturned, NULL) &&
|
2006-05-07 14:10:43 +02:00
|
|
|
DeviceIoControl(handle, IOCTL_SERIAL_SET_CHARS,
|
2009-02-05 14:37:46 +01:00
|
|
|
&sc, sizeof(sc), NULL, 0, &dwBytesReturned, 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
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************
|
2001-06-13 22:13:18 +02:00
|
|
|
* GetCommState (KERNEL32.@)
|
2000-12-20 00:33:03 +01:00
|
|
|
*
|
|
|
|
* Fills in a device control block with information from a communications device.
|
|
|
|
*
|
2006-05-07 14:10:46 +02:00
|
|
|
* 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
|
|
|
*/
|
2006-05-07 14:10:46 +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
|
|
|
{
|
2006-05-07 14:10:46 +02:00
|
|
|
SERIAL_BAUD_RATE sbr;
|
2006-05-07 14:10:49 +02:00
|
|
|
SERIAL_LINE_CONTROL slc;
|
2006-05-07 14:10:52 +02:00
|
|
|
SERIAL_HANDFLOW shf;
|
2006-05-07 14:10:55 +02:00
|
|
|
SERIAL_CHARS sc;
|
2009-02-05 14:37:46 +01:00
|
|
|
DWORD dwBytesReturned;
|
2006-05-07 14:10:46 +02:00
|
|
|
|
|
|
|
TRACE("handle %p, ptr %p\n", handle, lpdcb);
|
1999-03-14 13:25:36 +01:00
|
|
|
|
2006-05-07 14:10:46 +02:00
|
|
|
if (!lpdcb)
|
|
|
|
{
|
|
|
|
SetLastError(ERROR_INVALID_PARAMETER);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!DeviceIoControl(handle, IOCTL_SERIAL_GET_BAUD_RATE,
|
2009-02-05 14:37:46 +01:00
|
|
|
NULL, 0, &sbr, sizeof(sbr), &dwBytesReturned, NULL) ||
|
2006-05-07 14:10:49 +02:00
|
|
|
!DeviceIoControl(handle, IOCTL_SERIAL_GET_LINE_CONTROL,
|
2009-02-05 14:37:46 +01:00
|
|
|
NULL, 0, &slc, sizeof(slc), &dwBytesReturned, NULL) ||
|
2006-05-07 14:10:52 +02:00
|
|
|
!DeviceIoControl(handle, IOCTL_SERIAL_GET_HANDFLOW,
|
2009-02-05 14:37:46 +01:00
|
|
|
NULL, 0, &shf, sizeof(shf), &dwBytesReturned, NULL) ||
|
2006-05-07 14:10:55 +02:00
|
|
|
!DeviceIoControl(handle, IOCTL_SERIAL_GET_CHARS,
|
2009-02-05 14:37:46 +01:00
|
|
|
NULL, 0, &sc, sizeof(sc), &dwBytesReturned, NULL))
|
2006-05-07 14:10:46 +02:00
|
|
|
return FALSE;
|
2006-05-07 14:10:49 +02:00
|
|
|
|
2006-05-07 14:10:52 +02:00
|
|
|
memset(lpdcb, 0, sizeof(*lpdcb));
|
|
|
|
lpdcb->DCBlength = sizeof(*lpdcb);
|
|
|
|
|
2006-05-07 14:10:46 +02:00
|
|
|
/* yes, they seem no never be (re)set on NT */
|
|
|
|
lpdcb->fBinary = 1;
|
|
|
|
lpdcb->fParity = 0;
|
|
|
|
|
|
|
|
lpdcb->BaudRate = sbr.BaudRate;
|
2006-05-07 14:10:49 +02:00
|
|
|
|
|
|
|
lpdcb->StopBits = slc.StopBits;
|
|
|
|
lpdcb->Parity = slc.Parity;
|
|
|
|
lpdcb->ByteSize = slc.WordLength;
|
|
|
|
|
2006-05-07 14:10:52 +02:00
|
|
|
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
|
|
|
|
2006-05-07 14:10:52 +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
|
|
|
|
2006-05-07 14:10:55 +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
|
|
|
|
2006-05-07 14:10:46 +02:00
|
|
|
TRACE("OK\n");
|
|
|
|
dump_dcb(lpdcb);
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2006-05-07 14:10: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
|
|
|
}
|
|
|
|
|
|
|
|
/*****************************************************************************
|
2001-06-13 22:13:18 +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.
|
|
|
|
*
|
2006-02-06 11:38:53 +01:00
|
|
|
* 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
|
|
|
*/
|
2006-02-06 11:38:53 +01: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
|
|
|
{
|
2009-02-05 14:37:46 +01:00
|
|
|
DWORD dwBytesReturned;
|
2006-02-06 11:38:53 +01:00
|
|
|
return DeviceIoControl(hComm, IOCTL_SERIAL_IMMEDIATE_CHAR,
|
2009-02-05 14:37:46 +01:00
|
|
|
&chTransmit, sizeof(chTransmit), NULL, 0, &dwBytesReturned, 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
|
|
|
/*****************************************************************************
|
2001-06-13 22:13:18 +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
|
|
|
*
|
2006-05-07 14:10:58 +02: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
|
|
|
*/
|
2006-05-07 14:10:58 +02:00
|
|
|
BOOL WINAPI GetCommTimeouts(HANDLE hComm, LPCOMMTIMEOUTS lptimeouts)
|
1997-08-24 18:00:30 +02:00
|
|
|
{
|
2006-05-07 14:10:58 +02:00
|
|
|
SERIAL_TIMEOUTS st;
|
2009-02-05 14:37:46 +01:00
|
|
|
DWORD dwBytesReturned;
|
2000-09-16 22:55:12 +02:00
|
|
|
|
2006-05-07 14:10:58 +02:00
|
|
|
TRACE("(%p, %p)\n", hComm, lptimeouts);
|
|
|
|
if (!lptimeouts)
|
2000-09-16 22:55:12 +02:00
|
|
|
{
|
|
|
|
SetLastError(ERROR_INVALID_PARAMETER);
|
|
|
|
return FALSE;
|
|
|
|
}
|
2006-05-07 14:10:58 +02:00
|
|
|
if (!DeviceIoControl(hComm, IOCTL_SERIAL_GET_TIMEOUTS,
|
2009-02-05 14:37:46 +01:00
|
|
|
NULL, 0, &st, sizeof(st), &dwBytesReturned, NULL))
|
2006-05-07 14:10:58 +02:00
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
/*****************************************************************************
|
2001-06-13 22:13:18 +02:00
|
|
|
* SetCommTimeouts (KERNEL32.@)
|
2000-09-16 22:55:12 +02:00
|
|
|
*
|
|
|
|
* Sets the timeouts used when reading and writing data to/from COMM ports.
|
|
|
|
*
|
2006-05-07 14:10:58 +02:00
|
|
|
* PARAMS
|
|
|
|
* hComm [in] handle of COMM device
|
|
|
|
* lptimeouts [in] pointer to COMMTIMEOUTS structure
|
|
|
|
*
|
2002-06-01 01:06:46 +02:00
|
|
|
* ReadIntervalTimeout
|
2000-09-16 22:55:12 +02:00
|
|
|
* - 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
|
|
|
*/
|
2006-05-07 14:10:58 +02:00
|
|
|
BOOL WINAPI SetCommTimeouts(HANDLE hComm, LPCOMMTIMEOUTS lptimeouts)
|
2001-02-12 04:49:57 +01:00
|
|
|
{
|
2006-05-07 14:10:58 +02:00
|
|
|
SERIAL_TIMEOUTS st;
|
2009-02-05 14:37:46 +01:00
|
|
|
DWORD dwBytesReturned;
|
2000-01-05 02:46:53 +01:00
|
|
|
|
2006-05-07 14:10:58 +02:00
|
|
|
TRACE("(%p, %p)\n", hComm, lptimeouts);
|
2000-01-05 02:46:53 +01:00
|
|
|
|
2006-05-07 14:10:58 +02:00
|
|
|
if (lptimeouts == NULL)
|
2000-09-16 22:55:12 +02:00
|
|
|
{
|
|
|
|
SetLastError(ERROR_INVALID_PARAMETER);
|
|
|
|
return FALSE;
|
2000-10-15 02:40:25 +02:00
|
|
|
}
|
2006-05-07 14:10:58 +02:00
|
|
|
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,
|
2009-02-05 14:37:46 +01:00
|
|
|
&st, sizeof(st), NULL, 0, &dwBytesReturned, NULL);
|
1997-08-04 18:34:36 +02:00
|
|
|
}
|
|
|
|
|
1998-11-30 11:40:02 +01:00
|
|
|
/***********************************************************************
|
2001-06-13 22:13:18 +02:00
|
|
|
* GetCommModemStatus (KERNEL32.@)
|
2000-12-20 00:33:03 +01:00
|
|
|
*
|
|
|
|
* Obtains the four control register bits if supported by the hardware.
|
|
|
|
*
|
2006-02-06 11:37:39 +01:00
|
|
|
* 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.
|
1998-11-30 11:40:02 +01:00
|
|
|
*/
|
2006-02-06 11:37:39 +01:00
|
|
|
BOOL WINAPI GetCommModemStatus(HANDLE hFile, LPDWORD lpModemStat)
|
1998-11-30 11:40:02 +01:00
|
|
|
{
|
2009-02-05 14:37:46 +01:00
|
|
|
DWORD dwBytesReturned;
|
2006-02-06 11:37:39 +01:00
|
|
|
return DeviceIoControl(hFile, IOCTL_SERIAL_GET_MODEMSTATUS,
|
2009-02-05 14:37:46 +01:00
|
|
|
NULL, 0, lpModemStat, sizeof(DWORD), &dwBytesReturned, NULL);
|
1998-11-30 11:40:02 +01:00
|
|
|
}
|
2000-11-13 20:27:21 +01:00
|
|
|
|
2001-03-22 21:09:34 +01:00
|
|
|
/***********************************************************************
|
2001-06-13 22:13:18 +02:00
|
|
|
* WaitCommEvent (KERNEL32.@)
|
2001-03-22 21:09:34 +01:00
|
|
|
*
|
|
|
|
* Wait until something interesting happens on a COMM port.
|
|
|
|
* Interesting things (events) are set by calling SetCommMask before
|
|
|
|
* this function is called.
|
|
|
|
*
|
2005-11-08 12:01:03 +01:00
|
|
|
* RETURNS
|
2001-03-22 21:09:34 +01:00
|
|
|
* 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 */
|
|
|
|
{
|
2006-09-30 21:20:41 +02:00
|
|
|
return DeviceIoControl(hFile, IOCTL_SERIAL_WAIT_ON_MASK, NULL, 0,
|
|
|
|
lpdwEvents, sizeof(DWORD), NULL, lpOverlapped);
|
2001-03-22 21:09:34 +01:00
|
|
|
}
|
2002-06-01 01:06:46 +02:00
|
|
|
|
1999-03-14 13:25:36 +01:00
|
|
|
/***********************************************************************
|
2001-06-13 22:13:18 +02:00
|
|
|
* GetCommProperties (KERNEL32.@)
|
2000-07-15 23:36:31 +02:00
|
|
|
*
|
2002-06-01 01:06:46 +02:00
|
|
|
* This function fills in a structure with the capabilities of the
|
2000-07-15 23:36:31 +02:00
|
|
|
* communications port driver.
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
*
|
|
|
|
* TRUE on success, FALSE on failure
|
|
|
|
* If successful, the lpCommProp structure be filled in with
|
|
|
|
* properties of the comm port.
|
1999-03-14 13:25:36 +01:00
|
|
|
*/
|
2000-07-15 23:36:31 +02:00
|
|
|
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 */
|
|
|
|
{
|
2010-08-09 12:15:50 +02:00
|
|
|
TRACE("(%p %p)\n",hFile,lpCommProp);
|
2000-07-15 23:36:31 +02:00
|
|
|
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->dwMaxTxQueue = 4096;
|
|
|
|
lpCommProp->dwMaxRxQueue = 4096;
|
|
|
|
lpCommProp->dwMaxBaud = BAUD_115200;
|
|
|
|
lpCommProp->dwProvSubType = PST_RS232;
|
2002-06-05 19:27:48 +02:00
|
|
|
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 |
|
2000-07-15 23:36:31 +02:00
|
|
|
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 |
|
2000-07-15 23:36:31 +02:00
|
|
|
PARITY_NONE | PARITY_ODD |PARITY_EVEN | PARITY_MARK | PARITY_SPACE;
|
|
|
|
lpCommProp->dwCurrentTxQueue = lpCommProp->dwMaxTxQueue;
|
|
|
|
lpCommProp->dwCurrentRxQueue = lpCommProp->dwMaxRxQueue;
|
|
|
|
|
1999-03-14 13:25:36 +01:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2000-07-15 23:36:31 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* 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
|
2000-07-15 23:36:31 +02:00
|
|
|
* 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
|
2000-07-15 23:36:31 +02:00
|
|
|
* 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 };
|
2000-07-15 23:36:31 +02:00
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
2001-06-13 22:13:18 +02:00
|
|
|
* CommConfigDialogA (KERNEL32.@)
|
2000-07-15 23:36:31 +02:00
|
|
|
*
|
|
|
|
* 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 */
|
2005-05-09 21:32:33 +02:00
|
|
|
HWND hWnd, /* [in] parent window for the dialog */
|
2001-02-12 04:49:57 +01:00
|
|
|
LPCOMMCONFIG lpCommConfig) /* [out] pointer to struct to fill */
|
|
|
|
{
|
2007-03-06 05:40:56 +01:00
|
|
|
LPWSTR lpDeviceW = NULL;
|
|
|
|
DWORD len;
|
|
|
|
BOOL r;
|
2000-07-15 23:36:31 +02:00
|
|
|
|
2007-02-20 16:38:13 +01:00
|
|
|
TRACE("(%s, %p, %p)\n", debugstr_a(lpszDevice), hWnd, lpCommConfig);
|
2000-07-15 23:36:31 +02:00
|
|
|
|
2007-03-06 05:40:56 +01: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 = CommConfigDialogW(lpDeviceW, hWnd, lpCommConfig);
|
|
|
|
HeapFree( GetProcessHeap(), 0, lpDeviceW );
|
2000-07-15 23:36:31 +02:00
|
|
|
return r;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
2001-06-13 22:13:18 +02:00
|
|
|
* CommConfigDialogW (KERNEL32.@)
|
2000-07-15 23:36:31 +02:00
|
|
|
*
|
2005-11-08 12:01:03 +01:00
|
|
|
* See CommConfigDialogA.
|
2000-07-15 23:36:31 +02:00
|
|
|
*/
|
|
|
|
BOOL WINAPI CommConfigDialogW(
|
2001-02-12 04:49:57 +01:00
|
|
|
LPCWSTR lpszDevice, /* [in] name of communications device */
|
2005-05-09 21:32:33 +02:00
|
|
|
HWND hWnd, /* [in] parent window for the dialog */
|
2001-02-12 04:49:57 +01:00
|
|
|
LPCOMMCONFIG lpCommConfig) /* [out] pointer to struct to fill */
|
|
|
|
{
|
2009-09-09 13:12:28 +02:00
|
|
|
DWORD (WINAPI *pCommConfigDialog)(LPCWSTR, HWND, LPCOMMCONFIG);
|
2004-10-26 02:25:58 +02:00
|
|
|
HMODULE hConfigModule;
|
2007-03-06 05:40:56 +01:00
|
|
|
DWORD res = ERROR_INVALID_PARAMETER;
|
2004-10-26 02:25:58 +02:00
|
|
|
|
2007-02-20 16:38:13 +01:00
|
|
|
TRACE("(%s, %p, %p)\n", debugstr_w(lpszDevice), hWnd, lpCommConfig);
|
2004-10-26 02:25:58 +02:00
|
|
|
hConfigModule = LoadLibraryW(lpszSerialUI);
|
|
|
|
|
2007-03-06 05:40:56 +01:00
|
|
|
if (hConfigModule) {
|
2009-09-09 13:12:28 +02:00
|
|
|
pCommConfigDialog = (void *)GetProcAddress(hConfigModule, "drvCommConfigDialogW");
|
2007-03-06 05:40:56 +01:00
|
|
|
if (pCommConfigDialog) {
|
|
|
|
res = pCommConfigDialog(lpszDevice, hWnd, lpCommConfig);
|
|
|
|
}
|
|
|
|
FreeLibrary(hConfigModule);
|
|
|
|
}
|
2004-10-26 02:25:58 +02:00
|
|
|
|
2007-03-06 05:40:56 +01:00
|
|
|
if (res) SetLastError(res);
|
|
|
|
return (res == ERROR_SUCCESS);
|
2000-07-15 23:36:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
2001-06-19 05:44:16 +02:00
|
|
|
* GetCommConfig (KERNEL32.@)
|
2000-07-15 23:36:31 +02:00
|
|
|
*
|
|
|
|
* 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
|
|
|
|
*
|
2000-07-15 23:36:31 +02:00
|
|
|
*/
|
|
|
|
BOOL WINAPI GetCommConfig(
|
2001-02-12 04:49:57 +01:00
|
|
|
HANDLE hFile, /* [in] The communications device. */
|
2001-06-19 05:44:16 +02:00
|
|
|
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. */
|
|
|
|
{
|
2000-07-15 23:36:31 +02:00
|
|
|
BOOL r;
|
|
|
|
|
2007-02-20 16:38:13 +01:00
|
|
|
TRACE("(%p, %p, %p) *lpdwSize: %u\n", hFile, lpCommConfig, lpdwSize, lpdwSize ? *lpdwSize : 0 );
|
2000-07-15 23:36:31 +02:00
|
|
|
|
|
|
|
if(lpCommConfig == NULL)
|
|
|
|
return FALSE;
|
2003-12-11 05:25:00 +01:00
|
|
|
r = *lpdwSize < sizeof(COMMCONFIG); /* TRUE if not enough space */
|
2001-06-19 05:44:16 +02:00
|
|
|
*lpdwSize = sizeof(COMMCONFIG);
|
2003-12-11 05:25:00 +01:00
|
|
|
if(r)
|
2001-06-19 05:44:16 +02:00
|
|
|
return FALSE;
|
|
|
|
|
2000-07-15 23:36:31 +02:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
2001-06-13 22:13:18 +02:00
|
|
|
* SetCommConfig (KERNEL32.@)
|
2000-07-15 23:36:31 +02:00
|
|
|
*
|
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.
|
2000-07-15 23:36:31 +02:00
|
|
|
*/
|
|
|
|
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
|
|
|
{
|
2007-02-20 16:38:13 +01:00
|
|
|
TRACE("(%p, %p, %u)\n", hFile, lpCommConfig, dwSize);
|
2000-12-20 00:33:03 +01:00
|
|
|
return SetCommState(hFile,&lpCommConfig->dcb);
|
2000-07-15 23:36:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
2007-10-26 20:15:14 +02:00
|
|
|
* SetDefaultCommConfigW (KERNEL32.@)
|
2000-12-20 00:33:03 +01:00
|
|
|
*
|
2007-10-26 20:15:14 +02: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
|
2007-10-26 20:15:14 +02:00
|
|
|
* Failure: FALSE
|
|
|
|
* Success: TRUE, and default configuration saved
|
2000-12-20 00:33:03 +01:00
|
|
|
*
|
2000-07-15 23:36:31 +02:00
|
|
|
*/
|
2007-10-26 20:15:14 +02:00
|
|
|
BOOL WINAPI SetDefaultCommConfigW(LPCWSTR lpszDevice, LPCOMMCONFIG lpCommConfig, DWORD dwSize)
|
2001-02-12 04:49:57 +01:00
|
|
|
{
|
2009-09-09 13:12:28 +02:00
|
|
|
BOOL (WINAPI *lpfnSetDefaultCommConfig)(LPCWSTR, LPCOMMCONFIG, DWORD);
|
2000-07-15 23:36:31 +02:00
|
|
|
HMODULE hConfigModule;
|
2004-10-26 02:16:39 +02:00
|
|
|
BOOL r = FALSE;
|
2000-07-15 23:36:31 +02:00
|
|
|
|
2007-02-20 16:38:13 +01:00
|
|
|
TRACE("(%s, %p, %u)\n", debugstr_w(lpszDevice), lpCommConfig, dwSize);
|
2000-07-15 23:36:31 +02:00
|
|
|
|
2004-10-26 02:16:39 +02:00
|
|
|
hConfigModule = LoadLibraryW(lpszSerialUI);
|
2000-07-15 23:36:31 +02:00
|
|
|
if(!hConfigModule)
|
2004-10-26 02:16:39 +02:00
|
|
|
return r;
|
2000-07-15 23:36:31 +02:00
|
|
|
|
2009-09-09 13:12:28 +02:00
|
|
|
lpfnSetDefaultCommConfig = (void *)GetProcAddress(hConfigModule, "drvSetDefaultCommConfigW");
|
2004-10-26 02:16:39 +02:00
|
|
|
if (lpfnSetDefaultCommConfig)
|
|
|
|
r = lpfnSetDefaultCommConfig(lpszDevice, lpCommConfig, dwSize);
|
2000-07-15 23:36:31 +02:00
|
|
|
|
2004-10-26 02:16:39 +02:00
|
|
|
FreeLibrary(hConfigModule);
|
2000-07-15 23:36:31 +02:00
|
|
|
|
|
|
|
return r;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
2007-10-26 20:15:14 +02:00
|
|
|
* SetDefaultCommConfigA (KERNEL32.@)
|
2000-07-15 23:36:31 +02:00
|
|
|
*
|
2007-10-26 20:15:14 +02:00
|
|
|
* Initializes the default configuration for a communication device.
|
2000-12-20 00:33:03 +01:00
|
|
|
*
|
2007-10-26 20:15:14 +02:00
|
|
|
* See SetDefaultCommConfigW.
|
2000-12-20 00:33:03 +01:00
|
|
|
*
|
2000-07-15 23:36:31 +02:00
|
|
|
*/
|
2007-10-26 20:15:14 +02:00
|
|
|
BOOL WINAPI SetDefaultCommConfigA(LPCSTR lpszDevice, LPCOMMCONFIG lpCommConfig, DWORD dwSize)
|
2001-02-12 04:49:57 +01:00
|
|
|
{
|
2000-07-15 23:36:31 +02:00
|
|
|
BOOL r;
|
2004-10-26 02:16:39 +02:00
|
|
|
LPWSTR lpDeviceW = NULL;
|
|
|
|
DWORD len;
|
2000-07-15 23:36:31 +02:00
|
|
|
|
2007-02-20 16:38:13 +01:00
|
|
|
TRACE("(%s, %p, %u)\n", debugstr_a(lpszDevice), lpCommConfig, dwSize);
|
2000-07-15 23:36:31 +02:00
|
|
|
|
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);
|
2004-12-23 18:06:43 +01:00
|
|
|
HeapFree( GetProcessHeap(), 0, lpDeviceW );
|
2000-07-15 23:36:31 +02:00
|
|
|
return r;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2000-07-08 20:29:54 +02:00
|
|
|
/***********************************************************************
|
2004-01-16 03:21:01 +01:00
|
|
|
* 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.
|
2000-07-08 20:29:54 +02:00
|
|
|
*/
|
2004-01-16 03:21:01 +01:00
|
|
|
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
|
|
|
{
|
2009-09-09 13:12:28 +02:00
|
|
|
DWORD (WINAPI *pGetDefaultCommConfig)(LPCWSTR, LPCOMMCONFIG, LPDWORD);
|
2007-02-26 22:16:07 +01:00
|
|
|
HMODULE hConfigModule;
|
|
|
|
DWORD res = ERROR_INVALID_PARAMETER;
|
2000-07-08 20:29:54 +02:00
|
|
|
|
2007-02-26 22:16:07 +01:00
|
|
|
TRACE("(%s, %p, %p) *lpdwSize: %u\n", debugstr_w(lpszName), lpCC, lpdwSize, lpdwSize ? *lpdwSize : 0 );
|
|
|
|
hConfigModule = LoadLibraryW(lpszSerialUI);
|
2000-07-08 20:29:54 +02:00
|
|
|
|
2007-02-26 22:16:07 +01:00
|
|
|
if (hConfigModule) {
|
2009-09-09 13:12:28 +02:00
|
|
|
pGetDefaultCommConfig = (void *)GetProcAddress(hConfigModule, "drvGetDefaultCommConfigW");
|
2007-02-26 22:16:07 +01:00
|
|
|
if (pGetDefaultCommConfig) {
|
|
|
|
res = pGetDefaultCommConfig(lpszName, lpCC, lpdwSize);
|
|
|
|
}
|
|
|
|
FreeLibrary(hConfigModule);
|
|
|
|
}
|
2000-07-08 20:29:54 +02:00
|
|
|
|
2007-02-26 22:16:07 +01:00
|
|
|
if (res) SetLastError(res);
|
|
|
|
return (res == ERROR_SUCCESS);
|
2000-07-08 20:29:54 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************
|
2004-01-16 03:21:01 +01:00
|
|
|
* GetDefaultCommConfigA (KERNEL32.@)
|
2000-12-20 00:33:03 +01:00
|
|
|
*
|
2004-01-16 03:21:01 +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.
|
2000-07-08 20:29:54 +02:00
|
|
|
*/
|
2004-01-16 03:21:01 +01:00
|
|
|
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;
|
2004-01-16 03:21:01 +01:00
|
|
|
UNICODE_STRING lpszNameW;
|
2000-07-08 20:29:54 +02:00
|
|
|
|
2007-02-20 16:38:13 +01:00
|
|
|
TRACE("(%s, %p, %p) *lpdwSize: %u\n", debugstr_a(lpszName), lpCC, lpdwSize, lpdwSize ? *lpdwSize : 0 );
|
2004-01-16 03:21:01 +01:00
|
|
|
if(lpszName) RtlCreateUnicodeStringFromAsciiz(&lpszNameW,lpszName);
|
|
|
|
else lpszNameW.Buffer = NULL;
|
|
|
|
|
2007-02-26 22:16:07 +01:00
|
|
|
ret = GetDefaultCommConfigW(lpszNameW.Buffer,lpCC,lpdwSize);
|
2004-01-16 03:21:01 +01:00
|
|
|
|
|
|
|
RtlFreeUnicodeString(&lpszNameW);
|
2000-07-08 20:29:54 +02:00
|
|
|
return ret;
|
|
|
|
}
|