qmgr: Implement GetLocalName and GetRemoteName for IBackgroundCopyFile.
diff --git a/dlls/qmgr/file.c b/dlls/qmgr/file.c
index 60958f5..ad5546f 100644
--- a/dlls/qmgr/file.c
+++ b/dlls/qmgr/file.c
@@ -68,21 +68,35 @@
return ref;
}
-/*** IBackgroundCopyFile methods ***/
+/* Get the remote name of a background copy file */
static HRESULT WINAPI BITS_IBackgroundCopyFile_GetRemoteName(
IBackgroundCopyFile* iface,
LPWSTR *pVal)
{
- FIXME("Not implemented\n");
- return E_NOTIMPL;
+ BackgroundCopyFileImpl *This = (BackgroundCopyFileImpl *) iface;
+ int n = (lstrlenW(This->info.RemoteName) + 1) * sizeof(WCHAR);
+
+ *pVal = CoTaskMemAlloc(n);
+ if (!*pVal)
+ return E_OUTOFMEMORY;
+
+ memcpy(*pVal, This->info.RemoteName, n);
+ return S_OK;
}
static HRESULT WINAPI BITS_IBackgroundCopyFile_GetLocalName(
IBackgroundCopyFile* iface,
LPWSTR *pVal)
{
- FIXME("Not implemented\n");
- return E_NOTIMPL;
+ BackgroundCopyFileImpl *This = (BackgroundCopyFileImpl *) iface;
+ int n = (lstrlenW(This->info.LocalName) + 1) * sizeof(WCHAR);
+
+ *pVal = CoTaskMemAlloc(n);
+ if (!*pVal)
+ return E_OUTOFMEMORY;
+
+ memcpy(*pVal, This->info.LocalName, n);
+ return S_OK;
}
static HRESULT WINAPI BITS_IBackgroundCopyFile_GetProgress(