Commit 3ee9f240 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

scrrun: Implement Name() property for File.

parent 6dbc8195
......@@ -1559,11 +1559,29 @@ static HRESULT WINAPI file_get_Path(IFile *iface, BSTR *pbstrPath)
return E_NOTIMPL;
}
static HRESULT WINAPI file_get_Name(IFile *iface, BSTR *pbstrName)
static HRESULT WINAPI file_get_Name(IFile *iface, BSTR *name)
{
struct file *This = impl_from_IFile(iface);
FIXME("(%p)->(%p)\n", This, pbstrName);
return E_NOTIMPL;
WCHAR *ptr;
TRACE("(%p)->(%p)\n", This, name);
if(!name)
return E_POINTER;
*name = NULL;
ptr = strrchrW(This->path, '\\');
if (ptr)
{
*name = SysAllocString(ptr+1);
TRACE("%s\n", debugstr_w(*name));
if (!*name) return E_OUTOFMEMORY;
}
else
return E_FAIL;
return S_OK;
}
static HRESULT WINAPI file_put_Name(IFile *iface, BSTR pbstrName)
......
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