Commit 17c4c1be authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

scrrun: Implement DriveType property of IDrive.

parent b8e78f32
......@@ -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)
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment