Commit dd16a491 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mscoree: Use CreateConfigStream in parse_config_file.

parent 8fff6813
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
#include "cordebug.h" #include "cordebug.h"
#include "wine/list.h" #include "wine/list.h"
#include "mscoree_private.h" #include "mscoree_private.h"
#include "shlwapi.h"
#include "wine/debug.h" #include "wine/debug.h"
...@@ -664,20 +663,18 @@ HRESULT parse_config_file(LPCWSTR filename, parsed_config_file *result) ...@@ -664,20 +663,18 @@ HRESULT parse_config_file(LPCWSTR filename, parsed_config_file *result)
init_config(result); init_config(result);
initresult = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
hr = SHCreateStreamOnFileW(filename, STGM_SHARE_DENY_WRITE | STGM_READ | STGM_FAILIFTHERE, &stream); hr = CreateConfigStream(filename, &stream);
if (FAILED(hr))
return hr;
if (SUCCEEDED(hr)) initresult = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
{
V_VT(&var) = VT_UNKNOWN; V_VT(&var) = VT_UNKNOWN;
V_UNKNOWN(&var) = (IUnknown*)stream; V_UNKNOWN(&var) = (IUnknown*)stream;
hr = parse_config(var, result); hr = parse_config(var, result);
IStream_Release(stream); IStream_Release(stream);
}
if (SUCCEEDED(initresult)) if (SUCCEEDED(initresult))
CoUninitialize(); CoUninitialize();
......
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