scrrun: Implement DriveType property of IDrive.

This commit is contained in:
Nikolay Sivov 2014-02-25 09:25:54 +04:00 committed by Alexandre Julliard
parent b8e78f3234
commit 17c4c1bef5
2 changed files with 33 additions and 9 deletions

View File

@ -573,11 +573,35 @@ static HRESULT WINAPI drive_get_ShareName(IDrive *iface, BSTR *share_name)
return E_NOTIMPL;
}
static HRESULT WINAPI drive_get_DriveType(IDrive *iface, DriveTypeConst *ptype)
static HRESULT WINAPI drive_get_DriveType(IDrive *iface, DriveTypeConst *type)
{
struct drive *This = impl_from_IDrive(iface);
FIXME("(%p)->(%p): stub\n", This, ptype);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, type);
switch (GetDriveTypeW(This->root))
{
case DRIVE_REMOVABLE:
*type = Removable;
break;
case DRIVE_FIXED:
*type = Fixed;
break;
case DRIVE_REMOTE:
*type = Remote;
break;
case DRIVE_CDROM:
*type = CDRom;
break;
case DRIVE_RAMDISK:
*type = RamDisk;
break;
default:
*type = UnknownType;
break;
}
return S_OK;
}
static HRESULT WINAPI drive_get_RootFolder(IDrive *iface, IFolder **folder)

View File

@ -92,12 +92,12 @@ library Scripting
typedef enum DriveTypeConst
{
UnknownType = 0,
Removable = 1,
Fixed = 2,
Remote = 3,
CDRom = 4,
RamDisk = 5
UnknownType,
Removable,
Fixed,
Remote,
CDRom,
RamDisk
} DriveTypeConst;
typedef enum StandardStreamTypes