mirror of
https://github.com/reactos/wine.git
synced 2024-12-01 07:30:37 +00:00
scrrun: Implement Name() property for File.
This commit is contained in:
parent
6dbc8195a0
commit
3ee9f2407b
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user