Changeset 7482 for trunk/src/kernel32/hmparport.cpp
- Timestamp:
- Nov 29, 2001, 11:53:28 AM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/hmparport.cpp
r7476 r7482 1 /* $Id: hmparport.cpp,v 1.1 1 2001-11-29 00:20:48phaller Exp $ */1 /* $Id: hmparport.cpp,v 1.12 2001-11-29 10:53:27 phaller Exp $ */ 2 2 3 3 /* … … 144 144 lpDeviceName)); 145 145 146 #ifndef DEVINFO_PRINTER 147 #define DEVINFO_PRINTER 0 148 #endif 149 150 // first, we determine the number of parallel port devices available 151 BYTE bParallelPorts; 152 DWORD rc = OSLibDosDevConfig(&bParallelPorts, 153 DEVINFO_PRINTER); 154 dprintf(("HMDeviceParPortClass: Parallel ports reported: %d\n", 155 bParallelPorts)); 156 if (0 == bParallelPorts) 157 return; 158 159 // @@@PH 160 // query configuration data from Resource Manager 161 // (base i/o ports, etc. for the IOCTL_INTERNAL_GET_xxx) 162 163 146 164 VOID *pData; 147 dprintf(("HMDeviceParPortClass: Register LPT1 to LPT3with Handle Manager\n"));165 dprintf(("HMDeviceParPortClass: Registering LPTs with Handle Manager\n")); 148 166 149 167 pData = CreateDevData(); … … 156 174 PSZ pszLPT = strdup("\\\\.\\LPTx"); 157 175 PSZ pszLPT2 = strdup("\\Device\\ParallelPort1"); 158 for (char ch = '1'; ch <= ' 3'; ch++)176 for (char ch = '1'; ch <= '1' + (bParallelPorts - 1); ch++) 159 177 { 160 178 pszLPT[7] = ch;
Note:
See TracChangeset
for help on using the changeset viewer.