Changeset 7482 for trunk/src


Ignore:
Timestamp:
Nov 29, 2001, 11:53:28 AM (24 years ago)
Author:
phaller
Message:

Added support for DosDevConfig, query number of available parallel ports

Location:
trunk/src/kernel32
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/hmparport.cpp

    r7476 r7482  
    1 /* $Id: hmparport.cpp,v 1.11 2001-11-29 00:20:48 phaller Exp $ */
     1/* $Id: hmparport.cpp,v 1.12 2001-11-29 10:53:27 phaller Exp $ */
    22
    33/*
     
    144144           lpDeviceName));
    145145 
     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 
    146164  VOID *pData;
    147   dprintf(("HMDeviceParPortClass: Register LPT1 to LPT3 with Handle Manager\n"));
     165  dprintf(("HMDeviceParPortClass: Registering LPTs with Handle Manager\n"));
    148166 
    149167  pData = CreateDevData();
     
    156174    PSZ pszLPT  = strdup("\\\\.\\LPTx");
    157175    PSZ pszLPT2 = strdup("\\Device\\ParallelPort1");
    158     for (char ch = '1'; ch <= '3'; ch++)
     176    for (char ch = '1'; ch <= '1' + (bParallelPorts - 1); ch++)
    159177    {
    160178      pszLPT[7] = ch;
  • trunk/src/kernel32/oslibdos.cpp

    r7474 r7482  
    1 /* $Id: oslibdos.cpp,v 1.86 2001-11-28 23:33:37 phaller Exp $ */
     1/* $Id: oslibdos.cpp,v 1.87 2001-11-29 10:53:28 phaller Exp $ */
    22/*
    33 * Wrappers for OS/2 Dos* API
     
    1919#define INCL_DOSERRORS
    2020#define INCL_DOSDEVIOCTL
     21#define INCL_DOSDEVICES
    2122#define INCL_NPIPES
    2223#include <os2wrap.h>                     //Odin32 OS/2 api wrappers
     
    28972898//******************************************************************************
    28982899//******************************************************************************
     2900DWORD OSLibDosDevConfig(PVOID pdevinfo,
     2901                         ULONG item)
     2902{
     2903  return (DWORD)DosDevConfig(pdevinfo, item);
     2904}
  • trunk/src/kernel32/oslibdos.h

    r7321 r7482  
    1 /* $Id: oslibdos.h,v 1.39 2001-11-11 13:46:19 bird Exp $ */
     1/* $Id: oslibdos.h,v 1.40 2001-11-29 10:53:28 phaller Exp $ */
    22
    33/*
     
    358358BOOL  OSLibDosQueryAffinity(DWORD fMaskType, DWORD *pdwThreadAffinityMask);
    359359
     360DWORD OSLibDosDevConfig(PVOID pdevinfo, ULONG item);
     361
    360362#endif //__OSLIBDOS_H__
    361363
Note: See TracChangeset for help on using the changeset viewer.