Commit ac132599 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

scrrun: Add IFileSystem3::GetTempName implementation.

parent d09ec591
MODULE = scrrun.dll MODULE = scrrun.dll
IMPORTS = uuid oleaut32 version IMPORTS = uuid oleaut32 version advapi32
C_SRCS = \ C_SRCS = \
dictionary.c \ dictionary.c \
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "ole2.h" #include "ole2.h"
#include "olectl.h" #include "olectl.h"
#include "dispex.h" #include "dispex.h"
#include "ntsecapi.h"
#include "scrrun.h" #include "scrrun.h"
#include "scrrun_private.h" #include "scrrun_private.h"
...@@ -868,9 +869,23 @@ static HRESULT WINAPI filesys_GetAbsolutePathName(IFileSystem3 *iface, BSTR Path ...@@ -868,9 +869,23 @@ static HRESULT WINAPI filesys_GetAbsolutePathName(IFileSystem3 *iface, BSTR Path
static HRESULT WINAPI filesys_GetTempName(IFileSystem3 *iface, BSTR *pbstrResult) static HRESULT WINAPI filesys_GetTempName(IFileSystem3 *iface, BSTR *pbstrResult)
{ {
FIXME("%p %p\n", iface, pbstrResult); static const WCHAR fmt[] = {'r','a','d','%','0','5','X','.','t','x','t',0};
return E_NOTIMPL; DWORD random;
TRACE("%p %p\n", iface, pbstrResult);
if(!pbstrResult)
return E_POINTER;
*pbstrResult = SysAllocStringLen(NULL, 12);
if(!*pbstrResult)
return E_OUTOFMEMORY;
if(!RtlGenRandom(&random, sizeof(random)))
return E_FAIL;
sprintfW(*pbstrResult, fmt, random & 0xfffff);
return S_OK;
} }
static HRESULT WINAPI filesys_DriveExists(IFileSystem3 *iface, BSTR DriveSpec, static HRESULT WINAPI filesys_DriveExists(IFileSystem3 *iface, BSTR DriveSpec,
......
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