Ignore:
Timestamp:
Dec 7, 2000, 1:00:24 PM (25 years ago)
Author:
sandervl
Message:

Rewrote GetLogicalDrives, minor fixes for GetDriveType

File:
1 edited

Legend:

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

    r4703 r4763  
    1 /* $Id: oslibdos.cpp,v 1.52 2000-11-26 15:10:06 bird Exp $ */
     1/* $Id: oslibdos.cpp,v 1.53 2000-12-07 12:00:23 sandervl Exp $ */
    22/*
    33 * Wrappers for OS/2 Dos* API
     
    1818#define INCL_DOSFILEMGR
    1919#define INCL_DOSERRORS
     20#define INCL_DOSDEVIOCTL
    2021#define INCL_NPIPES
    2122#include <os2wrap.h>                     //Odin32 OS/2 api wrappers
     
    20372038}
    20382039//******************************************************************************
     2040//Returns bit map where with the mapping of the logical drives
     2041//******************************************************************************
     2042ULONG OSLibGetLogicalDrives()
     2043{
     2044 ULONG   ulDriveNum   = 0;      /* Drive number (A=1, B=2, C=3, ...)    */
     2045 ULONG   ulDriveMap   = 0;      /* Mapping of valid drives              */
     2046 APIRET  rc;
     2047
     2048    rc = DosQueryCurrentDisk(&ulDriveNum, &ulDriveMap);
     2049    if(rc) {
     2050        DebugInt3();
     2051        SetLastError(error2WinError(rc));
     2052        return 0;
     2053    }
     2054    return ulDriveMap;
     2055}
     2056//******************************************************************************
     2057//******************************************************************************
     2058ULONG OSLibDosQueryCurrentDisk()
     2059
     2060{
     2061 ULONG   ulDriveNum   = 0;      /* Drive number (A=1, B=2, C=3, ...)    */
     2062 ULONG   ulDriveMap   = 0;      /* Mapping of valid drives              */
     2063 APIRET  rc;
     2064
     2065    rc = DosQueryCurrentDisk(&ulDriveNum, &ulDriveMap);
     2066    if(rc) {
     2067        DebugInt3();
     2068        SetLastError(error2WinError(rc));
     2069        return 0;
     2070    }
     2071    return ulDriveNum;
     2072}
     2073//******************************************************************************
    20392074//******************************************************************************
    20402075BOOL OSLibDosCreatePipe(PHANDLE phfRead,
Note: See TracChangeset for help on using the changeset viewer.