Changeset 7474 for trunk/src/kernel32/hmcomm.cpp
- Timestamp:
- Nov 29, 2001, 12:33:37 AM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/hmcomm.cpp
r7471 r7474 1 /* $Id: hmcomm.cpp,v 1.1 7 2001-11-28 15:35:15 sandervlExp $ */1 /* $Id: hmcomm.cpp,v 1.18 2001-11-28 23:33:35 phaller Exp $ */ 2 2 3 3 /* … … 19 19 #include <string.h> 20 20 #include <handlemanager.h> 21 #include "handlenames.h" 21 22 #include <heapstring.h> 22 23 #include "hmdevice.h" … … 91 92 if(pData!= NULL) 92 93 HMDeviceRegisterEx("COM1", this, pData); 94 95 // add symbolic links to the "real name" of the device 96 { 97 // @@@PH what's the long device name: SerialPortx ? 98 // HandleNamesAddSymbolicLink("\\Device\\ParallelPort3", "COM3"); 99 100 PSZ pszCOM = strdup("\\\\.\\COMx"); 101 for (char ch = '1'; ch <= '9'; ch++) 102 { 103 pszCOM[7] = ch; 104 HandleNamesAddSymbolicLink(pszCOM, pszCOM+4); 105 } 106 free(pszCOM); 107 } 93 108 } 94 109 … … 109 124 { 110 125 dprintf2(("HMDeviceCommClass::FindDevice %s %s", lpClassDevName, lpDeviceName)); 111 112 if(namelength > 5) { 113 if(namelength != 9 || lstrncmpA(lpDeviceName, "\\\\.\\", 4) != 0) { 114 return FALSE; //can't be com name 115 } 116 lpDeviceName += 4; //skip prefix 117 } 118 126 119 127 //first 3 letters 'COM'? 120 128 if(lstrncmpiA(lpDeviceName, lpClassDevName, 3) != 0) { … … 207 215 { 208 216 delete pHMHandleData->lpHandlerData; 209 return rc;217 return error2WinError(rc); 210 218 } 211 219 rc = SetBaud(pHMHandleData,9600);
Note:
See TracChangeset
for help on using the changeset viewer.