[Com0com-cvs] com0com/setup setup.cpp,1.54,1.55
The virtual serial port driver for Windows.
Brought to you by:
vfrolov
|
From: Vyacheslav F. <vf...@us...> - 2012-01-31 05:47:24
|
Update of /cvsroot/com0com/com0com/setup
In directory vz-cvs-4.sog:/tmp/cvs-serv3560
Modified Files:
setup.cpp
Log Message:
Deprecated invoking of system-supplied advanced settings dialog box
Allowed re-use port name while migration from Ports class to CNCPorts class
Index: setup.cpp
===================================================================
RCS file: /cvsroot/com0com/com0com/setup/setup.cpp,v
retrieving revision 1.54
retrieving revision 1.55
diff -C2 -d -r1.54 -r1.55
*** setup.cpp 10 Jan 2012 11:24:27 -0000 1.54
--- setup.cpp 31 Jan 2012 05:47:22 -0000 1.55
***************
*** 20,23 ****
--- 20,27 ----
*
* $Log$
+ * Revision 1.55 2012/01/31 05:47:22 vfrolov
+ * Deprecated invoking of system-supplied advanced settings dialog box
+ * Allowed re-use port name while migration from Ports class to CNCPorts class
+ *
* Revision 1.54 2012/01/10 11:24:27 vfrolov
* Added ability to repeate waiting for no pending device
***************
*** 205,209 ****
#include "portnum.h"
#include "comdb.h"
- #define SERIAL_ADVANCED_SETTINGS 1
#include <msports.h>
--- 209,212 ----
***************
*** 740,757 ****
};
- static CNC_DEV_CALLBACK ShowDialog;
- static bool ShowDialog(
- HDEVINFO hDevInfo,
- PSP_DEVINFO_DATA pDevInfoData,
- PCDevProperties /*pDevProperties*/,
- BOOL * /*pRebootRequired*/,
- void * /*pParam*/)
- {
- if (SerialDisplayAdvancedSettings(NULL, hDevInfo, pDevInfoData) != ERROR_SUCCESS)
- return FALSE;
-
- return TRUE;
- }
-
static CNC_DEV_CALLBACK ChangeDevice;
static bool ChangeDevice(
--- 743,746 ----
***************
*** 820,840 ****
continue;
! if (lstrcmpi(portNameNew, portNameOld) != 0 && !IsValidPortName(portNameNew))
! continue;
!
! bool isComClassNew = IsComClass(portNameNew);
!
! if (!Silent() && portParameters.DialogRequested()) {
! if (isComClassNew) {
! if (isComClassOld) {
! 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");
}
}
if (!isComClassNew || !isComClassOld) {
realPortNameOld[0] = 0;
--- 809,821 ----
continue;
! if (lstrcmpi(portNameNew, portNameOld) != 0) {
! if (!isComClassOld || lstrcmpi("", realPortNameOld) == 0 || lstrcmpi(portNameNew, realPortNameOld) != 0) {
! if (!IsValidPortName(portNameNew))
! continue;
}
}
+ bool isComClassNew = IsComClass(portNameNew);
+
if (!isComClassNew || !isComClassOld) {
realPortNameOld[0] = 0;
***************
*** 1342,1348 ****
portParameters.InitRealPortName(); // ignore RealPortName param
- 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()) {
err = portParameters.Save();
--- 1323,1326 ----
***************
*** 1955,1961 ****
, pProgName, (pProgName && *pProgName) ? " " : "");
ConsoleWrite(
- " %s%schange " C0C_PREF_PORT_NAME_A "0 PortName=?\n"
- , pProgName, (pProgName && *pProgName) ? " " : "");
- ConsoleWrite(
" %s%slist\n"
, pProgName, (pProgName && *pProgName) ? " " : "");
--- 1933,1936 ----
|