com0com-cvs Mailing List for Null-modem emulator (Page 26)
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...> - 2007-11-23 08:58:51
|
Update of /cvsroot/com0com/com0com/sys In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv5639 Modified Files: pnp.c Log Message: Added UniqueID capability Index: pnp.c =================================================================== RCS file: /cvsroot/com0com/com0com/sys/pnp.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** pnp.c 4 Jun 2007 15:24:33 -0000 1.8 --- pnp.c 23 Nov 2007 08:58:48 -0000 1.9 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.9 2007/11/23 08:58:48 vfrolov + * Added UniqueID capability + * * Revision 1.8 2007/06/04 15:24:33 vfrolov * Fixed open reject just after close in exclusiveMode *************** *** 48,52 **** * Initial revision * - * */ --- 51,54 ---- *************** *** 190,193 **** --- 192,197 ---- return STATUS_UNSUCCESSFUL; + pCaps->UniqueID = TRUE; + return STATUS_SUCCESS; } |
From: Vyacheslav F. <vf...@us...> - 2007-11-23 08:30:55
|
Update of /cvsroot/com0com/com0com/sys In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv19744 Modified Files: com0com.h Log Message: Increased size of TX buffer to typical default for Windows Index: com0com.h =================================================================== RCS file: /cvsroot/com0com/com0com/sys/com0com.h,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** com0com.h 17 Sep 2007 14:31:06 -0000 1.38 --- com0com.h 23 Nov 2007 08:30:50 -0000 1.39 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.39 2007/11/23 08:30:50 vfrolov + * Increased size of TX buffer to typical default for Windows + * * Revision 1.38 2007/09/17 14:31:06 vfrolov * Implemented pseudo pin OPEN *************** *** 218,222 **** PUCHAR pEnd; SIZE_T busy; ! UCHAR leastBuf[1 + 1]; /* transmitter holding and shift registers */ } C0C_TX_BUFFER, *PC0C_TX_BUFFER; --- 221,225 ---- PUCHAR pEnd; SIZE_T busy; ! UCHAR leastBuf[14 + 1]; /* transmitter holding and shift registers */ } C0C_TX_BUFFER, *PC0C_TX_BUFFER; |
From: Vyacheslav F. <vf...@us...> - 2007-11-23 08:23:33
|
Update of /cvsroot/com0com/com0com/NSIS In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv14260 Modified Files: install.nsi Log Message: Added popup for uncompatible CPU Index: install.nsi =================================================================== RCS file: /cvsroot/com0com/com0com/NSIS/install.nsi,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** install.nsi 22 Nov 2007 11:36:41 -0000 1.10 --- install.nsi 23 Nov 2007 08:23:29 -0000 1.11 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.11 2007/11/23 08:23:29 vfrolov + * Added popup for uncompatible CPU + * * Revision 1.10 2007/11/22 11:36:41 vfrolov * Moved output file to target CPU directory *************** *** 62,65 **** --- 65,69 ---- !include "MUI.nsh" + !include "x64.nsh" ;-------------------------------- *************** *** 84,87 **** --- 88,114 ---- ;-------------------------------- + Function .onInit + ${If} ${RunningX64} + !if "${TARGET_CPU}" == "i386" + MessageBox MB_YESNO|MB_DEFBUTTON2|MB_ICONEXCLAMATION \ + "The 32-bit driver cannot run under 64-bit System.$\n$\nContinue?" \ + /SD IDNO IDYES end_x64 + Abort + !endif + ${Else} + !if "${TARGET_CPU}" != "i386" + MessageBox MB_YESNO|MB_DEFBUTTON2|MB_ICONEXCLAMATION \ + "The 64-bit driver cannot run under 32-bit System.$\n$\nContinue?" \ + /SD IDNO IDYES end_x64 + Abort + !endif + ${EndIf} + + end_x64: + + FunctionEnd + + ;-------------------------------- + !macro MoveFileToDetails file |
From: Vyacheslav F. <vf...@us...> - 2007-11-22 12:42:27
|
Update of /cvsroot/com0com/com0com In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv6127 Added Files: Building.txt Log Message: Initial revision --- NEW FILE: Building.txt --- ============================= Null-modem emulator (com0com) ============================= PREREQUISITES ============= You will need the following to build com0com from source code: 1. Microsoft Windows Driver Development Kit (DDK). When the DDK is installed, it defines the Start menu shortcuts for several different build environments. To open a DDK build environment window choose one of the environment shortcuts. 2. Microsoft Windows Platform Software Development Kit (SDK). It's required for creating a certificate and signing com0com.sys file if you build driver for x64-based versions of Windows Vista. When the SDK is installed, it defines the Start menu shortcuts for several different build environments. To open a SDK build environment window choose one of the environment shortcuts. 3. Microsoft Visual C++ 2005 Express Edition (MSVC). It's required for building the GUI-based setup utility. When the MSVC is installed, it defines the Start menu shortcut for build environment. To open a MSVC build environment window choose it. 4. Nullsoft Scriptable Install System (http://nsis.sourceforge.net/). It's required for building the installer. BUILDING ======== 1. Build the driver. For example execute in the DDK build environment window: cd C:\com0com build -wcZ -M 1 It will create the com0com.sys, setup.dll and setupc.exe files in the C:\com0com\<CPU>\ directory, where <CPU> is i386, ia64 or amd64 and depends from choosen DDK build environment. 2. If you build driver for x64-based versions of Windows Vista then create a test certificate and sign com0com.sys file. For example execute in the SDK build environment window: mkdir C:\com0com\cert cd C:\com0com\cert makecert -r -n "CN=com0com (test)" -sv com0com.pvk com0com.cer pvk2pfx -pvk com0com.pvk -spc com0com.cer -pfx com0com.pfx signtool sign /v /f com0com.pfx /t "http://timestamp.verisign.com/scripts/timestamp.dll" ..\amd64\com0com.sys It will test-sign the C:\com0com\amd64\com0com.sys file. 3. Build the GUI-based setup utility. For example execute in the MSVC build environment window: vcbuild C:\com0com\setupg\setup.vcproj Release It will create the C:\com0com\setupg\Release\setupg.exe file. 4. Build the installer. For example execute in the DDK build environment window: "C:\Program Files\NSIS\makensis.exe" /V2 C:\com0com\NSIS\install.nsi It will create the installer in the C:\com0com\<CPU>\setup.exe file. |
From: Vyacheslav F. <vf...@us...> - 2007-11-22 12:39:21
|
Update of /cvsroot/com0com/com0com In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv4913 Modified Files: ReadMe.txt Log Message: Removed BUILDING section Added NOTE for x64-based Windows Vista Added GUI-based setup utility Added FAQ about Found New Hardware Wizard Index: ReadMe.txt =================================================================== RCS file: /cvsroot/com0com/com0com/ReadMe.txt,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** ReadMe.txt 20 Jul 2007 07:50:30 -0000 1.14 --- ReadMe.txt 22 Nov 2007 12:39:15 -0000 1.15 *************** *** 25,46 **** - BUILDING - ======== - - If you'd like to build a binary from source yourself then: - - 1. Set up the DDK environment on your machine. - 2. Run the build -wcZ command in the com0com directory to build - <CPU>\com0com.sys and <CPU>\setup.dll (where <CPU> is i386, ia64 - or amd64). - 3. Create the installer (setup.exe) from NSIS\install.nsi by - NSIS (see http://nsis.sourceforge.net/ for details) - - INSTALLING ========== ! NOTE: Before installing/uninstalling the com0com driver or adding/removing/changing ! ports on Windows Vista the User Account Control (UAC) should be turned off. Simply run the installer (setup.exe). An installation wizard will guide --- 25,39 ---- INSTALLING ========== ! NOTE (Windows Vista): ! Before installing/uninstalling the com0com driver or adding/removing/changing ! ports on Windows Vista the User Account Control (UAC) should be turned off. ! ! NOTE (x64-based Windows Vista): ! The com0com.sys is a test-signed kernel-mode driver that will not load by ! default on x64-based Windows Vista. To enable test signing, use the following ! BCDedit command: bcdedit.exe -set TESTSIGNING ON Simply run the installer (setup.exe). An installation wizard will guide *************** *** 68,71 **** --- 61,66 ---- command> help + Alternatively to setup ports you can invoke GUI-based setup utility by + launching Setup shortcut (Microsoft .NET Framework 2.0 is required). TESTING *************** *** 96,104 **** A. Yes, it's possible. To change the names: ! 1. Launch the Setup Command Prompt shortcut. ! 2. Enter the change commands, for example: ! command> change CNCA0 PortName=COM2 ! command> change CNCB0 PortName=COM3 Q. The baud rate setting does not seem to make a difference: data is always --- 91,99 ---- A. Yes, it's possible. To change the names: ! 1. Launch the Setup Command Prompt shortcut. ! 2. Enter the change commands, for example: ! command> change CNCA0 PortName=COM2 ! command> change CNCB0 PortName=COM3 Q. The baud rate setting does not seem to make a difference: data is always *************** *** 106,113 **** A. To enable baud rate emulation for transferring data from CNCA0 to CNCB0: ! 1. Launch the Setup Command Prompt shortcut. ! 2. Enter the change command, for example: ! command> change CNCA0 EmuBR=yes Q. The HyperTerminal test succeeds, but I get a failure when trying to open the --- 101,108 ---- A. To enable baud rate emulation for transferring data from CNCA0 to CNCB0: ! 1. Launch the Setup Command Prompt shortcut. ! 2. Enter the change command, for example: ! command> change CNCA0 EmuBR=yes Q. The HyperTerminal test succeeds, but I get a failure when trying to open the *************** *** 126,134 **** and other paired port is CNCB0, then: ! 1. Launch the Setup Command Prompt shortcut. ! 2. Enter the change commands, for example: ! command> change CNCB0 EmuOverrun=yes ! command> change CNCA0 EmuBR=yes Q. I have to write an application connected to one side of the com0com port pair, --- 121,129 ---- and other paired port is CNCB0, then: ! 1. Launch the Setup Command Prompt shortcut. ! 2. Enter the change commands, for example: ! command> change CNCB0 EmuOverrun=yes ! command> change CNCA0 EmuBR=yes Q. I have to write an application connected to one side of the com0com port pair, *************** *** 139,145 **** application. To enable it: ! 1. Launch the Setup Command Prompt shortcut. ! 2. Enter the change commands: ! command> change CNCB0 ExclusiveMode=yes ! command> change CNCA0 PlugInMode=yes --- 134,170 ---- application. To enable it: ! 1. Launch the Setup Command Prompt shortcut. ! 2. Enter the change commands: ! command> change CNCB0 ExclusiveMode=yes ! command> change CNCA0 PlugInMode=yes ! ! Q. When I add a port pair, why does Windows XP always pops up a Found New Hardware ! Wizard? The drivers are already there and it can install them silently in the ! background and report when the device is ready. ! A. It's because there is not signed com0com.cat catalog file. It can be created on ! your test computer by this way: ! ! 1. Create a catalog file, for example: ! ! cd "C:\Program Files\com0com" ! inf2cat /driver:. /os:XP_X86 ! ! 2. Create a test certificate, for example: ! ! makecert -r -n "CN=com0com (test)" -sv com0com.pvk com0com.cer ! pvk2pfx -pvk com0com.pvk -spc com0com.cer -pfx com0com.pfx ! ! 3. Sign the catalog file by test certificate, for example: ! ! signtool sign /v /f com0com.pfx com0com.cat ! ! 4. Install a test certificate to the Trusted Root Certification Authorities ! certificate store and the Trusted Publishers certificate store, for example: ! ! certmgr -add com0com.cer -s -r localMachine root ! certmgr -add com0com.cer -s -r localMachine trustedpublisher ! ! The inf2cat tool can be installed with the Winqual Submission Tool. ! The makecert, pvk2pfx, signtool and certmgr tools can be installed with the ! Platform Software Development Kit (SDK). |
From: Vyacheslav F. <vf...@us...> - 2007-11-22 11:36:48
|
Update of /cvsroot/com0com/com0com/NSIS In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv12997 Modified Files: install.nsi Log Message: Moved output file to target CPU directory Disabled moving Start Menu shortcuts to all users for Vista Fixed title truncation Added show ReadMe checkbox Added setupg.exe Index: install.nsi =================================================================== RCS file: /cvsroot/com0com/com0com/NSIS/install.nsi,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** install.nsi 15 Nov 2007 12:12:04 -0000 1.9 --- install.nsi 22 Nov 2007 11:36:41 -0000 1.10 *************** *** 20,23 **** --- 20,30 ---- * * $Log$ + * Revision 1.10 2007/11/22 11:36:41 vfrolov + * Moved output file to target CPU directory + * Disabled moving Start Menu shortcuts to all users for Vista + * Fixed title truncation + * Added show ReadMe checkbox + * Added setupg.exe + * * Revision 1.9 2007/11/15 12:12:04 vfrolov * Removed Function LaunchSetupCommandPrompt *************** *** 117,121 **** ; The file to write ! OutFile "setup.exe" ; The default installation directory --- 124,128 ---- ; The file to write ! OutFile "..\${TARGET_CPU}\setup.exe" ; The default installation directory *************** *** 126,129 **** --- 133,139 ---- InstallDirRegKey HKLM "Software\com0com" "Install_Dir" + ;Vista redirects $SMPROGRAMS to all users without this + RequestExecutionLevel admin + ShowInstDetails show ShowUninstDetails show *************** *** 132,137 **** --- 142,154 ---- ; Pages + !define MUI_WELCOMEPAGE_TITLE_3LINES + !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 + + !define MUI_FINISHPAGE_SHOWREADME ReadMe.txt + !define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED !define MUI_FINISHPAGE_LINK "Visit com0com homepage" *************** *** 139,143 **** !define MUI_FINISHPAGE_NOAUTOCLOSE - !define MUI_UNFINISHPAGE_NOAUTOCLOSE !insertmacro MUI_PAGE_WELCOME --- 156,159 ---- *************** *** 147,150 **** --- 163,170 ---- !insertmacro MUI_PAGE_FINISH + !define MUI_WELCOMEPAGE_TITLE_3LINES + !define MUI_FINISHPAGE_TITLE_3LINES + !define MUI_UNFINISHPAGE_NOAUTOCLOSE + !insertmacro MUI_UNPAGE_WELCOME !insertmacro MUI_UNPAGE_CONFIRM *************** *** 153,157 **** ;-------------------------------- ! ;Languages !insertmacro MUI_LANGUAGE "English" --- 173,177 ---- ;-------------------------------- ! ; Languages !insertmacro MUI_LANGUAGE "English" *************** *** 172,175 **** --- 192,196 ---- File "..\${TARGET_CPU}\setup.dll" File "..\${TARGET_CPU}\setupc.exe" + File "..\setupg\Release\setupg.exe" ; Write the installation path into the registry *************** *** 196,199 **** --- 217,221 ---- CreateDirectory "$SMPROGRAMS\com0com" CreateShortCut "$SMPROGRAMS\com0com\Setup Command Prompt.lnk" "$INSTDIR\setupc.exe" + CreateShortCut "$SMPROGRAMS\com0com\Setup.lnk" "$INSTDIR\setupg.exe" CreateShortCut "$SMPROGRAMS\com0com\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 CreateShortCut "$SMPROGRAMS\com0com\ReadMe.lnk" "$INSTDIR\ReadMe.txt" *************** *** 234,237 **** --- 256,260 ---- Delete $INSTDIR\setup.dll Delete $INSTDIR\setupc.exe + Delete $INSTDIR\setupg.exe Delete $INSTDIR\uninstall.exe |
From: Vyacheslav F. <vf...@us...> - 2007-11-20 12:29:50
|
Update of /cvsroot/com0com/com0com/setupg In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv29382 Modified Files: Form1.h Form1.resx Log Message: Fixed appearance for Vista Index: Form1.h =================================================================== RCS file: /cvsroot/com0com/com0com/setupg/Form1.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Form1.h 31 Oct 2007 10:16:55 -0000 1.1 --- Form1.h 20 Nov 2007 12:29:40 -0000 1.2 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.2 2007/11/20 12:29:40 vfrolov + * Fixed appearance for Vista + * * Revision 1.1 2007/10/31 10:16:55 vfrolov * Initial revision *************** *** 72,78 **** private: System::Windows::Forms::TextBox^ PortNameB; private: System::Windows::Forms::TextBox^ PortNameA; - private: System::Windows::Forms::Label^ pinNameON; - private: System::Windows::Forms::ListBox^ pinNamesB; - private: System::Windows::Forms::ListBox^ pinNamesA; private: System::Windows::Forms::PictureBox^ picturePinMap; private: System::Windows::Forms::ToolTip^ toolTip1; --- 75,78 ---- *************** *** 90,93 **** --- 90,114 ---- private: System::Windows::Forms::CheckBox^ EmuOverrunA; private: System::Windows::Forms::CheckBox^ EmuBrA; + private: System::Windows::Forms::Label^ pinNameON; + private: System::Windows::Forms::Label^ pinNameA_RX; + private: System::Windows::Forms::Label^ pinNameA_DTR; + private: System::Windows::Forms::Label^ pinNameA_TX; + private: System::Windows::Forms::Label^ pinNameA_DSR; + private: System::Windows::Forms::Label^ pinNameA_DCD; + private: System::Windows::Forms::Label^ pinNameA_RTS; + private: System::Windows::Forms::Label^ pinNameA_CTS; + private: System::Windows::Forms::Label^ pinNameA_RI; + private: System::Windows::Forms::Label^ pinNameA_OUT1; + private: System::Windows::Forms::Label^ pinNameA_OPEN; + private: System::Windows::Forms::Label^ pinNameB_OPEN; + private: System::Windows::Forms::Label^ pinNameB_OUT1; + private: System::Windows::Forms::Label^ pinNameB_RI; + private: System::Windows::Forms::Label^ pinNameB_CTS; + private: System::Windows::Forms::Label^ pinNameB_RTS; + private: System::Windows::Forms::Label^ pinNameB_DCD; + private: System::Windows::Forms::Label^ pinNameB_DSR; + private: System::Windows::Forms::Label^ pinNameB_TX; + private: System::Windows::Forms::Label^ pinNameB_DTR; + private: System::Windows::Forms::Label^ pinNameB_RX; private: System::Windows::Forms::TreeView^ pairList; *************** *** 110,115 **** this->PortNameA = (gcnew System::Windows::Forms::TextBox()); this->pinNameON = (gcnew System::Windows::Forms::Label()); - this->pinNamesB = (gcnew System::Windows::Forms::ListBox()); - this->pinNamesA = (gcnew System::Windows::Forms::ListBox()); this->picturePinMap = (gcnew System::Windows::Forms::PictureBox()); this->toolTip1 = (gcnew System::Windows::Forms::ToolTip(this->components)); --- 131,134 ---- *************** *** 122,125 **** --- 141,154 ---- this->EmuOverrunA = (gcnew System::Windows::Forms::CheckBox()); this->EmuBrA = (gcnew System::Windows::Forms::CheckBox()); + this->pinNameA_RX = (gcnew System::Windows::Forms::Label()); + this->pinNameA_DTR = (gcnew System::Windows::Forms::Label()); + this->pinNameA_TX = (gcnew System::Windows::Forms::Label()); + this->pinNameA_DSR = (gcnew System::Windows::Forms::Label()); + this->pinNameA_DCD = (gcnew System::Windows::Forms::Label()); + this->pinNameA_RTS = (gcnew System::Windows::Forms::Label()); + this->pinNameA_CTS = (gcnew System::Windows::Forms::Label()); + this->pinNameA_RI = (gcnew System::Windows::Forms::Label()); + this->pinNameA_OUT1 = (gcnew System::Windows::Forms::Label()); + this->pinNameA_OPEN = (gcnew System::Windows::Forms::Label()); this->pairList = (gcnew System::Windows::Forms::TreeView()); this->buttonRemovePair = (gcnew System::Windows::Forms::Button()); *************** *** 127,130 **** --- 156,169 ---- this->buttonApply = (gcnew System::Windows::Forms::Button()); this->buttonReset = (gcnew System::Windows::Forms::Button()); + this->pinNameB_OPEN = (gcnew System::Windows::Forms::Label()); + this->pinNameB_OUT1 = (gcnew System::Windows::Forms::Label()); + this->pinNameB_RI = (gcnew System::Windows::Forms::Label()); + this->pinNameB_CTS = (gcnew System::Windows::Forms::Label()); + this->pinNameB_RTS = (gcnew System::Windows::Forms::Label()); + this->pinNameB_DCD = (gcnew System::Windows::Forms::Label()); + this->pinNameB_DSR = (gcnew System::Windows::Forms::Label()); + this->pinNameB_TX = (gcnew System::Windows::Forms::Label()); + this->pinNameB_DTR = (gcnew System::Windows::Forms::Label()); + this->pinNameB_RX = (gcnew System::Windows::Forms::Label()); (cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->picturePinMap))->BeginInit(); this->SuspendLayout(); *************** *** 150,181 **** this->toolTip1->SetToolTip(this->pinNameON, resources->GetString(L"pinNameON.ToolTip")); // - // pinNamesB - // - this->pinNamesB->BackColor = System::Drawing::SystemColors::Control; - this->pinNamesB->BorderStyle = System::Windows::Forms::BorderStyle::None; - resources->ApplyResources(this->pinNamesB, L"pinNamesB"); - this->pinNamesB->FormattingEnabled = true; - this->pinNamesB->Items->AddRange(gcnew cli::array< System::Object^ >(10) {resources->GetString(L"pinNamesB.Items"), resources->GetString(L"pinNamesB.Items1"), - resources->GetString(L"pinNamesB.Items2"), resources->GetString(L"pinNamesB.Items3"), resources->GetString(L"pinNamesB.Items4"), - resources->GetString(L"pinNamesB.Items5"), resources->GetString(L"pinNamesB.Items6"), resources->GetString(L"pinNamesB.Items7"), - resources->GetString(L"pinNamesB.Items8"), resources->GetString(L"pinNamesB.Items9")}); - this->pinNamesB->Name = L"pinNamesB"; - this->pinNamesB->SelectionMode = System::Windows::Forms::SelectionMode::None; - this->toolTip1->SetToolTip(this->pinNamesB, resources->GetString(L"pinNamesB.ToolTip")); - // - // pinNamesA - // - this->pinNamesA->BackColor = System::Drawing::SystemColors::Control; - this->pinNamesA->BorderStyle = System::Windows::Forms::BorderStyle::None; - resources->ApplyResources(this->pinNamesA, L"pinNamesA"); - this->pinNamesA->FormattingEnabled = true; - this->pinNamesA->Items->AddRange(gcnew cli::array< System::Object^ >(10) {resources->GetString(L"pinNamesA.Items"), resources->GetString(L"pinNamesA.Items1"), - resources->GetString(L"pinNamesA.Items2"), resources->GetString(L"pinNamesA.Items3"), resources->GetString(L"pinNamesA.Items4"), - resources->GetString(L"pinNamesA.Items5"), resources->GetString(L"pinNamesA.Items6"), resources->GetString(L"pinNamesA.Items7"), - resources->GetString(L"pinNamesA.Items8"), resources->GetString(L"pinNamesA.Items9")}); - this->pinNamesA->Name = L"pinNamesA"; - this->pinNamesA->SelectionMode = System::Windows::Forms::SelectionMode::None; - this->toolTip1->SetToolTip(this->pinNamesA, resources->GetString(L"pinNamesA.ToolTip")); - // // picturePinMap // --- 189,192 ---- *************** *** 251,256 **** // EmuBrA // - resources->ApplyResources(this->EmuBrA, L"EmuBrA"); this->EmuBrA->ForeColor = System::Drawing::SystemColors::ControlText; this->EmuBrA->Name = L"EmuBrA"; this->toolTip1->SetToolTip(this->EmuBrA, resources->GetString(L"EmuBrA.ToolTip")); --- 262,267 ---- // EmuBrA // this->EmuBrA->ForeColor = System::Drawing::SystemColors::ControlText; + resources->ApplyResources(this->EmuBrA, L"EmuBrA"); this->EmuBrA->Name = L"EmuBrA"; this->toolTip1->SetToolTip(this->EmuBrA, resources->GetString(L"EmuBrA.ToolTip")); *************** *** 258,261 **** --- 269,332 ---- this->EmuBrA->CheckedChanged += gcnew System::EventHandler(this, &Form1::EmuBrA_Changed); // + // pinNameA_RX + // + resources->ApplyResources(this->pinNameA_RX, L"pinNameA_RX"); + this->pinNameA_RX->Name = L"pinNameA_RX"; + this->toolTip1->SetToolTip(this->pinNameA_RX, resources->GetString(L"pinNameA_RX.ToolTip")); + // + // pinNameA_DTR + // + resources->ApplyResources(this->pinNameA_DTR, L"pinNameA_DTR"); + this->pinNameA_DTR->Name = L"pinNameA_DTR"; + this->toolTip1->SetToolTip(this->pinNameA_DTR, resources->GetString(L"pinNameA_DTR.ToolTip")); + // + // pinNameA_TX + // + resources->ApplyResources(this->pinNameA_TX, L"pinNameA_TX"); + this->pinNameA_TX->Name = L"pinNameA_TX"; + this->toolTip1->SetToolTip(this->pinNameA_TX, resources->GetString(L"pinNameA_TX.ToolTip")); + // + // pinNameA_DSR + // + resources->ApplyResources(this->pinNameA_DSR, L"pinNameA_DSR"); + this->pinNameA_DSR->Name = L"pinNameA_DSR"; + this->toolTip1->SetToolTip(this->pinNameA_DSR, resources->GetString(L"pinNameA_DSR.ToolTip")); + // + // pinNameA_DCD + // + resources->ApplyResources(this->pinNameA_DCD, L"pinNameA_DCD"); + this->pinNameA_DCD->Name = L"pinNameA_DCD"; + this->toolTip1->SetToolTip(this->pinNameA_DCD, resources->GetString(L"pinNameA_DCD.ToolTip")); + // + // pinNameA_RTS + // + resources->ApplyResources(this->pinNameA_RTS, L"pinNameA_RTS"); + this->pinNameA_RTS->Name = L"pinNameA_RTS"; + this->toolTip1->SetToolTip(this->pinNameA_RTS, resources->GetString(L"pinNameA_RTS.ToolTip")); + // + // pinNameA_CTS + // + resources->ApplyResources(this->pinNameA_CTS, L"pinNameA_CTS"); + this->pinNameA_CTS->Name = L"pinNameA_CTS"; + this->toolTip1->SetToolTip(this->pinNameA_CTS, resources->GetString(L"pinNameA_CTS.ToolTip")); + // + // pinNameA_RI + // + resources->ApplyResources(this->pinNameA_RI, L"pinNameA_RI"); + this->pinNameA_RI->Name = L"pinNameA_RI"; + this->toolTip1->SetToolTip(this->pinNameA_RI, resources->GetString(L"pinNameA_RI.ToolTip")); + // + // pinNameA_OUT1 + // + resources->ApplyResources(this->pinNameA_OUT1, L"pinNameA_OUT1"); + this->pinNameA_OUT1->Name = L"pinNameA_OUT1"; + this->toolTip1->SetToolTip(this->pinNameA_OUT1, resources->GetString(L"pinNameA_OUT1.ToolTip")); + // + // pinNameA_OPEN + // + resources->ApplyResources(this->pinNameA_OPEN, L"pinNameA_OPEN"); + this->pinNameA_OPEN->Name = L"pinNameA_OPEN"; + this->toolTip1->SetToolTip(this->pinNameA_OPEN, resources->GetString(L"pinNameA_OPEN.ToolTip")); + // // pairList // *************** *** 294,301 **** --- 365,452 ---- this->buttonReset->Click += gcnew System::EventHandler(this, &Form1::buttonReset_Click); // + // pinNameB_OPEN + // + resources->ApplyResources(this->pinNameB_OPEN, L"pinNameB_OPEN"); + this->pinNameB_OPEN->Name = L"pinNameB_OPEN"; + this->toolTip1->SetToolTip(this->pinNameB_OPEN, resources->GetString(L"pinNameB_OPEN.ToolTip")); + // + // pinNameB_OUT1 + // + resources->ApplyResources(this->pinNameB_OUT1, L"pinNameB_OUT1"); + this->pinNameB_OUT1->Name = L"pinNameB_OUT1"; + this->toolTip1->SetToolTip(this->pinNameB_OUT1, resources->GetString(L"pinNameB_OUT1.ToolTip")); + // + // pinNameB_RI + // + resources->ApplyResources(this->pinNameB_RI, L"pinNameB_RI"); + this->pinNameB_RI->Name = L"pinNameB_RI"; + this->toolTip1->SetToolTip(this->pinNameB_RI, resources->GetString(L"pinNameB_RI.ToolTip")); + // + // pinNameB_CTS + // + resources->ApplyResources(this->pinNameB_CTS, L"pinNameB_CTS"); + this->pinNameB_CTS->Name = L"pinNameB_CTS"; + this->toolTip1->SetToolTip(this->pinNameB_CTS, resources->GetString(L"pinNameB_CTS.ToolTip")); + // + // pinNameB_RTS + // + resources->ApplyResources(this->pinNameB_RTS, L"pinNameB_RTS"); + this->pinNameB_RTS->Name = L"pinNameB_RTS"; + this->toolTip1->SetToolTip(this->pinNameB_RTS, resources->GetString(L"pinNameB_RTS.ToolTip")); + // + // pinNameB_DCD + // + resources->ApplyResources(this->pinNameB_DCD, L"pinNameB_DCD"); + this->pinNameB_DCD->Name = L"pinNameB_DCD"; + this->toolTip1->SetToolTip(this->pinNameB_DCD, resources->GetString(L"pinNameB_DCD.ToolTip")); + // + // pinNameB_DSR + // + resources->ApplyResources(this->pinNameB_DSR, L"pinNameB_DSR"); + this->pinNameB_DSR->Name = L"pinNameB_DSR"; + this->toolTip1->SetToolTip(this->pinNameB_DSR, resources->GetString(L"pinNameB_DSR.ToolTip")); + // + // pinNameB_TX + // + resources->ApplyResources(this->pinNameB_TX, L"pinNameB_TX"); + this->pinNameB_TX->Name = L"pinNameB_TX"; + this->toolTip1->SetToolTip(this->pinNameB_TX, resources->GetString(L"pinNameB_TX.ToolTip")); + // + // pinNameB_DTR + // + resources->ApplyResources(this->pinNameB_DTR, L"pinNameB_DTR"); + this->pinNameB_DTR->Name = L"pinNameB_DTR"; + this->toolTip1->SetToolTip(this->pinNameB_DTR, resources->GetString(L"pinNameB_DTR.ToolTip")); + // + // pinNameB_RX + // + resources->ApplyResources(this->pinNameB_RX, L"pinNameB_RX"); + this->pinNameB_RX->Name = L"pinNameB_RX"; + this->toolTip1->SetToolTip(this->pinNameB_RX, resources->GetString(L"pinNameB_RX.ToolTip")); + // // Form1 // resources->ApplyResources(this, L"$this"); this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font; + this->Controls->Add(this->pinNameB_OPEN); + this->Controls->Add(this->pinNameB_OUT1); + this->Controls->Add(this->pinNameB_RI); + this->Controls->Add(this->pinNameB_CTS); + this->Controls->Add(this->pinNameB_RTS); + this->Controls->Add(this->pinNameB_DCD); + this->Controls->Add(this->pinNameB_DSR); + this->Controls->Add(this->pinNameB_TX); + this->Controls->Add(this->pinNameB_DTR); + this->Controls->Add(this->pinNameB_RX); + this->Controls->Add(this->pinNameA_OPEN); + this->Controls->Add(this->pinNameA_OUT1); + this->Controls->Add(this->pinNameA_RI); + this->Controls->Add(this->pinNameA_CTS); + this->Controls->Add(this->pinNameA_RTS); + this->Controls->Add(this->pinNameA_DCD); + this->Controls->Add(this->pinNameA_DSR); + this->Controls->Add(this->pinNameA_TX); + this->Controls->Add(this->pinNameA_DTR); + this->Controls->Add(this->pinNameA_RX); this->Controls->Add(this->ExclusiveModeA); this->Controls->Add(this->PlugInModeA); *************** *** 314,319 **** this->Controls->Add(this->PortNameA); this->Controls->Add(this->pinNameON); - this->Controls->Add(this->pinNamesB); - this->Controls->Add(this->pinNamesA); this->Controls->Add(this->picturePinMap); this->FormBorderStyle = System::Windows::Forms::FormBorderStyle::FixedDialog; --- 465,468 ---- Index: Form1.resx =================================================================== RCS file: /cvsroot/com0com/com0com/setupg/Form1.resx,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Form1.resx 31 Oct 2007 10:16:55 -0000 1.1 --- Form1.resx 20 Nov 2007 12:29:40 -0000 1.2 *************** *** 149,153 **** </data> <data name=">>PortNameB.ZOrder" xml:space="preserve"> ! <value>13</value> </data> <data name="PortNameA.Location" type="System.Drawing.Point, System.Drawing"> --- 149,153 ---- </data> <data name=">>PortNameB.ZOrder" xml:space="preserve"> ! <value>33</value> </data> [...1185 lines suppressed...] + <data name="pinNameB_RX.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing"> + <value>MiddleLeft</value> + </data> + <data name="pinNameB_RX.ToolTip" xml:space="preserve"> + <value>RX - receive data.</value> + </data> + <data name=">>pinNameB_RX.Name" xml:space="preserve"> + <value>pinNameB_RX</value> + </data> + <data name=">>pinNameB_RX.Type" xml:space="preserve"> + <value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </data> + <data name=">>pinNameB_RX.Parent" xml:space="preserve"> + <value>$this</value> + </data> + <data name=">>pinNameB_RX.ZOrder" xml:space="preserve"> + <value>9</value> + </data> <metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>True</value> |
From: Vyacheslav F. <vf...@us...> - 2007-11-15 12:14:00
|
Update of /cvsroot/com0com/com0com In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv20320 Modified Files: com0com.inf Log Message: Added x64 support Index: com0com.inf =================================================================== RCS file: /cvsroot/com0com/com0com/com0com.inf,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** com0com.inf 14 Jul 2005 16:06:23 -0000 1.3 --- com0com.inf 15 Nov 2007 12:13:55 -0000 1.4 *************** *** 5,9 **** ; Installation file for the Null-modem emulator driver. ; ! ; Copyright (c) 2004-2005 Vyacheslav Frolov ; ;****************************************************************************** --- 5,9 ---- ; Installation file for the Null-modem emulator driver. ; ! ; Copyright (c) 2004-2007 Vyacheslav Frolov ; ;****************************************************************************** *************** *** 15,19 **** ClassGUID = {df799e12-3c56-421b-b298-b6d3642bc878} CatalogFile = com0com.cat ! DriverVer = 02/18/2004,1.2.0.0 ;****************************************************************************** --- 15,19 ---- ClassGUID = {df799e12-3c56-421b-b298-b6d3642bc878} CatalogFile = com0com.cat ! DriverVer = 12/05/2007,2.0.0.0 ;****************************************************************************** *************** *** 24,28 **** [ClassInstall32] ! AddReg = com0com_ClassReg [com0com_ClassReg] --- 24,28 ---- [ClassInstall32] ! AddReg = com0com_ClassReg [com0com_ClassReg] *************** *** 55,64 **** [Manufacturer] ! %VF% = VF.Mfg [ControlFlags] ExcludeFromSelect = com0com\port ! [VF.Mfg] %com0com.BusDesc% = com0com_inst, root\com0com %com0com.PortDesc% = com0com_inst_port, com0com\port --- 55,76 ---- [Manufacturer] ! %VF% = com0com, NTx86, NTia64, NTamd64 [ControlFlags] ExcludeFromSelect = com0com\port ! [com0com] ! %com0com.BusDesc% = com0com_inst, root\com0com ! %com0com.PortDesc% = com0com_inst_port, com0com\port ! ! [com0com.NTx86] ! %com0com.BusDesc% = com0com_inst, root\com0com ! %com0com.PortDesc% = com0com_inst_port, com0com\port ! ! [com0com.NTia64] ! %com0com.BusDesc% = com0com_inst, root\com0com ! %com0com.PortDesc% = com0com_inst_port, com0com\port ! ! [com0com.NTamd64] %com0com.BusDesc% = com0com_inst, root\com0com %com0com.PortDesc% = com0com_inst_port, com0com\port |
From: Vyacheslav F. <vf...@us...> - 2007-11-15 12:12:13
|
Update of /cvsroot/com0com/com0com/NSIS In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv19559 Modified Files: install.nsi Log Message: Removed Function LaunchSetupCommandPrompt Added MUI_FINISHPAGE_LINK Index: install.nsi =================================================================== RCS file: /cvsroot/com0com/com0com/NSIS/install.nsi,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** install.nsi 30 Oct 2007 15:06:14 -0000 1.8 --- install.nsi 15 Nov 2007 12:12:04 -0000 1.9 *************** *** 20,23 **** --- 20,27 ---- * * $Log$ + * Revision 1.9 2007/11/15 12:12:04 vfrolov + * Removed Function LaunchSetupCommandPrompt + * Added MUI_FINISHPAGE_LINK + * * Revision 1.8 2007/10/30 15:06:14 vfrolov * Added changing working directory before removing $INSTDIR *************** *** 73,84 **** ;-------------------------------- - Function LaunchSetupCommandPrompt - - Exec "setupc.exe" - - FunctionEnd - - ;-------------------------------- - !macro MoveFileToDetails file --- 77,80 ---- *************** *** 136,142 **** ; Pages ! !define MUI_FINISHPAGE_RUN ! !define MUI_FINISHPAGE_RUN_FUNCTION LaunchSetupCommandPrompt !define MUI_FINISHPAGE_RUN_TEXT "Launch Setup Command Prompt" !define MUI_FINISHPAGE_NOAUTOCLOSE !define MUI_UNFINISHPAGE_NOAUTOCLOSE --- 132,141 ---- ; Pages ! !define MUI_FINISHPAGE_RUN setupc.exe !define MUI_FINISHPAGE_RUN_TEXT "Launch Setup Command Prompt" + + !define MUI_FINISHPAGE_LINK "Visit com0com homepage" + !define MUI_FINISHPAGE_LINK_LOCATION http://com0com.sourceforge.net/ + !define MUI_FINISHPAGE_NOAUTOCLOSE !define MUI_UNFINISHPAGE_NOAUTOCLOSE |
From: Vyacheslav F. <vf...@us...> - 2007-11-09 15:51:23
|
Update of /cvsroot/com0com/com0com/sys In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv30566 Modified Files: fileinfo.c Log Message: Added OutputBufferLength check Index: fileinfo.c =================================================================== RCS file: /cvsroot/com0com/com0com/sys/fileinfo.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** fileinfo.c 21 Jun 2006 16:23:57 -0000 1.2 --- fileinfo.c 9 Nov 2007 15:51:18 -0000 1.3 *************** *** 2,6 **** * $Id$ * ! * Copyright (c) 2005-2006 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify --- 2,6 ---- * $Id$ * ! * Copyright (c) 2005-2007 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.3 2007/11/09 15:51:18 vfrolov + * Added OutputBufferLength check + * * Revision 1.2 2006/06/21 16:23:57 vfrolov * Fixed possible BSOD after one port of pair removal *************** *** 26,30 **** * Implemented IRP_MJ_QUERY_INFORMATION and IRP_MJ_SET_INFORMATION * - * */ --- 29,32 ---- *************** *** 50,53 **** --- 52,59 ---- switch (pIrpStack->Parameters.QueryFile.FileInformationClass) { case FileStandardInformation: + if (pIrpStack->Parameters.DeviceIoControl.OutputBufferLength < sizeof(FILE_STANDARD_INFORMATION)) { + status = STATUS_BUFFER_TOO_SMALL; + break; + } RtlZeroMemory(pIrp->AssociatedIrp.SystemBuffer, sizeof(FILE_STANDARD_INFORMATION)); pIrp->IoStatus.Information = sizeof(FILE_STANDARD_INFORMATION); *************** *** 55,58 **** --- 61,68 ---- break; case FilePositionInformation: + if (pIrpStack->Parameters.DeviceIoControl.OutputBufferLength < sizeof(FILE_POSITION_INFORMATION)) { + status = STATUS_BUFFER_TOO_SMALL; + break; + } RtlZeroMemory(pIrp->AssociatedIrp.SystemBuffer, sizeof(FILE_POSITION_INFORMATION)); pIrp->IoStatus.Information = sizeof(FILE_POSITION_INFORMATION); |
From: Vyacheslav F. <vf...@us...> - 2007-11-01 15:37:25
|
Update of /cvsroot/com0com/com0com/setupg In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv25645 Added Files: .cvsignore Log Message: Initial revision --- NEW FILE: .cvsignore --- *.ncb *.sln *.user *.suo Release Debug |
From: Vyacheslav F. <vf...@us...> - 2007-10-31 10:17:00
|
Update of /cvsroot/com0com/com0com/setupg In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv3440 Added Files: AssemblyInfo.cpp setup.cpp portprms.h setup.vcproj Form1.h pinmap.h pinmap.cpp exec.cpp resource.h Form1.resx portprms.cpp app.rc exec.h com0com.ico stdafx.cpp stdafx.h Log Message: Initial revision --- NEW FILE: app.rc --- // Microsoft Visual C++ generated resource script. // #include "resource.h" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // English (U.S.) resources ///////////////////////////////////////////////////////////////////////////// // // Icon // // Icon placed first or with lowest ID value becomes application icon LANGUAGE 25, 1 #pragma code_page(1251) 1 ICON "com0com.ico" #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // TEXTINCLUDE // 1 TEXTINCLUDE BEGIN "resource.h\0" "\0" END 2 TEXTINCLUDE BEGIN "#include ""afxres.h""\r\n" "\0" END 3 TEXTINCLUDE BEGIN "\0" END #endif // APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// #ifndef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 3 resource. // ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED --- NEW FILE: pinmap.h --- /* * $Id: pinmap.h,v 1.1 2007/10/31 10:16:55 vfrolov Exp $ * * Copyright (c) 2007 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * * $Log: pinmap.h,v $ * Revision 1.1 2007/10/31 10:16:55 vfrolov * Initial revision * * */ #pragma once namespace SetupApp { using namespace System; using namespace System::Drawing; using namespace System::Windows::Forms; using namespace System::Collections::Generic; ref class PinSource; ref class Pin; ref class PortPair; ref class PinMap { public: PinMap(); void Init(PortPair ^pair); void Paint(PaintEventArgs ^e, Control ^control); void GetChanges(PortPair ^pair); void MouseInit(); void MouseDown(MouseEventArgs ^e); void MouseMove(MouseEventArgs ^e); void MouseUp(MouseEventArgs ^e); void MouseDoubleClick(MouseEventArgs ^e); private: void Link(String ^pinName, String ^source, bool invert); Dictionary<String ^, PinSource ^> ^pinsOrg; Dictionary<String ^, Pin ^> ^pins; Point mb; Point me; String ^selected; bool down; bool up; bool doubleClick; }; } --- NEW FILE: portprms.cpp --- /* * $Id: portprms.cpp,v 1.1 2007/10/31 10:16:55 vfrolov Exp $ * * Copyright (c) 2007 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * * $Log: portprms.cpp,v $ * Revision 1.1 2007/10/31 10:16:55 vfrolov * Initial revision * * */ #include "stdafx.h" #include "portprms.h" #include "exec.h" using namespace SetupApp; using namespace System; using namespace System::Collections::Generic; PortParams::PortParams(String ^str) { array<Char> ^separator = {','}; array<String ^> ^prms = str->Split(separator, StringSplitOptions::RemoveEmptyEntries);; for (int i = 0 ; i < prms->Length ; i++) { array<Char> ^separator = {'='}; array<String ^> ^prm = prms[i]->Split(separator); if (prm->Length == 2) { this[prm[0]->ToLower()] = prm[1]->ToUpper(); } } } String ^PortPairs::ParseLine(String ^line) { array<Char> ^separator = {' '}; array<String ^> ^fields = line->Split(separator, StringSplitOptions::RemoveEmptyEntries); if (fields->Length != 2) return nullptr; int iPort; if (fields[0]->StartsWith("CNCA")) { iPort = 0; } else if (fields[0]->StartsWith("CNCB")) { iPort = 1; } else { return nullptr; } String ^keyPair = fields[0]->Substring(4); if (!ContainsKey(keyPair)) this[keyPair] = gcnew PortPair(); this[keyPair]->Set(iPort, gcnew PortParams(fields[1])); return keyPair; } void PortPairs::Init() { String ^cmd = "--detail-prms list"; array<String ^> ^lines = ExecCommand::ExecCommand(parent, cmd); Clear(); for (int i = 0 ; i < lines->Length ; i++) ParseLine(lines[i]); } String ^PortPairs::AddPair() { String ^res = nullptr; String ^cmd = "--detail-prms install - -"; array<String ^> ^lines = ExecCommand::ExecCommand(parent, cmd); for (int i = 0 ; i < lines->Length ; i++) { String ^keyPair = ParseLine(lines[i]); if (res == nullptr) res = keyPair; } return res; } void PortPairs::RemovePair(String ^keyPair) { String ^cmd = String::Format("remove {0}", keyPair); ExecCommand::ExecCommand(parent, cmd); Init(); } void PortPairs::ChangePair(String ^keyPair, PortPair ^pairChanges) { for (int i = 0 ; i < 2 ; i++) { if (pairChanges[i] == nullptr || pairChanges[i]->Count == 0) continue; String ^cmd = "change"; cmd += String::Format(" CNC{0}{1} ", (i == 0) ? "A" : "B", keyPair); for each (KeyValuePair<String ^, String ^> kvpPort in pairChanges[i]) cmd += String::Format("{0}={1},", kvpPort.Key, kvpPort.Value); ExecCommand::ExecCommand(parent, cmd); } Init(); } --- NEW FILE: Form1.resx --- (This appears to be a binary file; contents omitted.) --- NEW FILE: setup.cpp --- /* * $Id: setup.cpp,v 1.1 2007/10/31 10:16:55 vfrolov Exp $ * * Copyright (c) 2007 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * * $Log: setup.cpp,v $ * Revision 1.1 2007/10/31 10:16:55 vfrolov * Initial revision * * */ #include "stdafx.h" #include "portprms.h" #include "pinmap.h" #include "Form1.h" using namespace SetupApp; [STAThreadAttribute] int main(array<System::String ^> ^/*args*/) { // Enabling Windows XP visual effects before any controls are created Application::EnableVisualStyles(); Application::SetCompatibleTextRenderingDefault(false); // Create the main window and run it Application::Run(gcnew Form1()); return 0; } --- NEW FILE: AssemblyInfo.cpp --- #include "stdafx.h" using namespace System; using namespace System::Reflection; using namespace System::Runtime::CompilerServices; using namespace System::Runtime::InteropServices; using namespace System::Security::Permissions; // // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. // [assembly:AssemblyTitleAttribute("setup")]; [assembly:AssemblyDescriptionAttribute("")]; [assembly:AssemblyConfigurationAttribute("")]; [assembly:AssemblyCompanyAttribute("Vyacheslav Frolov")]; [assembly:AssemblyProductAttribute("setup")]; [assembly:AssemblyCopyrightAttribute("Copyright (c) Vyacheslav Frolov 2007")]; [assembly:AssemblyTrademarkAttribute("")]; [assembly:AssemblyCultureAttribute("")]; // // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the value or you can default the Revision and Build Numbers // by using the '*' as shown below: [assembly:AssemblyVersionAttribute("1.0.*")]; [assembly:ComVisible(false)]; [assembly:CLSCompliantAttribute(true)]; [assembly:SecurityPermission(SecurityAction::RequestMinimum, UnmanagedCode = true)]; --- NEW FILE: pinmap.cpp --- /* * $Id: pinmap.cpp,v 1.1 2007/10/31 10:16:55 vfrolov Exp $ * * Copyright (c) 2007 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * * $Log: pinmap.cpp,v $ * Revision 1.1 2007/10/31 10:16:55 vfrolov * Initial revision * * */ #include "stdafx.h" #include "portprms.h" #include "pinmap.h" namespace SetupApp { using namespace System; ref class PinSource { public: PinSource(String ^_source, bool _invert) : source(_source), invert(_invert) {} PinSource(PinSource ^pin) : source(pin->source), invert(pin->invert) {} void Invert() { invert = !invert; } bool IsEqual(PinSource ^pin) { return source == pin->source && invert == pin->invert; } String ^source; bool invert; }; ref class Pin { public: Pin(int c, int l, bool _isFixed, int ic) : C(c), L(l), IC(ic), isFixed(_isFixed), source(nullptr) {} void Link(PinSource ^_source) { source = gcnew PinSource(_source); } bool IsSource() { return source == nullptr; } void Invert() { if (source != nullptr) source->Invert(); } int C; int L; int IC; bool isFixed; PinSource ^source; }; } using namespace SetupApp; using namespace System; using namespace System::Drawing; using namespace System::Windows::Forms; using namespace System::Collections::Generic; #define NUM_LINES 10 #define NUM_MIDDLE_SRCS 1 #define MAX_DIFF 6 #define UL 0 #define DL (NUM_LINES - 1) #define NUM_COLUMS ((MAX_DIFF + 1)*2 + NUM_MIDDLE_SRCS) #define LC 0 #define RC (NUM_COLUMS - 1) #define MC (NUM_COLUMS/2) #define PIN_SIZE 8 #define INVERT_SIZE 14 PinMap::PinMap() { MouseInit(); pinsOrg = gcnew Dictionary<String ^, PinSource ^>; pins = gcnew Dictionary<String ^, Pin ^>; int C, L, IC; C = LC; L = UL; IC = 0; pins["RX(A)"] = gcnew Pin(C, L++, true, 0); pins["TX(A)"] = gcnew Pin(C, L++, true, 0); pins["DTR(A)"] = gcnew Pin(C, L++, false, IC++); pins["DSR(A)"] = gcnew Pin(C, L++, false, 0); pins["DCD(A)"] = gcnew Pin(C, L++, false, 0); pins["RTS(A)"] = gcnew Pin(C, L++, false, IC++); pins["CTS(A)"] = gcnew Pin(C, L++, false, 0); pins["RI(A)"] = gcnew Pin(C, L++, false, 0); pins["OUT1(A)"] = gcnew Pin(C, L++, false, IC++); pins["OPEN(A)"] = gcnew Pin(C, L++, false, IC++); C = RC; L = UL; IC = 0; pins["RX(B)"] = gcnew Pin(C, L++, true, 0); pins["TX(B)"] = gcnew Pin(C, L++, true, 0); pins["DTR(B)"] = gcnew Pin(C, L++, false, IC++); pins["DSR(B)"] = gcnew Pin(C, L++, false, 0); pins["DCD(B)"] = gcnew Pin(C, L++, false, 0); pins["RTS(B)"] = gcnew Pin(C, L++, false, IC++); pins["CTS(B)"] = gcnew Pin(C, L++, false, 0); pins["RI(B)"] = gcnew Pin(C, L++, false, 0); pins["OUT1(B)"] = gcnew Pin(C, L++, false, IC++); pins["OPEN(B)"] = gcnew Pin(C, L++, false, IC++); pins["ON"] = gcnew Pin(MC, DL, false, 0); pins["RX(A)"] -> Link(gcnew PinSource("TX(B)", false)); pins["RX(B)"] -> Link(gcnew PinSource("TX(A)", false)); Init(nullptr); } void PinMap::Link(String ^pinName, String ^source, bool invert) { pinsOrg[pinName] = gcnew PinSource(source, invert); pins[pinName] -> Link(pinsOrg[pinName]); } void PinMap::Init(PortPair ^pair) { MouseInit(); array<String ^> ^dstPins = {"DSR", "DCD", "CTS", "RI"}; for each (String ^dst in dstPins) { for (int i = 0 ; i < 2 ; i++) { if (pair == nullptr || pair[i] == nullptr || !pair[i]->ContainsKey(dst->ToLower())) { Link(String::Format("{0}{1}", dst, (i == 0) ? "(A)" : "(B)"), "", false); continue; } String ^src = pair[i][dst->ToLower()]; bool invert = false; if (src->StartsWith("!")) { invert = true; src = src->Substring(1); } String ^srcSuffix = ""; if (src->StartsWith("L")) { srcSuffix = (i == 0) ? "(A)" : "(B)"; src = src->Substring(1); } else if (src->StartsWith("R")) { srcSuffix = (i == 1) ? "(A)" : "(B)"; src = src->Substring(1); } Link(String::Format("{0}{1}", dst, (i == 0) ? "(A)" : "(B)"), String::Format("{0}{1}", src, srcSuffix), invert); } } } void PinMap::GetChanges(PortPair ^pair) { for each (KeyValuePair<String ^, Pin ^> kvp in pins) { Pin ^pin = kvp.Value; if (!pin->isFixed && !pin->IsSource() && (!pinsOrg->ContainsKey(kvp.Key) || !pin->source->IsEqual(pinsOrg[kvp.Key]))) { array<Char> ^separator = {'('}; array<String ^> ^fields; fields = kvp.Key->Split(separator); if (fields->Length != 2) continue; String ^dst = fields[0]; int iDst; if (fields[1]->StartsWith("A")) iDst = 0; else if (fields[1]->StartsWith("B")) iDst = 1; else continue; String ^src = pin->source->invert ? "!" : ""; fields = pin->source->source->Split(separator); if (fields->Length > 1) { if (fields[1]->StartsWith("A")) { src += (iDst == 0) ? "l" : "r"; } else if (fields[1]->StartsWith("B")) { src += (iDst == 1) ? "l" : "r"; } } src += fields[0]; pair[iDst][dst->ToLower()] = src->ToUpper(); } } } void PinMap::Paint(PaintEventArgs ^e, Control ^control) { Pen ^pOrg = gcnew Pen(Color::Black, 1); pOrg->EndCap = Drawing2D::LineCap::ArrowAnchor; Pen ^pNew = gcnew Pen(Color::Blue, 1); pNew->EndCap = Drawing2D::LineCap::ArrowAnchor; Pen ^p = pOrg; SolidBrush ^b = gcnew SolidBrush(Color::Black); SolidBrush ^bS = gcnew SolidBrush(Color::Red); SolidBrush ^bD = gcnew SolidBrush(Color::Green); int width = control->ClientSize.Width; int height = control->ClientSize.Height; int stepC = width/NUM_COLUMS; int stepL = height/NUM_LINES; int xCorrection = (width - NUM_COLUMS*stepC)/2; int yCorrection = (height - NUM_LINES*stepL)/2; for each (KeyValuePair<String ^, Pin ^> kvp in pins) { Pin ^pin = kvp.Value; int x, y; x = xCorrection + stepC/2 + pin->C * stepC; y = yCorrection + stepL/2 + pin->L * stepL; int pinSize = PIN_SIZE; if (!pin->isFixed && (!pins->ContainsKey(selected) || pins[selected]->IsSource() != pin->IsSource()) && me.X > x - stepC && me.X < x + stepC && me.Y > y - stepL/2 && me.Y < y + stepL/2) { if (down) { mb.X = x; mb.Y = y; selected = kvp.Key; } else { pinSize += 4; } if (doubleClick) pin->Invert(); if (up && pins->ContainsKey(selected)) { String ^src, ^dst; if (pin->IsSource()) { src = kvp.Key; dst = selected; } else { src = selected; dst = kvp.Key; } if (pinsOrg[dst]->source == src) pins[dst]->Link(pinsOrg[dst]); else pins[dst]->Link(gcnew PinSource(src, false)); } } Brush ^bE = b; if (!pin->isFixed) { if (pin->IsSource()) bE = bS; else bE = bD; } e->Graphics->FillEllipse(bE, x - pinSize/2, y - pinSize/2, pinSize, pinSize); if (pin->C == LC) { if (pin->IsSource()) e->Graphics->DrawLine(p, 0, y, x - PIN_SIZE/2, y); else e->Graphics->DrawLine(p, x - PIN_SIZE/2, y, 0, y); } else if (pin->C == RC) { if (pin->IsSource()) e->Graphics->DrawLine(p, width, y, x + PIN_SIZE/2, y); else e->Graphics->DrawLine(p, x + PIN_SIZE/2, y, width, y); } else if (pin->L == UL) { if (pin->IsSource()) e->Graphics->DrawLine(p, x, 0, x, y - PIN_SIZE/2); else e->Graphics->DrawLine(p, x, y - PIN_SIZE/2, x, 0); } else if (pin->L == DL) { if (pin->IsSource()) e->Graphics->DrawLine(p, x, height, x, y + PIN_SIZE/2); else e->Graphics->DrawLine(p, x, y + PIN_SIZE/2, x, height); } } for each (KeyValuePair<String ^, Pin ^> kvp in pins) { Pin ^pin = kvp.Value; if (!pin->source) continue; String ^source = pin->source->source; if (pins->ContainsKey(source)) { Pin ^pinS = pins[source]; int xS = xCorrection + stepC/2 + pinS->C * stepC; int yS = yCorrection + stepL/2 + pinS->L * stepL; array<Point> ^line = gcnew array<Point>(4); if (pinS->C == LC) { line[0].X = xS + PIN_SIZE/2; line[0].Y = yS; } else if (pinS->C == RC) { line[0].X = xS - PIN_SIZE/2; line[0].Y = yS; } else if (pinS->L == UL) { line[0].X = xS; line[0].Y = yS + PIN_SIZE/2; } else if (pinS->L == DL) { line[0].X = xS; line[0].Y = yS - PIN_SIZE/2; } else { line[0].X = xS; line[0].Y = yS; } int xD = xCorrection + stepC/2 + pin->C * stepC; int yD = yCorrection + stepL/2 + pin->L * stepL; Pen ^pCur = (pin->isFixed || pin->source->IsEqual(pinsOrg[kvp.Key])) ? pOrg : pNew; if (pin->C == LC) { line[3].X = xD + PIN_SIZE/2; line[3].Y = yD; if (pin->source->invert) { line[3].X += INVERT_SIZE/2; array<Point> ^poly = { Point(line[3].X, line[3].Y - INVERT_SIZE/2), Point(line[3].X, line[3].Y + INVERT_SIZE/2), Point(line[3].X - INVERT_SIZE/2, line[3].Y), }; e->Graphics->DrawPolygon(pCur, poly); } } else if (pin->C == RC) { line[3].X = xD - PIN_SIZE/2; line[3].Y = yD; if (pin->source->invert) { line[3].X -= INVERT_SIZE/2; array<Point> ^poly = { Point(line[3].X, line[3].Y - INVERT_SIZE/2), Point(line[3].X, line[3].Y + INVERT_SIZE/2), Point(line[3].X + INVERT_SIZE/2, line[3].Y), }; Pen ^pCur = (pin->isFixed || pin->source->IsEqual(pinsOrg[kvp.Key])) ? pOrg : pNew; e->Graphics->DrawPolygon(pCur, poly); } } else if (pin->L == UL) { line[3].X = xD; line[3].Y = yD + PIN_SIZE/2; if (pin->source->invert) { line[3].Y += INVERT_SIZE/2; array<Point> ^poly = { Point(line[3].X - INVERT_SIZE/2, line[3].Y), Point(line[3].X + INVERT_SIZE/2, line[3].Y), Point(line[3].X, line[3].Y - INVERT_SIZE/2), }; Pen ^pCur = (pin->isFixed || pin->source->IsEqual(pinsOrg[kvp.Key])) ? pOrg : pNew; e->Graphics->DrawPolygon(pCur, poly); } } else if (pin->L == DL) { line[3].X = xD; line[3].Y = yD - PIN_SIZE/2; if (pin->source->invert) { line[3].Y -= INVERT_SIZE/2; array<Point> ^poly = { Point(line[3].X - INVERT_SIZE/2, line[3].Y), Point(line[3].X + INVERT_SIZE/2, line[3].Y), Point(line[3].X, line[3].Y + INVERT_SIZE/2), }; Pen ^pCur = (pin->isFixed || pin->source->IsEqual(pinsOrg[kvp.Key])) ? pOrg : pNew; e->Graphics->DrawPolygon(pCur, poly); } } else { line[3].X = xD; line[3].Y = yD; } line[1].Y = line[0].Y; line[2].Y = line[3].Y; int diffX = (pin->L - pinS->L) * stepC; if (diffX < 0) diffX = -diffX; if (pinS->C != pin->C) { if (pinS->C == LC) { line[1].X = xCorrection + (NUM_COLUMS*stepC)/2 - stepC/2; line[2].X = line[1].X + diffX; } else if (pinS->C == RC) { line[1].X = xCorrection + (NUM_COLUMS*stepC)/2 + stepC/2; line[2].X = line[1].X - diffX; } else { line[1].X = line[0].X; line[1].Y = line[2].Y; line[2].X = line[3].X; } } else { if (pinS->C == LC) { line[1].X = line[0].X + (stepC + pinS->IC * stepC); line[2].X = line[1].X; } else if (pinS->C == RC) { line[1].X = xS - (stepC + pinS->IC * stepC); line[2].X = line[1].X; } else { line[1].X = line[0].X; line[2].X = line[3].X; } } e->Graphics->DrawLines(pCur, line); } } down = false; doubleClick = false; if (up) { selected = ""; up = false; } if (pins->ContainsKey(selected)) { p->EndCap = Drawing2D::LineCap::NoAnchor; e->Graphics->DrawLine(p, mb.X, mb.Y, me.X, me.Y); } } void PinMap::MouseInit() { mb = me = Point(0, 0); selected = ""; down = up = doubleClick = false; } void PinMap::MouseDown(MouseEventArgs ^e) { down = true; me = Point(e->X, e->Y); } void PinMap::MouseMove(MouseEventArgs ^e) { me = Point(e->X, e->Y); } void PinMap::MouseUp(MouseEventArgs ^e) { up = true; me = Point(e->X, e->Y); } void PinMap::MouseDoubleClick(MouseEventArgs ^e) { MouseInit(); doubleClick = true; me = Point(e->X, e->Y); } --- NEW FILE: setup.vcproj --- <?xml version="1.0" encoding="windows-1251"?> <VisualStudioProject ProjectType="Visual C++" Version="8,00" Name="setup" ProjectGUID="{6ACC2F57-86A2-41D4-8744-5982985E99DA}" RootNamespace="SetupApp" Keyword="ManagedCProj" > <Platforms> <Platform Name="Win32" /> </Platforms> <ToolFiles> </ToolFiles> <Configurations> <Configuration Name="Debug|Win32" OutputDirectory="$(SolutionDir)$(ConfigurationName)" IntermediateDirectory="$(ConfigurationName)" ConfigurationType="1" CharacterSet="1" ManagedExtensions="2" > <Tool Name="VCPreBuildEventTool" /> <Tool Name="VCCustomBuildTool" /> <Tool Name="VCXMLDataGeneratorTool" /> <Tool Name="VCWebServiceProxyGeneratorTool" /> <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" Optimization="0" PreprocessorDefinitions="WIN32;_DEBUG" RuntimeLibrary="3" UsePrecompiledHeader="2" WarningLevel="4" Detect64BitPortabilityProblems="true" DebugInformationFormat="3" /> <Tool Name="VCManagedResourceCompilerTool" /> <Tool Name="VCResourceCompilerTool" /> <Tool Name="VCPreLinkEventTool" /> <Tool Name="VCLinkerTool" AdditionalDependencies="$(NoInherit)" OutputFile="$(OutDir)\setupg.exe" LinkIncremental="2" GenerateDebugInformation="true" AssemblyDebug="1" SubSystem="2" EntryPointSymbol="main" TargetMachine="1" /> <Tool Name="VCALinkTool" /> <Tool Name="VCManifestTool" /> <Tool Name="VCXDCMakeTool" /> <Tool Name="VCBscMakeTool" /> <Tool Name="VCFxCopTool" /> <Tool Name="VCAppVerifierTool" /> <Tool Name="VCWebDeploymentTool" /> <Tool Name="VCPostBuildEventTool" /> </Configuration> <Configuration Name="Release|Win32" OutputDirectory="$(SolutionDir)$(ConfigurationName)" IntermediateDirectory="$(ConfigurationName)" ConfigurationType="1" CharacterSet="1" ManagedExtensions="2" WholeProgramOptimization="1" > <Tool Name="VCPreBuildEventTool" /> <Tool Name="VCCustomBuildTool" /> <Tool Name="VCXMLDataGeneratorTool" /> <Tool Name="VCWebServiceProxyGeneratorTool" /> <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" PreprocessorDefinitions="WIN32;NDEBUG" RuntimeLibrary="2" UsePrecompiledHeader="2" WarningLevel="4" Detect64BitPortabilityProblems="true" DebugInformationFormat="3" /> <Tool Name="VCManagedResourceCompilerTool" /> <Tool Name="VCResourceCompilerTool" /> <Tool Name="VCPreLinkEventTool" /> <Tool Name="VCLinkerTool" AdditionalDependencies="$(NoInherit)" OutputFile="$(OutDir)\setupg.exe" LinkIncremental="1" GenerateDebugInformation="true" SubSystem="2" EntryPointSymbol="main" TargetMachine="1" /> <Tool Name="VCALinkTool" /> <Tool Name="VCManifestTool" /> <Tool Name="VCXDCMakeTool" /> <Tool Name="VCBscMakeTool" /> <Tool Name="VCFxCopTool" /> <Tool Name="VCAppVerifierTool" /> <Tool Name="VCWebDeploymentTool" /> <Tool Name="VCPostBuildEventTool" /> </Configuration> </Configurations> <References> <AssemblyReference RelativePath="System.dll" AssemblyName="System, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" /> <AssemblyReference RelativePath="System.Data.dll" AssemblyName="System.Data, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=x86" /> <AssemblyReference RelativePath="System.Drawing.dll" AssemblyName="System.Drawing, Version=2.0.0.0, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" /> <AssemblyReference RelativePath="System.Windows.Forms.dll" AssemblyName="System.Windows.Forms, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" /> <AssemblyReference RelativePath="System.XML.dll" AssemblyName="System.Xml, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" /> </References> <Files> <Filter Name="Source Files" Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" > <File RelativePath=".\AssemblyInfo.cpp" > </File> <File RelativePath=".\exec.cpp" > </File> <File RelativePath=".\pinmap.cpp" > </File> <File RelativePath=".\portprms.cpp" > </File> <File RelativePath=".\setup.cpp" > </File> <File RelativePath=".\stdafx.cpp" > <FileConfiguration Name="Debug|Win32" > <Tool Name="VCCLCompilerTool" UsePrecompiledHeader="1" /> </FileConfiguration> <FileConfiguration Name="Release|Win32" > <Tool Name="VCCLCompilerTool" UsePrecompiledHeader="1" /> </FileConfiguration> </File> </Filter> <Filter Name="Header Files" Filter="h;hpp;hxx;hm;inl;inc;xsd" UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" > <File RelativePath=".\exec.h" > </File> <File RelativePath=".\Form1.h" FileType="3" > <File RelativePath=".\Form1.resX" SubType="Designer" > </File> </File> <File RelativePath=".\pinmap.h" > </File> <File RelativePath=".\portprms.h" > </File> <File RelativePath=".\resource.h" > </File> <File RelativePath=".\stdafx.h" > </File> </Filter> <Filter Name="Resource Files" Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" > <File RelativePath=".\app.rc" > </File> <File RelativePath=".\com0com.ico" > </File> </Filter> </Files> <Globals> </Globals> </VisualStudioProject> --- NEW FILE: com0com.ico --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Form1.h --- /* * $Id: Form1.h,v 1.1 2007/10/31 10:16:55 vfrolov Exp $ * * Copyright (c) 2007 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * * $Log: Form1.h,v $ * Revision 1.1 2007/10/31 10:16:55 vfrolov * Initial revision * * */ #pragma once namespace SetupApp { using namespace System::Collections::Generic; using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Windows::Forms; using namespace System::Data; using namespace System::Drawing; /// <summary> /// Summary for Form1 /// /// WARNING: If you change the name of this class, you will need to change the /// 'Resource File Name' property for the managed resource compiler tool /// associated with all .resx files this class depends on. Otherwise, /// the designers will not be able to interact properly with localized /// resources associated with this form. /// </summary> public ref class Form1 : public System::Windows::Forms::Form { public: Form1(void) { InitializeComponent(); // //TODO: Add the constructor code here // } protected: /// <summary> /// Clean up any resources being used. /// </summary> ~Form1() { if (components) { delete components; } } private: System::Windows::Forms::TextBox^ PortNameB; private: System::Windows::Forms::TextBox^ PortNameA; private: System::Windows::Forms::Label^ pinNameON; private: System::Windows::Forms::ListBox^ pinNamesB; private: System::Windows::Forms::ListBox^ pinNamesA; private: System::Windows::Forms::PictureBox^ picturePinMap; private: System::Windows::Forms::ToolTip^ toolTip1; private: System::ComponentModel::IContainer^ components; private: System::Windows::Forms::Button^ buttonRemovePair; private: System::Windows::Forms::Button^ buttonAddPair; private: System::Windows::Forms::Button^ buttonApply; private: System::Windows::Forms::Button^ buttonReset; private: System::Windows::Forms::CheckBox^ EmuBrB; private: System::Windows::Forms::CheckBox^ EmuOverrunB; private: System::Windows::Forms::CheckBox^ PlugInModeB; private: System::Windows::Forms::CheckBox^ ExclusiveModeB; private: System::Windows::Forms::CheckBox^ ExclusiveModeA; private: System::Windows::Forms::CheckBox^ PlugInModeA; private: System::Windows::Forms::CheckBox^ EmuOverrunA; private: System::Windows::Forms::CheckBox^ EmuBrA; private: System::Windows::Forms::TreeView^ pairList; private: /// <summary> /// Required designer variable. /// </summary> #pragma region Windows Form Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> void InitializeComponent(void) { this->components = (gcnew System::ComponentModel::Container()); System::ComponentModel::ComponentResourceManager^ resources = (gcnew System::ComponentModel::ComponentResourceManager(Form1::typeid)); this->PortNameB = (gcnew System::Windows::Forms::TextBox()); this->PortNameA = (gcnew System::Windows::Forms::TextBox()); this->pinNameON = (gcnew System::Windows::Forms::Label()); this->pinNamesB = (gcnew System::Windows::Forms::ListBox()); this->pinNamesA = (gcnew System::Windows::Forms::ListBox()); this->picturePinMap = (gcnew System::Windows::Forms::PictureBox()); this->toolTip1 = (gcnew System::Windows::Forms::ToolTip(this->components)); this->EmuBrB = (gcnew System::Windows::Forms::CheckBox()); this->EmuOverrunB = (gcnew System::Windows::Forms::CheckBox()); this->PlugInModeB = (gcnew System::Windows::Forms::CheckBox()); this->ExclusiveModeB = (gcnew System::Windows::Forms::CheckBox()); this->ExclusiveModeA = (gcnew System::Windows::Forms::CheckBox()); this->PlugInModeA = (gcnew System::Windows::Forms::CheckBox()); this->EmuOverrunA = (gcnew System::Windows::Forms::CheckBox()); this->EmuBrA = (gcnew System::Windows::Forms::CheckBox()); this->pairList = (gcnew System::Windows::Forms::TreeView()); this->buttonRemovePair = (gcnew System::Windows::Forms::Button()); this->buttonAddPair = (gcnew System::Windows::Forms::Button()); this->buttonApply = (gcnew System::Windows::Forms::Button()); this->buttonReset = (gcnew System::Windows::Forms::Button()); (cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->picturePinMap))->BeginInit(); this->SuspendLayout(); // // PortNameB // resources->ApplyResources(this->PortNameB, L"PortNameB"); this->PortNameB->Name = L"PortNameB"; this->toolTip1->SetToolTip(this->PortNameB, resources->GetString(L"PortNameB.ToolTip")); this->PortNameB->TextChanged += gcnew System::EventHandler(this, &Form1::PortNameB_Changed); // // PortNameA // resources->ApplyResources(this->PortNameA, L"PortNameA"); this->PortNameA->Name = L"PortNameA"; this->toolTip1->SetToolTip(this->PortNameA, resources->GetString(L"PortNameA.ToolTip")); this->PortNameA->TextChanged += gcnew System::EventHandler(this, &Form1::PortNameA_Changed); // // pinNameON // resources->ApplyResources(this->pinNameON, L"pinNameON"); this->pinNameON->Name = L"pinNameON"; this->toolTip1->SetToolTip(this->pinNameON, resources->GetString(L"pinNameON.ToolTip")); // // pinNamesB // this->pinNamesB->BackColor = System::Drawing::SystemColors::Control; this->pinNamesB->BorderStyle = System::Windows::Forms::BorderStyle::None; resources->ApplyResources(this->pinNamesB, L"pinNamesB"); this->pinNamesB->FormattingEnabled = true; this->pinNamesB->Items->AddRange(gcnew cli::array< System::Object^ >(10) {resources->GetString(L"pinNamesB.Items"), resources->GetString(L"pinNamesB.Items1"), resources->GetString(L"pinNamesB.Items2"), resources->GetString(L"pinNamesB.Items3"), resources->GetString(L"pinNamesB.Items4"), resources->GetString(L"pinNamesB.Items5"), resources->GetString(L"pinNamesB.Items6"), resources->GetString(L"pinNamesB.Items7"), resources->GetString(L"pinNamesB.Items8"), resources->GetString(L"pinNamesB.Items9")}); this->pinNamesB->Name = L"pinNamesB"; this->pinNamesB->SelectionMode = System::Windows::Forms::SelectionMode::None; this->toolTip1->SetToolTip(this->pinNamesB, resources->GetString(L"pinNamesB.ToolTip")); // // pinNamesA // this->pinNamesA->BackColor = System::Drawing::SystemColors::Control; this->pinNamesA->BorderStyle = System::Windows::Forms::BorderStyle::None; resources->ApplyResources(this->pinNamesA, L"pinNamesA"); this->pinNamesA->FormattingEnabled = true; this->pinNamesA->Items->AddRange(gcnew cli::array< System::Object^ >(10) {resources->GetString(L"pinNamesA.Items"), resources->GetString(L"pinNamesA.Items1"), resources->GetString(L"pinNamesA.Items2"), resources->GetString(L"pinNamesA.Items3"), resources->GetString(L"pinNamesA.Items4"), resources->GetString(L"pinNamesA.Items5"), resources->GetString(L"pinNamesA.Items6"), resources->GetString(L"pinNamesA.Items7"), resources->GetString(L"pinNamesA.Items8"), resources->GetString(L"pinNamesA.Items9")}); this->pinNamesA->Name = L"pinNamesA"; this->pinNamesA->SelectionMode = System::Windows::Forms::SelectionMode::None; this->toolTip1->SetToolTip(this->pinNamesA, resources->GetString(L"pinNamesA.ToolTip")); // // picturePinMap // this->picturePinMap->BackColor = System::Drawing::SystemColors::Control; this->picturePinMap->Cursor = System::Windows::Forms::Cursors::Hand; resources->ApplyResources(this->picturePinMap, L"picturePinMap"); this->picturePinMap->Name = L"picturePinMap"; this->picturePinMap->TabStop = false; this->toolTip1->SetToolTip(this->picturePinMap, resources->GetString(L"picturePinMap.ToolTip")); this->picturePinMap->MouseLeave += gcnew System::EventHandler(this, &Form1::picturePinMap_MouseLeave); this->picturePinMap->MouseDown += gcnew System::Windows::Forms::MouseEventHandler(this, &Form1::picturePinMap_MouseDown); this->picturePinMap->MouseMove += gcnew System::Windows::Forms::MouseEventHandler(this, &Form1::picturePinMap_MouseMove); this->picturePinMap->Paint += gcnew System::Windows::Forms::PaintEventHandler(this, &Form1::picturePinMap_Paint); this->picturePinMap->MouseDoubleClick += gcnew System::Windows::Forms::MouseEventHandler(this, &Form1::picturePinMap_MouseDoubleClick); this->picturePinMap->MouseUp += gcnew System::Windows::Forms::MouseEventHandler(this, &Form1::picturePinMap_MouseUp); // // EmuBrB // resources->ApplyResources(this->EmuBrB, L"EmuBrB"); this->EmuBrB->Name = L"EmuBrB"; this->toolTip1->SetToolTip(this->EmuBrB, resources->GetString(L"EmuBrB.ToolTip")); this->EmuBrB->UseVisualStyleBackColor = true; this->EmuBrB->CheckedChanged += gcnew System::EventHandler(this, &Form1::EmuBrB_Changed); // // EmuOverrunB // resources->ApplyResources(this->EmuOverrunB, L"EmuOverrunB"); this->EmuOverrunB->Name = L"EmuOverrunB"; this->toolTip1->SetToolTip(this->EmuOverrunB, resources->GetString(L"EmuOverrunB.ToolTip")); this->EmuOverrunB->UseVisualStyleBackColor = true; this->EmuOverrunB->CheckedChanged += gcnew System::EventHandler(this, &Form1::EmuOverrunB_Changed); // // PlugInModeB // resources->ApplyResources(this->PlugInModeB, L"PlugInModeB"); this->PlugInModeB->Name = L"PlugInModeB"; this->toolTip1->SetToolTip(this->PlugInModeB, resources->GetString(L"PlugInModeB.ToolTip")); this->PlugInModeB->UseVisualStyleBackColor = true; this->PlugInModeB->CheckedChanged += gcnew System::EventHandler(this, &Form1::PlugInModeB_Changed); // // ExclusiveModeB // resources->ApplyResources(this->ExclusiveModeB, L"ExclusiveModeB"); this->ExclusiveModeB->Name = L"ExclusiveModeB"; this->toolTip1->SetToolTip(this->ExclusiveModeB, resources->GetString(L"ExclusiveModeB.ToolTip")); this->ExclusiveModeB->UseVisualStyleBackColor = true; this->ExclusiveModeB->CheckedChanged += gcnew System::EventHandler(this, &Form1::ExclusiveModeB_Changed); // // ExclusiveModeA // resources->ApplyResources(this->ExclusiveModeA, L"ExclusiveModeA"); this->ExclusiveModeA->Name = L"ExclusiveModeA"; this->toolTip1->SetToolTip(this->ExclusiveModeA, resources->GetString(L"ExclusiveModeA.ToolTip")); this->ExclusiveModeA->UseVisualStyleBackColor = true; this->ExclusiveModeA->CheckedChanged += gcnew System::EventHandler(this, &Form1::ExclusiveModeA_Changed); // // PlugInModeA // resources->ApplyResources(this->PlugInModeA, L"PlugInModeA"); this->PlugInModeA->Name = L"PlugInModeA"; this->toolTip1->SetToolTip(this->PlugInModeA, resources->GetString(L"PlugInModeA.ToolTip")); this->PlugInModeA->UseVisualStyleBackColor = true; this->PlugInModeA->CheckedChanged += gcnew System::EventHandler(this, &Form1::PlugInModeA_Changed); // // EmuOverrunA // resources->ApplyResources(this->EmuOverrunA, L"EmuOverrunA"); this->EmuOverrunA->Name = L"EmuOverrunA"; this->toolTip1->SetToolTip(this->EmuOverrunA, resources->GetString(L"EmuOverrunA.ToolTip")); this->EmuOverrunA->UseVisualStyleBackColor = true; this->EmuOverrunA->CheckedChanged += gcnew System::EventHandler(this, &Form1::EmuOverrunA_Changed); // // EmuBrA // resources->ApplyResources(this->EmuBrA, L"EmuBrA"); this->EmuBrA->ForeColor = System::Drawing::SystemColors::ControlText; this->EmuBrA->Name = L"EmuBrA"; this->toolTip1->SetToolTip(this->EmuBrA, resources->GetString(L"EmuBrA.ToolTip")); this->EmuBrA->UseVisualStyleBackColor = true; this->EmuBrA->CheckedChanged += gcnew System::EventHandler(this, &Form1::EmuBrA_Changed); // // pairList // this->pairList->HideSelection = false; resources->ApplyResources(this->pairList, L"pairList"); this->pairList->Name = L"pairList"; this->pairList->AfterSelect += gcnew System::Windows::Forms::TreeViewEventHandler(this, &Form1::pairsList_AfterSelect); this->pairList->BeforeSelect += gcnew System::Windows::Forms::TreeViewCancelEventHandler(this, &Form1::pairsList_BeforeSelect); // // buttonRemovePair // resources->ApplyResources(this->buttonRemovePair, L"buttonRemovePair"); this->buttonRemovePair->Name = L"buttonRemovePair"; this->buttonRemovePair->UseVisualStyleBackColor = true; this->buttonRemovePair->Click += gcnew System::EventHandler(this, &Form1::buttonRemovePair_Click); // // buttonAddPair // resources->ApplyResources(this->buttonAddPair, L"buttonAddPair"); this->buttonAddPair->Name = L"buttonAddPair"; this->buttonAddPair->UseVisualStyleBackColor = true; this->buttonAddPair->Click += gcnew System::EventHandler(this, &Form1::buttonAddPair_Click); // // buttonApply // resources->ApplyResources(this->buttonApply, L"buttonApply"); this->buttonApply->Name = L"buttonApply"; this->buttonApply->UseVisualStyleBackColor = true; this->buttonApply->Click += gcnew System::EventHandler(this, &Form1::buttonApply_Click); // // buttonReset // resources->ApplyResources(this->buttonReset, L"buttonReset"); this->buttonReset->Name = L"buttonReset"; this->buttonReset->UseVisualStyleBackColor = true; this->buttonReset->Click += gcnew System::EventHandler(this, &Form1::buttonReset_Click); // // Form1 // resources->ApplyResources(this, L"$this"); this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font; this->Controls->Add(this->ExclusiveModeA); this->Controls->Add(this->PlugInModeA); this->Controls->Add(this->EmuOverrunA); this->Controls->Add(this->EmuBrA); this->Controls->Add(this->ExclusiveModeB); this->Controls->Add(this->PlugInModeB); this->Controls->Add(this->EmuOverrunB); this->Controls->Add(this->EmuBrB); this->Controls->Add(this->buttonReset); this->Controls->Add(this->buttonApply); this->Controls->Add(this->buttonAddPair); this->Controls->Add(this->buttonRemovePair); this->Controls->Add(this->pairList); this->Controls->Add(this->PortNameB); this->Controls->Add(this->PortNameA); this->Controls->Add(this->pinNameON); this->Controls->Add(this->pinNamesB); this->Controls->Add(this->pinNamesA); this->Controls->Add(this->picturePinMap); this->FormBorderStyle = System::Windows::Forms::FormBorderStyle::FixedDialog; this->MaximizeBox = false; this->Name = L"Form1"; this->Load += gcnew System::EventHandler(this, &Form1::this_Load); (cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->picturePinMap))->EndInit(); this->ResumeLayout(false); this->PerformLayout(); } #pragma endregion private: String ^GetControlValue(CheckBox ^control) { return control->Checked ? "YES" : "NO"; } String ^GetControlValue(TextBox ^control) { return control->Text; } Void SetControlValue(CheckBox ^control, String ^value) { control->Checked = (value->ToUpper() == "YES") ? true : false; } Void SetControlValue(TextBox ^control, String ^value) { control->Text = value; } ///////////////////////////////////////////////////////////////////// #define DeclareControlPair(controlClass, control) \ array<controlClass ^> ^control##s; \ Void control##_Init() { \ control##s = gcnew array<controlClass ^>{control##A, control##B}; \ } \ Void control##A_Changed(Object ^/*sender*/, EventArgs ^/*e*/) { \ control##_Changed(0); \ } \ Void control##B_Changed(Object ^/*sender*/, EventArgs ^/*e*/) { \ control##_Changed(1); \ } \ Void control##_Changed(int i) { \ try { \ String ^key = (gcnew String(#control))->ToLower(); \ String ^value = GetControlValue(control##s[i])->ToUpper(); \ if (pairs[pairList->SelectedNode->Name][i][key] != value) { \ control##s[i]->ForeColor = Color::Blue; \ return; \ } \ } \ catch (Exception^ /*e*/) { \ } \ control##s[i]->ForeColor = System::Drawing::SystemColors::ControlText; \ } \ Void control##_GetChanges(int i, PortPair ^portChanges) { \ try { \ String ^key = (gcnew String(#control))->ToLower(); \ String ^value = GetControlValue(control##s[i])->ToUpper(); \ if (pairs[pairList->SelectedNode->Name][i][key] != value) \ portChanges[i][key] = value; \ } \ catch (Exception^ /*e*/) { \ } \ } \ Void control##_Reset(int i) { \ try { \ String ^key = (gcnew String(#control))->ToLower(); \ SetControlValue(control##s[i], pairs[pairList->SelectedNode->Name][i][key]); \ } \ catch (Exception^ /*e*/) { \ SetControlValue(control##s[i], ""); \ } \ control##_Changed(i); \ } \ ///////////////////////////////////////////////////////////////////// private: DeclareControlPair(TextBox, PortName) DeclareControlPair(CheckBox, EmuBr) DeclareControlPair(CheckBox, EmuOverrun) DeclareControlPair(CheckBox, PlugInMode) DeclareControlPair(CheckBox, ExclusiveMode) #define ForEachControlPair(func) \ PortName_##func; \ EmuBr_##func; \ EmuOverrun_##func; \ PlugInMode_##func; \ ExclusiveMode_##func; \ private: Void Reset() { pairList->BeginUpdate(); for each (TreeNode ^pair in pairList->Nodes) { if (!pairs->ContainsKey(pair->Name) || pairs[pair->Name][0] == nullptr || pairs[pair->Name][1] == nullptr) { pairList->Nodes->Remove(pair); } } for each (KeyValuePair<String ^, PortPair ^> kvpPair in pairs) { if (kvpPair.Value[0] == nullptr || kvpPair.Value[1] == nullptr) continue; TreeNode ^pair; bool pairExpand; if (pairList->Nodes->ContainsKey(kvpPair.Key)) { pair = pairList->Nodes[kvpPair.Key]; pairExpand = pair->IsExpanded; } else { pair = pairList->Nodes->Add(kvpPair.Key, String::Format( "Virtual Port Pair {0}", kvpPair.Key)); pairExpand = true; } bool portExpand[2]; for (int i = 0 ; i < 2 ; i++) { try { portExpand[i] = pair->Nodes[i]->IsExpanded; } catch (Exception^ /*e*/) { portExpand[i] = false; } } pair->Nodes->Clear(); for (int i = 0 ; i < 2 ; i++) { TreeNode ^port; try { port = pair->Nodes->Add(kvpPair.Value[i]["portname"]); } catch (Exception^ /*e*/) { port = pair->Nodes->Add(String::Format("CNC{0}{1}", (i == 0) ? "A" : "B", kvpPair.Key)); } for each (KeyValuePair<String ^, String ^> kvpPort in kvpPair.Value[i]) { port->Nodes->Add(String::Format("{0}={1}", kvpPort.Key, kvpPort.Value)); } if (portExpand[i]) port->Expand(); } if (pairExpand) pair->Expand(); } if (pairList->SelectedNode == nullptr) { try { pairList->SelectedNode = pairList->Nodes[0]; } catch (Exception^ /*e*/) { } } pairList->EndUpdate(); try { pinMap->Init(pairs[pairList->SelectedNode->Name]); } catch (Exception^ /*e*/) { pinMap->Init(nullptr); } picturePinMap->Invalidate(); for (int i = 0 ; i < 2 ; i++) { ForEachControlPair(Reset(i)) } } PortPair ^GetChanges() { PortPair ^portChanges = gcnew PortPair; pinMap->GetChanges(portChanges); for (int i = 0 ; i < 2 ; i++) { ForEachControlPair(GetChanges(i, portChanges)) } return portChanges; } bool SaveChanges() { if (!pairList->SelectedNode) return true; PortPair ^portChanges = GetChanges(); if (!portChanges->IsEmpty()) { String^ msg = String::Format( "The parameters of \"{0}\" were changed.\n" "Would you like to apply the changes?", pairList->SelectedNode->Text); System::Windows::Forms::DialogResult res; res = MessageBox::Show(this, msg, "Apply", MessageBoxButtons::YesNoCancel); if (res == System::Windows::Forms::DialogResult::Cancel) { return false; } else if (res == System::Windows::Forms::DialogResult::Yes) { pairs->ChangePair(pairList->SelectedNode->Name, portChanges); Reset(); } } return true; } private: PinMap ^pinMap; PortPairs ^pairs; Void this_Load(Object ^/*sender*/, EventArgs ^/*e*/) { ForEachControlPair(Init()) pinMap = gcnew PinMap; pairs = gcnew PortPairs(this); pairs->Init(); Reset(); } private: Void picturePinMap_Paint(Object ^/*sender*/, PaintEventArgs ^e) { pinMap->Paint(e, picturePinMap); } Void picturePinMap_MouseDown(Object ^/*sender*/, MouseEventArgs ^e) { pinMap->MouseDown(e); picturePinMap->Invalidate(); } Void picturePinMap_MouseMove(Object ^/*sender*/, MouseEventArgs ^e) { pinMap->MouseMove(e); picturePinMap->Invalidate(); } Void picturePinMap_MouseUp(Object ^/*sender*/, MouseEventArgs ^e) { pinMap->MouseUp(e); picturePinMap->Invalidate(); } Void picturePinMap_MouseDoubleClick(Object ^/*sender*/, MouseEventArgs ^e) { pinMap->MouseDoubleClick(e); picturePinMap->Invalidate(); } Void picturePinMap_MouseLeave(Object ^/*sender*/, EventArgs ^/*e*/) { pinMap->MouseInit(); picturePinMap->Invalidate(); } private: Void pairsList_BeforeSelect(Object ^/*sender*/, TreeViewCancelEventArgs ^e) { if (e->Node->Level != 0 || !SaveChanges()) e->Cancel = true; } Void pairsList_AfterSelect(Object ^/*sender*/, TreeViewEventArgs ^/*e*/) { Reset(); } private: Void buttonApply_Click(Object ^/*sender*/, EventArgs ^/*e*/) { if (pairList->SelectedNode) { pairs->ChangePair(pairList->SelectedNode->Name, GetChanges()); Reset(); } } Void buttonRemovePair_Click(Object ^/*sender*/, EventArgs ^/*e*/) { if (pairList->SelectedNode != nullptr) { String^ msg = String::Format( "Would you like to remove \"{0}\"?", pairList->SelectedNode->Text); System::Windows::Forms::DialogResult res; res = MessageBox::Show(this, msg, "", MessageBoxButtons::YesNo); if (res == System::Windows::Forms::DialogResult::Yes) { pairs->RemovePair(pairList->SelectedNode->Name); Reset(); } } } Void buttonAddPair_Click(Object ^/*sender*/, EventArgs ^/*e*/) { if (!SaveChanges()) return; String ^key = pairs->AddPair(); Reset(); try { pairList->SelectedNode = pairList->Nodes[key]; } catch (Exception^ /*e*/) { } } Void buttonReset_Click(Object ^/*sender*/, EventArgs ^/*e*/) { pairs->Init(); Reset(); } }; } --- NEW FILE: portprms.h --- /* * $Id: portprms.h,v 1.1 2007/10/31 10:16:55 vfrolov Exp $ * * Copyright (c) 2007 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * * $Log: portprms.h,v $ * Revision 1.1 2007/10/31 10:16:55 vfrolov * Initial revision * * */ #pragma once namespace SetupApp { using namespace System; using namespace System::Collections::Generic; ref class PortParams : public Dictionary<String ^, String ^> { public: PortParams() {} PortParams(String ^str); }; ref class PortPair { public: PortPair() { ports = gcnew array<PortParams ^>{gcnew PortParams, gcnew PortParams}; } PortParams ^operator [](int i) { return ports[i]; } void Set(int i, PortParams ^port) { ports[i] = port; } bool IsEmpty() { return ports[0]->Count == 0 && ports[1]->Count == 0; } private: array<PortParams ^> ^ports; }; ref class PortPairs : public Dictionary<String ^, PortPair ^> { public: PortPairs(System::Windows::Forms::Control ^_parent) : parent(_parent) {} void Init(); String ^AddPair(); void RemovePair(String ^keyPair); void ChangePair(String ^keyPair, PortPair ^pairChanges); private: String ^ParseLine(String ^line); System::Windows::Forms::Control ^parent; }; } --- NEW FILE: exec.cpp --- /* * $Id: exec.cpp,v 1.1 2007/10/31 10:16:55 vfrolov Exp $ * * Copyright (c) 2007 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * * $Log: exec.cpp,v $ * Revision 1.1 2007/10/31 10:16:55 vfrolov * Initial revision * * */ #include "stdafx.h" #include "exec.h" using namespace System; using namespace System::Windows::Forms; array<String ^> ^ExecCommand::ExecCommand(System::Windows::Forms::Control ^parent, String ^cmd) { Cursor ^cursor = parent->Cursor; parent->Cursor = Cursors::WaitCursor; System::Diagnostics::Process ^setupc = gcnew System::Diagnostics::Process(); setupc->StartInfo->FileName = "setupc.exe"; setupc->StartInfo->Arguments = cmd->Trim(); setupc->StartInfo->CreateNoWindow = true; setupc->StartInfo->UseShellExecute = false; setupc->StartInfo->RedirectStandardOutput = true; array<String ^> ^lines = gcnew array<String ^>(0); try { if (setupc->Start()) { for (;;) { String ^line = setupc->StandardOutput->ReadLine(); if (!line) break; Array::Resize(lines, lines->Length + 1); lines[lines->Length - 1] = line->Trim(); } setupc->WaitForExit(); /* String ^msg = String::Format("\"{0} {1}\"\n\n{2}", setupc->StartInfo->FileName, setupc->StartInfo->Arguments, String::Join("\n", lines)); MessageBox::Show(msg, ""); */ setupc->Close(); } } catch (Exception ^e) { String ^msg = String::Format("\"{0} {1}\"\n\n{2}", setupc->StartInfo->FileName, setupc->StartInfo->Arguments, e->Message); MessageBox::Show(msg, "Error"); } parent->Cursor = cu... [truncated message content] |
From: Vyacheslav F. <vf...@us...> - 2007-10-31 10:11:37
|
Update of /cvsroot/com0com/com0com/setupg In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv31827/setupg Log Message: Directory /cvsroot/com0com/com0com/setupg added to the repository |
From: Vyacheslav F. <vf...@us...> - 2007-10-30 15:06:18
|
Update of /cvsroot/com0com/com0com/NSIS In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv28704 Modified Files: install.nsi Log Message: Added changing working directory before removing $INSTDIR Index: install.nsi =================================================================== RCS file: /cvsroot/com0com/com0com/NSIS/install.nsi,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** install.nsi 25 Oct 2007 14:30:27 -0000 1.7 --- install.nsi 30 Oct 2007 15:06:14 -0000 1.8 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.8 2007/10/30 15:06:14 vfrolov + * Added changing working directory before removing $INSTDIR + * * Revision 1.7 2007/10/25 14:30:27 vfrolov * Replaced setup.bat by setupc.exe *************** *** 239,242 **** --- 242,246 ---- ; Remove directories used RMDir "$SMPROGRAMS\com0com" + SetOutPath $TEMP RMDir "$INSTDIR" |
From: Vyacheslav F. <vf...@us...> - 2007-10-30 12:49:06
|
Update of /cvsroot/com0com/com0com/setupc In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv9147 Added Files: .cvsignore Log Message: Initial revision --- NEW FILE: .cvsignore --- obj objchk* objfre* |
From: Vyacheslav F. <vf...@us...> - 2007-10-30 12:48:01
|
Update of /cvsroot/com0com/com0com/setupc In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv8710 Modified Files: sources Log Message: Added USE_MSVCRT Index: sources =================================================================== RCS file: /cvsroot/com0com/com0com/setupc/sources,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** sources 25 Oct 2007 14:25:34 -0000 1.1 --- sources 30 Oct 2007 12:47:51 -0000 1.2 *************** *** 6,9 **** --- 6,10 ---- UMBASE=0x400000 MSC_WARNING_LEVEL=/W4 + USE_MSVCRT=1 SOURCES= \ |
From: Vyacheslav F. <vf...@us...> - 2007-10-25 14:30:34
|
Update of /cvsroot/com0com/com0com/NSIS In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv15616 Modified Files: install.nsi Log Message: Replaced setup.bat by setupc.exe Index: install.nsi =================================================================== RCS file: /cvsroot/com0com/com0com/NSIS/install.nsi,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** install.nsi 8 Aug 2007 14:15:16 -0000 1.6 --- install.nsi 25 Oct 2007 14:30:27 -0000 1.7 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.7 2007/10/25 14:30:27 vfrolov + * Replaced setup.bat by setupc.exe + * * Revision 1.6 2007/08/08 14:15:16 vfrolov * Added missing SetOutPath *************** *** 69,73 **** Function LaunchSetupCommandPrompt ! Exec "RunDll32 setup,RunDll" FunctionEnd --- 72,76 ---- Function LaunchSetupCommandPrompt ! Exec "setupc.exe" FunctionEnd *************** *** 166,170 **** File "..\${TARGET_CPU}\com0com.sys" File "..\${TARGET_CPU}\setup.dll" ! File "..\setup\setup.bat" ; Write the installation path into the registry --- 169,173 ---- File "..\${TARGET_CPU}\com0com.sys" File "..\${TARGET_CPU}\setup.dll" ! File "..\${TARGET_CPU}\setupc.exe" ; Write the installation path into the registry *************** *** 190,194 **** CreateDirectory "$SMPROGRAMS\com0com" ! CreateShortCut "$SMPROGRAMS\com0com\Setup Command Prompt.lnk" "$INSTDIR\setup.bat" CreateShortCut "$SMPROGRAMS\com0com\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 CreateShortCut "$SMPROGRAMS\com0com\ReadMe.lnk" "$INSTDIR\ReadMe.txt" --- 193,197 ---- CreateDirectory "$SMPROGRAMS\com0com" ! CreateShortCut "$SMPROGRAMS\com0com\Setup Command Prompt.lnk" "$INSTDIR\setupc.exe" CreateShortCut "$SMPROGRAMS\com0com\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 CreateShortCut "$SMPROGRAMS\com0com\ReadMe.lnk" "$INSTDIR\ReadMe.txt" *************** *** 201,205 **** GetTempFileName $0 ! ExecWait "RunDll32 setup,RunDll --output $0 install 0 - -" !insertmacro MoveFileToDetails $0 --- 204,208 ---- GetTempFileName $0 ! ExecWait "setupc.exe --output $0 install 0 - -" !insertmacro MoveFileToDetails $0 *************** *** 216,220 **** GetTempFileName $0 ! ExecWait "RunDll32 setup,RunDll --output $0 uninstall" !insertmacro MoveFileToDetails $0 --- 219,223 ---- GetTempFileName $0 ! ExecWait "setupc.exe --output $0 uninstall" !insertmacro MoveFileToDetails $0 *************** *** 228,232 **** Delete $INSTDIR\com0com.sys Delete $INSTDIR\setup.dll ! Delete $INSTDIR\setup.bat Delete $INSTDIR\uninstall.exe --- 231,235 ---- Delete $INSTDIR\com0com.sys Delete $INSTDIR\setup.dll ! Delete $INSTDIR\setupc.exe Delete $INSTDIR\uninstall.exe |
From: Vyacheslav F. <vf...@us...> - 2007-10-25 14:27:33
|
Update of /cvsroot/com0com/com0com In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv14282 Modified Files: dirs Log Message: Added setupc Index: dirs =================================================================== RCS file: /cvsroot/com0com/com0com/dirs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** dirs 28 Jul 2006 12:18:11 -0000 1.2 --- dirs 25 Oct 2007 14:27:28 -0000 1.3 *************** *** 2,3 **** --- 2,4 ---- sys \ setup \ + setupc \ |
From: Vyacheslav F. <vf...@us...> - 2007-10-25 14:25:37
|
Update of /cvsroot/com0com/com0com/setupc In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv13478 Added Files: sources setup.cpp makefile Log Message: Initial revision --- NEW FILE: sources --- TARGETNAME=setupc TARGETTYPE=PROGRAM TARGETPATH=.. UMTYPE=console UMENTRY=main UMBASE=0x400000 MSC_WARNING_LEVEL=/W4 SOURCES= \ setup.cpp \ !IF "$(BUILD_DEFAULT_TARGETS)" == "-386" TARGET_CPU=i386 !ELSE !IF "$(BUILD_DEFAULT_TARGETS)" == "-IA64" TARGET_CPU=ia64 !ELSE !IF "$(BUILD_DEFAULT_TARGETS)" == "-AMD64" TARGET_CPU=amd64 !ENDIF !ENDIF !ENDIF TARGETLIBS= \ ..\$(TARGET_CPU)\setup.lib \ --- NEW FILE: setup.cpp --- /* * $Id: setup.cpp,v 1.1 2007/10/25 14:25:34 vfrolov Exp $ * * Copyright (c) 2007 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * * $Log: setup.cpp,v $ * Revision 1.1 2007/10/25 14:25:34 vfrolov * Initial revision * * */ #include <windows.h> int CALLBACK MainA(const char *pProgName, const char *pCmdLine); int _cdecl main(int argc, char *argv[]) { char cmd[200] = ""; for (int i = 1 ; i < argc ; i++) { int lenCmd = lstrlen(cmd); if (sizeof(cmd)/sizeof(cmd[0]) < lenCmd + 1 + lstrlen(argv[i]) + 1) break; lstrcpy(cmd + lenCmd, " "); lenCmd++; lstrcpy(cmd + lenCmd, argv[i]); } return MainA(argv[0], cmd); } --- NEW FILE: makefile --- !INCLUDE $(NTMAKEENV)\makefile.def |
From: Vyacheslav F. <vf...@us...> - 2007-10-25 14:23:10
|
Update of /cvsroot/com0com/com0com/setupc In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv12509/setupc Log Message: Directory /cvsroot/com0com/com0com/setupc added to the repository |
From: Vyacheslav F. <vf...@us...> - 2007-10-19 16:12:01
|
Update of /cvsroot/com0com/com0com/setup In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv3860 Modified Files: msg.cpp Log Message: Added ability to redirect console output Index: msg.cpp =================================================================== RCS file: /cvsroot/com0com/com0com/setup/msg.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** msg.cpp 20 Sep 2007 12:29:03 -0000 1.5 --- msg.cpp 19 Oct 2007 16:11:56 -0000 1.6 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.6 2007/10/19 16:11:56 vfrolov + * Added ability to redirect console output + * * Revision 1.5 2007/09/20 12:29:03 vfrolov * Added return value to SetOutputFile() *************** *** 69,74 **** } ! if (pText) ! WriteConsole(handle, pText, lstrlen(pText), NULL, NULL); if (pReadBuf && lenReadBuf > 0) { --- 72,83 ---- } ! if (pText) { ! DWORD cnt; ! ! if (GetFileType(handle) == FILE_TYPE_CHAR) ! WriteConsole(handle, pText, lstrlen(pText), &cnt, NULL); ! else ! WriteFile(handle, pText, lstrlen(pText), &cnt, NULL); ! } if (pReadBuf && lenReadBuf > 0) { |
From: Vyacheslav F. <vf...@us...> - 2007-10-19 16:09:58
|
Update of /cvsroot/com0com/com0com/setup In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv3020 Modified Files: params.cpp params.h setup.cpp Log Message: Implemented --detail-prms option Index: params.h =================================================================== RCS file: /cvsroot/com0com/com0com/setup/params.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** params.h 3 Jul 2007 14:39:49 -0000 1.4 --- params.h 19 Oct 2007 16:09:55 -0000 1.5 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.5 2007/10/19 16:09:55 vfrolov + * Implemented --detail-prms option + * * Revision 1.4 2007/07/03 14:39:49 vfrolov * Implemented pinout customization *************** *** 46,50 **** LONG Save(); BOOL ParseParametersStr(const char *pParameters); ! BOOL FillParametersStr(char *pParameters, int size); BOOL FillPortName(char *pPortName, int size); BOOL Changed() const { return maskChanged != 0; } --- 49,53 ---- LONG Save(); BOOL ParseParametersStr(const char *pParameters); ! BOOL FillParametersStr(char *pParameters, int size, BOOL detail); BOOL FillPortName(char *pPortName, int size); BOOL Changed() const { return maskChanged != 0; } *************** *** 56,60 **** BOOL SetPortName(const char *pNewPortName); DWORD *GetDwPtr(DWORD bit); - const char *GetBitName(DWORD bit); BOOL SetFlag(const char *pNewVal, DWORD bit); BOOL SetPin(const char *pNewVal, DWORD bit); --- 59,62 ---- Index: params.cpp =================================================================== RCS file: /cvsroot/com0com/com0com/setup/params.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** params.cpp 20 Sep 2007 12:43:03 -0000 1.8 --- params.cpp 19 Oct 2007 16:09:55 -0000 1.9 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.9 2007/10/19 16:09:55 vfrolov + * Implemented --detail-prms option + * * Revision 1.8 2007/09/20 12:43:03 vfrolov * Added parameters string length check *************** *** 148,152 **** } /////////////////////////////////////////////////////////////// ! const char *PortParameters::GetBitName(DWORD bit) { switch (bit) { --- 151,180 ---- } /////////////////////////////////////////////////////////////// ! static const DWORD *GetDwPtrDefault(DWORD bit) ! { ! static const DWORD emuBR = C0C_DEFAULT_EMUBR; ! static const DWORD emuOverrun = C0C_DEFAULT_EMUOVERRUN; ! static const DWORD plugInMode = C0C_DEFAULT_PLUGINMODE; ! static const DWORD exclusiveMode = C0C_DEFAULT_EXCLUSIVEMODE; ! static const DWORD pinCTS = C0C_DEFAULT_PIN_CTS; ! static const DWORD pinDSR = C0C_DEFAULT_PIN_DSR; ! static const DWORD pinDCD = C0C_DEFAULT_PIN_DCD; ! static const DWORD pinRI = C0C_DEFAULT_PIN_RI; ! ! switch (bit) { ! case m_emuBR: return &emuBR; ! case m_emuOverrun: return &emuOverrun; ! case m_plugInMode: return &plugInMode; ! case m_exclusiveMode: return &exclusiveMode; ! case m_pinCTS: return &pinCTS; ! case m_pinDSR: return &pinDSR; ! case m_pinDCD: return &pinDCD; ! case m_pinRI: return &pinRI; ! } ! ! return NULL; ! } ! /////////////////////////////////////////////////////////////// ! static const char *GetBitName(DWORD bit) { switch (bit) { *************** *** 582,590 **** } /////////////////////////////////////////////////////////////// ! BOOL PortParameters::FillParametersStr(char *pParameters, int size) { int len; ! len = SNPRINTF(pParameters, size, "PortName=%s", (maskExplicit & m_portName) ? (portName) : "-"); if (len < 0) --- 610,619 ---- } /////////////////////////////////////////////////////////////// ! BOOL PortParameters::FillParametersStr(char *pParameters, int size, BOOL detail) { int len; ! len = SNPRINTF(pParameters, size, "PortName=%s", ! (maskExplicit & m_portName) ? portName : (detail ? phPortName : "-")); if (len < 0) *************** *** 598,607 **** for (i = 0 ; i < sizeof(flagBits)/sizeof(flagBits[0]) ; i++) { DWORD bit = flagBits[i]; ! if ((maskExplicit & bit) != 0) { ! DWORD *pFlag = GetDwPtr(bit); ! const char *pName = GetBitName(bit); ! if (pFlag == NULL || pName == NULL) continue; --- 627,644 ---- for (i = 0 ; i < sizeof(flagBits)/sizeof(flagBits[0]) ; i++) { DWORD bit = flagBits[i]; + const char *pName = GetBitName(bit); ! if (pName) { ! const DWORD *pFlag; ! if ((maskExplicit & bit) != 0) ! pFlag = GetDwPtr(bit); ! else ! if (detail) ! pFlag = GetDwPtrDefault(bit); ! else ! continue; ! ! if (pFlag == NULL) continue; *************** *** 618,627 **** for (i = 0 ; i < sizeof(pinBits)/sizeof(pinBits[0]) ; i++) { DWORD bit = pinBits[i]; ! if ((maskExplicit & bit) != 0) { ! DWORD *pPin = GetDwPtr(bit); ! const char *pName = GetBitName(bit); ! if (pPin == NULL || pName == NULL) continue; --- 655,672 ---- for (i = 0 ; i < sizeof(pinBits)/sizeof(pinBits[0]) ; i++) { DWORD bit = pinBits[i]; + const char *pName = GetBitName(bit); ! if (pName) { ! const DWORD *pPin; ! if ((maskExplicit & bit) != 0) ! pPin = GetDwPtr(bit); ! else ! if (detail) ! pPin = GetDwPtrDefault(bit); ! else ! continue; ! ! if (pPin == NULL) continue; Index: setup.cpp =================================================================== RCS file: /cvsroot/com0com/com0com/setup/setup.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** setup.cpp 15 Oct 2007 13:49:04 -0000 1.20 --- setup.cpp 19 Oct 2007 16:09:55 -0000 1.21 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.21 2007/10/19 16:09:55 vfrolov + * Implemented --detail-prms option + * * Revision 1.20 2007/10/15 13:49:04 vfrolov * Added entry point MainA *************** *** 111,114 **** --- 114,119 ---- /////////////////////////////////////////////////////////////// + static BOOL detailPrms = FALSE; + /////////////////////////////////////////////////////////////// static BOOL IsValidPortNum(int num) { *************** *** 323,329 **** LONG err = portParameters.Load(); ! char buf[100]; ! portParameters.FillParametersStr(buf, sizeof(buf)/sizeof(buf[0])); Trace(" %s %s\n", phPortName, buf); --- 328,334 ---- LONG err = portParameters.Load(); ! char buf[200]; ! portParameters.FillParametersStr(buf, sizeof(buf)/sizeof(buf[0]), detailPrms); Trace(" %s %s\n", phPortName, buf); *************** *** 345,349 **** if (err == ERROR_SUCCESS) { ! portParameters.FillParametersStr(buf, sizeof(buf)/sizeof(buf[0])); Trace("change %s %s\n", phPortName, buf); --- 350,354 ---- if (err == ERROR_SUCCESS) { ! portParameters.FillParametersStr(buf, sizeof(buf)/sizeof(buf[0]), detailPrms); Trace("change %s %s\n", phPortName, buf); *************** *** 650,656 **** } ! char buf[100]; ! portParameters.FillParametersStr(buf, sizeof(buf)/sizeof(buf[0])); Trace(" %s %s\n", phPortName, buf); --- 655,661 ---- } ! char buf[200]; ! portParameters.FillParametersStr(buf, sizeof(buf)/sizeof(buf[0]), detailPrms); Trace(" %s %s\n", phPortName, buf); *************** *** 905,908 **** --- 910,914 ---- "Options:\n" " --output <file> - file for output, default is console\n" + " --detail-prms - show detailed parameters\n" ); ConsoleWrite( *************** *** 980,983 **** --- 986,991 ---- return 1; + detailPrms = FALSE; + while (argc > 1) { if (*argv[1] != '-') *************** *** 990,994 **** argv += 2; argc -= 2; ! } else { ConsoleWrite("Invalid option %s\n", argv[1]); return 1; --- 998,1009 ---- argv += 2; argc -= 2; ! } ! else ! if (!strcmp(argv[1], "--detail-prms")) { ! detailPrms = TRUE; ! argv++; ! argc--; ! } ! else { ConsoleWrite("Invalid option %s\n", argv[1]); return 1; |
From: Vyacheslav F. <vf...@us...> - 2007-10-19 16:03:45
|
Update of /cvsroot/com0com/com0com/sys In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv593 Modified Files: adddev.c pinouts.c Log Message: Added default values Index: pinouts.c =================================================================== RCS file: /cvsroot/com0com/com0com/sys/pinouts.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** pinouts.c 17 Sep 2007 14:31:06 -0000 1.2 --- pinouts.c 19 Oct 2007 16:03:41 -0000 1.3 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.3 2007/10/19 16:03:41 vfrolov + * Added default values + * * Revision 1.2 2007/09/17 14:31:06 vfrolov * Implemented pseudo pin OPEN *************** *** 165,181 **** if (!pinCTS) ! pinCTS = C0C_PIN_RRTS; PinWire(pIoPort, pIoPortRemote, pinCTS, C0C_MSB_CTS, &pIoPort->modemStatus); if (!pinDSR) ! pinDSR = C0C_PIN_RDTR; PinWire(pIoPort, pIoPortRemote, pinDSR, C0C_MSB_DSR, &pIoPort->modemStatus); if (!pinDCD) ! pinDCD = C0C_PIN_RDTR; PinWire(pIoPort, pIoPortRemote, pinDCD, C0C_MSB_RLSD, &pIoPort->modemStatus); if (!pinRI) ! pinRI = C0C_PIN_ON|C0C_PIN_NEGATIVE; PinWire(pIoPort, pIoPortRemote, pinRI, C0C_MSB_RING, &pIoPort->modemStatus); } --- 168,184 ---- if (!pinCTS) ! pinCTS = C0C_DEFAULT_PIN_CTS; PinWire(pIoPort, pIoPortRemote, pinCTS, C0C_MSB_CTS, &pIoPort->modemStatus); if (!pinDSR) ! pinDSR = C0C_DEFAULT_PIN_DSR; PinWire(pIoPort, pIoPortRemote, pinDSR, C0C_MSB_DSR, &pIoPort->modemStatus); if (!pinDCD) ! pinDCD = C0C_DEFAULT_PIN_DCD; PinWire(pIoPort, pIoPortRemote, pinDCD, C0C_MSB_RLSD, &pIoPort->modemStatus); if (!pinRI) ! pinRI = C0C_DEFAULT_PIN_RI; PinWire(pIoPort, pIoPortRemote, pinRI, C0C_MSB_RING, &pIoPort->modemStatus); } Index: adddev.c =================================================================== RCS file: /cvsroot/com0com/com0com/sys/adddev.c,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** adddev.c 26 Sep 2007 10:12:13 -0000 1.30 --- adddev.c 19 Oct 2007 16:03:41 -0000 1.31 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.31 2007/10/19 16:03:41 vfrolov + * Added default values + * * Revision 1.30 2007/09/26 10:12:13 vfrolov * Added checks of DeviceExtension for zero *************** *** 252,256 **** } ! emuBR = emuOverrun = plugInMode = exclusiveMode = 0; pinCTS = pinDSR = pinDCD = pinRI = 0; --- 255,262 ---- } ! emuBR = C0C_DEFAULT_EMUBR; ! emuOverrun = C0C_DEFAULT_EMUOVERRUN; ! plugInMode = C0C_DEFAULT_PLUGINMODE; ! exclusiveMode = C0C_DEFAULT_EXCLUSIVEMODE; pinCTS = pinDSR = pinDCD = pinRI = 0; *************** *** 272,287 **** --- 278,297 ---- queryTable[i].Name = L"EmuBR"; queryTable[i].EntryContext = &emuBR; + queryTable[i].DefaultData = &emuBR; i++; queryTable[i].Name = L"EmuOverrun"; queryTable[i].EntryContext = &emuOverrun; + queryTable[i].DefaultData = &emuOverrun; i++; queryTable[i].Name = L"PlugInMode"; queryTable[i].EntryContext = &plugInMode; + queryTable[i].DefaultData = &plugInMode; i++; queryTable[i].Name = L"ExclusiveMode"; queryTable[i].EntryContext = &exclusiveMode; + queryTable[i].DefaultData = &exclusiveMode; i++; |
From: Vyacheslav F. <vf...@us...> - 2007-10-19 15:58:24
|
Update of /cvsroot/com0com/com0com/include In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv30974 Modified Files: com0com.h Log Message: Added default values Index: com0com.h =================================================================== RCS file: /cvsroot/com0com/com0com/include/com0com.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** com0com.h 17 Sep 2007 14:28:07 -0000 1.5 --- com0com.h 19 Oct 2007 15:58:18 -0000 1.6 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.6 2007/10/19 15:58:18 vfrolov + * Added default values + * * Revision 1.5 2007/09/17 14:28:07 vfrolov * Implemented pseudo pin OPEN *************** *** 65,67 **** --- 68,80 ---- #define C0C_PIN_NEGATIVE 0x80000000 + #define C0C_DEFAULT_PIN_CTS C0C_PIN_RRTS + #define C0C_DEFAULT_PIN_DSR C0C_PIN_RDTR + #define C0C_DEFAULT_PIN_DCD C0C_PIN_RDTR + #define C0C_DEFAULT_PIN_RI (C0C_PIN_ON|C0C_PIN_NEGATIVE) + + #define C0C_DEFAULT_EMUBR 0x00000000 + #define C0C_DEFAULT_EMUOVERRUN 0x00000000 + #define C0C_DEFAULT_PLUGINMODE 0x00000000 + #define C0C_DEFAULT_EXCLUSIVEMODE 0x00000000 + #endif /* _INCLUDE_C0C_COM0COM_H_ */ |
From: Vyacheslav F. <vf...@us...> - 2007-10-15 13:49:09
|
Update of /cvsroot/com0com/com0com/setup In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv10230 Modified Files: setup.def setup.cpp Log Message: Added entry point MainA Index: setup.def =================================================================== RCS file: /cvsroot/com0com/com0com/setup/setup.def,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** setup.def 1 Oct 2007 15:03:19 -0000 1.2 --- setup.def 15 Oct 2007 13:49:04 -0000 1.3 *************** *** 2,4 **** --- 2,5 ---- EXPORTS + MainA RunDllA Index: setup.cpp =================================================================== RCS file: /cvsroot/com0com/com0com/setup/setup.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** setup.cpp 5 Oct 2007 07:28:26 -0000 1.19 --- setup.cpp 15 Oct 2007 13:49:04 -0000 1.20 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.20 2007/10/15 13:49:04 vfrolov + * Added entry point MainA + * * Revision 1.19 2007/10/05 07:28:26 vfrolov * Added listing pairs w/o PortNum *************** *** 887,891 **** } /////////////////////////////////////////////////////////////// ! int Help(const char *pCmdPref) { SetTitle(C0C_SETUP_TITLE " (HELP)"); --- 890,894 ---- } /////////////////////////////////////////////////////////////// ! int Help(const char *pProgName) { SetTitle(C0C_SETUP_TITLE " (HELP)"); *************** *** 896,901 **** ConsoleWrite( "Usage:\n" ! " %s [options] <command>\n" ! , pCmdPref); ConsoleWrite( "\n" --- 899,904 ---- ConsoleWrite( "Usage:\n" ! " %s%s[options] <command>\n" ! , pProgName, (pProgName && *pProgName) ? " " : ""); ConsoleWrite( "\n" *************** *** 943,969 **** ); ConsoleWrite( ! " %sinstall - -\n" ! , pCmdPref); ConsoleWrite( ! " %sinstall 5 * *\n" ! , pCmdPref); ConsoleWrite( ! " %sremove 0\n" ! , pCmdPref); ConsoleWrite( ! " %sinstall PortName=COM2 PortName=COM4\n" ! , pCmdPref); ConsoleWrite( ! " %sinstall PortName=COM5,EmuBR=yes,EmuOverrun=yes -\n" ! , pCmdPref); ConsoleWrite( ! " %schange " C0C_PREF_PORT_NAME_A "0 EmuBR=yes,EmuOverrun=yes\n" ! , pCmdPref); ConsoleWrite( ! " %slist\n" ! , pCmdPref); ConsoleWrite( ! " %suninstall\n" ! , pCmdPref); ConsoleWrite( "\n"); --- 946,972 ---- ); ConsoleWrite( ! " %s%sinstall - -\n" ! , pProgName, (pProgName && *pProgName) ? " " : ""); ConsoleWrite( ! " %s%sinstall 5 * *\n" ! , pProgName, (pProgName && *pProgName) ? " " : ""); ConsoleWrite( ! " %s%sremove 0\n" ! , pProgName, (pProgName && *pProgName) ? " " : ""); ConsoleWrite( ! " %s%sinstall PortName=COM2 PortName=COM4\n" ! , pProgName, (pProgName && *pProgName) ? " " : ""); ConsoleWrite( ! " %s%sinstall PortName=COM5,EmuBR=yes,EmuOverrun=yes -\n" ! , pProgName, (pProgName && *pProgName) ? " " : ""); ConsoleWrite( ! " %s%schange " C0C_PREF_PORT_NAME_A "0 EmuBR=yes,EmuOverrun=yes\n" ! , pProgName, (pProgName && *pProgName) ? " " : ""); ConsoleWrite( ! " %s%slist\n" ! , pProgName, (pProgName && *pProgName) ? " " : ""); ConsoleWrite( ! " %s%suninstall\n" ! , pProgName, (pProgName && *pProgName) ? " " : ""); ConsoleWrite( "\n"); *************** *** 1092,1096 **** } /////////////////////////////////////////////////////////////// ! int CALLBACK RunDllA(HWND /*hWnd*/, HINSTANCE /*hInst*/, LPSTR pCmdLine, int /*nCmdShow*/) { SetTitle(C0C_SETUP_TITLE); --- 1095,1099 ---- } /////////////////////////////////////////////////////////////// ! int CALLBACK MainA(const char *pProgName, const char *pCmdLine) { SetTitle(C0C_SETUP_TITLE); *************** *** 1124,1133 **** } ! argv[0] = "rundll32 setup,RunDll "; ! int res = Main(argc, argv); ! if (!GetOutputFile()) ! ConsoleWriteRead(cmd, sizeof(cmd)/sizeof(cmd[0]), "\nPress <RETURN> to continue\n"); return res; --- 1127,1144 ---- } ! argv[0] = pProgName; ! return Main(argc, argv); ! } ! /////////////////////////////////////////////////////////////// ! int CALLBACK RunDllA(HWND /*hWnd*/, HINSTANCE /*hInst*/, LPSTR pCmdLine, int /*nCmdShow*/) ! { ! int res = MainA("rundll32 setup,RunDll", pCmdLine); ! if (!GetOutputFile()) { ! char buf[10]; ! ! ConsoleWriteRead(buf, sizeof(buf)/sizeof(buf[0]), "\nPress <RETURN> to continue\n"); ! } return res; |