com0com-cvs Mailing List for Null-modem emulator (Page 7)
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...> - 2009-08-04 11:36:58
|
Update of /cvsroot/com0com/hub4com/plugins/tcp In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv22874 Modified Files: comio.cpp comio.h comport.cpp comport.h port.cpp Log Message: Implemented priority and reject modifiers for <listen port> Index: comport.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/tcp/comport.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** comport.cpp 31 Jul 2009 11:40:04 -0000 1.16 --- comport.cpp 4 Aug 2009 11:36:49 -0000 1.17 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.17 2009/08/04 11:36:49 vfrolov + * Implemented priority and reject modifiers for <listen port> + * * Revision 1.16 2009/07/31 11:40:04 vfrolov * Fixed pending acception of incoming connections *************** *** 86,89 **** --- 89,99 ---- } + void Listener::Push(ComPort *pPort) + { + _ASSERTE(pPort != NULL); + + ports.push(pPort); + } + BOOL Listener::Start() { *************** *** 119,130 **** if (e == FD_ACCEPT) { ! if (!empty()) { ! ComPort *pPort = front(); _ASSERTE(pPort != NULL); - pop(); ! pPort->Accept(); } else { ! cout << "OnEvent(" << hex << hSockListen << dec << ", FD_ACCEPT) - pending" << endl; } } --- 129,140 ---- if (e == FD_ACCEPT) { ! if (!ports.empty()) { ! ComPort *pPort = ports.top().Ptr(); _ASSERTE(pPort != NULL); ! if (pPort->Accept()) ! ports.pop(); } else { ! PortTcp::Accept("Listener", hSockListen, CF_DEFER); } } *************** *** 133,139 **** } ! SOCKET Listener::Accept() { ! return PortTcp::Accept(hSockListen); } /////////////////////////////////////////////////////////////// --- 143,169 ---- } ! void Listener::OnDisconnect(ComPort *pPort) { ! Push(pPort); ! ! _ASSERTE(!ports.empty()); ! ! for (;;) { ! ComPort *pPort = ports.top().Ptr(); ! _ASSERTE(pPort != NULL); ! ! if (!pPort->Accept()) ! break; ! ! ports.pop(); ! ! if (ports.empty()) ! break; ! } ! } ! ! SOCKET Listener::Accept(const ComPort &port, int cmd) ! { ! return PortTcp::Accept(port.Name().c_str(), hSockListen, cmd); } /////////////////////////////////////////////////////////////// *************** *** 143,150 **** --- 173,183 ---- const char *pPath) : pListener(NULL), + rejectZeroConnectionCounter(FALSE), + priority(0), hSock(INVALID_SOCKET), isConnected(FALSE), isDisconnected(FALSE), connectionCounter(0), + permanent(FALSE), reconnectTime(-1), hReconnectTimer(NULL), *************** *** 164,175 **** writeQueueLimitSendXon = writeQueueLimit/3; ! string path; ! if (*pPath == '*') { ! path = pPath + 1; ! permanent = TRUE; ! } else { ! path = pPath; ! permanent = FALSE; } --- 197,212 ---- writeQueueLimitSendXon = writeQueueLimit/3; ! string path(pPath); ! for ( ;; path = path.substr(1)) { ! switch (path[0]) { ! case '*': ! permanent = TRUE; ! continue; ! case '!': ! rejectZeroConnectionCounter = TRUE; ! continue; ! } ! break; } *************** *** 193,197 **** } } else { ! isValid = SetAddr(snLocal, comParams.GetIF(), path.c_str()); if (isValid) { --- 230,256 ---- } } else { ! iDelim = path.find('/'); ! ! if (iDelim != path.npos) { ! istringstream buf(path.substr(iDelim + 1)); ! path = path.substr(0, iDelim); ! ! buf >> priority; ! ! if (buf.fail()) ! isValid = FALSE; ! ! string rest; ! buf >> rest; ! ! if (!rest.empty()) ! isValid = FALSE; ! ! if (!isValid) ! cerr << "ERROR: Invalid priority in " << pPath << endl; ! } ! ! if (isValid) ! isValid = SetAddr(snLocal, comParams.GetIF(), path.c_str()); if (isValid) { *************** *** 211,215 **** if (pListener) ! pListener->push(this); else isValid = FALSE; --- 270,274 ---- if (pListener) ! pListener->Push(this); else isValid = FALSE; *************** *** 308,318 **** return; ! if (!StartWaitEvent(hSock) || !Connect(hSock, snRemote)) { ! Close(hSock); hSock = INVALID_SOCKET; } } ! void ComPort::Accept() { _ASSERTE(pListener); --- 367,377 ---- return; ! if (!StartWaitEvent(hSock) || !Connect(name.c_str(), hSock, snRemote)) { ! Close(name.c_str(), hSock); hSock = INVALID_SOCKET; } } ! BOOL ComPort::Accept() { _ASSERTE(pListener); *************** *** 320,337 **** for (;;) { ! hSock = pListener->Accept(); ! if (hSock == INVALID_SOCKET) { ! pListener->push(this); break; - } if (StartWaitEvent(hSock)) { OnConnect(); ! break; } ! Close(hSock); } } --- 379,397 ---- for (;;) { ! hSock = pListener->Accept(*this, ! (rejectZeroConnectionCounter && connectionCounter <= 0) ? CF_REJECT : CF_ACCEPT); ! if (hSock == INVALID_SOCKET) break; if (StartWaitEvent(hSock)) { OnConnect(); ! return TRUE; } ! Close(name.c_str(), hSock); } + + return FALSE; } *************** *** 444,448 **** if (hSock != INVALID_SOCKET && !permanent && connectionCounter <= 0) ! PortTcp::Disconnect(hSock); } break; --- 504,508 ---- if (hSock != INVALID_SOCKET && !permanent && connectionCounter <= 0) ! PortTcp::Disconnect(name.c_str(), hSock); } break; *************** *** 549,553 **** void ComPort::OnDisconnect() { ! Close(hSock); hSock = INVALID_SOCKET; --- 609,613 ---- void ComPort::OnDisconnect() { ! Close(name.c_str(), hSock); hSock = INVALID_SOCKET; *************** *** 576,580 **** if (pListener) { ! Accept(); } else --- 636,640 ---- if (pListener) { ! pListener->OnDisconnect(this); } else Index: comport.h =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/tcp/comport.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** comport.h 23 Jan 2009 16:55:05 -0000 1.9 --- comport.h 4 Aug 2009 11:36:49 -0000 1.10 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.10 2009/08/04 11:36:49 vfrolov + * Implemented priority and reject modifiers for <listen port> + * * Revision 1.9 2009/01/23 16:55:05 vfrolov * Utilized timer routines *************** *** 60,79 **** class ComPort; /////////////////////////////////////////////////////////////// ! class Listener : public queue<ComPort *> { public: Listener(const struct sockaddr_in &_snLocal); ! BOOL IsEqual(const struct sockaddr_in &_snLocal) { return memcmp(&snLocal, &_snLocal, sizeof(snLocal)) == 0; } BOOL Start(); BOOL OnEvent(ListenOverlapped *pOverlapped, long e, int err); ! SOCKET Accept(); private: struct sockaddr_in snLocal; SOCKET hSockListen; }; /////////////////////////////////////////////////////////////// --- 63,96 ---- class ComPort; /////////////////////////////////////////////////////////////// ! class ComPortPtr ! { ! public: ! ComPortPtr(ComPort *_pPort = NULL) : pPort(_pPort) {} ! ComPort *Ptr() const { return pPort; } ! bool ComPortPtr::operator<(const ComPortPtr &p) const; ! ! private: ! ComPort *pPort; ! }; ! /////////////////////////////////////////////////////////////// ! class Listener { public: Listener(const struct sockaddr_in &_snLocal); ! BOOL IsEqual(const struct sockaddr_in &_snLocal) const { return memcmp(&snLocal, &_snLocal, sizeof(snLocal)) == 0; } + void Push(ComPort *pPort); BOOL Start(); BOOL OnEvent(ListenOverlapped *pOverlapped, long e, int err); ! void OnDisconnect(ComPort *pPort); ! SOCKET Accept(const ComPort &port, int cmd); private: struct sockaddr_in snLocal; SOCKET hSockListen; + priority_queue<ComPortPtr> ports; }; /////////////////////////////////////////////////////////////// *************** *** 86,89 **** --- 103,108 ---- const char *pPath); + bool operator<(const ComPort &p) const { return priority < p.priority; } + BOOL Init(HMASTERPORT _hMasterPort); BOOL Start(); *************** *** 94,98 **** BOOL OnEvent(WaitEventOverlapped *pOverlapped, long e); void LostReport(); ! void Accept(); const string &Name() const { return name; } --- 113,117 ---- BOOL OnEvent(WaitEventOverlapped *pOverlapped, long e); void LostReport(); ! BOOL Accept(); const string &Name() const { return name; } *************** *** 112,115 **** --- 131,136 ---- struct sockaddr_in snRemote; Listener *pListener; + BOOL rejectZeroConnectionCounter; + int priority; BOOL isValid; *************** *** 143,146 **** --- 164,172 ---- }; /////////////////////////////////////////////////////////////// + inline bool ComPortPtr::operator<(const ComPortPtr &p) const + { + return *pPort < *p.pPort; + } + /////////////////////////////////////////////////////////////// #endif // _COMPORT_H Index: comio.h =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/tcp/comio.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** comio.h 1 Dec 2008 17:09:34 -0000 1.5 --- comio.h 4 Aug 2009 11:36:49 -0000 1.6 *************** *** 2,6 **** * $Id$ * ! * Copyright (c) 2008 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify --- 2,6 ---- * $Id$ * ! * Copyright (c) 2008-2009 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.6 2009/08/04 11:36:49 vfrolov + * Implemented priority and reject modifiers for <listen port> + * * Revision 1.5 2008/12/01 17:09:34 vfrolov * Improved write buffering *************** *** 46,54 **** extern BOOL SetAddr(struct sockaddr_in &sn, const char *pAddr, const char *pPort); extern SOCKET Socket(const struct sockaddr_in &sn); ! extern BOOL Connect(SOCKET hSock, const struct sockaddr_in &snRemote); extern BOOL Listen(SOCKET hSock); ! extern SOCKET Accept(SOCKET hSockListen); ! extern void Disconnect(SOCKET hSock); ! extern void Close(SOCKET hSock); /////////////////////////////////////////////////////////////// class ReadOverlapped : private OVERLAPPED --- 49,57 ---- extern BOOL SetAddr(struct sockaddr_in &sn, const char *pAddr, const char *pPort); extern SOCKET Socket(const struct sockaddr_in &sn); ! extern BOOL Connect(const char *pName, SOCKET hSock, const struct sockaddr_in &snRemote); extern BOOL Listen(SOCKET hSock); ! extern SOCKET Accept(const char *pName, SOCKET hSockListen, int cmd); ! extern void Disconnect(const char *pName, SOCKET hSock); ! extern void Close(const char *pName, SOCKET hSock); /////////////////////////////////////////////////////////////// class ReadOverlapped : private OVERLAPPED Index: port.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/tcp/port.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** port.cpp 6 Mar 2009 07:56:28 -0000 1.13 --- port.cpp 4 Aug 2009 11:36:49 -0000 1.14 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.14 2009/08/04 11:36:49 vfrolov + * Implemented priority and reject modifiers for <listen port> + * * Revision 1.13 2009/03/06 07:56:28 vfrolov * Fixed assertion with non ascii chars *************** *** 104,111 **** << " " << pProgPath << " ... [--use-driver=" << GetPluginAbout()->pName << "] [*]<host addr>:<host port> ..." << endl << "Usage (server mode):" << endl ! << " " << pProgPath << " ... [--use-driver=" << GetPluginAbout()->pName << "] [*]<listen port> ..." << endl << endl ! << " The sign * above means that connection shold be permanent as it's possible." << endl << " In client mode it will force connection to remote host on start." << endl << endl << "Options:" << endl --- 107,118 ---- << " " << pProgPath << " ... [--use-driver=" << GetPluginAbout()->pName << "] [*]<host addr>:<host port> ..." << endl << "Usage (server mode):" << endl ! << " " << pProgPath << " ... [--use-driver=" << GetPluginAbout()->pName << "] [*][!]<listen port>[/<priority>] ..." << endl << endl ! << " The sign * above means that connection should be permanent as it's possible." << endl << " In client mode it will force connection to remote host on start." << endl + << " The sign ! above means that connection to <listen port> should be rejected if" << endl + << " the connection counter is 0." << endl + << " The <priority> above is an integer (default is 0). The port will be used only" << endl + << " if all ports with the same <listen port> and higher <priority> are busy." << endl << endl << "Options:" << endl *************** *** 138,153 **** << endl << "Examples:" << endl ! << " " << pProgPath << " --use-driver=" << GetPluginAbout()->pName << " 1111 222.22.22.22:2222" << endl << " - listen TCP port 1111 and on incoming connection connect to" << endl << " 222.22.22.22:2222, receive data from 1111 and send it to" << endl << " 222.22.22.22:2222, receive data from 222.22.22.22:2222 and send it to" << endl << " 1111, on disconnecting any connection disconnect paired connection." << endl ! << " " << pProgPath << " --use-driver=" << GetPluginAbout()->pName << " *111.11.11.11:1111 *222.22.22.22:2222" << endl << " - connect to 111.11.11.11:1111 and connect to 222.22.22.22:2222," << endl << " receive data from 111.11.11.11:1111 and send it to 222.22.22.22:2222," << endl << " receive data from 222.22.22.22:2222 and send it to 111.11.11.11:1111," << endl << " on disconnecting any connection reconnect it." << endl ! << " " << pProgPath << " --route=All:All --use-driver=" << GetPluginAbout()->pName << " *1111 *1111 *1111" << endl ! << " - up to 3 clients can connect to port 2222 and talk each others." << endl ; } --- 145,186 ---- << endl << "Examples:" << endl ! << " " << pProgPath << " --use-driver=tcp 1111 222.22.22.22:2222" << endl << " - listen TCP port 1111 and on incoming connection connect to" << endl << " 222.22.22.22:2222, receive data from 1111 and send it to" << endl << " 222.22.22.22:2222, receive data from 222.22.22.22:2222 and send it to" << endl << " 1111, on disconnecting any connection disconnect paired connection." << endl ! << " " << pProgPath << " --use-driver=tcp *111.11.11.11:1111 *222.22.22.22:2222" << endl << " - connect to 111.11.11.11:1111 and connect to 222.22.22.22:2222," << endl << " receive data from 111.11.11.11:1111 and send it to 222.22.22.22:2222," << endl << " receive data from 222.22.22.22:2222 and send it to 111.11.11.11:1111," << endl << " on disconnecting any connection reconnect it." << endl ! << " " << pProgPath << " --route=All:All --use-driver=tcp *1111 *1111 *1111" << endl ! << " - up to 3 clients can connect to port 1111 and talk each others." << endl ! << " " << pProgPath << " --load=,,_END_" << endl ! << " COM1" << endl ! << " COM2" << endl ! << " --use-driver=tcp" << endl ! << " *1111" << endl ! << " --bi-route=0:2" << endl ! << " *1111" << endl ! << " --bi-route=1:3" << endl ! << " !1111/-1" << endl ! << " _END_" << endl ! << " - up to 2 clients can connect to COM1 or COM2 via port 1111." << endl ! << " The third client will be rejected." << endl ! << " " << pProgPath << " --load=,,_END_" << endl ! << " COM1" << endl ! << " COM2" << endl ! << " --use-driver=tcp" << endl ! << " *1111" << endl ! << " --bi-route=0:2" << endl ! << " *1111" << endl ! << " --bi-route=1:3" << endl ! << " 1111/-1" << endl ! << " --bi-route=5:4" << endl ! << " 127.0.0.1:2222" << endl ! << " _END_" << endl ! << " - up to 2 clients can connect to COM1 or COM2 via port 1111." << endl ! << " The third client will be routed to 127.0.0.1:2222." << endl ; } Index: comio.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/tcp/comio.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** comio.cpp 5 Dec 2008 14:20:55 -0000 1.8 --- comio.cpp 4 Aug 2009 11:36:49 -0000 1.9 *************** *** 2,6 **** * $Id$ * ! * Copyright (c) 2008 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify --- 2,6 ---- * $Id$ * ! * Copyright (c) 2008-2009 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.9 2009/08/04 11:36:49 vfrolov + * Implemented priority and reject modifiers for <listen port> + * * Revision 1.8 2008/12/05 14:20:55 vfrolov * Fixed race conditions *************** *** 123,127 **** } /////////////////////////////////////////////////////////////// ! BOOL Connect(SOCKET hSock, const struct sockaddr_in &snRemote) { if (connect(hSock, (struct sockaddr *)&snRemote, sizeof(snRemote)) == SOCKET_ERROR) { --- 126,130 ---- } /////////////////////////////////////////////////////////////// ! BOOL Connect(const char *pName, SOCKET hSock, const struct sockaddr_in &snRemote) { if (connect(hSock, (struct sockaddr *)&snRemote, sizeof(snRemote)) == SOCKET_ERROR) { *************** *** 129,133 **** if (err != WSAEWOULDBLOCK) { ! TraceError(err, "Connect(%x): connect()", hSock); return FALSE; } --- 132,136 ---- if (err != WSAEWOULDBLOCK) { ! TraceError(err, "Connect(%x): connect() %s", hSock, pName); return FALSE; } *************** *** 137,141 **** u_short port = ntohs(snRemote.sin_port); ! cout << "Connect(" << hex << hSock << dec << ", " << ((addr >> 24) & 0xFF) << '.' << ((addr >> 16) & 0xFF) << '.' --- 140,144 ---- u_short port = ntohs(snRemote.sin_port); ! cout << pName << ": Connect(" << hex << hSock << dec << ", " << ((addr >> 24) & 0xFF) << '.' << ((addr >> 16) & 0xFF) << '.' *************** *** 161,204 **** } /////////////////////////////////////////////////////////////// ! SOCKET Accept(SOCKET hSockListen) ! { struct sockaddr_in sn; ! int snlen = sizeof(sn); ! SOCKET hSock = accept(hSockListen, (struct sockaddr *)&sn, &snlen); ! if (hSock == INVALID_SOCKET) { ! DWORD err = GetLastError(); ! if (err != WSAEWOULDBLOCK) ! TraceError(err, "Accept(%x): accept()", hSockListen); ! return INVALID_SOCKET; ! } ! u_long addr = ntohl(sn.sin_addr.s_addr); ! u_short port = ntohs(sn.sin_port); ! cout << "Accept(" << hex << hSockListen << dec << ") = " << hex << hSock << dec ! << " from " ! << ((addr >> 24) & 0xFF) << '.' ! << ((addr >> 16) & 0xFF) << '.' ! << ((addr >> 8) & 0xFF) << '.' ! << ( addr & 0xFF) << ':' ! << port ! << endl; ! return hSock; } /////////////////////////////////////////////////////////////// ! void Disconnect(SOCKET hSock) { if (shutdown(hSock, SD_BOTH) != 0) ! TraceError(GetLastError(), "Disconnect(%x): shutdown()", hSock); else ! cout << "Disconnect(" << hex << hSock << dec << ") - OK" << endl; } /////////////////////////////////////////////////////////////// ! void Close(SOCKET hSock) { if (hSock == INVALID_SOCKET) --- 164,265 ---- } /////////////////////////////////////////////////////////////// ! struct ConditionProcData { ! ConditionProcData(int _cmd) : cmd(_cmd) { ::memset(&sn, 0, sizeof(sn)); } ! ! void SetSN(char FAR* pBuf, u_long len) { ! if (pBuf != NULL && len != 0) { ! if (len > sizeof(sn)) ! len = sizeof(sn); ! ! ::memcpy(&sn, pBuf, len); ! } ! } ! ! int cmd; struct sockaddr_in sn; ! }; ! static int CALLBACK ConditionProc( ! IN LPWSABUF lpCallerId, ! IN LPWSABUF /*lpCallerData*/, ! IN OUT LPQOS /*lpSQOS*/, ! IN OUT LPQOS /*lpGQOS*/, ! IN LPWSABUF /*lpCalleeId*/, ! IN LPWSABUF /*lpCalleeData*/, ! OUT GROUP FAR * /*g*/, ! IN DWORD_PTR dwCallbackData) ! { ! ConditionProcData *pCpd = (ConditionProcData *)dwCallbackData; ! _ASSERTE(pCpd != NULL); ! if (lpCallerId) ! ((ConditionProcData *)dwCallbackData)->SetSN(lpCallerId->buf, lpCallerId->len); ! return ((ConditionProcData *)dwCallbackData)->cmd; ! } ! SOCKET Accept(const char *pName, SOCKET hSockListen, int cmd) ! { ! BOOL defered = FALSE; ! for (;;) { ! ConditionProcData cpd(cmd); ! SOCKET hSock = WSAAccept(hSockListen, NULL, NULL, ConditionProc, (DWORD_PTR)&cpd); ! ! stringstream buf; ! ! if (hSock != INVALID_SOCKET) { ! buf << hex << hSock << dec; ! } else { ! DWORD err = GetLastError(); ! ! switch (err) { ! case WSAEWOULDBLOCK: ! return INVALID_SOCKET; ! case WSAECONNREFUSED: ! buf << "rejected"; ! break; ! case WSATRY_AGAIN: ! defered = TRUE; ! buf << "defered"; ! break; ! case WSAECONNRESET: ! buf << "forcibly closed by the remote host"; ! break; ! default: ! TraceError(err, "Accept(%x): accept() %s", hSockListen, pName); ! return INVALID_SOCKET; ! } ! } ! ! string result = buf.str(); ! u_long addr = ntohl(cpd.sn.sin_addr.s_addr); ! u_short port = ntohs(cpd.sn.sin_port); ! ! cout << pName << ": Accept(" << hex << hSockListen << dec << ") = " << result ! << " from " ! << ((addr >> 24) & 0xFF) << '.' ! << ((addr >> 16) & 0xFF) << '.' ! << ((addr >> 8) & 0xFF) << '.' ! << ( addr & 0xFF) << ':' ! << port ! << endl; ! ! if (hSock != INVALID_SOCKET || defered) ! return hSock; ! } } /////////////////////////////////////////////////////////////// ! void Disconnect(const char *pName, SOCKET hSock) { if (shutdown(hSock, SD_BOTH) != 0) ! TraceError(GetLastError(), "Disconnect(%x): shutdown() %s", hSock, pName); else ! cout << pName << ": Disconnect(" << hex << hSock << dec << ") - OK" << endl; } /////////////////////////////////////////////////////////////// ! void Close(const char *pName, SOCKET hSock) { if (hSock == INVALID_SOCKET) *************** *** 206,212 **** if (closesocket(hSock) != 0) ! TraceError(GetLastError(), "Close(): closesocket(%x)", hSock); else ! cout << "Close(" << hex << hSock << dec << ") - OK" << endl; } /////////////////////////////////////////////////////////////// --- 267,273 ---- if (closesocket(hSock) != 0) ! TraceError(GetLastError(), "Close(): closesocket(%x) %s", hSock, pName); else ! cout << pName << ": Close(" << hex << hSock << dec << ") - OK" << endl; } /////////////////////////////////////////////////////////////// |
From: Vyacheslav F. <vf...@us...> - 2009-07-31 15:16:14
|
Update of /cvsroot/com0com/com0com In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv14059 Modified Files: ReadMe.txt Log Message: Added FAQ about Windows 9x Index: ReadMe.txt =================================================================== RCS file: /cvsroot/com0com/com0com/ReadMe.txt,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** ReadMe.txt 20 May 2009 13:54:10 -0000 1.22 --- ReadMe.txt 31 Jul 2009 12:35:19 -0000 1.23 *************** *** 101,104 **** --- 101,107 ---- ============= + Q. Is it possible to run com0com on Windows 9x platform? + A. No, it is not possible. You need Windows 2000 platform or newer. + Q. Is it possible to install or uninstall com0com silently (with no user intervention and no user interface)? |
From: Vyacheslav F. <vf...@us...> - 2009-07-31 12:33:42
|
Update of /cvsroot/com0com/com0com/sys In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv13766 Modified Files: version.h Log Message: Post-tagging version change Index: version.h =================================================================== RCS file: /cvsroot/com0com/com0com/sys/version.h,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** version.h 29 May 2009 13:50:11 -0000 1.18 --- version.h 31 Jul 2009 12:33:20 -0000 1.19 *************** *** 28,32 **** #define C0C_V2 2 #define C0C_V3 1 ! #define C0C_V4 0 #define MK_VERSION_STR1(V1, V2, V3, V4) #V1 "." #V2 "." #V3 "." #V4 --- 28,32 ---- #define C0C_V2 2 #define C0C_V3 1 ! #define C0C_V4 1 #define MK_VERSION_STR1(V1, V2, V3, V4) #V1 "." #V2 "." #V3 "." #V4 |
From: Vyacheslav F. <vf...@us...> - 2009-07-31 11:40:17
|
Update of /cvsroot/com0com/hub4com/plugins/tcp In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv7520 Modified Files: comport.cpp Log Message: Fixed pending acception of incoming connections Index: comport.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/tcp/comport.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** comport.cpp 17 Feb 2009 14:17:37 -0000 1.15 --- comport.cpp 31 Jul 2009 11:40:04 -0000 1.16 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.16 2009/07/31 11:40:04 vfrolov + * Fixed pending acception of incoming connections + * * Revision 1.15 2009/02/17 14:17:37 vfrolov * Redesigned timer's API *************** *** 122,125 **** --- 125,130 ---- pPort->Accept(); + } else { + cout << "OnEvent(" << hex << hSockListen << dec << ", FD_ACCEPT) - pending" << endl; } } *************** *** 314,331 **** _ASSERTE(hSock == INVALID_SOCKET); ! if (hSock != INVALID_SOCKET) ! return; ! hSock = pListener->Accept(); ! if (hSock != INVALID_SOCKET) { ! if (StartWaitEvent(hSock)) OnConnect(); ! else ! hSock = INVALID_SOCKET; ! } ! if (hSock == INVALID_SOCKET) ! pListener->push(this); } --- 319,337 ---- _ASSERTE(hSock == INVALID_SOCKET); ! for (;;) { ! hSock = pListener->Accept(); ! if (hSock == INVALID_SOCKET) { ! pListener->push(this); ! break; ! } ! if (StartWaitEvent(hSock)) { OnConnect(); ! break; ! } ! Close(hSock); ! } } *************** *** 570,574 **** if (pListener) { ! pListener->push(this); } else --- 576,580 ---- if (pListener) { ! Accept(); } else |
From: Vyacheslav F. <vf...@us...> - 2009-07-31 11:30:29
|
Update of /cvsroot/com0com/hub4com In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv6445 Modified Files: ReadMe.txt Log Message: Added FAQ about --octs=off option Index: ReadMe.txt =================================================================== RCS file: /cvsroot/com0com/hub4com/ReadMe.txt,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ReadMe.txt 12 Mar 2009 10:01:41 -0000 1.8 --- ReadMe.txt 31 Jul 2009 11:30:18 -0000 1.9 *************** *** 267,268 **** --- 267,276 ---- multiplexer --baud 115200 COM1 CNCB1 CNCB2 CNCB3 hub4com --load=my.txt,_BEGIN_,_END_ + + Q. We've been using and experimenting with hub4com and came to the conclusion + that if you use a real com port in it, the real com port won't receive + anything from the other loopback ports. Is there some trick to getting a + physical com port to accept data with hub4com? + A. By default hub4com use CTS handshaking on output so if CTS state is OFF + then no any data can be send to the port. To disable CTS handshaking add + --octs=off option before real com port. |
From: Vyacheslav F. <vf...@us...> - 2009-07-31 11:23:59
|
Update of /cvsroot/com0com/hub4com In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv5637 Modified Files: version.h Log Message: Post-tagging version change Index: version.h =================================================================== RCS file: /cvsroot/com0com/hub4com/version.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** version.h 12 Mar 2009 10:03:12 -0000 1.5 --- version.h 31 Jul 2009 11:23:43 -0000 1.6 *************** *** 28,32 **** #define H4C_V2 0 #define H4C_V3 0 ! #define H4C_V4 0 #define MK_VERSION_STR1(V1, V2, V3, V4) #V1 "." #V2 "." #V3 "." #V4 --- 28,32 ---- #define H4C_V2 0 #define H4C_V3 0 ! #define H4C_V4 1 #define MK_VERSION_STR1(V1, V2, V3, V4) #V1 "." #V2 "." #V3 "." #V4 |
From: Vyacheslav F. <vf...@us...> - 2009-05-29 14:16:41
|
Update of /cvsroot/com0com/com0com/sys In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv5035 Modified Files: version.h Log Message: Pre-tagging version change Index: version.h =================================================================== RCS file: /cvsroot/com0com/com0com/sys/version.h,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** version.h 15 Dec 2008 10:50:25 -0000 1.17 --- version.h 29 May 2009 13:50:11 -0000 1.18 *************** *** 2,6 **** * $Id$ * ! * Copyright (c) 2005-2008 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify --- 2,6 ---- * $Id$ * ! * Copyright (c) 2005-2009 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify *************** *** 23,32 **** #define _C0C_VERSION_H_ ! #define C0C_COPYRIGHT_YEARS "2004-2008" #define C0C_V1 2 #define C0C_V2 2 ! #define C0C_V3 0 ! #define C0C_V4 1 #define MK_VERSION_STR1(V1, V2, V3, V4) #V1 "." #V2 "." #V3 "." #V4 --- 23,32 ---- #define _C0C_VERSION_H_ ! #define C0C_COPYRIGHT_YEARS "2004-2009" #define C0C_V1 2 #define C0C_V2 2 ! #define C0C_V3 1 ! #define C0C_V4 0 #define MK_VERSION_STR1(V1, V2, V3, V4) #V1 "." #V2 "." #V3 "." #V4 |
From: Vyacheslav F. <vf...@us...> - 2009-05-22 14:25:43
|
Update of /cvsroot/com0com/com0com/sys In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv11384 Modified Files: trace.h trace.c Log Message: Optimized for trace disabled mode Index: trace.c =================================================================== RCS file: /cvsroot/com0com/com0com/sys/trace.c,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** trace.c 20 May 2009 13:35:36 -0000 1.33 --- trace.c 22 May 2009 14:25:39 -0000 1.34 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.34 2009/05/22 14:25:39 vfrolov + * Optimized for trace disabled mode + * * Revision 1.33 2009/05/20 13:35:36 vfrolov * United closely IRP function name printing code *************** *** 192,201 **** } TRACE_DATA, *PTRACE_DATA; /********************************************************************/ ! static PTRACE_DATA pTraceData = NULL; static PDRIVER_OBJECT pDrvObj; /********************************************************************/ - #define TRACE_FILE_OK (pTraceData != NULL) - /********************************************************************/ - VOID QueryRegistryTrace(IN PUNICODE_STRING pRegistryPath) { --- 195,201 ---- } TRACE_DATA, *PTRACE_DATA; /********************************************************************/ ! PTRACE_DATA pTraceData = NULL; static PDRIVER_OBJECT pDrvObj; /********************************************************************/ VOID QueryRegistryTrace(IN PUNICODE_STRING pRegistryPath) { *************** *** 1138,1141 **** --- 1138,1143 ---- va_list va; + HALT_UNLESS(TRACE_FILE_OK); + pBuf = AllocTraceBuf(); if (!pBuf) *************** *** 1225,1233 **** } ! VOID Trace0( IN PC0C_COMMON_EXTENSION pDevExt, IN PWCHAR pStr) { ! if (!TRACE_FILE_OK || !pStr) return; --- 1227,1235 ---- } ! VOID InternalTrace0( IN PC0C_COMMON_EXTENSION pDevExt, IN PWCHAR pStr) { ! if (!pStr) return; *************** *** 1235,1244 **** } ! VOID Trace00( IN PC0C_COMMON_EXTENSION pDevExt, IN PWCHAR pStr1, IN PWCHAR pStr2) { ! if (!TRACE_FILE_OK || !pStr1 || !pStr2) return; --- 1237,1246 ---- } ! VOID InternalTrace00( IN PC0C_COMMON_EXTENSION pDevExt, IN PWCHAR pStr1, IN PWCHAR pStr2) { ! if (!pStr1 || !pStr2) return; *************** *** 1246,1250 **** } ! VOID TraceCode( IN PC0C_COMMON_EXTENSION pDevExt, IN PCHAR pHead, --- 1248,1252 ---- } ! VOID InternalTraceCode( IN PC0C_COMMON_EXTENSION pDevExt, IN PCHAR pHead, *************** *** 1257,1262 **** SIZE_T size; ! if (!TRACE_FILE_OK) ! return; pBuf = AllocTraceBuf(); --- 1259,1263 ---- SIZE_T size; ! HALT_UNLESS(TRACE_FILE_OK); pBuf = AllocTraceBuf(); *************** *** 1278,1282 **** } ! VOID TraceMask( IN PC0C_COMMON_EXTENSION pDevExt, IN PCHAR pHead, --- 1279,1283 ---- } ! VOID InternalTraceMask( IN PC0C_COMMON_EXTENSION pDevExt, IN PCHAR pHead, *************** *** 1288,1293 **** SIZE_T size; ! if (!TRACE_FILE_OK) ! return; pBuf = AllocTraceBuf(); --- 1289,1293 ---- SIZE_T size; ! HALT_UNLESS(TRACE_FILE_OK); pBuf = AllocTraceBuf(); *************** *** 1304,1311 **** } ! VOID TraceModemStatus(IN PC0C_IO_PORT pIoPort) { ! if (!TRACE_FILE_OK) ! return; if (!pTraceData->traceEnable.modemStatus) --- 1304,1310 ---- } ! VOID InternalTraceModemStatus(IN PC0C_IO_PORT pIoPort) { ! HALT_UNLESS(TRACE_FILE_OK); if (!pTraceData->traceEnable.modemStatus) *************** *** 1319,1323 **** } ! VOID TraceIrp( IN PCHAR pHead, IN PIRP pIrp, --- 1318,1322 ---- } ! VOID InternalTraceIrp( IN PCHAR pHead, IN PIRP pIrp, *************** *** 1335,1340 **** ULONG enableMask; ! if (!TRACE_FILE_OK) ! return; pIrpStack = IoGetCurrentIrpStackLocation(pIrp); --- 1334,1338 ---- ULONG enableMask; ! HALT_UNLESS(TRACE_FILE_OK); pIrpStack = IoGetCurrentIrpStackLocation(pIrp); Index: trace.h =================================================================== RCS file: /cvsroot/com0com/com0com/sys/trace.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** trace.h 2 Dec 2008 16:10:09 -0000 1.13 --- trace.h 22 May 2009 14:25:39 -0000 1.14 *************** *** 2,6 **** * $Id$ * ! * Copyright (c) 2004-2008 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify --- 2,6 ---- * $Id$ * ! * Copyright (c) 2004-2009 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.14 2009/05/22 14:25:39 vfrolov + * Optimized for trace disabled mode + * * Revision 1.13 2008/12/02 16:10:09 vfrolov * Separated tracing and debuging *************** *** 81,84 **** --- 84,90 ---- } FIELD2NAME, *PFIELD2NAME; + extern struct _TRACE_DATA *pTraceData; + #define TRACE_FILE_OK (pTraceData != NULL) + VOID TraceOpen( IN PDRIVER_OBJECT _pDrvObj, *************** *** 87,100 **** VOID TraceClose(); ! VOID Trace0( IN PC0C_COMMON_EXTENSION pDevExt, IN PWCHAR pStr); ! VOID Trace00( IN PC0C_COMMON_EXTENSION pDevExt, IN PWCHAR pStr1, IN PWCHAR pStr2); ! VOID TraceCode( IN PC0C_COMMON_EXTENSION pDevExt, IN PCHAR pHead, --- 93,106 ---- VOID TraceClose(); ! VOID InternalTrace0( IN PC0C_COMMON_EXTENSION pDevExt, IN PWCHAR pStr); ! VOID InternalTrace00( IN PC0C_COMMON_EXTENSION pDevExt, IN PWCHAR pStr1, IN PWCHAR pStr2); ! VOID InternalTraceCode( IN PC0C_COMMON_EXTENSION pDevExt, IN PCHAR pHead, *************** *** 103,107 **** IN PNTSTATUS pStatus); ! VOID TraceMask( IN PC0C_COMMON_EXTENSION pDevExt, IN PCHAR pHead, --- 109,113 ---- IN PNTSTATUS pStatus); ! VOID InternalTraceMask( IN PC0C_COMMON_EXTENSION pDevExt, IN PCHAR pHead, *************** *** 109,115 **** IN ULONG mask); ! VOID TraceModemStatus(IN PC0C_IO_PORT pIoPort); ! VOID TraceIrp( IN PCHAR pHead, IN PIRP pIrp, --- 115,121 ---- IN ULONG mask); ! VOID InternalTraceModemStatus(IN PC0C_IO_PORT pIoPort); ! VOID InternalTraceIrp( IN PCHAR pHead, IN PIRP pIrp, *************** *** 117,120 **** --- 123,133 ---- IN ULONG flags); + #define Trace0(a1, a2) if (TRACE_FILE_OK) InternalTrace0(a1, a2); else + #define Trace00(a1, a2, a3) if (TRACE_FILE_OK) InternalTrace00(a1, a2, a3); else + #define TraceCode(a1, a2, a3, a4, a5) if (TRACE_FILE_OK) InternalTraceCode(a1, a2, a3, a4, a5); else + #define TraceMask(a1, a2, a3, a4) if (TRACE_FILE_OK) InternalTraceMask(a1, a2, a3, a4); else + #define TraceModemStatus(a1) if (TRACE_FILE_OK) InternalTraceModemStatus(a1); else + #define TraceIrp(a1, a2, a3, a4) if (TRACE_FILE_OK) InternalTraceIrp(a1, a2, a3, a4); else + CODE2NAME codeNameTableWaitMask[]; CODE2NAME codeNameTablePurgeMask[]; |
From: Vyacheslav F. <vf...@us...> - 2009-05-22 11:49:13
|
Update of /cvsroot/com0com/com0com/setupg In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv25726 Modified Files: Form1.resx Log Message: Added more tips about port name Index: Form1.resx =================================================================== RCS file: /cvsroot/com0com/com0com/setupg/Form1.resx,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Form1.resx 4 May 2008 09:56:47 -0000 1.5 --- Form1.resx 22 May 2009 11:49:06 -0000 1.6 *************** *** 137,141 **** </metadata> <data name="PortNameB.ToolTip" xml:space="preserve"> ! <value>Port name.</value> </data> <data name=">>PortNameB.Name" xml:space="preserve"> --- 137,144 ---- </metadata> <data name="PortNameB.ToolTip" xml:space="preserve"> ! <value>Port name. ! Enter '-' to reset the name to the default. ! The name is red if it's already in use by ! other device.</value> </data> <data name=">>PortNameB.Name" xml:space="preserve"> *************** *** 161,165 **** </data> <data name="PortNameA.ToolTip" xml:space="preserve"> ! <value>Port name.</value> </data> <data name=">>PortNameA.Name" xml:space="preserve"> --- 164,171 ---- </data> <data name="PortNameA.ToolTip" xml:space="preserve"> ! <value>Port name. ! Enter '-' to reset the name to the default. ! The name is red if it's already in use by ! other device.</value> </data> <data name=">>PortNameA.Name" xml:space="preserve"> |
From: Vyacheslav F. <vf...@us...> - 2009-05-22 11:33:17
|
Update of /cvsroot/com0com/com0com/NSIS In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv23768 Modified Files: install.nsi Log Message: Added URLInfoAbout, InstallLocation, InstallSource, Language, Version and EstimatedSize to the registry Added Windows version check Index: install.nsi =================================================================== RCS file: /cvsroot/com0com/com0com/NSIS/install.nsi,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** install.nsi 21 May 2009 15:39:34 -0000 1.16 --- install.nsi 22 May 2009 11:32:52 -0000 1.17 *************** *** 20,23 **** --- 20,28 ---- * * $Log$ + * Revision 1.17 2009/05/22 11:32:52 vfrolov + * Added URLInfoAbout, InstallLocation, InstallSource, Language, Version + * and EstimatedSize to the registry + * Added Windows version check + * * Revision 1.16 2009/05/21 15:39:34 vfrolov * Added DisplayIcon, DisplayVersion, VersionMajor, VersionMinor *************** *** 83,89 **** --- 88,96 ---- !include "MUI2.nsh" + !include "WinVer.nsh" !include "x64.nsh" !include WordFunc.nsh !insertmacro VersionCompare + !include "FileFunc.nsh" ;-------------------------------- *************** *** 271,276 **** --- 278,287 ---- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\com0com" "HelpLink" "http://com0com.sourceforge.net/" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\com0com" "URLUpdateInfo" "http://com0com.sourceforge.net/" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\com0com" "URLInfoAbout" "http://com0com.sourceforge.net/" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\com0com" "Readme" "$INSTDIR\ReadMe.txt" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\com0com" "DisplayIcon" "$INSTDIR\setupg.exe" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\com0com" "InstallLocation" "$INSTDIR\" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\com0com" "InstallSource" "$EXEDIR\" + WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\com0com" "Language" $LANGUAGE GetDLLVersionLocal "..\${TARGET_CPU}\com0com.sys" $R0 $R1 *************** *** 279,287 **** --- 290,323 ---- IntOp $R4 $R1 / 0x00010000 IntOp $R5 $R1 & 0x0000FFFF + IntOp $R5 $R1 & 0x0000FFFF + IntOp $R6 $R2 * 0x00000100 + IntOp $R6 $R6 | $R3 + IntOp $R6 $R6 * 0x00000100 + IntOp $R6 $R6 | $R4 + IntOp $R6 $R6 * 0x00000100 + IntOp $R6 $R6 | $R5 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\com0com" "DisplayVersion" "$R2.$R3.$R4.$R5" + WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\com0com" "Version" $R6 WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\com0com" "VersionMajor" $R2 WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\com0com" "VersionMinor" $R3 + ${GetSize} "$INSTDIR" "/M=ReadMe.txt /S=0B /G=0" $R0 $R1 $R2 + ${GetSize} "$INSTDIR" "/M=com0com.inf /S=0B /G=0" $R3 $R1 $R2 + IntOp $R0 $R0 + $R3 + ${GetSize} "$INSTDIR" "/M=com0com.sys /S=0B /G=0" $R3 $R1 $R2 + IntOp $R0 $R0 + $R3 + ${GetSize} "$INSTDIR" "/M=setup.dll /S=0B /G=0" $R3 $R1 $R2 + IntOp $R0 $R0 + $R3 + ${GetSize} "$INSTDIR" "/M=setupc.exe /S=0B /G=0" $R3 $R1 $R2 + IntOp $R0 $R0 + $R3 + ${GetSize} "$INSTDIR" "/M=setupg.exe /S=0B /G=0" $R3 $R1 $R2 + IntOp $R0 $R0 + $R3 + ${GetSize} "$INSTDIR" "/M=uninstall.exe /S=0B /G=0" $R3 $R1 $R2 + IntOp $R0 $R0 + $R3 + IntOp $R0 $R0 / 1024 ; in KBytes + + WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\com0com" "EstimatedSize" $R0 + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\com0com" "UninstallString" '"$INSTDIR\uninstall.exe"' WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\com0com" "QuietUninstallString" '"$INSTDIR\uninstall.exe" /S' *************** *** 349,352 **** --- 385,397 ---- ${EndIf} + ; Check Windows version + + ${IfNot} ${AtLeastWin2000} + MessageBox MB_YESNO|MB_DEFBUTTON2|MB_ICONEXCLAMATION \ + "The driver cannot run under below Windows 2000 System.$\n$\nContinue?" \ + /SD IDNO IDYES +2 + Abort + ${EndIf} + ; Disable installing a pair of linked ports if silent |
From: Vyacheslav F. <vf...@us...> - 2009-05-21 15:39:43
|
Update of /cvsroot/com0com/com0com/NSIS In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv9627 Modified Files: install.nsi Log Message: Added DisplayIcon, DisplayVersion, VersionMajor, VersionMinor and QuietUninstallString to the registry Index: install.nsi =================================================================== RCS file: /cvsroot/com0com/com0com/NSIS/install.nsi,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** install.nsi 20 May 2009 13:02:18 -0000 1.15 --- install.nsi 21 May 2009 15:39:34 -0000 1.16 *************** *** 20,23 **** --- 20,27 ---- * * $Log$ + * Revision 1.16 2009/05/21 15:39:34 vfrolov + * Added DisplayIcon, DisplayVersion, VersionMajor, VersionMinor + * and QuietUninstallString to the registry + * * Revision 1.15 2009/05/20 13:02:18 vfrolov * Changed MUI.nsh to MUI2.nsh *************** *** 257,260 **** --- 261,266 ---- File "..\setupg\Release\setupg.exe" + WriteUninstaller "uninstall.exe" + ; Write the installation path into the registry WriteRegStr HKLM SOFTWARE\com0com "Install_Dir" "$INSTDIR" *************** *** 266,276 **** WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\com0com" "URLUpdateInfo" "http://com0com.sourceforge.net/" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\com0com" "Readme" "$INSTDIR\ReadMe.txt" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\com0com" "UninstallString" '"$INSTDIR\uninstall.exe"' WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\com0com" "NoModify" 1 WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\com0com" "NoRepair" 1 - WriteUninstaller "uninstall.exe" - GetTempFileName $0 --- 272,292 ---- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\com0com" "URLUpdateInfo" "http://com0com.sourceforge.net/" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\com0com" "Readme" "$INSTDIR\ReadMe.txt" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\com0com" "DisplayIcon" "$INSTDIR\setupg.exe" + + GetDLLVersionLocal "..\${TARGET_CPU}\com0com.sys" $R0 $R1 + IntOp $R2 $R0 / 0x00010000 + IntOp $R3 $R0 & 0x0000FFFF + IntOp $R4 $R1 / 0x00010000 + IntOp $R5 $R1 & 0x0000FFFF + + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\com0com" "DisplayVersion" "$R2.$R3.$R4.$R5" + WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\com0com" "VersionMajor" $R2 + WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\com0com" "VersionMinor" $R3 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\com0com" "UninstallString" '"$INSTDIR\uninstall.exe"' + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\com0com" "QuietUninstallString" '"$INSTDIR\uninstall.exe" /S' WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\com0com" "NoModify" 1 WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\com0com" "NoRepair" 1 GetTempFileName $0 |
From: Vyacheslav F. <vf...@us...> - 2009-05-20 14:17:12
|
Update of /cvsroot/com0com/com0com/sys In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv5168 Modified Files: trace.c Log Message: United closely IRP function name printing code Index: trace.c =================================================================== RCS file: /cvsroot/com0com/com0com/sys/trace.c,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** trace.c 2 Dec 2008 16:10:09 -0000 1.32 --- trace.c 20 May 2009 13:35:36 -0000 1.33 *************** *** 2,6 **** * $Id$ * ! * Copyright (c) 2004-2008 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify --- 2,6 ---- * $Id$ * ! * Copyright (c) 2004-2009 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.33 2009/05/20 13:35:36 vfrolov + * United closely IRP function name printing code + * * Revision 1.32 2008/12/02 16:10:09 vfrolov * Separated tracing and debuging *************** *** 1378,1394 **** pDestStr = AnsiStrCopyHead(pDestStr, &size, pDevExt, pHead); switch (major) { case IRP_MJ_DEVICE_CONTROL: case IRP_MJ_PNP: case IRP_MJ_POWER: case IRP_MJ_SYSTEM_CONTROL: break; default: - pDestStr = AnsiStrCopyStr(pDestStr, &size, " "); pDestStr = AnsiStrCopyCode(pDestStr, &size, major, codeNameTableIrpMj, "IRP_MJ_", 10); } pSysBuf = pIrp->AssociatedIrp.SystemBuffer; inform = pIrp->IoStatus.Information; --- 1381,1417 ---- pDestStr = AnsiStrCopyHead(pDestStr, &size, pDevExt, pHead); + pDestStr = AnsiStrCopyStr(pDestStr, &size, " "); switch (major) { case IRP_MJ_DEVICE_CONTROL: + pDestStr = AnsiStrCopyCode(pDestStr, &size, + pIrpStack->Parameters.DeviceIoControl.IoControlCode, + codeNameTableIoctl, "IOCTL_", 16); + break; case IRP_MJ_PNP: + pDestStr = AnsiStrCopyCode(pDestStr, &size, + pIrpStack->MinorFunction, + codeNameTablePnp, "PNP_", 10); + break; case IRP_MJ_POWER: + pDestStr = AnsiStrCopyCode(pDestStr, &size, + pIrpStack->MinorFunction, + codeNameTablePower, "POWER_", 10); + break; case IRP_MJ_SYSTEM_CONTROL: + pDestStr = AnsiStrCopyCode(pDestStr, &size, + pIrpStack->MinorFunction, + codeNameTableWmi, "WMI_", 10); break; default: pDestStr = AnsiStrCopyCode(pDestStr, &size, major, codeNameTableIrpMj, "IRP_MJ_", 10); } + /* + if (pIrpStack->FileObject) + pDestStr = AnsiStrFormat(pDestStr, &size, "(%lx)", PtrToUlong(pIrpStack->FileObject)); + */ + pSysBuf = pIrp->AssociatedIrp.SystemBuffer; inform = pIrp->IoStatus.Information; *************** *** 1396,1401 **** switch (major) { case IRP_MJ_CREATE: ! if (flags & TRACE_FLAG_PARAMS) ! pDestStr = AnsiStrFormat(pDestStr, &size, ", PID:%lu", PtrToUlong(PsGetCurrentProcessId())); break; case IRP_MJ_WRITE: --- 1419,1423 ---- switch (major) { case IRP_MJ_CREATE: ! pDestStr = AnsiStrFormat(pDestStr, &size, ", PID:%lu", PtrToUlong(PsGetCurrentProcessId())); break; case IRP_MJ_WRITE: *************** *** 1419,1429 **** break; case IRP_MJ_DEVICE_CONTROL: { - ULONG code = pIrpStack->Parameters.DeviceIoControl.IoControlCode; ULONG inLength = pIrpStack->Parameters.DeviceIoControl.InputBufferLength; ! pDestStr = AnsiStrCopyStr(pDestStr, &size, " "); ! pDestStr = AnsiStrCopyCode(pDestStr, &size, code, codeNameTableIoctl, "IOCTL_", 16); ! ! switch (code) { case IOCTL_SERIAL_GET_MODEMSTATUS: if ((flags & TRACE_FLAG_RESULTS) && inform >= sizeof(ULONG)) { --- 1441,1447 ---- break; case IRP_MJ_DEVICE_CONTROL: { ULONG inLength = pIrpStack->Parameters.DeviceIoControl.InputBufferLength; ! switch (pIrpStack->Parameters.DeviceIoControl.IoControlCode) { case IOCTL_SERIAL_GET_MODEMSTATUS: if ((flags & TRACE_FLAG_RESULTS) && inform >= sizeof(ULONG)) { *************** *** 1583,1593 **** break; } ! case IRP_MJ_PNP: { ! ULONG code = pIrpStack->MinorFunction; ! ! pDestStr = AnsiStrCopyStr(pDestStr, &size, " "); ! pDestStr = AnsiStrCopyCode(pDestStr, &size, code, codeNameTablePnp, "PNP_", 10); ! ! switch (code) { case IRP_MN_QUERY_ID: pDestStr = AnsiStrCopyStr(pDestStr, &size, " "); --- 1601,1606 ---- break; } ! case IRP_MJ_PNP: ! switch (pIrpStack->MinorFunction) { case IRP_MN_QUERY_ID: pDestStr = AnsiStrCopyStr(pDestStr, &size, " "); *************** *** 1640,1654 **** } break; ! } ! case IRP_MJ_POWER: { ! ULONG code = pIrpStack->MinorFunction; ! ! pDestStr = AnsiStrCopyStr(pDestStr, &size, " "); ! pDestStr = AnsiStrCopyCode(pDestStr, &size, code, codeNameTablePower, "POWER_", 10); ! if ((flags & TRACE_FLAG_PARAMS) == 0) break; ! switch (code) { case IRP_MN_SET_POWER: case IRP_MN_QUERY_POWER: { --- 1653,1661 ---- } break; ! case IRP_MJ_POWER: if ((flags & TRACE_FLAG_PARAMS) == 0) break; ! switch (pIrpStack->MinorFunction) { case IRP_MN_SET_POWER: case IRP_MN_QUERY_POWER: { *************** *** 1688,1699 **** } break; - } - case IRP_MJ_SYSTEM_CONTROL: { - ULONG code = pIrpStack->MinorFunction; - - pDestStr = AnsiStrCopyStr(pDestStr, &size, " "); - pDestStr = AnsiStrCopyCode(pDestStr, &size, code, codeNameTableWmi, "WMI_", 10); - break; - } case IRP_MJ_QUERY_INFORMATION: { ULONG code = pIrpStack->Parameters.QueryFile.FileInformationClass; --- 1695,1698 ---- |
From: Vyacheslav F. <vf...@us...> - 2009-05-20 14:13:10
|
Update of /cvsroot/com0com/com0com/sys In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv6690 Modified Files: ioctl.c Log Message: Added tracing the resulting event mask on nonpending successful completion of WAIT_ON_MASK Index: ioctl.c =================================================================== RCS file: /cvsroot/com0com/com0com/sys/ioctl.c,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** ioctl.c 2 Dec 2008 16:10:08 -0000 1.41 --- ioctl.c 20 May 2009 13:45:35 -0000 1.42 *************** *** 2,6 **** * $Id$ * ! * Copyright (c) 2004-2008 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify --- 2,6 ---- * $Id$ * ! * Copyright (c) 2004-2009 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify *************** *** 20,23 **** --- 20,27 ---- * * $Log$ + * Revision 1.42 2009/05/20 13:45:35 vfrolov + * Added tracing the resulting event mask on nonpending successful + * completion of WAIT_ON_MASK + * * Revision 1.41 2008/12/02 16:10:08 vfrolov * Separated tracing and debuging *************** *** 419,425 **** --- 423,434 ---- case IOCTL_SERIAL_GET_WAIT_MASK: status = FdoPortGetWaitMask(pIoPortLocal, pIrp, pIrpStack); + TraceIrp("FdoPortIoCtl", pIrp, &status, TRACE_FLAG_RESULTS); break; case IOCTL_SERIAL_WAIT_ON_MASK: status = FdoPortWaitOnMask(pIoPortLocal, pIrp, pIrpStack); + #if ENABLE_TRACING + if (status == STATUS_SUCCESS) + TraceIrp("FdoPortIoCtl", pIrp, &status, TRACE_FLAG_RESULTS); + #endif /* ENABLE_TRACING */ break; case IOCTL_SERIAL_IMMEDIATE_CHAR: *************** *** 929,934 **** &size); ! if (status == STATUS_SUCCESS) pIrp->IoStatus.Information = size; break; --- 938,945 ---- &size); ! if (status == STATUS_SUCCESS) { pIrp->IoStatus.Information = size; + TraceIrp("FdoPortIoCtl", pIrp, &status, TRACE_FLAG_RESULTS); + } break; |
From: Vyacheslav F. <vf...@us...> - 2009-05-20 14:12:55
|
Update of /cvsroot/com0com/com0com In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv8263 Modified Files: ReadMe.txt Log Message: Added Windows 7 Added FAQ about silent install or uninstall Added FAQ about internal com0com's tracing Index: ReadMe.txt =================================================================== RCS file: /cvsroot/com0com/com0com/ReadMe.txt,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** ReadMe.txt 16 Feb 2009 12:24:26 -0000 1.21 --- ReadMe.txt 20 May 2009 13:54:10 -0000 1.22 *************** *** 35,43 **** ========== ! NOTE (Windows Vista/Windows Server 2008): Before installing/uninstalling the com0com driver or adding/removing/changing ports the User Account Control (UAC) should be turned off (require reboot). ! NOTE (x64-based Windows Vista/Windows Server 2008): The com0com.sys is a test-signed kernel-mode driver that will not load by default. To enable test signing, enter command: --- 35,43 ---- ========== ! NOTE (Windows Vista/Windows Server 2008/Windows 7): Before installing/uninstalling the com0com driver or adding/removing/changing ports the User Account Control (UAC) should be turned off (require reboot). ! NOTE (x64-based Windows Vista/Windows Server 2008/Windows 7): The com0com.sys is a test-signed kernel-mode driver that will not load by default. To enable test signing, enter command: *************** *** 101,104 **** --- 101,117 ---- ============= + Q. Is it possible to install or uninstall com0com silently (with no user + intervention and no user interface)? + A. Yes, it's possible with /S option, for example: + + setup.exe /S + "%ProgramFiles%\com0com\uninstall.exe" /S + + You can specify the installation directory with /D option, for example: + + setup.exe /S /D=C:\Program Files\com0com + + NOTE: Silent installation of com0com will not install any port pairs. + Q. Is it possible to change the names CNCA0 and CNCB0 to COM2 and COM3? A. Yes, it's possible. To change the names: *************** *** 281,282 **** --- 294,308 ---- > FOR /L %i IN (0,1,249) DO setupc --no-update install - - > setupc update + + Q. I am using the 64-bit version of com0com and I am having trouble. I'd like + to debug this, but I can not find any free serial port monitor software, + like portmon that works with a 64-bit OS. Does anyone know of any? + A. You can try to use internal com0com's tracing for debuging: + + - get trace.reg file from com0com's source; + - import trace.reg to the Registry; + - reload driver (or reboot system); + - do your tests and watch results in C:\com0com.log file. + + To disable tracing reinstall com0com or import trace_disable.reg to the + Registry and reload driver. |
From: Vyacheslav F. <vf...@us...> - 2009-05-20 14:12:42
|
Update of /cvsroot/com0com/com0com In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv7634 Modified Files: Building.txt Log Message: Added Windows 7 Index: Building.txt =================================================================== RCS file: /cvsroot/com0com/com0com/Building.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Building.txt 22 Nov 2007 12:42:22 -0000 1.1 --- Building.txt 20 May 2009 13:50:10 -0000 1.2 *************** *** 15,19 **** 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 --- 15,20 ---- 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/Windows Server 2008/Windows 7. When the SDK is installed, it defines the Start menu shortcuts for several different build environments. To open a SDK build environment *************** *** 43,47 **** 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. --- 44,49 ---- and depends from choosen DDK build environment. ! 2. If you build driver for x64-based versions of ! Windows Vista/Windows Server 2008/Windows 7 then create a test certificate and sign com0com.sys file. |
From: Vyacheslav F. <vf...@us...> - 2009-05-20 13:02:38
|
Update of /cvsroot/com0com/com0com/NSIS In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv31993 Modified Files: install.nsi Log Message: Changed MUI.nsh to MUI2.nsh Added .NET check and advise Disabled silent installing of linked ports Index: install.nsi =================================================================== RCS file: /cvsroot/com0com/com0com/NSIS/install.nsi,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** install.nsi 12 Jan 2009 13:16:20 -0000 1.14 --- install.nsi 20 May 2009 13:02:18 -0000 1.15 *************** *** 20,23 **** --- 20,28 ---- * * $Log$ + * Revision 1.15 2009/05/20 13:02:18 vfrolov + * Changed MUI.nsh to MUI2.nsh + * Added .NET check and advise + * Disabled silent installing of linked ports + * * Revision 1.14 2009/01/12 13:16:20 vfrolov * Added driver updating *************** *** 73,78 **** ;-------------------------------- ! !include "MUI.nsh" !include "x64.nsh" ;-------------------------------- --- 78,85 ---- ;-------------------------------- ! !include "MUI2.nsh" !include "x64.nsh" + !include WordFunc.nsh + !insertmacro VersionCompare ;-------------------------------- *************** *** 97,119 **** ;-------------------------------- ! 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 --- 104,145 ---- ;-------------------------------- ! Function GetDotNETVersion ! Push $0 ! Push $1 ! System::Call "mscoree::GetCORVersion(w .r0, i ${NSIS_MAX_STRLEN}, *i) i .r1 ?u" ! StrCmp $1 0 +2 ! StrCpy $0 "v0" ! ! StrCpy $0 $0 "" 1 # skip "v" ! ! Pop $1 ! Exch $0 ! FunctionEnd ! ! ;-------------------------------- ! ! Function AdviseDotNETVersion ! IfSilent 0 +2 ! return ! ! Push $0 ! Push $1 ! Push $2 ! ! Call GetDotNETVersion ! Pop $0 ! ! StrCpy $1 "2.0" + ${VersionCompare} $0 $1 $2 + ${If} $2 == 2 + MessageBox MB_OK|MB_ICONINFORMATION \ + "To use GUI-based Setup utility you will need to$\ninstall Microsoft .NET Framework v$1 or newer." + ${EndIf} + + Pop $2 + Pop $1 + Pop $0 FunctionEnd *************** *** 236,239 **** --- 262,266 ---- ; Write the uninstall keys for Windows WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\com0com" "DisplayName" "Null-modem emulator (com0com)" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\com0com" "Publisher" "Vyacheslav Frolov" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\com0com" "HelpLink" "http://com0com.sourceforge.net/" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\com0com" "URLUpdateInfo" "http://com0com.sourceforge.net/" *************** *** 286,289 **** --- 313,353 ---- ;-------------------------------- + Function .onInit + + ; Check CPU + + ${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 +2 + 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 +2 + Abort + !endif + ${EndIf} + + ; Disable installing a pair of linked ports if silent + + IfSilent 0 +5 + SectionGetFlags ${sec_ports} $0 + IntOp $1 ${SF_SELECTED} ~ + IntOp $0 $0 & $1 + SectionSetFlags ${sec_ports} $0 + + FunctionEnd + ;-------------------------------- + + Function .onInstSuccess + Call AdviseDotNETVersion + FunctionEnd + + ;-------------------------------- + ; Uninstaller |
From: Vyacheslav F. <vf...@us...> - 2009-03-12 15:30:44
|
Update of /cvsroot/com0com/homepage In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv5118 Modified Files: index.html Log Message: Fixed t38modem link Added more info about hub4com Index: index.html =================================================================== RCS file: /cvsroot/com0com/homepage/index.html,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** index.html 12 Mar 2009 14:06:57 -0000 1.7 --- index.html 12 Mar 2009 15:30:29 -0000 1.8 *************** *** 31,36 **** requires a COM port to communicate with the device. For example, to send/receive faxes over IP you can connect Windows ! Fax application to t38modem ("T38FAX Pseudo Modem", part of the ! <a href="http://openh323.sourceforge.net/"> OpenH323 project</a> ) via virtual COM port pair. </p> --- 31,39 ---- requires a COM port to communicate with the device. For example, to send/receive faxes over IP you can connect Windows ! Fax application to t38modem ( ! <a href="http://t38modem.cvs.sourceforge.net/viewvc/*checkout*/t38modem/t38modem/ReadMe.txt"> ! T38FAX Pseudo Modem </a>, ! part of the ! <a href="http://sourceforge.net/projects/t38modem/"> t38modem project </a> ) via virtual COM port pair. </p> *************** *** 41,55 **** COM port to TCP redirector</a>, part of the ! <a href="http://sourceforge.net/projects/com0com/">com0com</a> ! project) you can communicate via serial interface with the TCP/IP servers. </p> <p> With the hub4com ( <a href="http://com0com.cvs.sourceforge.net/*checkout*/com0com/hub4com/ReadMe.txt?revision=RELEASED"> ! HUB for COM ports</a>, part of the ! <a href="http://sourceforge.net/projects/com0com/">com0com</a> ! project) it is possible to handle data from a single serial device by a number of different ! applications. For example, several applications can share data from one GPS device. </p> <p>You can find more information in --- 44,62 ---- COM port to TCP redirector</a>, part of the ! <a href="http://sourceforge.net/projects/com0com/"> com0com project </a> ! ) you can communicate via serial interface with the TCP/IP servers. ! If you feel that com2tcp is what you need but can't find some required features (for example ! <a href="http://tools.ietf.org/html/rfc2217"> RFC 2217 </a> ! support) then try use hub4com instead. </p> <p> With the hub4com ( <a href="http://com0com.cvs.sourceforge.net/*checkout*/com0com/hub4com/ReadMe.txt?revision=RELEASED"> ! HUB for communications</a>, part of the ! <a href="http://sourceforge.net/projects/com0com/"> com0com project </a> ! ) it is possible to handle data and signals from a single serial device by a number of different ! applications (for example, several applications can share data from one GPS device). ! It's also possible to use the real serial ports of remote computer like if they exist on a local computer. </p> <p>You can find more information in |
From: Vyacheslav F. <vf...@us...> - 2009-03-12 14:07:13
|
Update of /cvsroot/com0com/homepage In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv5211 Modified Files: index.html Log Message: Added link to UsingCom0com.pdf Index: index.html =================================================================== RCS file: /cvsroot/com0com/homepage/index.html,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** index.html 28 Feb 2007 13:58:44 -0000 1.6 --- index.html 12 Mar 2009 14:06:57 -0000 1.7 *************** *** 54,57 **** --- 54,59 ---- </p> <p>You can find more information in + <a href="http://com0com.sourceforge.net/doc/UsingCom0com.pdf"> + Using com0com and com2tcp</a>, <a href="http://com0com.cvs.sourceforge.net/*checkout*/com0com/com0com/ReadMe.txt?revision=RELEASED"> ReadMe.txt for com0com</a>, |
From: Vyacheslav F. <vf...@us...> - 2009-03-12 10:03:25
|
Update of /cvsroot/com0com/hub4com In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv9394 Modified Files: version.h Log Message: Pre-tagging version change Index: version.h =================================================================== RCS file: /cvsroot/com0com/hub4com/version.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** version.h 26 Mar 2008 08:10:14 -0000 1.4 --- version.h 12 Mar 2009 10:03:12 -0000 1.5 *************** *** 2,6 **** * $Id$ * ! * Copyright (c) 2006-2008 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify --- 2,6 ---- * $Id$ * ! * Copyright (c) 2006-2009 Vyacheslav Frolov * * This program is free software; you can redistribute it and/or modify *************** *** 23,32 **** #define _H4C_VERSION_H_ ! #define H4C_COPYRIGHT_YEARS "2006-2008" ! #define H4C_V1 1 ! #define H4C_V2 1 #define H4C_V3 0 ! #define H4C_V4 1 #define MK_VERSION_STR1(V1, V2, V3, V4) #V1 "." #V2 "." #V3 "." #V4 --- 23,32 ---- #define _H4C_VERSION_H_ ! #define H4C_COPYRIGHT_YEARS "2006-2009" ! #define H4C_V1 2 ! #define H4C_V2 0 #define H4C_V3 0 ! #define H4C_V4 0 #define MK_VERSION_STR1(V1, V2, V3, V4) #V1 "." #V2 "." #V3 "." #V4 |
From: Vyacheslav F. <vf...@us...> - 2009-03-12 10:02:16
|
Update of /cvsroot/com0com/hub4com In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv7706 Modified Files: ReadMe.txt Log Message: Added hub4com vs. com2tcp Index: ReadMe.txt =================================================================== RCS file: /cvsroot/com0com/hub4com/ReadMe.txt,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ReadMe.txt 5 Dec 2008 18:09:51 -0000 1.7 --- ReadMe.txt 12 Mar 2009 10:01:41 -0000 1.8 *************** *** 86,90 **** BTW: com2tcp.bat is a wrapper to hub4com.exe. It works very similar to the "COM port to TCP redirector" (com2tcp). It supports all ! com2tcp's options. --- 86,92 ---- BTW: com2tcp.bat is a wrapper to hub4com.exe. It works very similar to the "COM port to TCP redirector" (com2tcp). It supports all ! com2tcp's options. If you feel that com2tcp is what you need but ! can't find any required functionality (for example RFC 2217 support) ! then try use hub4com instead. *************** *** 260,264 **** 2. Cut line "--create-filter=trace,_CUT_THIS_LINE_" from my.txt file. ! Now the folloving two command lines are equal: --- 262,266 ---- 2. Cut line "--create-filter=trace,_CUT_THIS_LINE_" from my.txt file. ! Now the folloving two command lines are equal: |
From: Vyacheslav F. <vf...@us...> - 2009-03-12 09:59:33
|
Update of /cvsroot/com0com/hub4com In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv4583 Modified Files: Building.txt Log Message: Added Building hub4com with statically linked modules Index: Building.txt =================================================================== RCS file: /cvsroot/com0com/hub4com/Building.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Building.txt 5 Dec 2008 18:04:00 -0000 1.1 --- Building.txt 12 Mar 2009 09:59:23 -0000 1.2 *************** *** 15,21 **** ======== 1. Start Microsoft Visual C++ 2005 with hub4com.sln file. 2. Set Active Configuration to hub4com - Win32 Release. 3. Build solution (hub4com.exe and plugins\*.dll). ! It will create hub4com.exe and plugins\*.dll files. --- 15,41 ---- ======== + Building hub4com with dynamically linking modules + ------------------------------------------------- + 1. Start Microsoft Visual C++ 2005 with hub4com.sln file. 2. Set Active Configuration to hub4com - Win32 Release. 3. Build solution (hub4com.exe and plugins\*.dll). ! It will create Release\hub4com.exe and Release\plugins\*.dll ! files. On start the hub4com.exe will load all modules from ! plugins subfolder. ! ! ! Building hub4com with statically linked modules ! ----------------------------------------------- ! ! 1. Start Microsoft Visual C++ 2005 with static\hub4com-static.vcproj ! file. ! 2. Set Active Configuration to hub4com-static - Win32 Release. ! 3. Build solution (hub4com.exe). ! ! It will create static\Release\hub4com.exe file. ! ! BTW: You can replace any statically linked module or add new module by ! placing module's DLL file to plugins subfolder of hub4com.exe ! file's folder. |
From: Vyacheslav F. <vf...@us...> - 2009-03-12 09:58:23
|
Update of /cvsroot/com0com/hub4com/static In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv2242 Added Files: hub4com-static.vcproj Log Message: Initial revision --- NEW FILE: hub4com-static.vcproj --- <?xml version="1.0" encoding="windows-1251"?> <VisualStudioProject ProjectType="Visual C++" Version="8,00" Name="hub4com-static" ProjectGUID="{CBD42AC6-435C-4B79-BCC0-7319291F649D}" RootNamespace="hub4com" Keyword="Win32Proj" > <Platforms> <Platform Name="Win32" /> </Platforms> <ToolFiles> </ToolFiles> <Configurations> <Configuration Name="Debug|Win32" [...1025 lines suppressed...] ObjectFile="$(IntDir)\$(InputName)12.obj" XMLDocumentationFileName="$(IntDir)\$(InputName)12.xdc" /> </FileConfiguration> <FileConfiguration Name="Release|Win32" > <Tool Name="VCCLCompilerTool" ObjectFile="$(IntDir)\$(InputName)12.obj" XMLDocumentationFileName="$(IntDir)\$(InputName)12.xdc" /> </FileConfiguration> </File> </Filter> </Filter> </Files> <Globals> </Globals> </VisualStudioProject> |
From: Vyacheslav F. <vf...@us...> - 2009-03-12 09:56:52
|
Update of /cvsroot/com0com/hub4com/static In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv831/static Log Message: Directory /cvsroot/com0com/hub4com/static added to the repository |
From: Vyacheslav F. <vf...@us...> - 2009-03-06 07:56:38
|
Update of /cvsroot/com0com/hub4com/plugins/telnet In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv16239/plugins/telnet Modified Files: filter.cpp Log Message: Fixed assertion with non ascii chars Index: filter.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/telnet/filter.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** filter.cpp 20 Feb 2009 18:32:35 -0000 1.18 --- filter.cpp 6 Mar 2009 07:56:28 -0000 1.19 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.19 2009/03/06 07:56:28 vfrolov + * Fixed assertion with non ascii chars + * * Revision 1.18 2009/02/20 18:32:35 vfrolov * Added info about location of options *************** *** 248,252 **** else if ((pParam = GetParam(pArg, "comport=")) != NULL) { ! switch (tolower(*pParam)) { case 'n': comport = comport_no; --- 251,255 ---- else if ((pParam = GetParam(pArg, "comport=")) != NULL) { ! switch (tolower((unsigned char)*pParam)) { case 'n': comport = comport_no; *************** *** 265,269 **** else if ((pParam = GetParam(pArg, "suppress-echo=")) != NULL) { ! switch (tolower(*pParam)) { case 'y': suppressEcho = TRUE; --- 268,272 ---- else if ((pParam = GetParam(pArg, "suppress-echo=")) != NULL) { ! switch (tolower((unsigned char)*pParam)) { case 'y': suppressEcho = TRUE; *************** *** 279,283 **** else if ((pParam = GetParam(pArg, "keep-active=")) != NULL) { ! if (isdigit(*pParam)) { keepActive = (unsigned)atol(pParam); } else { --- 282,286 ---- else if ((pParam = GetParam(pArg, "keep-active=")) != NULL) { ! if (isdigit((unsigned char)*pParam)) { keepActive = (unsigned)atol(pParam); } else { |
From: Vyacheslav F. <vf...@us...> - 2009-03-06 07:56:33
|
Update of /cvsroot/com0com/hub4com In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv16239 Modified Files: utils.cpp Log Message: Fixed assertion with non ascii chars Index: utils.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/utils.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** utils.cpp 20 Feb 2009 18:32:35 -0000 1.8 --- utils.cpp 6 Mar 2009 07:56:28 -0000 1.9 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.9 2009/03/06 07:56:28 vfrolov + * Fixed assertion with non ascii chars + * * Revision 1.8 2009/02/20 18:32:35 vfrolov * Added info about location of options *************** *** 172,176 **** for (string::size_type i = 0 ; i < var.length() ; i++) { ! if (!isdigit(var[i])) { isToken = FALSE; break; --- 175,179 ---- for (string::size_type i = 0 ; i < var.length() ; i++) { ! if (!isdigit((unsigned char)var[i])) { isToken = FALSE; break; *************** *** 281,285 **** for (string::size_type i = 0 ; i < str.length() ; i++) { ! if (!isspace(str[i])) { if (first_non_space == string::npos) first_non_space = i; --- 284,288 ---- for (string::size_type i = 0 ; i < str.length() ; i++) { ! if (!isspace((unsigned char)str[i])) { if (first_non_space == string::npos) first_non_space = i; |