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) ...@@ -573,11 +573,35 @@ static HRESULT WINAPI drive_get_ShareName(IDrive *iface, BSTR *share_name)
return E_NOTIMPL; 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); 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) static HRESULT WINAPI drive_get_RootFolder(IDrive *iface, IFolder **folder)
......
...@@ -92,12 +92,12 @@ library Scripting ...@@ -92,12 +92,12 @@ library Scripting
typedef enum DriveTypeConst typedef enum DriveTypeConst
{ {
UnknownType = 0, UnknownType,
Removable = 1, Removable,
Fixed = 2, Fixed,
Remote = 3, Remote,
CDRom = 4, CDRom,
RamDisk = 5 RamDisk
} DriveTypeConst; } DriveTypeConst;
typedef enum StandardStreamTypes 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