com0com-cvs Mailing List for Null-modem emulator (Page 3)
The virtual serial port driver for Windows.
Brought to you by:
vfrolov
You can subscribe to this list here.
2005 |
Jan
|
Feb
(7) |
Mar
|
Apr
|
May
(13) |
Jun
(18) |
Jul
(9) |
Aug
(10) |
Sep
(15) |
Oct
(6) |
Nov
(9) |
Dec
(6) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(6) |
Feb
(4) |
Mar
(4) |
Apr
(2) |
May
(7) |
Jun
(11) |
Jul
(6) |
Aug
(9) |
Sep
(1) |
Oct
(27) |
Nov
(22) |
Dec
(3) |
2007 |
Jan
(13) |
Feb
(16) |
Mar
(2) |
Apr
(3) |
May
(7) |
Jun
(17) |
Jul
(9) |
Aug
(1) |
Sep
(13) |
Oct
(20) |
Nov
(18) |
Dec
(1) |
2008 |
Jan
|
Feb
(3) |
Mar
(46) |
Apr
(40) |
May
(4) |
Jun
(9) |
Jul
(7) |
Aug
(62) |
Sep
(25) |
Oct
(51) |
Nov
(67) |
Dec
(81) |
2009 |
Jan
(13) |
Feb
(31) |
Mar
(12) |
Apr
|
May
(10) |
Jun
|
Jul
(5) |
Aug
(2) |
Sep
(10) |
Oct
|
Nov
(3) |
Dec
(1) |
2010 |
Jan
|
Feb
(1) |
Mar
(4) |
Apr
|
May
(12) |
Jun
(9) |
Jul
(12) |
Aug
(7) |
Sep
(6) |
Oct
|
Nov
|
Dec
(1) |
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(11) |
Jun
|
Jul
(26) |
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
(23) |
2012 |
Jan
(7) |
Feb
(3) |
Mar
|
Apr
|
May
(2) |
Jun
(9) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Vyacheslav F. <vf...@us...> - 2011-07-26 11:59:16
|
Update of /cvsroot/com0com/hub4com/plugins/tcp In directory vz-cvs-4.sog:/tmp/cvs-serv1667 Modified Files: comio.cpp Log Message: Replaced strerror() by FormatMessage() Index: comio.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/tcp/comio.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** comio.cpp 14 Sep 2010 18:34:30 -0000 1.11 --- comio.cpp 26 Jul 2011 11:59:14 -0000 1.12 *************** *** 2,6 **** * $Id$ * ! * Copyright (c) 2008-2010 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify --- 2,6 ---- * $Id$ * ! * Copyright (c) 2008-2011 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.12 2011/07/26 11:59:14 vfrolov + * Replaced strerror() by FormatMessage() + * * Revision 1.11 2010/09/14 18:34:30 vfrolov * Fixed rejected connections handling *************** *** 71,75 **** va_end(va); ! fprintf(stderr, " ERROR %s (%lu)\n", strerror(err), (unsigned long)err); } /////////////////////////////////////////////////////////////// --- 74,96 ---- va_end(va); ! LPVOID pMsgBuf; ! ! FormatMessage( ! FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, ! NULL, ! err, ! MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), ! (LPTSTR) &pMsgBuf, ! 0, ! NULL); ! ! if ((err & 0xFFFF0000) == 0) ! fprintf(stderr, " ERROR %lu - %s\n", (unsigned long)err, pMsgBuf); ! else ! fprintf(stderr, " ERROR 0x%08lX - %s\n", (unsigned long)err, pMsgBuf); ! ! fflush(stderr); ! ! LocalFree(pMsgBuf); } /////////////////////////////////////////////////////////////// *************** *** 449,453 **** TraceError( err, ! "WaitEventOverlapped::~WaitEventOverlapped(): UnregisterWait() %s", port.Name().c_str()); } --- 470,474 ---- TraceError( err, ! "WaitEventOverlapped::Delete(): UnregisterWait() %s", port.Name().c_str()); } *************** *** 459,463 **** TraceError( GetLastError(), ! "WaitEventOverlapped::~WaitEventOverlapped(): CloseHandle(hEvent) %s", port.Name().c_str()); } --- 480,484 ---- TraceError( GetLastError(), ! "WaitEventOverlapped::Delete(): CloseHandle(hEvent) %s", port.Name().c_str()); } |
From: Vyacheslav F. <vf...@us...> - 2011-07-26 11:57:55
|
Update of /cvsroot/com0com/hub4com/plugins/serial In directory vz-cvs-4.sog:/tmp/cvs-serv1475 Modified Files: comio.cpp Log Message: Replaced strerror() by FormatMessage() Index: comio.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/serial/comio.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** comio.cpp 14 Sep 2009 08:52:27 -0000 1.16 --- comio.cpp 26 Jul 2011 11:57:53 -0000 1.17 *************** *** 2,6 **** * $Id$ * ! * Copyright (c) 2006-2009 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify --- 2,6 ---- * $Id$ * ! * Copyright (c) 2006-2011 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.17 2011/07/26 11:57:53 vfrolov + * Replaced strerror() by FormatMessage() + * * Revision 1.16 2009/09/14 08:52:27 vfrolov * Suppressed "IOCTL_SERIAL_GET_MODEM_CONTROL ERROR Unknown error (87)" *************** *** 120,124 **** va_end(va); ! fprintf(stderr, " ERROR %s (%lu)\n", strerror(err), (unsigned long)err); } /////////////////////////////////////////////////////////////// --- 123,145 ---- va_end(va); ! LPVOID pMsgBuf; ! ! FormatMessage( ! FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, ! NULL, ! err, ! MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), ! (LPTSTR) &pMsgBuf, ! 0, ! NULL); ! ! if ((err & 0xFFFF0000) == 0) ! fprintf(stderr, " ERROR %lu - %s\n", (unsigned long)err, pMsgBuf); ! else ! fprintf(stderr, " ERROR 0x%08lX - %s\n", (unsigned long)err, pMsgBuf); ! ! fflush(stderr); ! ! LocalFree(pMsgBuf); } /////////////////////////////////////////////////////////////// |
From: Vyacheslav F. <vf...@us...> - 2011-07-26 11:38:11
|
Update of /cvsroot/com0com/hub4com/examples In directory vz-cvs-4.sog:/tmp/cvs-serv28484 Modified Files: com2tcp-rfc2217.bat Log Message: Added --reconnect option Index: com2tcp-rfc2217.bat =================================================================== RCS file: /cvsroot/com0com/hub4com/examples/com2tcp-rfc2217.bat,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** com2tcp-rfc2217.bat 26 Jan 2009 15:10:27 -0000 1.6 --- com2tcp-rfc2217.bat 26 Jul 2011 11:38:09 -0000 1.7 *************** *** 29,32 **** --- 29,38 ---- :END_OPTION_INTERFACE + IF /I "%OPTION%" NEQ "--reconnect" GOTO END_OPTION_RECONNECT + SET OPTIONS=%OPTIONS% --reconnect=%~1 + SHIFT /1 + GOTO BEGIN_PARSE_OPTIONS + :END_OPTION_RECONNECT + IF /I "%OPTION%" NEQ "--rfc2217-mode" GOTO END_OPTION_RFC2217_MODE SET ARG=%~1 *************** *** 159,162 **** --- 165,173 ---- ECHO TCP client mode options: ECHO --interface ^<if^> - use interface ^<if^> for connecting. + ECHO --reconnect ^<t^> - enable^/disable forcing connection to remote host + ECHO on disconnecting and set reconnect time. Where ^<t^> + ECHO is a positive number of milliseconds or d^[efault^] + ECHO or n^[o^]. If connection is not permanent then + ECHO d^[efault^] means n^[o^] else d^[efault^] means 0. ECHO. ECHO TCP server mode options: |
From: Vyacheslav F. <vf...@us...> - 2011-07-25 07:05:02
|
Update of /cvsroot/com0com/hub4com/plugins/escparse In directory vz-cvs-4.sog:/tmp/cvs-serv1890 Modified Files: filter.cpp Log Message: Fixed set-ID field assertion Index: filter.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/escparse/filter.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** filter.cpp 2 Feb 2009 15:21:42 -0000 1.11 --- filter.cpp 25 Jul 2011 07:05:00 -0000 1.12 *************** *** 2,6 **** * $Id$ * ! * Copyright (c) 2008-2009 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify --- 2,6 ---- * $Id$ * ! * Copyright (c) 2008-2011 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.12 2011/07/25 07:05:00 vfrolov + * Fixed set-ID field assertion + * * Revision 1.11 2009/02/02 15:21:42 vfrolov * Optimized filter's API *************** *** 526,529 **** --- 529,535 ---- DWORD interceptable_options = (pInMsg->u.pv.val & ((Filter *)hFilter)->acceptableOptions); + _ASSERTE((interceptable_options & GO_I2O(-1)) == 0); + interceptable_options &= ~GO_I2O(-1); + pInMsg->u.pv.val &= ~interceptable_options; *************** *** 535,539 **** pInMsg->type = HUB_MSG_TYPE_GET_IN_OPTS; pInMsg->u.pv.pVal = &((State *)hFilterInstance)->intercepted_options; - _ASSERTE((interceptable_options & GO_I2O(-1)) == 0); pInMsg->u.pv.val = interceptable_options | GO_I2O(iGo); } --- 541,544 ---- |
From: Vyacheslav F. <vf...@us...> - 2011-07-25 07:03:57
|
Update of /cvsroot/com0com/hub4com/plugins/telnet In directory vz-cvs-4.sog:/tmp/cvs-serv1688 Modified Files: filter.cpp Log Message: Fixed set-ID field assertion Index: filter.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/telnet/filter.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** filter.cpp 14 Sep 2009 11:22:46 -0000 1.20 --- filter.cpp 25 Jul 2011 07:03:55 -0000 1.21 *************** *** 2,6 **** * $Id$ * ! * Copyright (c) 2008-2009 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify --- 2,6 ---- * $Id$ * ! * Copyright (c) 2008-2011 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.21 2011/07/25 07:03:55 vfrolov + * Fixed set-ID field assertion + * * Revision 1.20 2009/09/14 11:22:46 vfrolov * Added discarding owned tick (for optimization) *************** *** 558,561 **** --- 561,567 ---- DWORD interceptable_options = (pInMsg->u.pv.val & ((Filter *)hFilter)->goMask[iGo == 0 ? 0 : 1]); + _ASSERTE((interceptable_options & GO_I2O(-1)) == 0); + interceptable_options &= ~GO_I2O(-1); + pInMsg->u.pv.val &= ~interceptable_options; *************** *** 567,571 **** pInMsg->type = HUB_MSG_TYPE_GET_IN_OPTS; pInMsg->u.pv.pVal = &((State *)hFilterInstance)->goMask[iGo == 0 ? 0 : 1]; - _ASSERTE((interceptable_options & GO_I2O(-1)) == 0); pInMsg->u.pv.val = interceptable_options | GO_I2O(iGo); --- 573,576 ---- |
From: Vyacheslav F. <vf...@us...> - 2011-07-25 07:01:31
|
Update of /cvsroot/com0com/hub4com/plugins In directory vz-cvs-4.sog:/tmp/cvs-serv32723 Modified Files: plugins_api.h Log Message: Added more comments Index: plugins_api.h =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/plugins_api.h,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** plugins_api.h 20 Feb 2009 18:32:35 -0000 1.28 --- plugins_api.h 25 Jul 2011 07:01:29 -0000 1.29 *************** *** 2,6 **** * plugins_api.h * ! * Copyright (c) 2008-2009 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify --- 2,6 ---- * plugins_api.h * ! * Copyright (c) 2008-2011 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify *************** *** 61,64 **** --- 61,65 ---- #define HUB_MSG_TYPE_LINE_DATA (1 | HUB_MSG_UNION_TYPE_BUF) #define HUB_MSG_TYPE_CONNECT (2 | HUB_MSG_UNION_TYPE_VAL | HUB_MSG_VAL_TYPE_BOOL) + /*************/ #define HUB_MSG_TYPE_MODEM_STATUS (3 | HUB_MSG_UNION_TYPE_VAL | HUB_MSG_VAL_TYPE_MASK_VAL) #define MODEM_STATUS_DCTS 0x01 *************** *** 70,73 **** --- 71,75 ---- #define MODEM_STATUS_RI 0x40 #define MODEM_STATUS_DCD 0x80 + /*************/ #define HUB_MSG_TYPE_LINE_STATUS (4 | HUB_MSG_UNION_TYPE_VAL | HUB_MSG_VAL_TYPE_MASK_VAL) #define LINE_STATUS_DR 0x01 *************** *** 79,82 **** --- 81,85 ---- #define LINE_STATUS_TEMT 0x40 #define LINE_STATUS_FIFOERR 0x80 + /*************/ #define HUB_MSG_TYPE_SET_PIN_STATE (5 | HUB_MSG_UNION_TYPE_VAL | HUB_MSG_VAL_TYPE_MASK_VAL) #define SPS_P2V_MCR(p) ((BYTE)(p)) *************** *** 93,99 **** #define PIN_STATE_DCD SPS_V2P_MST(MODEM_STATUS_DCD) #define PIN_STATE_BREAK 0x0100 #define HUB_MSG_TYPE_GET_IN_OPTS (6 | HUB_MSG_UNION_TYPE_PVAL) ! #define GO_O2I(o) ((DWORD)(o) >> 30) ! #define GO_I2O(i) ((DWORD)i << 30) #define GO0_ESCAPE_MODE ((DWORD)1 << 0) #define GO0_LBR_STATUS ((DWORD)1 << 1) --- 96,110 ---- #define PIN_STATE_DCD SPS_V2P_MST(MODEM_STATUS_DCD) #define PIN_STATE_BREAK 0x0100 + /*************/ #define HUB_MSG_TYPE_GET_IN_OPTS (6 | HUB_MSG_UNION_TYPE_PVAL) ! /* ! * Input ! * HUB_MSG.u.pv.val - the set and set-ID of input-options that can be requested ! * Output ! * *HUB_MSG.u.pv.pVal - the cumulative set of requested input-options ! * (suppose set-ID is from Input, set-ID field reserved for future) ! */ ! #define GO_O2I(o) ((DWORD)(o) >> 30) /* unpack set-ID */ ! #define GO_I2O(i) ((DWORD)i << 30) /* pack set-ID */ #define GO0_ESCAPE_MODE ((DWORD)1 << 0) #define GO0_LBR_STATUS ((DWORD)1 << 1) *************** *** 107,112 **** --- 118,133 ---- #define GO1_BREAK_STATUS ((DWORD)1 << 18) #define GO1_PURGE_TX_IN ((DWORD)1 << 19) + /*************/ #define HUB_MSG_TYPE_FAIL_IN_OPTS (7 | HUB_MSG_UNION_TYPE_VAL) + /* + * Input + * HUB_MSG.u.val - the set and set-ID of rejected input-options + */ + /*************/ #define HUB_MSG_TYPE_SET_OUT_OPTS (8 | HUB_MSG_UNION_TYPE_VAL) + /* + * Input + * HUB_MSG.u.val - the cumulative set of requested output-options + */ #define SO_O2V_PIN_STATE(o) ((WORD)(o)) #define SO_V2O_PIN_STATE(v) ((DWORD)(WORD)(v)) *************** *** 116,128 **** --- 137,173 ---- #define SO_SET_LC ((DWORD)1 << 25) #define SO_PURGE_TX ((DWORD)1 << 26) + /*************/ #define HUB_MSG_TYPE_RBR_STATUS (9 | HUB_MSG_UNION_TYPE_VAL | HUB_MSG_VAL_TYPE_UINT) #define HUB_MSG_TYPE_RLC_STATUS (10 | HUB_MSG_UNION_TYPE_VAL | HUB_MSG_VAL_TYPE_LC) + /*************/ #define HUB_MSG_TYPE_COUNT_REPEATS (11 | HUB_MSG_UNION_TYPE_PVAL | HUB_MSG_VAL_TYPE_MSG_TYPE) + /* + * Input + * HUB_MSG.u.pv.val - the message-type that can be repeated multiple times + * Output + * *HUB_MSG.u.pv.pVal - the cumulative number of requested repeats + */ + /*************/ #define HUB_MSG_TYPE_GET_ESC_OPTS (12 | HUB_MSG_UNION_TYPE_PVAL) + /* + * Input + * HUB_MSG.u.pv.val - the set of escape-mode-input-options that can be requested + * Output + * *HUB_MSG.u.pv.pVal - the cumulative set of requested escape-mode-input-options + */ #define ESC_OPTS_MAP_EO_2_GO1(e) ((DWORD)(e) & 0x00FFFFFF) #define ESC_OPTS_MAP_GO1_2_EO(g) ((DWORD)(g) & 0x00FFFFFF) #define ESC_OPTS_O2V_ESCCHAR(o) ((BYTE)(o >> 24)) #define ESC_OPTS_V2O_ESCCHAR(v) ((DWORD)(BYTE)(v) << 24) + /*************/ #define HUB_MSG_TYPE_FAIL_ESC_OPTS (13 | HUB_MSG_UNION_TYPE_PVAL) + /* + * Input + * HUB_MSG.u.val - the set of rejected escape-mode-input-options + * Output + * *HUB_MSG.u.pv.pVal - the cumulative set of requested input-options + * (suppose set-ID is 1, set-ID field reserved for future) + */ + /*************/ #define HUB_MSG_TYPE_BREAK_STATUS (14 | HUB_MSG_UNION_TYPE_VAL | HUB_MSG_VAL_TYPE_BOOL) #define HUB_MSG_TYPE_SET_BR (15 | HUB_MSG_UNION_TYPE_VAL | HUB_MSG_VAL_TYPE_UINT) |
From: Vyacheslav F. <vf...@us...> - 2011-07-25 06:43:02
|
Update of /cvsroot/com0com/hub4com In directory vz-cvs-4.sog:/tmp/cvs-serv28502 Modified Files: comhub.cpp Log Message: Removed set-ID field assertion (set-ID field reserved for future) Index: comhub.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/comhub.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** comhub.cpp 21 Jul 2011 10:13:22 -0000 1.16 --- comhub.cpp 25 Jul 2011 06:43:00 -0000 1.17 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.17 2011/07/25 06:43:00 vfrolov + * Removed set-ID field assertion (set-ID field reserved for future) + * * Revision 1.16 2011/07/21 10:13:22 vfrolov * Added warning for not supported output options *************** *** 160,168 **** for (int iGo = 0 ; iGo < sizeof(fail_options)/sizeof(fail_options[0]) ; iGo++) { - _ASSERTE((fail_options[iGo] & GO_I2O(-1)) == 0); - if (fail_options[iGo]) { cerr << (*i)->Name() << " WARNING: Requested input option(s) GO" << iGo << "_0x" ! << hex << fail_options[iGo] << dec << " not supported" << endl; } --- 163,169 ---- for (int iGo = 0 ; iGo < sizeof(fail_options)/sizeof(fail_options[0]) ; iGo++) { if (fail_options[iGo]) { cerr << (*i)->Name() << " WARNING: Requested input option(s) GO" << iGo << "_0x" ! << hex << (fail_options[iGo] & ~GO_I2O(-1)) << dec << " not supported" << endl; } |
From: Vyacheslav F. <vf...@us...> - 2011-07-21 10:13:25
|
Update of /cvsroot/com0com/hub4com In directory vz-cvs-4.sog:/tmp/cvs-serv13359 Modified Files: comhub.cpp Log Message: Added warning for not supported output options Index: comhub.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/comhub.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** comhub.cpp 21 Jul 2011 09:20:47 -0000 1.15 --- comhub.cpp 21 Jul 2011 10:13:22 -0000 1.16 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.16 2011/07/21 10:13:22 vfrolov + * Added warning for not supported output options + * * Revision 1.15 2011/07/21 09:20:47 vfrolov * Fixed printing not supported input options *************** *** 231,237 **** } ! for (HubMsg *pCurMsg = pOutMsg ; pCurMsg ; pCurMsg = pCurMsg->Next()) i->second->Write(pCurMsg); if (pOutMsg) delete pOutMsg; --- 234,251 ---- } ! for (HubMsg *pCurMsg = pOutMsg ; pCurMsg ; pCurMsg = pCurMsg->Next()) { i->second->Write(pCurMsg); + switch (HUB_MSG_T2N(pCurMsg->type)) { + case HUB_MSG_T2N(HUB_MSG_TYPE_SET_OUT_OPTS): + if (pCurMsg->u.val) { + cerr << i->second->Name() << " WARNING: Requested output option(s) SO_0x" + << hex << pCurMsg->u.val << dec + << " not supported" << endl; + } + break; + } + } + if (pOutMsg) delete pOutMsg; |
From: Vyacheslav F. <vf...@us...> - 2011-07-21 09:20:49
|
Update of /cvsroot/com0com/hub4com In directory vz-cvs-4.sog:/tmp/cvs-serv1620 Modified Files: comhub.cpp Log Message: Fixed printing not supported input options Index: comhub.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/comhub.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** comhub.cpp 18 Dec 2008 16:50:51 -0000 1.14 --- comhub.cpp 21 Jul 2011 09:20:47 -0000 1.15 *************** *** 2,6 **** * $Id$ * ! * Copyright (c) 2006-2008 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify --- 2,6 ---- * $Id$ * ! * Copyright (c) 2006-2011 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.15 2011/07/21 09:20:47 vfrolov + * Fixed printing not supported input options + * * Revision 1.14 2008/12/18 16:50:51 vfrolov * Extended the number of possible IN options *************** *** 157,162 **** if (fail_options[iGo]) { ! cerr << (*i)->Name() << " WARNING: Requested option(s) GO" << iGo << "_0x" ! << hex << fail_options << dec << " not supported" << endl; } --- 160,165 ---- if (fail_options[iGo]) { ! cerr << (*i)->Name() << " WARNING: Requested input option(s) GO" << iGo << "_0x" ! << hex << fail_options[iGo] << dec << " not supported" << endl; } |
From: Vyacheslav F. <vf...@us...> - 2011-07-15 16:09:08
|
Update of /cvsroot/com0com/com0com/setup In directory vz-cvs-2.sog:/tmp/cvs-serv16022 Modified Files: devutils.cpp inffile.cpp msg.cpp setup.cpp Log Message: Disabled MessageBox() for silent mode and added default processing Index: msg.cpp =================================================================== RCS file: /cvsroot/com0com/com0com/setup/msg.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** msg.cpp 13 Jul 2011 17:42:46 -0000 1.10 --- msg.cpp 15 Jul 2011 16:09:05 -0000 1.11 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.11 2011/07/15 16:09:05 vfrolov + * Disabled MessageBox() for silent mode and added default processing + * * Revision 1.10 2011/07/13 17:42:46 vfrolov * Added tracing of dialogs *************** *** 67,71 **** static int ShowMsgDefault(LPCSTR pText, UINT type) { ! return MessageBox(NULL, pText, title, type|MB_SETFOREGROUND); } --- 70,74 ---- static int ShowMsgDefault(LPCSTR pText, UINT type) { ! return Silent() ? 0 : MessageBox(NULL, pText, title, type|MB_SETFOREGROUND); } *************** *** 163,167 **** TRACECASE(ID, CONTINUE) case 0: ! Trace("error"); break; default: --- 166,170 ---- TRACECASE(ID, CONTINUE) case 0: ! Trace("ERROR"); break; default: Index: setup.cpp =================================================================== RCS file: /cvsroot/com0com/com0com/setup/setup.cpp,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** setup.cpp 13 Jul 2011 17:39:56 -0000 1.45 --- setup.cpp 15 Jul 2011 16:09:05 -0000 1.46 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.46 2011/07/15 16:09:05 vfrolov + * Disabled MessageBox() for silent mode and added default processing + * * Revision 1.45 2011/07/13 17:39:56 vfrolov * Fixed result treatment of UpdateDriverForPlugAndPlayDevices() *************** *** 295,299 **** int res = ShowMsg(MB_OKCANCEL|MB_ICONWARNING, "The port number %d is too big.\n", num); ! if (res == IDCANCEL) return FALSE; } --- 298,302 ---- int res = ShowMsg(MB_OKCANCEL|MB_ICONWARNING, "The port number %d is too big.\n", num); ! if (res == IDCANCEL || res == 0) return FALSE; } *************** *** 313,317 **** pPortName, C0C_PORT_NAME_LEN); ! if (res == IDCANCEL) return FALSE; } --- 316,320 ---- pPortName, C0C_PORT_NAME_LEN); ! if (res == IDCANCEL || res == 0) return FALSE; } *************** *** 913,917 **** if (i >= 0) { if (!((BusyMask *)pParam)->AddNum(i)) { ! if (ShowLastError(MB_OKCANCEL|MB_ICONWARNING, "AddDeviceToBusyMask(%d)", i) == IDCANCEL) return FALSE; } --- 916,920 ---- if (i >= 0) { if (!((BusyMask *)pParam)->AddNum(i)) { ! if (ShowLastError(MB_OKCANCEL|MB_ICONWARNING, "AddDeviceToBusyMask(%d)", i) != IDOK) return FALSE; } *************** *** 1012,1016 **** ShowMsg(MB_OKCANCEL|MB_ICONWARNING, "The same port name %s is used for both ports.\n", ! portName[0]) == IDCANCEL) { goto err; --- 1015,1019 ---- ShowMsg(MB_OKCANCEL|MB_ICONWARNING, "The same port name %s is used for both ports.\n", ! portName[0]) != IDOK) { goto err; *************** *** 1393,1397 **** } ! if (ShowError(MB_OKCANCEL, ERROR_NOT_ENOUGH_MEMORY, "LocalAlloc(%lu)", (unsigned long)size) == IDCANCEL) { if (pNames) LocalFree(pNames); --- 1396,1400 ---- } ! if (ShowError(MB_OKCANCEL, ERROR_NOT_ENOUGH_MEMORY, "LocalAlloc(%lu)", (unsigned long)size) != IDOK) { if (pNames) LocalFree(pNames); *************** *** 1421,1425 **** if (ShowLastError(MB_OKCANCEL, ! i != 0 ? "QueryDosDevice()" : "ComDbNames()") == IDCANCEL) { if (pNames) --- 1424,1428 ---- if (ShowLastError(MB_OKCANCEL, ! i != 0 ? "QueryDosDevice()" : "ComDbNames()") != IDOK) { if (pNames) *************** *** 1474,1478 **** if (!pNamesNew) { ! if (ShowError(MB_OKCANCEL, ERROR_NOT_ENOUGH_MEMORY, "LocalAlloc(%lu)", (unsigned long)sizeNamesNew) == IDCANCEL) { if (pNames) LocalFree(pNames); --- 1477,1481 ---- if (!pNamesNew) { ! if (ShowError(MB_OKCANCEL, ERROR_NOT_ENOUGH_MEMORY, "LocalAlloc(%lu)", (unsigned long)sizeNamesNew) != IDOK) { if (pNames) LocalFree(pNames); Index: devutils.cpp =================================================================== RCS file: /cvsroot/com0com/com0com/setup/devutils.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** devutils.cpp 13 Jul 2011 17:39:55 -0000 1.18 --- devutils.cpp 15 Jul 2011 16:09:05 -0000 1.19 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.19 2011/07/15 16:09:05 vfrolov + * Disabled MessageBox() for silent mode and added default processing + * * Revision 1.18 2011/07/13 17:39:55 vfrolov * Fixed result treatment of UpdateDriverForPlugAndPlayDevices() *************** *** 425,430 **** int res; ! if (!Silent()) { ! res = ShowMsg(MB_CANCELTRYCONTINUE, "Can't stop device %s %s %s.\n" "Close application that use this device and Try Again.\n" --- 428,432 ---- int res; ! res = ShowMsg(MB_CANCELTRYCONTINUE, "Can't stop device %s %s %s.\n" "Close application that use this device and Try Again.\n" *************** *** 433,439 **** pDevProperties->DevId(), pDevProperties->PhObjName()); ! } else { res = IDCONTINUE; - } if (res != IDCONTINUE) { --- 435,441 ---- pDevProperties->DevId(), pDevProperties->PhObjName()); ! ! if (res == 0) res = IDCONTINUE; if (res != IDCONTINUE) { *************** *** 569,574 **** int res; ! if (!Silent()) { ! res = ShowMsg(MB_CANCELTRYCONTINUE, "Can't reastart device %s %s %s.\n" "Close application that use this device and Try Again.\n" --- 571,575 ---- int res; ! res = ShowMsg(MB_CANCELTRYCONTINUE, "Can't reastart device %s %s %s.\n" "Close application that use this device and Try Again.\n" *************** *** 577,583 **** pDevParams->devProperties.DevId(), pDevParams->devProperties.PhObjName()); ! } else { res = IDCONTINUE; - } if (res != IDCONTINUE) { --- 578,584 ---- pDevParams->devProperties.DevId(), pDevParams->devProperties.PhObjName()); ! ! if (res == 0) res = IDCONTINUE; if (res != IDCONTINUE) { *************** *** 739,742 **** --- 740,746 ---- "Continue to add the key to the registry.\n"); + if (res == 0) + return IDCANCEL; + if (res == IDCONTINUE) { err = RegCreateKeyEx(HKEY_LOCAL_MACHINE, REGSTR_PATH_RUNONCE, 0, NULL, 0, KEY_WRITE, NULL, &hKey, NULL); Index: inffile.cpp =================================================================== RCS file: /cvsroot/com0com/com0com/setup/inffile.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** inffile.cpp 30 Jul 2010 09:27:18 -0000 1.10 --- inffile.cpp 15 Jul 2011 16:09:05 -0000 1.11 *************** *** 2,6 **** * $Id$ * ! * Copyright (c) 2006-2010 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify --- 2,6 ---- * $Id$ * ! * Copyright (c) 2006-2011 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.11 2011/07/15 16:09:05 vfrolov + * Disabled MessageBox() for silent mode and added default processing + * * Revision 1.10 2010/07/30 09:27:18 vfrolov * Added STRDUP() *************** *** 138,146 **** break; ! res = ShowLastError(MB_CANCELTRYCONTINUE, "SetupOpenInfFile(%s) on line %u", pInfPath, errLine); } ! } while (res == IDTRYAGAIN); return *phInf != INVALID_HANDLE_VALUE; --- 141,149 ---- break; ! res = ShowLastError(MB_RETRYCANCEL, "SetupOpenInfFile(%s) on line %u", pInfPath, errLine); } ! } while (res == IDRETRY); return *phInf != INVALID_HANDLE_VALUE; *************** *** 668,673 **** int res; ! if (!Silent()) { ! res = ShowMsg(MB_YESNO, "The file %s possible should be deleted too.\n" "\n" --- 671,675 ---- int res; ! res = ShowMsg(MB_YESNO, "The file %s possible should be deleted too.\n" "\n" *************** *** 687,706 **** infFile.DriverVer(FALSE), infFile.UninstallInfTag(FALSE)); - } else { - Trace("\nThe file %s possible should be deleted too:\n" - " ClassGUID = %s\n" - " Class = %s\n" - " Provider = %s\n" - " DriverVer = %s\n" - " UninstallInfTag = %s\n", - infFile.Path(), - infFile.ClassGUID(FALSE), - infFile.Class(FALSE), - infFile.Provider(FALSE), - infFile.DriverVer(FALSE), - infFile.UninstallInfTag(FALSE)); res = IDNO; - } doUninstall = (res == IDYES); --- 689,695 ---- infFile.DriverVer(FALSE), infFile.UninstallInfTag(FALSE)); + if (res == 0) res = IDNO; doUninstall = (res == IDYES); |
From: Vyacheslav F. <vf...@us...> - 2011-07-14 15:02:44
|
Update of /cvsroot/com0com/com0com/NSIS In directory vz-cvs-2.sog:/tmp/cvs-serv19590 Modified Files: install.nsi Log Message: Added packaging com0com.cat (if file exists) Index: install.nsi =================================================================== RCS file: /cvsroot/com0com/com0com/NSIS/install.nsi,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** install.nsi 14 Jul 2011 12:12:28 -0000 1.22 --- install.nsi 14 Jul 2011 15:02:41 -0000 1.23 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.23 2011/07/14 15:02:41 vfrolov + * Added packaging com0com.cat (if file exists) + * * Revision 1.22 2011/07/14 12:12:28 vfrolov * Fixed mistaken execution of executables located in installer's folder *************** *** 331,338 **** --- 334,344 ---- ; Put files there File "..\ReadMe.txt" + File "..\com0com.inf" File "..\cncport.inf" File "..\comport.inf" File "..\${TARGET_CPU}\com0com.sys" + File /nonfatal "..\${TARGET_CPU}\com0com.cat" + File "..\${TARGET_CPU}\setup.dll" File "..\${TARGET_CPU}\setupc.exe" *************** *** 383,386 **** --- 389,394 ---- ${GetSize} "$INSTDIR" "/M=com0com.sys /S=0B /G=0" $R3 $R1 $R2 IntOp $R0 $R0 + $R3 + ${GetSize} "$INSTDIR" "/M=com0com.cat /S=0B /G=0" $R3 $R1 $R2 + IntOp $R0 $R0 + $R3 ${GetSize} "$INSTDIR" "/M=setup.dll /S=0B /G=0" $R3 $R1 $R2 IntOp $R0 $R0 + $R3 *************** *** 552,555 **** --- 560,564 ---- Delete $INSTDIR\comport.inf Delete $INSTDIR\com0com.sys + Delete $INSTDIR\com0com.cat Delete $INSTDIR\setup.dll Delete $INSTDIR\setupc.exe |
From: Vyacheslav F. <vf...@us...> - 2011-07-14 12:12:31
|
Update of /cvsroot/com0com/com0com/NSIS In directory vz-cvs-2.sog:/tmp/cvs-serv20181 Modified Files: install.nsi Log Message: Fixed mistaken execution of executables located in installer's folder Index: install.nsi =================================================================== RCS file: /cvsroot/com0com/com0com/NSIS/install.nsi,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** install.nsi 12 Jul 2011 18:10:11 -0000 1.21 --- install.nsi 14 Jul 2011 12:12:28 -0000 1.22 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.22 2011/07/14 12:12:28 vfrolov + * Fixed mistaken execution of executables located in installer's folder + * * Revision 1.21 2011/07/12 18:10:11 vfrolov * Added launching setupg.exe rather then setupc.exe if .NET is OK *************** *** 185,191 **** ${VersionCompare} $0 $1 $2 ${If} $2 == 2 ! Exec "setupc.exe" ${Else} ! Exec "setupg.exe" ${EndIf} --- 188,194 ---- ${VersionCompare} $0 $1 $2 ${If} $2 == 2 ! Exec '"$INSTDIR\setupc.exe"' ${Else} ! Exec '"$INSTDIR\setupg.exe"' ${EndIf} *************** *** 403,413 **** StrCpy $1 "--silent" ! ExecWait "setupc.exe $1 --output $0 preinstall" !insertmacro MoveFileToDetails $0 ! ExecWait "setupc.exe $1 --output $0 update" !insertmacro MoveFileToDetails $0 ! ExecWait "setupc.exe $1 --output $0 infclean" !insertmacro MoveFileToDetails $0 --- 406,416 ---- StrCpy $1 "--silent" ! ExecWait '"$INSTDIR\setupc.exe" $1 --output "$0" preinstall' !insertmacro MoveFileToDetails $0 ! ExecWait '"$INSTDIR\setupc.exe" $1 --output "$0" update' !insertmacro MoveFileToDetails $0 ! ExecWait '"$INSTDIR\setupc.exe" $1 --output "$0" infclean' !insertmacro MoveFileToDetails $0 *************** *** 436,440 **** StrCpy $1 "--silent" ! ExecWait "setupc.exe $1 --output $0 install 0 - -" !insertmacro MoveFileToDetails $0 --- 439,443 ---- StrCpy $1 "--silent" ! ExecWait '"$INSTDIR\setupc.exe" $1 --output "$0" install 0 - -' !insertmacro MoveFileToDetails $0 *************** *** 451,455 **** StrCpy $1 "--silent" ! ExecWait "setupc.exe $1 --output $0 install PortName=COM# PortName=COM#" !insertmacro MoveFileToDetails $0 --- 454,458 ---- StrCpy $1 "--silent" ! ExecWait '"$INSTDIR\setupc.exe" $1 --output "$0" install PortName=COM# PortName=COM#' !insertmacro MoveFileToDetails $0 *************** *** 536,540 **** StrCpy $1 "--silent" ! ExecWait "setupc.exe $1 --output $0 uninstall" !insertmacro MoveFileToDetails $0 --- 539,543 ---- StrCpy $1 "--silent" ! ExecWait '"$INSTDIR\setupc.exe" $1 --output "$0" uninstall' !insertmacro MoveFileToDetails $0 |
From: Vyacheslav F. <vf...@us...> - 2011-07-13 17:42:48
|
Update of /cvsroot/com0com/com0com/setup In directory vz-cvs-2.sog:/tmp/cvs-serv3470 Modified Files: msg.cpp Log Message: Added tracing of dialogs Index: msg.cpp =================================================================== RCS file: /cvsroot/com0com/com0com/setup/msg.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** msg.cpp 30 Jul 2010 09:19:29 -0000 1.9 --- msg.cpp 13 Jul 2011 17:42:46 -0000 1.10 *************** *** 2,6 **** * $Id$ * ! * Copyright (c) 2006-2010 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify --- 2,6 ---- * $Id$ * ! * Copyright (c) 2006-2011 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.10 2011/07/13 17:42:46 vfrolov + * Added tracing of dialogs + * * Revision 1.9 2010/07/30 09:19:29 vfrolov * Added STRDUP() *************** *** 139,142 **** --- 142,177 ---- static void (* pTrace)(LPCSTR pText) = TraceDefault; /////////////////////////////////////////////////////////////// + static int ShowMsg(LPCSTR pText, UINT type) + { + Trace("\nDIALOG: {\n%s} ... ", pText); + + #define TRACECASE(p, s) case p##s: Trace(#s); break; + + int res = pShowMsg(pText, type); + + switch(res) { + TRACECASE(ID, OK) + TRACECASE(ID, CANCEL) + TRACECASE(ID, ABORT) + TRACECASE(ID, RETRY) + TRACECASE(ID, IGNORE) + TRACECASE(ID, YES) + TRACECASE(ID, NO) + TRACECASE(ID, CLOSE) + TRACECASE(ID, HELP) + TRACECASE(ID, TRYAGAIN) + TRACECASE(ID, CONTINUE) + case 0: + Trace("error"); + break; + default: + Trace("%d", res); + } + + Trace("\n"); + + return res; + } + /////////////////////////////////////////////////////////////// static int ShowMsgVA(UINT type, const char *pFmt, va_list va) { *************** *** 145,149 **** VSNPRINTF(buf, sizeof(buf)/sizeof(buf[0]), pFmt, va); ! return pShowMsg(buf, type); } /////////////////////////////////////////////////////////////// --- 180,184 ---- VSNPRINTF(buf, sizeof(buf)/sizeof(buf[0]), pFmt, va); ! return ShowMsg(buf, type); } /////////////////////////////////////////////////////////////// *************** *** 167,175 **** int len = lstrlen(buf); ! SNPRINTF(buf + len, sizeof(buf)/sizeof(buf[0]) - len, "\nERROR: 0x%08lX - %s\n", (unsigned long)err, pMsgBuf); LocalFree(pMsgBuf); ! return pShowMsg(buf, type); } /////////////////////////////////////////////////////////////// --- 202,213 ---- int len = lstrlen(buf); ! if ((err & 0xFFFF0000) == 0) ! SNPRINTF(buf + len, sizeof(buf)/sizeof(buf[0]) - len, "\nERROR: %lu - %s\n", (unsigned long)err, pMsgBuf); ! else ! SNPRINTF(buf + len, sizeof(buf)/sizeof(buf[0]) - len, "\nERROR: 0x%08lX - %s\n", (unsigned long)err, pMsgBuf); LocalFree(pMsgBuf); ! return ShowMsg(buf, type); } /////////////////////////////////////////////////////////////// |
From: Vyacheslav F. <vf...@us...> - 2011-07-13 17:39:58
|
Update of /cvsroot/com0com/com0com/setup In directory vz-cvs-2.sog:/tmp/cvs-serv3076 Modified Files: devutils.cpp devutils.h setup.cpp Log Message: Fixed result treatment of UpdateDriverForPlugAndPlayDevices() Index: devutils.h =================================================================== RCS file: /cvsroot/com0com/com0com/setup/devutils.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** devutils.h 29 Jul 2010 12:18:43 -0000 1.11 --- devutils.h 13 Jul 2011 17:39:56 -0000 1.12 *************** *** 2,6 **** * $Id$ * ! * Copyright (c) 2006-2010 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify --- 2,6 ---- * $Id$ * ! * Copyright (c) 2006-2011 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.12 2011/07/13 17:39:56 vfrolov + * Fixed result treatment of UpdateDriverForPlugAndPlayDevices() + * * Revision 1.11 2010/07/29 12:18:43 vfrolov * Fixed waiting stuff *************** *** 148,151 **** --- 151,155 ---- const char *pHardwareId, DWORD flags, + BOOL mandatory, BOOL *pRebootRequired); Index: setup.cpp =================================================================== RCS file: /cvsroot/com0com/com0com/setup/setup.cpp,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** setup.cpp 30 Jul 2010 09:19:29 -0000 1.44 --- setup.cpp 13 Jul 2011 17:39:56 -0000 1.45 *************** *** 2,6 **** * $Id$ * ! * Copyright (c) 2006-2010 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify --- 2,6 ---- * $Id$ * ! * Copyright (c) 2006-2011 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.45 2011/07/13 17:39:56 vfrolov + * Fixed result treatment of UpdateDriverForPlugAndPlayDevices() + * * Revision 1.44 2010/07/30 09:19:29 vfrolov * Added STRDUP() *************** *** 327,331 **** res = ShowMsg(MB_CANCELTRYCONTINUE, ! "The port name %s is already used for other device %s.", pPortName, phDevName); --- 330,334 ---- res = ShowMsg(MB_CANCELTRYCONTINUE, ! "The port name %s is already used for other device %s.\n", pPortName, phDevName); *************** *** 348,352 **** res = ShowMsg(MB_CANCELTRYCONTINUE, "The port name %s is already logged as \"in use\"\n" ! "in the COM port database.", pPortName); } --- 351,355 ---- res = ShowMsg(MB_CANCELTRYCONTINUE, "The port name %s is already logged as \"in use\"\n" ! "in the COM port database.\n", pPortName); } *************** *** 540,547 **** EnumDevices(EnumFilter, &devProperties, pRebootRequired, ShowDialog, NULL); } else { ! ShowMsg(MB_OK|MB_ICONWARNING, "Can't display the dialog while changing the class of port"); } } else { ! ShowMsg(MB_OK|MB_ICONWARNING, "Can't display the dialog for non Ports class port"); } } --- 543,550 ---- EnumDevices(EnumFilter, &devProperties, pRebootRequired, ShowDialog, NULL); } else { ! ShowMsg(MB_OK|MB_ICONWARNING, "Can't display the dialog while changing the class of port.\n"); } } else { ! ShowMsg(MB_OK|MB_ICONWARNING, "Can't display the dialog for non Ports class port.\n"); } } *************** *** 745,749 **** do { ! res = UpdateDriver(pInfFilePath, pHardwareId, INSTALLFLAG_FORCE, &rebootRequired); } while (res == IDTRYAGAIN); --- 748,752 ---- do { ! res = UpdateDriver(pInfFilePath, pHardwareId, INSTALLFLAG_FORCE, FALSE, &rebootRequired); } while (res == IDTRYAGAIN); *************** *** 840,844 **** do { ! res = UpdateDriver(pInfFilePath, C0C_BUS_DEVICE_ID, 0, &rebootRequired); } while (res == IDTRYAGAIN); --- 843,847 ---- do { ! res = UpdateDriver(pInfFilePath, C0C_BUS_DEVICE_ID, 0, FALSE, &rebootRequired); } while (res == IDTRYAGAIN); *************** *** 985,989 **** if (!Silent() && portParameters.DialogRequested()) ! ShowMsg(MB_OK|MB_ICONWARNING, "Can't display the dialog while installing a pair of linked ports"); if (portParameters.Changed()) { --- 988,992 ---- if (!Silent() && portParameters.DialogRequested()) ! ShowMsg(MB_OK|MB_ICONWARNING, "Can't display the dialog while installing a pair of linked ports.\n"); if (portParameters.Changed()) { *************** *** 1008,1012 **** lstrcmpi(portName[0], C0C_PORT_NAME_COMCLASS) != 0 && ShowMsg(MB_OKCANCEL|MB_ICONWARNING, ! "The same port name %s is used for both ports.", portName[0]) == IDCANCEL) { --- 1011,1015 ---- lstrcmpi(portName[0], C0C_PORT_NAME_COMCLASS) != 0 && ShowMsg(MB_OKCANCEL|MB_ICONWARNING, ! "The same port name %s is used for both ports.\n", portName[0]) == IDCANCEL) { *************** *** 1122,1126 **** } else { res = ShowMsg(MB_CANCELTRYCONTINUE, ! "Service %s is not stopped (state %ld).", C0C_SERVICE, (long)srvStatus.dwCurrentState); } --- 1125,1129 ---- } else { res = ShowMsg(MB_CANCELTRYCONTINUE, ! "Service %s is not stopped (state %ld).\n", C0C_SERVICE, (long)srvStatus.dwCurrentState); } Index: devutils.cpp =================================================================== RCS file: /cvsroot/com0com/com0com/setup/devutils.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** devutils.cpp 29 Jul 2010 12:18:43 -0000 1.17 --- devutils.cpp 13 Jul 2011 17:39:55 -0000 1.18 *************** *** 2,6 **** * $Id$ * ! * Copyright (c) 2006-2010 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify --- 2,6 ---- * $Id$ * ! * Copyright (c) 2006-2011 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.18 2011/07/13 17:39:55 vfrolov + * Fixed result treatment of UpdateDriverForPlugAndPlayDevices() + * * Revision 1.17 2010/07/29 12:18:43 vfrolov * Fixed waiting stuff *************** *** 682,685 **** --- 685,689 ---- const char *pHardwareId, DWORD flags, + BOOL mandatory, BOOL *pRebootRequired) { *************** *** 693,700 **** updateErr = GetLastError(); - if (updateErr == ERROR_NO_SUCH_DEVINST) { - updateErr = ERROR_SUCCESS; - } - else if (updateErr == ERROR_SHARING_VIOLATION) { Trace("."); --- 697,700 ---- *************** *** 702,705 **** --- 702,715 ---- continue; } + else + if (!mandatory) { + if (updateErr == ERROR_NO_SUCH_DEVINST) { + updateErr = ERROR_SUCCESS; + } + else + if (updateErr == ERROR_NO_MORE_ITEMS && (flags & INSTALLFLAG_FORCE) == 0) { + updateErr = ERROR_SUCCESS; + } + } } *************** *** 745,749 **** } ! return ShowError(MB_CANCELTRYCONTINUE, updateErr, "UpdateDriverForPlugAndPlayDevices()"); } --- 755,761 ---- } ! return ShowError(MB_CANCELTRYCONTINUE, updateErr, ! "UpdateDriverForPlugAndPlayDevices(\"%s\", \"%s\", 0x%lX)", ! pHardwareId, pInfFilePath, (long)flags); } *************** *** 879,883 **** if (updateDriver) ! res = UpdateDriver(pInfFilePath, pDevId, 0, pRebootRequired); exit2: --- 891,895 ---- if (updateDriver) ! res = UpdateDriver(pInfFilePath, pDevId, 0, TRUE, pRebootRequired); exit2: *************** *** 971,975 **** if (!inTrace) { ! Trace("Wating for no pending device installation activities "); inTrace = TRUE; } --- 983,991 ---- if (!inTrace) { ! if (timeLimit != -1) ! Trace("Wating for no pending device installation activities (%u secs) ", (unsigned)timeLimit); ! else ! Trace("Wating for no pending device installation activities (perpetually) "); ! inTrace = TRUE; } |
From: Vyacheslav F. <vf...@us...> - 2011-07-12 18:22:04
|
Update of /cvsroot/com0com/com0com/sys In directory vz-cvs-2.sog:/tmp/cvs-serv1558 Modified Files: trace.c Log Message: Discarded WDM garbage (fixed timestamp localization) Added IOCTL_SERIAL_SET_FIFO_CONTROL value tracing Index: trace.c =================================================================== RCS file: /cvsroot/com0com/com0com/sys/trace.c,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** trace.c 9 Aug 2010 05:51:16 -0000 1.37 --- trace.c 12 Jul 2011 18:22:02 -0000 1.38 *************** *** 2,6 **** * $Id$ * ! * Copyright (c) 2004-2010 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify --- 2,6 ---- * $Id$ * ! * Copyright (c) 2004-2011 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify *************** *** 20,23 **** --- 20,27 ---- * * $Log$ + * Revision 1.38 2011/07/12 18:22:02 vfrolov + * Discarded WDM garbage (fixed timestamp localization) + * Added IOCTL_SERIAL_SET_FIFO_CONTROL value tracing + * * Revision 1.37 2010/08/09 05:51:16 vfrolov * Fixed BSOD on tracing broken IRP_MN_QUERY_DEVICE_RELATIONS *************** *** 944,962 **** { LARGE_INTEGER systemTime; KeQuerySystemTime(&systemTime); ! #ifndef _WDMDDK_ ! { ! LARGE_INTEGER localTime; ! ExSystemTimeToLocalTime(&systemTime, &localTime); ! systemTime = localTime; ! } ! #else ! #define LOCAL_TIME_SHIFT (3*60*60) ! systemTime.QuadPart += (LONGLONG)(10000)*1000*LOCAL_TIME_SHIFT; ! #endif ! ! RtlTimeToTimeFields(&systemTime, pTimeFields); } --- 948,957 ---- { LARGE_INTEGER systemTime; + LARGE_INTEGER localTime; KeQuerySystemTime(&systemTime); + ExSystemTimeToLocalTime(&systemTime, &localTime); ! RtlTimeToTimeFields(&localTime, pTimeFields); } *************** *** 1509,1512 **** --- 1504,1511 ---- } break; + case IOCTL_SERIAL_SET_FIFO_CONTROL: + if ((flags & TRACE_FLAG_PARAMS) && inLength >= sizeof(ULONG)) + pDestStr = AnsiStrFormat(pDestStr, &size, " 0x%lX", (long)*((PULONG)pSysBuf)); + break; case IOCTL_SERIAL_SET_WAIT_MASK: if ((flags & TRACE_FLAG_PARAMS) && inLength >= sizeof(ULONG)) { |
From: Vyacheslav F. <vf...@us...> - 2011-07-12 18:16:48
|
Update of /cvsroot/com0com/com0com/sys In directory vz-cvs-2.sog:/tmp/cvs-serv32530 Modified Files: tracetbl.c Log Message: Discarded WDM garbage Index: tracetbl.c =================================================================== RCS file: /cvsroot/com0com/com0com/sys/tracetbl.c,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** tracetbl.c 10 Aug 2010 16:45:58 -0000 1.18 --- tracetbl.c 12 Jul 2011 18:16:46 -0000 1.19 *************** *** 2,6 **** * $Id$ * ! * Copyright (c) 2004-2010 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify --- 2,6 ---- * $Id$ * ! * Copyright (c) 2004-2011 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.19 2011/07/12 18:16:46 vfrolov + * Discarded WDM garbage + * * Revision 1.18 2010/08/10 16:45:58 vfrolov * Added STATUS_WAIT_1..3 *************** *** 409,420 **** CODE2NAME codeNameTableFileInformationClass[] = { - #ifndef _WDMDDK_ TOCODE2NAME1(FileDirectoryInformation), TOCODE2NAME1(FileFullDirectoryInformation), TOCODE2NAME1(FileBothDirectoryInformation), - #endif TOCODE2NAME1(FileBasicInformation), TOCODE2NAME1(FileStandardInformation), - #ifndef _WDMDDK_ TOCODE2NAME1(FileInternalInformation), TOCODE2NAME1(FileEaInformation), --- 412,420 ---- *************** *** 425,431 **** TOCODE2NAME1(FileNamesInformation), TOCODE2NAME1(FileDispositionInformation), - #endif TOCODE2NAME1(FilePositionInformation), - #ifndef _WDMDDK_ TOCODE2NAME1(FileFullEaInformation), TOCODE2NAME1(FileModeInformation), --- 425,429 ---- *************** *** 433,439 **** TOCODE2NAME1(FileAllInformation), TOCODE2NAME1(FileAllocationInformation), - #endif TOCODE2NAME1(FileEndOfFileInformation), - #ifndef _WDMDDK_ TOCODE2NAME1(FileAlternateNameInformation), TOCODE2NAME1(FileStreamInformation), --- 431,435 ---- *************** *** 453,457 **** TOCODE2NAME1(FileTrackingInformation), TOCODE2NAME1(FileMaximumInformation), - #endif {0, NULL} }; --- 449,452 ---- |
From: Vyacheslav F. <vf...@us...> - 2011-07-12 18:15:39
|
Update of /cvsroot/com0com/com0com/sys In directory vz-cvs-2.sog:/tmp/cvs-serv32438 Modified Files: precomp.h Log Message: Discarded WDM garbage Index: precomp.h =================================================================== RCS file: /cvsroot/com0com/com0com/sys/precomp.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** precomp.h 3 Sep 2010 13:32:14 -0000 1.5 --- precomp.h 12 Jul 2011 18:15:37 -0000 1.6 *************** *** 2,6 **** * $Id$ * ! * Copyright (c) 2004-2010 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify --- 2,6 ---- * $Id$ * ! * Copyright (c) 2004-2011 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.6 2011/07/12 18:15:37 vfrolov + * Discarded WDM garbage + * * Revision 1.5 2010/09/03 13:32:14 vfrolov * Fixed incompatibility with WDK 6001.18002 *************** *** 43,47 **** #include <ntddk.h> - //#include <wdm.h> #include <ntddser.h> --- 46,49 ---- |
From: Vyacheslav F. <vf...@us...> - 2011-07-12 18:10:13
|
Update of /cvsroot/com0com/com0com/NSIS In directory vz-cvs-2.sog:/tmp/cvs-serv30712 Modified Files: install.nsi Log Message: Added launching setupg.exe rather then setupc.exe if .NET is OK Disabled installing ports by default while update Index: install.nsi =================================================================== RCS file: /cvsroot/com0com/com0com/NSIS/install.nsi,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** install.nsi 8 Jul 2011 10:19:19 -0000 1.20 --- install.nsi 12 Jul 2011 18:10:11 -0000 1.21 *************** *** 20,23 **** --- 20,27 ---- * * $Log$ + * Revision 1.21 2011/07/12 18:10:11 vfrolov + * Added launching setupg.exe rather then setupc.exe if .NET is OK + * Disabled installing ports by default while update + * * Revision 1.20 2011/07/08 10:19:19 vfrolov * Added ability to set selections for setup.exe by setting environment variables *************** *** 166,169 **** --- 170,200 ---- ;-------------------------------- + Function LaunchSetup + IfSilent 0 +2 + return + + Push $0 + Push $1 + Push $2 + + Call GetDotNETVersion + Pop $0 + + StrCpy $1 "2.0" + + ${VersionCompare} $0 $1 $2 + ${If} $2 == 2 + Exec "setupc.exe" + ${Else} + Exec "setupg.exe" + ${EndIf} + + Pop $2 + Pop $1 + Pop $0 + FunctionEnd + + ;-------------------------------- + !macro MoveFileToDetails file *************** *** 252,257 **** !define MUI_FINISHPAGE_TITLE_3LINES ! !define MUI_FINISHPAGE_RUN setupc.exe ! !define MUI_FINISHPAGE_RUN_TEXT "Launch Setup Command Prompt" !define MUI_FINISHPAGE_RUN_NOTCHECKED --- 283,289 ---- !define MUI_FINISHPAGE_TITLE_3LINES ! !define MUI_FINISHPAGE_RUN ! !define MUI_FINISHPAGE_RUN_TEXT "Launch Setup" ! !define MUI_FINISHPAGE_RUN_FUNCTION LaunchSetup !define MUI_FINISHPAGE_RUN_NOTCHECKED *************** *** 455,461 **** ${EndIf} ! ; Disable installing ports if silent ! IfSilent 0 +9 SectionGetFlags ${sec_CNCxCNC_ports} $0 IntOp $1 ${SF_SELECTED} ~ --- 487,500 ---- ${EndIf} ! ; Disable installing ports by default if update or silent install ! ClearErrors ! ReadRegStr $0 HKLM SOFTWARE\com0com "Install_Dir" ! IfErrors 0 disable_ports_begin ! ! IfSilent disable_ports_begin 0 ! Goto disable_ports_end ! ! disable_ports_begin: SectionGetFlags ${sec_CNCxCNC_ports} $0 IntOp $1 ${SF_SELECTED} ~ *************** *** 466,469 **** --- 505,509 ---- IntOp $0 $0 & $1 SectionSetFlags ${sec_COMxCOM_ports} $0 + disable_ports_end: ; Set selections from enviroment |
From: Vyacheslav F. <vf...@us...> - 2011-07-12 18:01:29
|
Update of /cvsroot/com0com/com0com In directory vz-cvs-2.sog:/tmp/cvs-serv28462 Modified Files: ReadMe.txt Building.txt Log Message: Fixed UAC problem Index: ReadMe.txt =================================================================== RCS file: /cvsroot/com0com/com0com/ReadMe.txt,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** ReadMe.txt 8 Jul 2011 10:20:20 -0000 1.29 --- ReadMe.txt 12 Jul 2011 18:01:27 -0000 1.30 *************** *** 35,42 **** ========== - NOTE (Windows Vista/Windows Server 2008/Windows 7): - Before installing/uninstalling the com0com driver or adding/removing/changing - ports the User Account Control (UAC) should be turned off (require reboot). - NOTE (x64-based Windows Vista/Windows Server 2008/Windows 7): The com0com.sys is a test-signed kernel-mode driver that will not load by --- 35,38 ---- *************** *** 48,52 **** NOTE: ! Turning off UAC or enabling test signing will impair computer security. Simply run the installer (setup.exe). An installation wizard will guide --- 44,48 ---- NOTE: ! Enabling test signing will impair computer security. Simply run the installer (setup.exe). An installation wizard will guide Index: Building.txt =================================================================== RCS file: /cvsroot/com0com/com0com/Building.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Building.txt 3 Sep 2010 13:39:10 -0000 1.3 --- Building.txt 12 Jul 2011 18:01:27 -0000 1.4 *************** *** 70,74 **** It will create the C:\com0com\setupg\Release\setupg.exe file. ! 4. Build the installer. For example execute in the DDK build environment window: --- 70,84 ---- It will create the C:\com0com\setupg\Release\setupg.exe file. ! 4. If you build driver for Windows Vista/Windows Server 2008/Windows 7 then ! embed requireAdministrator.manifest to the executables. ! ! For example execute in the MSVC build environment window: ! ! mt.exe -manifest C:\com0com\requireAdministrator.manifest -updateresource:"C:\com0com\setupg\Release\setupg.exe";#1 ! mt.exe -manifest C:\com0com\requireAdministrator.manifest -outputresource:"C:\com0com\<CPU>\setupc.exe";#1 ! ! where <CPU> is i386, ia64 or amd64 ! ! 5. Build the installer. For example execute in the DDK build environment window: |
From: Vyacheslav F. <vf...@us...> - 2011-07-12 17:57:40
|
Update of /cvsroot/com0com/com0com In directory vz-cvs-2.sog:/tmp/cvs-serv28030 Added Files: requireAdministrator.manifest Log Message: Initial revision --- NEW FILE: requireAdministrator.manifest --- <?xml version='1.0' encoding='UTF-8' standalone='yes'?> <assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'> <ms_asmv2:trustInfo xmlns:ms_asmv2="urn:schemas-microsoft-com:asm.v2"> <ms_asmv2:security> <ms_asmv2:requestedPrivileges> <ms_asmv2:requestedExecutionLevel level="requireAdministrator"> </ms_asmv2:requestedExecutionLevel> </ms_asmv2:requestedPrivileges> </ms_asmv2:security> </ms_asmv2:trustInfo> </assembly> |
From: Vyacheslav F. <vf...@us...> - 2011-07-08 10:20:22
|
Update of /cvsroot/com0com/com0com In directory vz-cvs-2.sog:/tmp/cvs-serv25838 Modified Files: ReadMe.txt Log Message: Added ability to set selections for setup.exe by setting environment variables Index: ReadMe.txt =================================================================== RCS file: /cvsroot/com0com/com0com/ReadMe.txt,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** ReadMe.txt 3 Sep 2010 13:52:28 -0000 1.28 --- ReadMe.txt 8 Jul 2011 10:20:20 -0000 1.29 *************** *** 115,119 **** setup.exe /S /D=C:\Program Files\com0com ! NOTE: Silent installation of com0com will not install any port pairs. Q. Is it possible to change the names CNCA0 and CNCB0 to COM2 and COM3? --- 115,134 ---- setup.exe /S /D=C:\Program Files\com0com ! NOTE: Silent installation of com0com will not install any port pairs by ! default {it can be overriden by setting CNC_INSTALL_CNCA0_CNCB0_PORTS ! and/or CNC_INSTALL_COMX_COMX_PORTS environment variables). ! ! Q. What are the other setup.exe command line options? ! A. The command line options of setup.exe and uninstall.exe listed in ! NSIS Users Manual, section 3.2 Installer Usage: ! ! http://nsis.sourceforge.net/Docs/Chapter3.html#3.2 ! ! Additionally the following environment variables can be used to change ! behaviour of setup.exe ! ! CNC_INSTALL_START_MENU_SHORTCUTS={YES|NO} - select/unselect "Start Menu Shortcuts" ! CNC_INSTALL_CNCA0_CNCB0_PORTS={YES|NO} - select/unselect "CNCA0 <-> CNCB0" ! CNC_INSTALL_COMX_COMX_PORTS={YES|NO} - select/unselect "COM# <-> COM#" Q. Is it possible to change the names CNCA0 and CNCB0 to COM2 and COM3? |
From: Vyacheslav F. <vf...@us...> - 2011-07-08 10:19:22
|
Update of /cvsroot/com0com/com0com/NSIS In directory vz-cvs-2.sog:/tmp/cvs-serv25725 Modified Files: install.nsi Log Message: Added ability to set selections for setup.exe by setting environment variables Index: install.nsi =================================================================== RCS file: /cvsroot/com0com/com0com/NSIS/install.nsi,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** install.nsi 1 Jun 2010 06:14:09 -0000 1.19 --- install.nsi 8 Jul 2011 10:19:19 -0000 1.20 *************** *** 2,6 **** * $Id$ * ! * Copyright (c) 2006-2010 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify --- 2,6 ---- * $Id$ * ! * Copyright (c) 2006-2011 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.20 2011/07/08 10:19:19 vfrolov + * Added ability to set selections for setup.exe by setting environment variables + * * Revision 1.19 2010/06/01 06:14:09 vfrolov * Improved driver updating *************** *** 199,202 **** --- 202,230 ---- ;-------------------------------- + !macro EnvToSel section env + + Push $0 + Push $1 + + ReadEnvStr $0 ${env} + StrCpy $0 $0 1 + ${Select} $0 + ${Case2} "Y" "y" + SectionGetFlags ${section} $0 + IntOp $0 $0 | ${SF_SELECTED} + SectionSetFlags ${section} $0 + ${Case2} "N" "n" + SectionGetFlags ${section} $0 + IntOp $1 ${SF_SELECTED} ~ + IntOp $0 $0 & $1 + SectionSetFlags ${section} $0 + ${EndSelect} + Pop $1 + Pop $0 + + !macroend + + ;-------------------------------- + ; The name of the installer Name "Null-modem emulator (com0com)" *************** *** 427,431 **** ${EndIf} ! ; Disable installing a pair of linked ports if silent IfSilent 0 +9 --- 455,459 ---- ${EndIf} ! ; Disable installing ports if silent IfSilent 0 +9 *************** *** 439,443 **** --- 467,478 ---- SectionSetFlags ${sec_COMxCOM_ports} $0 + ; Set selections from enviroment + + !insertmacro EnvToSel ${sec_shortcuts} "CNC_INSTALL_START_MENU_SHORTCUTS" + !insertmacro EnvToSel ${sec_CNCxCNC_ports} "CNC_INSTALL_CNCA0_CNCB0_PORTS" + !insertmacro EnvToSel ${sec_COMxCOM_ports} "CNC_INSTALL_COMX_COMX_PORTS" + FunctionEnd + ;-------------------------------- |
From: Vyacheslav F. <vf...@us...> - 2011-05-23 09:54:01
|
Update of /cvsroot/com0com/hub4com/plugins/pinmap In directory vz-cvs-2.sog:/tmp/cvs-serv13771 Modified Files: filter.cpp Log Message: Added --data option Index: filter.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/pinmap/filter.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** filter.cpp 19 May 2011 16:33:34 -0000 1.18 --- filter.cpp 23 May 2011 09:53:58 -0000 1.19 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.19 2011/05/23 09:53:58 vfrolov + * Added --data option + * * Revision 1.18 2011/05/19 16:33:34 vfrolov * Fixed typo *************** *** 86,89 **** --- 89,93 ---- /////////////////////////////////////////////////////////////// static ROUTINE_MSG_INSERT_VAL *pMsgInsertVal; + static ROUTINE_MSG_REPLACE_NONE *pMsgReplaceNone; static ROUTINE_PORT_NAME_A *pPortName; static ROUTINE_FILTER_NAME_A *pFilterName; *************** *** 109,125 **** }; /////////////////////////////////////////////////////////////// static struct { const char *pName; ! WORD val; } pinOut_names[] = { ! {"rts=", PIN_STATE_RTS}, ! {"dtr=", PIN_STATE_DTR}, ! {"out1=", PIN_STATE_OUT1}, ! {"out2=", PIN_STATE_OUT2}, ! {"cts=", PIN_STATE_CTS}, ! {"dsr=", PIN_STATE_DSR}, ! {"ring=", PIN_STATE_RI}, ! {"dcd=", PIN_STATE_DCD}, ! {"break=", PIN_STATE_BREAK}, }; /////////////////////////////////////////////////////////////// --- 113,134 ---- }; /////////////////////////////////////////////////////////////// + #define PST2OM(m) ((DWORD)((WORD)(m))) + #define OM2PST(m) ((WORD)(m)) + #define OM_DATA ((DWORD)1 << 16) + static struct { const char *pName; ! DWORD val; } pinOut_names[] = { ! {"rts=", PST2OM(PIN_STATE_RTS)}, ! {"dtr=", PST2OM(PIN_STATE_DTR)}, ! {"out1=", PST2OM(PIN_STATE_OUT1)}, ! {"out2=", PST2OM(PIN_STATE_OUT2)}, ! {"cts=", PST2OM(PIN_STATE_CTS)}, ! {"dsr=", PST2OM(PIN_STATE_DSR)}, ! {"ring=", PST2OM(PIN_STATE_RI)}, ! {"dcd=", PST2OM(PIN_STATE_DCD)}, ! {"break=", PST2OM(PIN_STATE_BREAK)}, ! {"data=", OM_DATA}, }; /////////////////////////////////////////////////////////////// *************** *** 148,151 **** --- 157,161 ---- State(HMASTERPORT hMasterPort) : pName(pPortName(hMasterPort)) + , outVal(0) , lmInVal(LM_ON) , connectionCounter(0) *************** *** 153,156 **** --- 163,167 ---- const char *const pName; + DWORD outVal; WORD lmInVal; int connectionCounter; *************** *** 166,175 **** PinOuts() : mask(0), val(0) {} ! WORD mask; ! WORD val; }; PinOuts pinMap[sizeof(pinIn_names)/sizeof(pinIn_names[0])]; ! WORD outMask; WORD lmInMask; --- 177,186 ---- PinOuts() : mask(0), val(0) {} ! DWORD mask; ! DWORD val; }; PinOuts pinMap[sizeof(pinIn_names)/sizeof(pinIn_names[0])]; ! DWORD outMask; WORD lmInMask; *************** *** 299,302 **** --- 310,314 ---- << " --dcd=[!]<s> - wire input state of <s> to output pin DCD." << endl << " --break=[!]<s> - wire input state of <s> to output state of BREAK." << endl + << " --data=[!]<s> - wire input state of <s> to state of DATA." << endl << endl << " The possible values of <s> above can be on, cts, dsr, dcd, ring, break or" << endl *************** *** 316,319 **** --- 328,333 ---- << " BREAK_STATUS(<val>) - current state of break." << endl << " MODEM_STATUS(<val>) - current state of modem." << endl + << " LINE_DATA(<data>) - will be discarded from stream if the state of DATA is" << endl + << " OFF." << endl << endl << "OUT method output data stream description:" << endl *************** *** 345,348 **** --- 359,370 ---- << " - receive data and signals from COM2 and send it back to COM2." << endl << " " << pProgPath << " --load=,,_END_" << endl + << " --create-filter=pinmap:--data=!cts" << endl + << " --add-filters=0:pinmap" << endl + << " --echo-route=0" << endl + << " --octs=off" << endl + << " COM2" << endl + << " _END_" << endl + << " - receive data from COM2 and if cts is OFF then send data back to COM2." << endl + << " " << pProgPath << " --load=,,_END_" << endl << " --route=all:0" << endl << " --create-filter=pinmap:--rts=connect --dtr=connect" << endl *************** *** 414,420 **** /////////////////////////////////////////////////////////////// static void InsertPinState( ! Filter &filter, WORD lmInMask, WORD lmInVal, HUB_MSG **ppOutMsg) { --- 436,443 ---- /////////////////////////////////////////////////////////////// static void InsertPinState( ! const Filter &filter, WORD lmInMask, WORD lmInVal, + State &state, HUB_MSG **ppOutMsg) { *************** *** 424,429 **** //cout << "InsertPinState lmInMask=0x" << hex << lmInMask << " lmInVal=0x" << lmInVal << dec << endl; ! WORD mask = 0; ! WORD val = 0; for (int iIn = 0 ; iIn < sizeof(pinIn_names)/sizeof(pinIn_names[0]) ; iIn++) { --- 447,452 ---- //cout << "InsertPinState lmInMask=0x" << hex << lmInMask << " lmInVal=0x" << lmInVal << dec << endl; ! DWORD outMask = 0; ! DWORD outVal = 0; for (int iIn = 0 ; iIn < sizeof(pinIn_names)/sizeof(pinIn_names[0]) ; iIn++) { *************** *** 431,444 **** continue; ! mask |= filter.pinMap[iIn].mask; if ((lmInVal & pinIn_names[iIn].lmVal) != 0) ! val |= (filter.pinMap[iIn].val & filter.pinMap[iIn].mask); else ! val |= (~filter.pinMap[iIn].val & filter.pinMap[iIn].mask); } ! if (mask) { ! DWORD dVal = (VAL2MASK(mask) | val); //cout << "SET_PIN_STATE 0x" << hex << dVal << dec << endl; *ppOutMsg = pMsgInsertVal(*ppOutMsg, HUB_MSG_TYPE_SET_PIN_STATE, dVal); --- 454,469 ---- continue; ! outMask |= filter.pinMap[iIn].mask; if ((lmInVal & pinIn_names[iIn].lmVal) != 0) ! outVal |= (filter.pinMap[iIn].val & filter.pinMap[iIn].mask); else ! outVal |= (~filter.pinMap[iIn].val & filter.pinMap[iIn].mask); } ! state.outVal = (outVal & outMask) | (state.outVal & ~outMask); ! ! if (OM2PST(outMask)) { ! DWORD dVal = (VAL2MASK(OM2PST(outMask)) | OM2PST(outVal)); //cout << "SET_PIN_STATE 0x" << hex << dVal << dec << endl; *ppOutMsg = pMsgInsertVal(*ppOutMsg, HUB_MSG_TYPE_SET_PIN_STATE, dVal); *************** *** 460,467 **** case HUB_MSG_T2N(HUB_MSG_TYPE_SET_OUT_OPTS): { // or'e with the required mask to set pin state ! pOutMsg->u.val |= SO_V2O_PIN_STATE(((Filter *)hFilter)->outMask); // init pin state ! InsertPinState(*(Filter *)hFilter, ((Filter *)hFilter)->lmInMask, ((State *)hFilterInstance)->lmInVal, &pOutMsg); break; --- 485,492 ---- case HUB_MSG_T2N(HUB_MSG_TYPE_SET_OUT_OPTS): { // or'e with the required mask to set pin state ! pOutMsg->u.val |= SO_V2O_PIN_STATE(OM2PST(((Filter *)hFilter)->outMask)); // init pin state ! InsertPinState(*(Filter *)hFilter, ((Filter *)hFilter)->lmInMask, ((State *)hFilterInstance)->lmInVal, *(State *)hFilterInstance, &pOutMsg); break; *************** *** 494,498 **** case HUB_MSG_T2N(HUB_MSG_TYPE_SET_PIN_STATE): // discard any pin settings controlled by this filter ! pOutMsg->u.val &= ~(VAL2MASK(((Filter *)hFilter)->outMask)); break; case HUB_MSG_T2N(HUB_MSG_TYPE_MODEM_STATUS): { --- 519,523 ---- case HUB_MSG_T2N(HUB_MSG_TYPE_SET_PIN_STATE): // discard any pin settings controlled by this filter ! pOutMsg->u.val &= ~(VAL2MASK(OM2PST(((Filter *)hFilter)->outMask))); break; case HUB_MSG_T2N(HUB_MSG_TYPE_MODEM_STATUS): { *************** *** 500,504 **** WORD lmInVal = ((MST2LM(pOutMsg->u.val) & lmInMask) | (((State *)hFilterInstance)->lmInVal & ~lmInMask)); ! InsertPinState(*(Filter *)hFilter, ((State *)hFilterInstance)->lmInVal ^ lmInVal, lmInVal, &pOutMsg); ((State *)hFilterInstance)->lmInVal = lmInVal; --- 525,529 ---- WORD lmInVal = ((MST2LM(pOutMsg->u.val) & lmInMask) | (((State *)hFilterInstance)->lmInVal & ~lmInMask)); ! InsertPinState(*(Filter *)hFilter, ((State *)hFilterInstance)->lmInVal ^ lmInVal, lmInVal, *(State *)hFilterInstance, &pOutMsg); ((State *)hFilterInstance)->lmInVal = lmInVal; *************** *** 509,513 **** WORD lmInVal = ((pOutMsg->u.val ? LM_BREAK : 0) | (((State *)hFilterInstance)->lmInVal & ~LM_BREAK)); ! InsertPinState(*(Filter *)hFilter, ((State *)hFilterInstance)->lmInVal ^ lmInVal, lmInVal, &pOutMsg); ((State *)hFilterInstance)->lmInVal = lmInVal; --- 534,538 ---- WORD lmInVal = ((pOutMsg->u.val ? LM_BREAK : 0) | (((State *)hFilterInstance)->lmInVal & ~LM_BREAK)); ! InsertPinState(*(Filter *)hFilter, ((State *)hFilterInstance)->lmInVal ^ lmInVal, lmInVal, *(State *)hFilterInstance, &pOutMsg); ((State *)hFilterInstance)->lmInVal = lmInVal; *************** *** 530,534 **** WORD lmInVal = ((((State *)hFilterInstance)->connectionCounter > 0 ? LM_CONNECT : 0) | (((State *)hFilterInstance)->lmInVal & ~LM_CONNECT)); ! InsertPinState(*(Filter *)hFilter, ((State *)hFilterInstance)->lmInVal ^ lmInVal, lmInVal, &pOutMsg); ((State *)hFilterInstance)->lmInVal = lmInVal; --- 555,559 ---- WORD lmInVal = ((((State *)hFilterInstance)->connectionCounter > 0 ? LM_CONNECT : 0) | (((State *)hFilterInstance)->lmInVal & ~LM_CONNECT)); ! InsertPinState(*(Filter *)hFilter, ((State *)hFilterInstance)->lmInVal ^ lmInVal, lmInVal, *(State *)hFilterInstance, &pOutMsg); ((State *)hFilterInstance)->lmInVal = lmInVal; *************** *** 536,539 **** --- 561,572 ---- break; } + case HUB_MSG_T2N(HUB_MSG_TYPE_LINE_DATA): { + if ((((Filter *)hFilter)->outMask & OM_DATA) != 0 && (((State *)hFilterInstance)->outVal & OM_DATA) == 0) { + if (!pMsgReplaceNone(pOutMsg, HUB_MSG_TYPE_EMPTY)) + return FALSE; + } + + break; + } } *************** *** 567,570 **** --- 600,604 ---- { if (!ROUTINE_IS_VALID(pHubRoutines, pMsgInsertVal) || + !ROUTINE_IS_VALID(pHubRoutines, pMsgReplaceNone) || !ROUTINE_IS_VALID(pHubRoutines, pPortName) || !ROUTINE_IS_VALID(pHubRoutines, pFilterName) || *************** *** 575,578 **** --- 609,613 ---- pMsgInsertVal = pHubRoutines->pMsgInsertVal; + pMsgReplaceNone = pHubRoutines->pMsgReplaceNone; pPortName = pHubRoutines->pPortName; pFilterName = pHubRoutines->pFilterName; |
From: Vyacheslav F. <vf...@us...> - 2011-05-20 09:13:18
|
Update of /cvsroot/com0com/hub4com/examples In directory vz-cvs-2.sog:/tmp/cvs-serv17864 Modified Files: multiplexer.bat Log Message: Fixed bug with double quotes Index: multiplexer.bat =================================================================== RCS file: /cvsroot/com0com/hub4com/examples/multiplexer.bat,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** multiplexer.bat 11 Dec 2008 13:23:11 -0000 1.5 --- multiplexer.bat 20 May 2011 09:13:15 -0000 1.6 *************** *** 75,82 **** --- 75,84 ---- IF "%TRACE_COMMENT%" NEQ "" GOTO END_LINKPORT_TRACE SET LINKPORT_FILTERS=%LINKPORT_FILTERS% --create-filter=trace,linkport,COM + SET LINKPORT_FILTERS_ADDED=TRUE :END_LINKPORT_TRACE IF "%SECRET%" == "" GOTO END_LINKPORT_SECRET SET LINKPORT_FILTERS=%LINKPORT_FILTERS% --create-filter=crypt,linkport,crypt:"--secret=\"%SECRET%\"" + SET LINKPORT_FILTERS_ADDED=TRUE IF "%TRACE_COMMENT%" NEQ "" GOTO END_LINKPORT_TRACE_RAW *************** *** 85,89 **** :END_LINKPORT_SECRET ! IF "%LINKPORT_FILTERS%" == "" GOTO END_LINKPORT_FILTERS SET LINKPORT_FILTERS=%LINKPORT_FILTERS% --add-filters=0:linkport :END_LINKPORT_FILTERS --- 87,91 ---- :END_LINKPORT_SECRET ! IF "%LINKPORT_FILTERS_ADDED%" NEQ "TRUE" GOTO END_LINKPORT_FILTERS SET LINKPORT_FILTERS=%LINKPORT_FILTERS% --add-filters=0:linkport :END_LINKPORT_FILTERS |
From: Vyacheslav F. <vf...@us...> - 2011-05-20 09:03:36
|
Update of /cvsroot/com0com/hub4com/plugins/crypt In directory vz-cvs-2.sog:/tmp/cvs-serv14174 Modified Files: filter.cpp Log Message: Added CRYPT_VERIFYCONTEXT to prevent NTE_BAD_KEYSET error Index: filter.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/crypt/filter.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** filter.cpp 2 Feb 2009 15:21:42 -0000 1.4 --- filter.cpp 20 May 2011 09:03:33 -0000 1.5 *************** *** 2,6 **** * $Id$ * ! * Copyright (c) 2008-2009 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify --- 2,6 ---- * $Id$ * ! * Copyright (c) 2008-2011 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.5 2011/05/20 09:03:33 vfrolov + * Added CRYPT_VERIFYCONTEXT to prevent NTE_BAD_KEYSET error + * * Revision 1.4 2009/02/02 15:21:42 vfrolov * Optimized filter's API *************** *** 124,128 **** cerr << "WARNING: The secret is empty" << endl; ! if (!CryptAcquireContext(&hProv, NULL, MS_ENHANCED_PROV, PROV_RSA_FULL, 0)) { DWORD err = GetLastError(); cerr << "CryptAcquireContext() - error=" << err << endl; --- 127,131 ---- cerr << "WARNING: The secret is empty" << endl; ! if (!CryptAcquireContext(&hProv, NULL, MS_ENHANCED_PROV, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) { DWORD err = GetLastError(); cerr << "CryptAcquireContext() - error=" << err << endl; |