Wine-Devel
By thread
wine-devel@list.winehq.org
By month
Messages by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
December 2020
- 68 participants
- 931 messages
Re: [PATCH 05/17] winegstreamer: Implement Get*Attributes functions for audio converter transform.
by Zebediah Figura (she/her)
On 12/3/20 3:55 PM, Derek Lesho wrote:
> Signed-off-by: Derek Lesho <dlesho(a)codeweavers.com>
> ---
> dlls/winegstreamer/audioconvert.c | 37 +++++++++++++++++++++++++++----
> 1 file changed, 33 insertions(+), 4 deletions(-)
>
The patch subject is mildly misleading, since you don't implement all
such functions...
> diff --git a/dlls/winegstreamer/audioconvert.c b/dlls/winegstreamer/audioconvert.c
> index d204d9582ba..556aba44fc9 100644
> --- a/dlls/winegstreamer/audioconvert.c
> +++ b/dlls/winegstreamer/audioconvert.c
> @@ -37,6 +37,8 @@ struct audio_converter
> {
> IMFTransform IMFTransform_iface;
> LONG refcount;
> + IMFAttributes *attributes;
> + IMFAttributes *output_attributes;
> IMFMediaType *input_type;
> IMFMediaType *output_type;
> CRITICAL_SECTION cs;
> @@ -87,6 +89,10 @@ static ULONG WINAPI audio_converter_Release(IMFTransform *iface)
> {
> transform->cs.DebugInfo->Spare[0] = 0;
> DeleteCriticalSection(&transform->cs);
> + if (transform->attributes)
> + IMFAttributes_Release(transform->attributes);
> + if (transform->output_attributes)
> + IMFAttributes_Release(transform->output_attributes);
> gst_object_unref(transform->container);
> heap_free(transform);
> }
> @@ -152,9 +158,14 @@ static HRESULT WINAPI audio_converter_GetOutputStreamInfo(IMFTransform *iface, D
>
> static HRESULT WINAPI audio_converter_GetAttributes(IMFTransform *iface, IMFAttributes **attributes)
> {
> - FIXME("%p, %p.\n", iface, attributes);
> + struct audio_converter *converter = impl_audio_converter_from_IMFTransform(iface);
>
> - return E_NOTIMPL;
> + TRACE("%p, %p.\n", iface, attributes);
> +
> + *attributes = converter->attributes;
> + IMFAttributes_AddRef(*attributes);
> +
> + return S_OK;
> }
>
> static HRESULT WINAPI audio_converter_GetInputStreamAttributes(IMFTransform *iface, DWORD id,
> @@ -168,9 +179,14 @@ static HRESULT WINAPI audio_converter_GetInputStreamAttributes(IMFTransform *ifa
> static HRESULT WINAPI audio_converter_GetOutputStreamAttributes(IMFTransform *iface, DWORD id,
> IMFAttributes **attributes)
> {
> - FIXME("%p, %u, %p.\n", iface, id, attributes);
> + struct audio_converter *converter = impl_audio_converter_from_IMFTransform(iface);
>
> - return E_NOTIMPL;
> + TRACE("%p, %u, %p.\n", iface, id, attributes);
> +
> + *attributes = converter->output_attributes;
> + IMFAttributes_AddRef(*attributes);
> +
> + return S_OK;
> }
>
> static HRESULT WINAPI audio_converter_DeleteInputStream(IMFTransform *iface, DWORD id)
> @@ -644,6 +660,7 @@ static const IMFTransformVtbl audio_converter_vtbl =
> HRESULT audio_converter_create(REFIID riid, void **ret)
> {
> struct audio_converter *object;
> + HRESULT hr;
>
> TRACE("%s %p\n", debugstr_guid(riid), ret);
>
> @@ -656,6 +673,18 @@ HRESULT audio_converter_create(REFIID riid, void **ret)
> InitializeCriticalSection(&object->cs);
> object->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": audio_converter_lock");
>
> + if (FAILED(hr = MFCreateAttributes(&object->attributes, 0)))
> + {
> + IMFTransform_Release(&object->IMFTransform_iface);
> + return hr;
> + }
> +
> + if (FAILED(hr = MFCreateAttributes(&object->output_attributes, 0)))
> + {
> + IMFTransform_Release(&object->IMFTransform_iface);
> + return hr;
> + }
> +
> object->container = gst_bin_new(NULL);
>
> if (!(object->appsrc = gst_element_factory_make("appsrc", NULL)))
>
Dec. 4, 2020
Re: [PATCH 04/17] winegstreamer: Implement ::Get(Input/Output)StreamInfo for audio conversion transform.
by Zebediah Figura (she/her)
On 12/3/20 3:55 PM, Derek Lesho wrote:
> Signed-off-by: Derek Lesho <dlesho(a)codeweavers.com>
> ---
> v1(v6): Made naming and style of the two functions consistent.
> ---
> dlls/winegstreamer/audioconvert.c | 23 +++++++++++++++++++----
> 1 file changed, 19 insertions(+), 4 deletions(-)
>
> diff --git a/dlls/winegstreamer/audioconvert.c b/dlls/winegstreamer/audioconvert.c
> index 631c57d6d55..d204d9582ba 100644
> --- a/dlls/winegstreamer/audioconvert.c
> +++ b/dlls/winegstreamer/audioconvert.c
> @@ -123,16 +123,31 @@ static HRESULT WINAPI audio_converter_GetStreamIDs(IMFTransform *iface, DWORD in
>
> static HRESULT WINAPI audio_converter_GetInputStreamInfo(IMFTransform *iface, DWORD id, MFT_INPUT_STREAM_INFO *info)
> {
> - FIXME("%p %u %p.\n", iface, id, info);
> + TRACE("%p %u %p.\n", iface, id, info);
>
> - return E_NOTIMPL;
> + if (id != 0)
> + return MF_E_INVALIDSTREAMNUMBER;
> +
> + info->dwFlags = MFT_INPUT_STREAM_WHOLE_SAMPLES | MFT_INPUT_STREAM_DOES_NOT_ADDREF;
> + info->cbMaxLookahead = 0;
> + info->cbAlignment = 0;
> + info->hnsMaxLatency = 0;
> +
"info->cbSize" isn't set here; is that intentional?
> + return S_OK;
> }
>
> static HRESULT WINAPI audio_converter_GetOutputStreamInfo(IMFTransform *iface, DWORD id, MFT_OUTPUT_STREAM_INFO *info)
> {
> - FIXME("%p %u %p.\n", iface, id, info);
> + TRACE("%p %u %p.\n", iface, id, info);
>
> - return E_NOTIMPL;
> + if (id != 0)
> + return MF_E_INVALIDSTREAMNUMBER;
> +
> + info->dwFlags = MFT_OUTPUT_STREAM_PROVIDES_SAMPLES;
Is it intentional to provide WHOLE_SAMPLES in GetInputStreamInfo() but
not (the equivalent flag) here?
> + info->cbSize = 0;
> + info->cbAlignment = 0;
> +
> + return S_OK;
> }
>
> static HRESULT WINAPI audio_converter_GetAttributes(IMFTransform *iface, IMFAttributes **attributes)
>
Dec. 4, 2020
Re: [PATCH 03/17] winegstreamer: Implement ::Process(Input/Output) for audio conversion transform.
by Zebediah Figura (she/her)
On 12/3/20 3:55 PM, Derek Lesho wrote:
> Signed-off-by: Derek Lesho <dlesho(a)codeweavers.com>
> ---
> v1(v6):
> - Move unused hr to later patch.
> - Fix extra parentheses.
> - Place converter declaration more consistently.
> ---
> dlls/winegstreamer/audioconvert.c | 175 +++++++++++++++++++++++++++++-
> dlls/winegstreamer/gst_private.h | 1 +
> dlls/winegstreamer/mfplat.c | 69 ++++++++++++
> 3 files changed, 239 insertions(+), 6 deletions(-)
>
> diff --git a/dlls/winegstreamer/audioconvert.c b/dlls/winegstreamer/audioconvert.c
> index 7fb0dee99f6..631c57d6d55 100644
> --- a/dlls/winegstreamer/audioconvert.c
> +++ b/dlls/winegstreamer/audioconvert.c
> @@ -40,6 +40,8 @@ struct audio_converter
> IMFMediaType *input_type;
> IMFMediaType *output_type;
> CRITICAL_SECTION cs;
> + BOOL inflight;
> + GstElement *container, *appsrc, *audioconvert, *resampler, *appsink;
Both "resampler" and "audioconvert" can be local variables, I think.
> };
>
> static struct audio_converter *impl_audio_converter_from_IMFTransform(IMFTransform *iface)
> @@ -85,6 +87,7 @@ static ULONG WINAPI audio_converter_Release(IMFTransform *iface)
> {
> transform->cs.DebugInfo->Spare[0] = 0;
> DeleteCriticalSection(&transform->cs);
> + gst_object_unref(transform->container);
> heap_free(transform);
> }
>
> @@ -311,7 +314,8 @@ static HRESULT WINAPI audio_converter_SetInputType(IMFTransform *iface, DWORD id
> if (!(input_caps = caps_from_mf_media_type(type)))
> return MF_E_INVALIDTYPE;
>
> - gst_caps_unref(input_caps);
> + if (flags & MFT_SET_TYPE_TEST_ONLY)
> + gst_caps_unref(input_caps);
> }
>
> if (flags & MFT_SET_TYPE_TEST_ONLY)
> @@ -320,6 +324,7 @@ static HRESULT WINAPI audio_converter_SetInputType(IMFTransform *iface, DWORD id
> EnterCriticalSection(&converter->cs);
>
> hr = S_OK;
> + gst_element_set_state(converter->container, GST_STATE_READY);
Presumably you also want to reset "inflight" here...
>
> if (type)
> {
> @@ -329,6 +334,9 @@ static HRESULT WINAPI audio_converter_SetInputType(IMFTransform *iface, DWORD id
> if (SUCCEEDED(hr))
> hr = IMFMediaType_CopyAllItems(type, (IMFAttributes *) converter->input_type);
>
> + g_object_set(converter->appsrc, "caps", input_caps, NULL);
> + gst_caps_unref(input_caps);
> +
> if (FAILED(hr))
> {
> IMFMediaType_Release(converter->input_type);
> @@ -341,6 +349,9 @@ static HRESULT WINAPI audio_converter_SetInputType(IMFTransform *iface, DWORD id
> converter->input_type = NULL;
> }
>
> + if (converter->input_type && converter->output_type)
> + gst_element_set_state(converter->container, GST_STATE_PLAYING);
> +
> LeaveCriticalSection(&converter->cs);
>
> return hr;
> @@ -386,7 +397,8 @@ static HRESULT WINAPI audio_converter_SetOutputType(IMFTransform *iface, DWORD i
> if (!(output_caps = caps_from_mf_media_type(type)))
> return MF_E_INVALIDTYPE;
>
> - gst_caps_unref(output_caps);
> + if (flags & MFT_SET_TYPE_TEST_ONLY)
> + gst_caps_unref(output_caps);
This is something of a style nitpick, but having variables that are
conditionally valid like this is often better avoided. Reorganizing the
function to be something more like
if (CLEAR)
{
if (TEST_ONLY)
return;
EnterCriticalSection();
// clear
LeaveCriticalSection();
return;
}
// validate
// convert to caps
if (TEST_ONLY)
return;
EnterCriticalSection();
// clear
LeaveCriticalSection();
might be more idiomatic.
> }
>
> if (flags & MFT_SET_TYPE_TEST_ONLY)
> @@ -395,6 +407,7 @@ static HRESULT WINAPI audio_converter_SetOutputType(IMFTransform *iface, DWORD i
> EnterCriticalSection(&converter->cs);
>
> hr = S_OK;
> + gst_element_set_state(converter->container, GST_STATE_READY);
...and here.
>
> if (type)
> {
> @@ -404,6 +417,9 @@ static HRESULT WINAPI audio_converter_SetOutputType(IMFTransform *iface, DWORD i
> if (SUCCEEDED(hr))
> hr = IMFMediaType_CopyAllItems(type, (IMFAttributes *) converter->output_type);
>
> + g_object_set(converter->appsink, "caps", output_caps, NULL);
> + gst_caps_unref(output_caps);
> +
> if (FAILED(hr))
> {
> IMFMediaType_Release(converter->output_type);
> @@ -416,6 +432,9 @@ static HRESULT WINAPI audio_converter_SetOutputType(IMFTransform *iface, DWORD i
> converter->output_type = NULL;
> }
>
> + if (converter->input_type && converter->output_type)
> + gst_element_set_state(converter->container, GST_STATE_PLAYING);
> +
> LeaveCriticalSection(&converter->cs);
>
> return hr;
> @@ -479,17 +498,102 @@ static HRESULT WINAPI audio_converter_ProcessMessage(IMFTransform *iface, MFT_ME
>
> static HRESULT WINAPI audio_converter_ProcessInput(IMFTransform *iface, DWORD id, IMFSample *sample, DWORD flags)
> {
> - FIXME("%p, %u, %p, %#x.\n", iface, id, sample, flags);
> + GstBuffer *gst_buffer;
> + int ret;
>
> - return E_NOTIMPL;
> + struct audio_converter *converter = impl_audio_converter_from_IMFTransform(iface);
> +
> + TRACE("%p, %u, %p, %#x.\n", iface, id, sample, flags);
> +
> + if (flags)
> + WARN("Unsupported flags %#x\n", flags);
> +
> + if (id != 0)
> + return MF_E_INVALIDSTREAMNUMBER;
> +
> + EnterCriticalSection(&converter->cs);
> +
> + if (!converter->input_type || !converter->output_type)
> + {
> + LeaveCriticalSection(&converter->cs);
> + return MF_E_TRANSFORM_TYPE_NOT_SET;
> + }
> +
> + if (converter->inflight)
> + {
> + LeaveCriticalSection(&converter->cs);
> + return MF_E_NOTACCEPTING;
> + }
> +
> + if (!(gst_buffer = gst_buffer_from_mf_sample(sample)))
> + {
> + LeaveCriticalSection(&converter->cs);
> + return E_FAIL;
> + }
> +
> + g_signal_emit_by_name(converter->appsrc, "push-buffer", gst_buffer, &ret);
> + gst_buffer_unref(gst_buffer);
> + if (ret != GST_FLOW_OK)
> + {
> + ERR("Couldn't push buffer ret = %d (%s)\n", ret, gst_flow_get_name(ret));
Is there a point in tracing the numeric value as well?
> + LeaveCriticalSection(&converter->cs);
> + return E_FAIL;
> + }
> +
> + converter->inflight = TRUE;
> + LeaveCriticalSection(&converter->cs);
> +
> + return S_OK;
> }
>
> static HRESULT WINAPI audio_converter_ProcessOutput(IMFTransform *iface, DWORD flags, DWORD count,
> MFT_OUTPUT_DATA_BUFFER *samples, DWORD *status)
> {
> - FIXME("%p, %#x, %u, %p, %p.\n", iface, flags, count, samples, status);
> + GstSample *sample;
>
> - return E_NOTIMPL;
> + struct audio_converter *converter = impl_audio_converter_from_IMFTransform(iface);
> +
> + TRACE("%p, %#x, %u, %p, %p.\n", iface, flags, count, samples, status);
> +
> + if (flags)
> + WARN("Unsupported flags %#x\n", flags);
> +
> + if (!count)
> + return S_OK;
> +
> + if (count != 1)
> + return MF_E_INVALIDSTREAMNUMBER;
> +
> + if (samples[0].dwStreamID != 0)
> + return MF_E_INVALIDSTREAMNUMBER;
> +
> + EnterCriticalSection(&converter->cs);
> +
> + if (!converter->input_type || !converter->output_type)
> + {
> + LeaveCriticalSection(&converter->cs);
> + return MF_E_TRANSFORM_TYPE_NOT_SET;
> + }
> +
> + if (!converter->inflight)
> + {
> + LeaveCriticalSection(&converter->cs);
> + return MF_E_TRANSFORM_NEED_MORE_INPUT;
> + }
> +
> + g_signal_emit_by_name(converter->appsink, "pull-sample", &sample);
I'm not fully familiar with mfplat, but this call may block, and it
doesn't look like ProcessOutput() is supposed to. You probably want
"try-pull-sample" instead.
> +
> + converter->inflight = FALSE;
Nitpick, but this looks like a spacing error.
> +
> + samples[0].pSample = mf_sample_from_gst_buffer(gst_sample_get_buffer(sample));
> + gst_sample_unref(sample);
> + samples[0].dwStatus = S_OK;
> + samples[0].pEvents = NULL;
> + *status = 0;
> +
> + LeaveCriticalSection(&converter->cs);
> +
> + return S_OK;
> }
>
> static const IMFTransformVtbl audio_converter_vtbl =
> @@ -537,6 +641,65 @@ HRESULT audio_converter_create(REFIID riid, void **ret)
> InitializeCriticalSection(&object->cs);
> object->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": audio_converter_lock");
>
> + object->container = gst_bin_new(NULL);
> +
> + if (!(object->appsrc = gst_element_factory_make("appsrc", NULL)))
> + {
> + ERR("Failed to create appsrc, are %u-bit Gstreamer \"base\" plugins installed?\n",
> + 8 * (int)sizeof(void *));
> + IMFTransform_Release(&object->IMFTransform_iface);
> + return E_FAIL;
> + }
> + gst_bin_add(GST_BIN(object->container), object->appsrc);
> +
> + if (!(object->audioconvert = gst_element_factory_make("audioconvert", NULL)))
> + {
> + ERR("Failed to create audioconvert, are %u-bit Gstreamer \"base\" plugins installed?\n",
> + 8 * (int)sizeof(void *));
> + IMFTransform_Release(&object->IMFTransform_iface);
> + return E_FAIL;
> + }
> + gst_bin_add(GST_BIN(object->container), object->audioconvert);
> +
> + if (!(object->resampler = gst_element_factory_make("audioresample", NULL)))
> + {
> + ERR("Failed to create audioresample, are %u-bit Gstreamer \"base\" plugins installed?\n",
> + 8 * (int)sizeof(void *));
> + IMFTransform_Release(&object->IMFTransform_iface);
> + return E_FAIL;
> + }
> + gst_bin_add(GST_BIN(object->container), object->resampler);
> +
> + if (!(object->appsink = gst_element_factory_make("appsink", NULL)))
> + {
> + ERR("Failed to create appsink, are %u-bit Gstreamer \"base\" plugins installed?\n",
> + 8 * (int)sizeof(void *));
> + IMFTransform_Release(&object->IMFTransform_iface);
> + return E_FAIL;
> + }
> + gst_bin_add(GST_BIN(object->container), object->appsink);
> +
> + if (!gst_element_link(object->appsrc, object->audioconvert))
> + {
> + ERR("Failed to link appsrc to audioconvert\n");
> + IMFTransform_Release(&object->IMFTransform_iface);
> + return E_FAIL;
> + }
> +
> + if (!gst_element_link(object->audioconvert, object->resampler))
> + {
> + ERR("Failed to link audioconvert to resampler\n");
> + IMFTransform_Release(&object->IMFTransform_iface);
> + return E_FAIL;
> + }
> +
> + if (!gst_element_link(object->resampler, object->appsink))
> + {
> + ERR("Failed to link resampler to appsink\n");
> + IMFTransform_Release(&object->IMFTransform_iface);
> + return E_FAIL;
> + }
> +
> *ret = &object->IMFTransform_iface;
> return S_OK;
> }
> diff --git a/dlls/winegstreamer/gst_private.h b/dlls/winegstreamer/gst_private.h
> index 9518f721504..14b6a011ac2 100644
> --- a/dlls/winegstreamer/gst_private.h
> +++ b/dlls/winegstreamer/gst_private.h
> @@ -82,6 +82,7 @@ HRESULT winegstreamer_stream_handler_create(REFIID riid, void **obj) DECLSPEC_HI
> IMFMediaType *mf_media_type_from_caps(const GstCaps *caps) DECLSPEC_HIDDEN;
> GstCaps *caps_from_mf_media_type(IMFMediaType *type) DECLSPEC_HIDDEN;
> IMFSample *mf_sample_from_gst_buffer(GstBuffer *in) DECLSPEC_HIDDEN;
> +GstBuffer *gst_buffer_from_mf_sample(IMFSample *in) DECLSPEC_HIDDEN;
>
> HRESULT winegstreamer_stream_handler_create(REFIID riid, void **obj) DECLSPEC_HIDDEN;
>
> diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c
> index f300988fc5c..883084b2d89 100644
> --- a/dlls/winegstreamer/mfplat.c
> +++ b/dlls/winegstreamer/mfplat.c
> @@ -865,3 +865,72 @@ done:
>
> return out;
> }
> +
> +GstBuffer* gst_buffer_from_mf_sample(IMFSample *mf_sample)
Please use consistent spacing around pointers.
> +{
> + GstBuffer *out = gst_buffer_new();
> + IMFMediaBuffer *mf_buffer = NULL;
> + LONGLONG duration, time;
> + DWORD buffer_count;
> + unsigned int i;
> + HRESULT hr;
> +
> + if (FAILED(hr = IMFSample_GetSampleDuration(mf_sample, &duration)))
> + goto fail;
> +
> + if (FAILED(hr = IMFSample_GetSampleTime(mf_sample, &time)))
> + goto fail;
> +
> + GST_BUFFER_DURATION(out) = duration;
> + GST_BUFFER_PTS(out) = time * 100;
> +
> + if (FAILED(hr = IMFSample_GetBufferCount(mf_sample, &buffer_count)))
> + goto fail;
> +
> + for (i = 0; i < buffer_count; i++)
> + {
> + DWORD buffer_size;
> + GstMapInfo map_info;
> + GstMemory *memory;
> + BYTE *buf_data;
> +
> + if (FAILED(hr = IMFSample_GetBufferByIndex(mf_sample, i, &mf_buffer)))
> + goto fail;
> +
> + if (FAILED(hr = IMFMediaBuffer_GetCurrentLength(mf_buffer, &buffer_size)))
> + goto fail;
> +
> + memory = gst_allocator_alloc(NULL, buffer_size, NULL);
> + gst_memory_resize(memory, 0, buffer_size);
> +
> + if (!(gst_memory_map(memory, &map_info, GST_MAP_WRITE)))
These parentheses are somewhat redundant...
> + {
> + hr = E_FAIL;
> + goto fail;
> + }
> +
> + if (FAILED(hr = IMFMediaBuffer_Lock(mf_buffer, &buf_data, NULL, NULL)))
> + goto fail;
> +
> + memcpy(map_info.data, buf_data, buffer_size);
> +
> + if (FAILED(hr = IMFMediaBuffer_Unlock(mf_buffer)))
> + goto fail;
> +
> + gst_memory_unmap(memory, &map_info);
> +
> + gst_buffer_append_memory(out, memory);
> +
> + IMFMediaBuffer_Release(mf_buffer);
> + mf_buffer = NULL;
> + }
> +
> + return out;
> +
> +fail:
> + ERR("Failed to copy IMFSample to GstBuffer, hr = %#x\n", hr);
> + if (mf_buffer)
> + IMFMediaBuffer_Release(mf_buffer);
> + gst_buffer_unref(out);
> + return NULL;
> +}
>
Dec. 4, 2020
Re: [PATCH 02/17] winegstreamer: Implement ::SetOutputType for audio conversion transform.
by Zebediah Figura (she/her)
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
Dec. 4, 2020
Re: [PATCH 01/17] winegstreamer: Implement ::SetInputType for audio conversion transform.
by Zebediah Figura (she/her)
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
That said, I am only really qualified to review these patches for
general errors, and for usage of GStreamer; it strikes me as a good idea
for the Media Foundation maintainers to also review them, to ensure the
functions are doing what they are supposed to.
Dec. 4, 2020
[PATCH] mfplat: Zero-initialize the device manager object.
by Zebediah Figura
This fixes a crash for me when reallocating "handles", triggered by the mfplat tests.
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
dlls/mfplat/main.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/dlls/mfplat/main.c b/dlls/mfplat/main.c
index e4cd1c397ad..54bd70a2fff 100644
--- a/dlls/mfplat/main.c
+++ b/dlls/mfplat/main.c
@@ -8911,14 +8911,12 @@ HRESULT WINAPI MFCreateDXGIDeviceManager(UINT *token, IMFDXGIDeviceManager **man
if (!token || !manager)
return E_POINTER;
- object = heap_alloc(sizeof(*object));
- if (!object)
+ if (!(object = heap_alloc_zero(sizeof(*object))))
return E_OUTOFMEMORY;
object->IMFDXGIDeviceManager_iface.lpVtbl = &dxgi_device_manager_vtbl;
object->refcount = 1;
object->token = GetTickCount();
- object->device = NULL;
InitializeCriticalSection(&object->cs);
InitializeConditionVariable(&object->lock);
--
2.29.2
Dec. 4, 2020
[PATCH] ntdll: Use wide-char string literals.
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/ntdll/atom.c | 3 +-
dlls/ntdll/directory.c | 6 +-
dlls/ntdll/env.c | 138 +++++++++++++----------------------------
dlls/ntdll/loader.c | 107 +++++++++++---------------------
dlls/ntdll/loadorder.c | 24 +++----
dlls/ntdll/locale.c | 8 +--
dlls/ntdll/path.c | 15 ++---
dlls/ntdll/reg.c | 31 ++-------
dlls/ntdll/relay.c | 32 +++-------
dlls/ntdll/rtl.c | 6 +-
dlls/ntdll/rtlstr.c | 20 ++----
dlls/ntdll/sec.c | 7 +--
12 files changed, 123 insertions(+), 274 deletions(-)
diff --git a/dlls/ntdll/atom.c b/dlls/ntdll/atom.c
index fd1f17b6197..8facadbf8f6 100644
--- a/dlls/ntdll/atom.c
+++ b/dlls/ntdll/atom.c
@@ -102,11 +102,10 @@ NTSTATUS WINAPI RtlDeleteAtomFromAtomTable( RTL_ATOM_TABLE table, RTL_ATOM atom
*/
static ULONG integral_atom_name(WCHAR* buffer, ULONG len, RTL_ATOM atom)
{
- static const WCHAR fmt[] = {'#','%','u',0};
WCHAR tmp[16];
int ret;
- ret = swprintf( tmp, ARRAY_SIZE(tmp), fmt, atom );
+ ret = swprintf( tmp, ARRAY_SIZE(tmp), L"#%u", atom );
if (!len) return ret * sizeof(WCHAR);
if (len <= ret) ret = len - 1;
memcpy( buffer, tmp, ret * sizeof(WCHAR) );
diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c
index 39641e9d4d5..cfb4595d457 100644
--- a/dlls/ntdll/directory.c
+++ b/dlls/ntdll/directory.c
@@ -50,8 +50,6 @@ static BOOL show_dot_files;
*/
void init_directories(void)
{
- static const WCHAR WineW[] = {'S','o','f','t','w','a','r','e','\\','W','i','n','e',0};
- static const WCHAR ShowDotFilesW[] = {'S','h','o','w','D','o','t','F','i','l','e','s',0};
char tmp[80];
HANDLE root, hkey;
DWORD dummy;
@@ -65,12 +63,12 @@ void init_directories(void)
attr.Attributes = 0;
attr.SecurityDescriptor = NULL;
attr.SecurityQualityOfService = NULL;
- RtlInitUnicodeString( &nameW, WineW );
+ RtlInitUnicodeString( &nameW, L"Software\\Wine" );
/* @@ Wine registry key: HKCU\Software\Wine */
if (!NtOpenKey( &hkey, KEY_ALL_ACCESS, &attr ))
{
- RtlInitUnicodeString( &nameW, ShowDotFilesW );
+ RtlInitUnicodeString( &nameW, L"ShowDotFiles" );
if (!NtQueryValueKey( hkey, &nameW, KeyValuePartialInformation, tmp, sizeof(tmp), &dummy ))
{
WCHAR *str = (WCHAR *)((KEY_VALUE_PARTIAL_INFORMATION *)tmp)->Data;
diff --git a/dlls/ntdll/env.c b/dlls/ntdll/env.c
index bf3fedcac67..5d1b6de5bba 100644
--- a/dlls/ntdll/env.c
+++ b/dlls/ntdll/env.c
@@ -33,7 +33,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(environ);
-static WCHAR empty[] = {0};
+static WCHAR empty[] = L"";
static const UNICODE_STRING empty_str = { 0, sizeof(empty), empty };
static const UNICODE_STRING null_str = { 0, 0, NULL };
@@ -76,7 +76,6 @@ static void set_env_var( WCHAR **env, const WCHAR *name, const WCHAR *val )
static void set_registry_variables( WCHAR **env, HANDLE hkey, ULONG type )
{
static const WCHAR pathW[] = {'P','A','T','H'};
- static const WCHAR sep[] = {';',0};
UNICODE_STRING env_name, env_value;
NTSTATUS status;
DWORD size;
@@ -114,7 +113,7 @@ static void set_registry_variables( WCHAR **env, HANDLE hkey, ULONG type )
!wcsnicmp( env_name.Buffer, pathW, ARRAY_SIZE( pathW )) &&
!RtlQueryEnvironmentVariable_U( *env, &env_name, &tmp ))
{
- RtlAppendUnicodeToString( &tmp, sep );
+ RtlAppendUnicodeToString( &tmp, L";" );
if (RtlAppendUnicodeStringToString( &tmp, &env_value )) continue;
RtlCopyUnicodeString( &env_value, &tmp );
}
@@ -137,16 +136,6 @@ static void set_registry_variables( WCHAR **env, HANDLE hkey, ULONG type )
*/
static BOOL set_registry_environment( WCHAR **env, BOOL first_time )
{
- static const WCHAR env_keyW[] = {'\\','R','e','g','i','s','t','r','y','\\',
- 'M','a','c','h','i','n','e','\\',
- 'S','y','s','t','e','m','\\',
- 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\',
- 'C','o','n','t','r','o','l','\\',
- 'S','e','s','s','i','o','n',' ','M','a','n','a','g','e','r','\\',
- 'E','n','v','i','r','o','n','m','e','n','t',0};
- static const WCHAR envW[] = {'E','n','v','i','r','o','n','m','e','n','t',0};
- static const WCHAR volatile_envW[] = {'V','o','l','a','t','i','l','e',' ','E','n','v','i','r','o','n','m','e','n','t',0};
-
OBJECT_ATTRIBUTES attr;
UNICODE_STRING nameW;
HANDLE hkey;
@@ -154,7 +143,8 @@ static BOOL set_registry_environment( WCHAR **env, BOOL first_time )
/* first the system environment variables */
InitializeObjectAttributes( &attr, &nameW, 0, 0, NULL );
- RtlInitUnicodeString( &nameW, env_keyW );
+ RtlInitUnicodeString( &nameW, L"\\Registry\\Machine\\System\\CurrentControlSet\\Control\\"
+ "Session Manager\\Environment" );
if (first_time && !NtOpenKey( &hkey, KEY_READ, &attr ))
{
set_registry_variables( env, hkey, REG_SZ );
@@ -165,7 +155,7 @@ static BOOL set_registry_environment( WCHAR **env, BOOL first_time )
/* then the ones for the current user */
if (RtlOpenCurrentUser( KEY_READ, &attr.RootDirectory ) != STATUS_SUCCESS) return ret;
- RtlInitUnicodeString( &nameW, envW );
+ RtlInitUnicodeString( &nameW, L"Environment" );
if (first_time && !NtOpenKey( &hkey, KEY_READ, &attr ))
{
set_registry_variables( env, hkey, REG_SZ );
@@ -173,7 +163,7 @@ static BOOL set_registry_environment( WCHAR **env, BOOL first_time )
NtClose( hkey );
}
- RtlInitUnicodeString( &nameW, volatile_envW );
+ RtlInitUnicodeString( &nameW, L"Volatile Environment" );
if (!NtOpenKey( &hkey, KEY_READ, &attr ))
{
set_registry_variables( env, hkey, REG_SZ );
@@ -237,26 +227,6 @@ static WCHAR *get_registry_value( WCHAR *env, HKEY hkey, const WCHAR *name )
*/
static void set_additional_environment( WCHAR **env )
{
- static const WCHAR profile_keyW[] = {'\\','R','e','g','i','s','t','r','y','\\',
- 'M','a','c','h','i','n','e','\\',
- 'S','o','f','t','w','a','r','e','\\',
- 'M','i','c','r','o','s','o','f','t','\\',
- 'W','i','n','d','o','w','s',' ','N','T','\\',
- 'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
- 'P','r','o','f','i','l','e','L','i','s','t',0};
- static const WCHAR computer_keyW[] = {'\\','R','e','g','i','s','t','r','y','\\',
- 'M','a','c','h','i','n','e','\\',
- 'S','y','s','t','e','m','\\',
- 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\',
- 'C','o','n','t','r','o','l','\\',
- 'C','o','m','p','u','t','e','r','N','a','m','e','\\',
- 'A','c','t','i','v','e','C','o','m','p','u','t','e','r','N','a','m','e',0};
- static const WCHAR computer_valueW[] = {'C','o','m','p','u','t','e','r','N','a','m','e',0};
- static const WCHAR public_valueW[] = {'P','u','b','l','i','c',0};
- static const WCHAR computernameW[] = {'C','O','M','P','U','T','E','R','N','A','M','E',0};
- static const WCHAR allusersW[] = {'A','L','L','U','S','E','R','S','P','R','O','F','I','L','E',0};
- static const WCHAR programdataW[] = {'P','r','o','g','r','a','m','D','a','t','a',0};
- static const WCHAR publicW[] = {'P','U','B','L','I','C',0};
OBJECT_ATTRIBUTES attr;
UNICODE_STRING nameW;
WCHAR *val;
@@ -265,18 +235,19 @@ static void set_additional_environment( WCHAR **env )
/* set the user profile variables */
InitializeObjectAttributes( &attr, &nameW, 0, 0, NULL );
- RtlInitUnicodeString( &nameW, profile_keyW );
+ RtlInitUnicodeString( &nameW, L"\\Registry\\Machine\\Software\\Microsoft\\Windows NT\\"
+ "CurrentVersion\\ProfileList" );
if (!NtOpenKey( &hkey, KEY_READ, &attr ))
{
- if ((val = get_registry_value( *env, hkey, programdataW )))
+ if ((val = get_registry_value( *env, hkey, L"ProgramData" )))
{
- set_env_var( env, allusersW, val );
- set_env_var( env, programdataW, val );
+ set_env_var( env, L"ALLUSERSPROFILE", val );
+ set_env_var( env, L"ProgramData", val );
RtlFreeHeap( GetProcessHeap(), 0, val );
}
- if ((val = get_registry_value( *env, hkey, public_valueW )))
+ if ((val = get_registry_value( *env, hkey, L"Public" )))
{
- set_env_var( env, publicW, val );
+ set_env_var( env, L"PUBLIC", val );
RtlFreeHeap( GetProcessHeap(), 0, val );
}
NtClose( hkey );
@@ -284,12 +255,13 @@ static void set_additional_environment( WCHAR **env )
/* set the computer name */
- RtlInitUnicodeString( &nameW, computer_keyW );
+ RtlInitUnicodeString( &nameW, L"\\Registry\\Machine\\System\\CurrentControlSet\\Control\\"
+ "ComputerName\\ActiveComputerName" );
if (!NtOpenKey( &hkey, KEY_READ, &attr ))
{
- if ((val = get_registry_value( *env, hkey, computer_valueW )))
+ if ((val = get_registry_value( *env, hkey, L"ComputerName" )))
{
- set_env_var( env, computernameW, val );
+ set_env_var( env, L"COMPUTERNAME", val );
RtlFreeHeap( GetProcessHeap(), 0, val );
}
NtClose( hkey );
@@ -304,25 +276,8 @@ static void set_additional_environment( WCHAR **env )
*/
static void set_wow64_environment( WCHAR **env )
{
- static WCHAR archW[] = {'P','R','O','C','E','S','S','O','R','_','A','R','C','H','I','T','E','C','T','U','R','E',0};
- static WCHAR arch6432W[] = {'P','R','O','C','E','S','S','O','R','_','A','R','C','H','I','T','E','W','6','4','3','2',0};
- static const WCHAR x86W[] = {'x','8','6',0};
- static const WCHAR versionW[] = {'\\','R','e','g','i','s','t','r','y','\\',
- 'M','a','c','h','i','n','e','\\',
- 'S','o','f','t','w','a','r','e','\\',
- 'M','i','c','r','o','s','o','f','t','\\',
- 'W','i','n','d','o','w','s','\\',
- 'C','u','r','r','e','n','t','V','e','r','s','i','o','n',0};
- static const WCHAR progdirW[] = {'P','r','o','g','r','a','m','F','i','l','e','s','D','i','r',0};
- static const WCHAR progdir86W[] = {'P','r','o','g','r','a','m','F','i','l','e','s','D','i','r',' ','(','x','8','6',')',0};
- static const WCHAR progfilesW[] = {'P','r','o','g','r','a','m','F','i','l','e','s',0};
- static const WCHAR progfiles86W[] = {'P','r','o','g','r','a','m','F','i','l','e','s','(','x','8','6',')',0};
- static const WCHAR progw6432W[] = {'P','r','o','g','r','a','m','W','6','4','3','2',0};
- static const WCHAR commondirW[] = {'C','o','m','m','o','n','F','i','l','e','s','D','i','r',0};
- static const WCHAR commondir86W[] = {'C','o','m','m','o','n','F','i','l','e','s','D','i','r',' ','(','x','8','6',')',0};
- static const WCHAR commonfilesW[] = {'C','o','m','m','o','n','P','r','o','g','r','a','m','F','i','l','e','s',0};
- static const WCHAR commonfiles86W[] = {'C','o','m','m','o','n','P','r','o','g','r','a','m','F','i','l','e','s','(','x','8','6',')',0};
- static const WCHAR commonw6432W[] = {'C','o','m','m','o','n','P','r','o','g','r','a','m','W','6','4','3','2',0};
+ static WCHAR archW[] = L"PROCESSOR_ARCHITECTURE";
+ static WCHAR arch6432W[] = L"PROCESSOR_ARCHITEW6432";
WCHAR buf[256];
UNICODE_STRING arch_strW = { sizeof(archW) - sizeof(WCHAR), sizeof(archW), archW };
@@ -363,42 +318,42 @@ static void set_wow64_environment( WCHAR **env )
if (is_wow64)
{
RtlSetEnvironmentVariable( env, &arch6432_strW, &valW );
- RtlInitUnicodeString( &nameW, x86W );
+ RtlInitUnicodeString( &nameW, L"x86" );
RtlSetEnvironmentVariable( env, &arch_strW, &nameW );
}
}
InitializeObjectAttributes( &attr, &nameW, 0, 0, NULL );
- RtlInitUnicodeString( &nameW, versionW );
+ RtlInitUnicodeString( &nameW, L"\\Registry\\Machine\\Software\\Microsoft\\Windows\\CurrentVersion" );
if (NtOpenKey( &hkey, KEY_READ | KEY_WOW64_64KEY, &attr )) return;
/* set the ProgramFiles variables */
- if ((val = get_registry_value( *env, hkey, progdirW )))
+ if ((val = get_registry_value( *env, hkey, L"ProgramFilesDir" )))
{
- if (is_win64 || is_wow64) set_env_var( env, progw6432W, val );
- if (is_win64 || !is_wow64) set_env_var( env, progfilesW, val );
+ if (is_win64 || is_wow64) set_env_var( env, L"ProgramW6432", val );
+ if (is_win64 || !is_wow64) set_env_var( env, L"ProgramFiles", val );
RtlFreeHeap( GetProcessHeap(), 0, val );
}
- if ((val = get_registry_value( *env, hkey, progdir86W )))
+ if ((val = get_registry_value( *env, hkey, L"ProgramFilesDir (x86)" )))
{
- if (is_win64 || is_wow64) set_env_var( env, progfiles86W, val );
- if (is_wow64) set_env_var( env, progfilesW, val );
+ if (is_win64 || is_wow64) set_env_var( env, L"ProgramFiles(x86)", val );
+ if (is_wow64) set_env_var( env, L"ProgramFiles", val );
RtlFreeHeap( GetProcessHeap(), 0, val );
}
/* set the CommonProgramFiles variables */
- if ((val = get_registry_value( *env, hkey, commondirW )))
+ if ((val = get_registry_value( *env, hkey, L"CommonFilesDir" )))
{
- if (is_win64 || is_wow64) set_env_var( env, commonw6432W, val );
- if (is_win64 || !is_wow64) set_env_var( env, commonfilesW, val );
+ if (is_win64 || is_wow64) set_env_var( env, L"CommonProgramW6432", val );
+ if (is_win64 || !is_wow64) set_env_var( env, L"CommonProgramFiles", val );
RtlFreeHeap( GetProcessHeap(), 0, val );
}
- if ((val = get_registry_value( *env, hkey, commondir86W )))
+ if ((val = get_registry_value( *env, hkey, L"CommonFilesDir (x86)" )))
{
- if (is_win64 || is_wow64) set_env_var( env, commonfiles86W, val );
- if (is_wow64) set_env_var( env, commonfilesW, val );
+ if (is_win64 || is_wow64) set_env_var( env, L"CommonProgramFiles(x86)", val );
+ if (is_wow64) set_env_var( env, L"CommonProgramFiles", val );
RtlFreeHeap( GetProcessHeap(), 0, val );
}
NtClose( hkey );
@@ -469,7 +424,6 @@ static inline BOOL is_path_prefix( const WCHAR *prefix, const WCHAR *path, const
*/
static void get_image_path( const WCHAR *name, UNICODE_STRING *path )
{
- static const WCHAR exeW[] = {'.','e','x','e',0};
WCHAR *load_path, *file_part, full_name[MAX_PATH];
DWORD len;
@@ -482,7 +436,7 @@ static void get_image_path( const WCHAR *name, UNICODE_STRING *path )
if (RtlDoesFileExists_U( full_name )) goto done;
if (len < (MAX_PATH - 4) * sizeof(WCHAR) && !wcschr( file_part, '.' ))
{
- wcscat( file_part, exeW );
+ wcscat( file_part, L".exe" );
if (RtlDoesFileExists_U( full_name )) goto done;
}
/* check for builtin path inside system directory */
@@ -495,7 +449,7 @@ static void get_image_path( const WCHAR *name, UNICODE_STRING *path )
else
{
RtlGetExePath( name, &load_path );
- len = RtlDosSearchPath_U( load_path, name, exeW, sizeof(full_name), full_name, &file_part );
+ len = RtlDosSearchPath_U( load_path, name, L".exe", sizeof(full_name), full_name, &file_part );
RtlReleasePath( load_path );
if (!len || len > sizeof(full_name))
{
@@ -504,7 +458,7 @@ static void get_image_path( const WCHAR *name, UNICODE_STRING *path )
if (wcslen( name ) >= MAX_PATH - 4 - len) goto failed;
wcscpy( full_name, system_dir );
wcscat( full_name, name );
- if (!wcschr( name, '.' )) wcscat( full_name, exeW );
+ if (!wcschr( name, '.' )) wcscat( full_name, L".exe" );
}
}
done:
@@ -1140,15 +1094,6 @@ static inline void get_unicode_string( UNICODE_STRING *str, WCHAR **src, UINT le
*/
static void run_wineboot( WCHAR **env )
{
- static const WCHAR wineboot_eventW[] = {'\\','K','e','r','n','e','l','O','b','j','e','c','t','s',
- '\\','_','_','w','i','n','e','b','o','o','t','_','e','v','e','n','t',0};
- static const WCHAR wineboot[] = {'\\','?','?','\\','C',':','\\','w','i','n','d','o','w','s','\\',
- 's','y','s','t','e','m','3','2','\\',
- 'w','i','n','e','b','o','o','t','.','e','x','e',0};
- static const WCHAR cmdline[] = {'C',':','\\','w','i','n','d','o','w','s','\\',
- 's','y','s','t','e','m','3','2','\\',
- 'w','i','n','e','b','o','o','t','.','e','x','e',' ',
- '-','-','i','n','i','t',0};
UNICODE_STRING nameW, cmdlineW, dllpathW;
RTL_USER_PROCESS_PARAMETERS *params;
RTL_USER_PROCESS_INFORMATION info;
@@ -1160,7 +1105,7 @@ static void run_wineboot( WCHAR **env )
ULONG redir = 0;
int count = 1;
- RtlInitUnicodeString( &nameW, wineboot_eventW );
+ RtlInitUnicodeString( &nameW, L"\\KernelObjects\\__wineboot_event" );
InitializeObjectAttributes( &attr, &nameW, OBJ_OPENIF, 0, NULL );
status = NtCreateEvent( &handles[0], EVENT_ALL_ACCESS, &attr, NotificationEvent, 0 );
@@ -1170,17 +1115,18 @@ static void run_wineboot( WCHAR **env )
ERR( "failed to create wineboot event, expect trouble\n" );
return;
}
- LdrGetDllPath( wineboot + 4, LOAD_WITH_ALTERED_SEARCH_PATH, &load_path, &dummy );
- RtlInitUnicodeString( &nameW, wineboot + 4 );
+ LdrGetDllPath( L"C:\\windows\\system32\\wineboot.exe", LOAD_WITH_ALTERED_SEARCH_PATH,
+ &load_path, &dummy );
+ RtlInitUnicodeString( &nameW, L"C:\\windows\\system32\\wineboot.exe" );
RtlInitUnicodeString( &dllpathW, load_path );
- RtlInitUnicodeString( &cmdlineW, cmdline );
+ RtlInitUnicodeString( &cmdlineW, L"C:\\windows\\system32\\wineboot.exe --init" );
RtlCreateProcessParametersEx( ¶ms, &nameW, &dllpathW, NULL, &cmdlineW, *env, NULL, NULL,
NULL, NULL, PROCESS_PARAMS_FLAG_NORMALIZED );
params->hStdInput = 0;
params->hStdOutput = 0;
params->hStdError = NtCurrentTeb()->Peb->ProcessParameters->hStdError;
- RtlInitUnicodeString( &nameW, wineboot );
+ RtlInitUnicodeString( &nameW, L"\\??\\C:\\windows\\system32\\wineboot.exe" );
RtlWow64EnableFsRedirectionEx( TRUE, &redir );
status = RtlCreateUserProcess( &nameW, OBJ_CASE_INSENSITIVE, params,
NULL, NULL, 0, FALSE, 0, 0, &info );
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index ff5a175027c..45ad496fd64 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -63,23 +63,16 @@ void (FASTCALL *pBaseThreadInitThunk)(DWORD,LPTHREAD_START_ROUTINE,void *) = NUL
const struct unix_funcs *unix_funcs = NULL;
/* windows directory */
-const WCHAR windows_dir[] = {'C',':','\\','w','i','n','d','o','w','s',0};
+const WCHAR windows_dir[] = L"C:\\windows";
/* system directory with trailing backslash */
-const WCHAR system_dir[] = {'C',':','\\','w','i','n','d','o','w','s','\\',
- 's','y','s','t','e','m','3','2','\\',0};
-const WCHAR syswow64_dir[] = {'C',':','\\','w','i','n','d','o','w','s','\\',
- 's','y','s','w','o','w','6','4','\\',0};
+const WCHAR system_dir[] = L"C:\\windows\\system32\\";
+const WCHAR syswow64_dir[] = L"C:\\windows\\syswow64\\";
static const BOOL is_win64 = (sizeof(void *) > sizeof(int));
BOOL is_wow64 = FALSE;
/* system search path */
-static const WCHAR system_path[] =
- {'C',':','\\','w','i','n','d','o','w','s','\\','s','y','s','t','e','m','3','2',';',
- 'C',':','\\','w','i','n','d','o','w','s','\\','s','y','s','t','e','m',';',
- 'C',':','\\','w','i','n','d','o','w','s',0};
-
-static const WCHAR dotW[] = {'.',0};
+static const WCHAR system_path[] = L"C:\\windows\\system32;C:\\windows\\system;C:\\windows";
static BOOL imports_fixup_done = FALSE; /* set once the imports have been fixed up, before attaching them */
static BOOL process_detaching = FALSE; /* set on process detach to avoid deadlocks with thread detach */
@@ -116,8 +109,6 @@ static const char * const reason_names[] =
"WINE_PREATTACH"
};
-static const WCHAR dllW[] = {'.','d','l','l',0};
-
struct file_id
{
BYTE ObjectId[16];
@@ -613,20 +604,21 @@ static FARPROC find_forwarded_export( HMODULE module, const char *forward, LPCWS
FARPROC proc = NULL;
if (!end) return NULL;
- if ((end - forward) * sizeof(WCHAR) > sizeof(buffer) - sizeof(dllW))
+ if ((end - forward) * sizeof(WCHAR) > sizeof(buffer) - sizeof(L".dll"))
{
- if (!(mod_name = RtlAllocateHeap( GetProcessHeap(), 0, (end - forward + sizeof(dllW)) * sizeof(WCHAR) )))
+ if (!(mod_name = RtlAllocateHeap( GetProcessHeap(), 0,
+ (end - forward + sizeof(L".dll")) * sizeof(WCHAR) )))
return NULL;
}
ascii_to_unicode( mod_name, forward, end - forward );
mod_name[end - forward] = 0;
if (!wcschr( mod_name, '.' ))
- memcpy( mod_name + (end - forward), dllW, sizeof(dllW) );
+ memcpy( mod_name + (end - forward), L".dll", sizeof(L".dll") );
if (!(wm = find_basename_module( mod_name )))
{
TRACE( "delay loading %s for '%s'\n", debugstr_w(mod_name), forward );
- if (load_dll( load_path, mod_name, dllW, 0, &wm ) == STATUS_SUCCESS &&
+ if (load_dll( load_path, mod_name, L".dll", 0, &wm ) == STATUS_SUCCESS &&
!(wm->ldr.Flags & LDR_DONT_RESOLVE_REFS))
{
if (!imports_fixup_done && current_modref)
@@ -789,7 +781,7 @@ static BOOL import_dll( HMODULE module, const IMAGE_IMPORT_DESCRIPTOR *descr, LP
{
ascii_to_unicode( buffer, name, len );
buffer[len] = 0;
- status = load_dll( load_path, buffer, dllW, 0, &wmImp );
+ status = load_dll( load_path, buffer, L".dll", 0, &wmImp );
}
else /* need to allocate a larger buffer */
{
@@ -797,7 +789,7 @@ static BOOL import_dll( HMODULE module, const IMAGE_IMPORT_DESCRIPTOR *descr, LP
if (!ptr) return FALSE;
ascii_to_unicode( ptr, name, len );
ptr[len] = 0;
- status = load_dll( load_path, ptr, dllW, 0, &wmImp );
+ status = load_dll( load_path, ptr, L".dll", 0, &wmImp );
RtlFreeHeap( GetProcessHeap(), 0, ptr );
}
@@ -930,8 +922,6 @@ static NTSTATUS create_module_activation_context( LDR_DATA_TABLE_ENTRY *module )
*/
static BOOL is_dll_native_subsystem( LDR_DATA_TABLE_ENTRY *mod, const IMAGE_NT_HEADERS *nt, LPCWSTR filename )
{
- static const WCHAR ntdllW[] = {'n','t','d','l','l','.','d','l','l',0};
- static const WCHAR kernel32W[] = {'k','e','r','n','e','l','3','2','.','d','l','l',0};
const IMAGE_IMPORT_DESCRIPTOR *imports;
DWORD i, size;
WCHAR buffer[16];
@@ -949,7 +939,7 @@ static BOOL is_dll_native_subsystem( LDR_DATA_TABLE_ENTRY *mod, const IMAGE_NT_H
DWORD len = strlen(name);
if (len * sizeof(WCHAR) >= sizeof(buffer)) continue;
ascii_to_unicode( buffer, name, len + 1 );
- if (!wcsicmp( buffer, ntdllW ) || !wcsicmp( buffer, kernel32W ))
+ if (!wcsicmp( buffer, L"ntdll.dll" ) || !wcsicmp( buffer, L"kernel32.dll" ))
{
TRACE( "%s imports %s, assuming not native\n", debugstr_w(filename), debugstr_w(buffer) );
return FALSE;
@@ -1067,7 +1057,6 @@ static void free_tls_slot( LDR_DATA_TABLE_ENTRY *mod )
*/
static NTSTATUS fixup_imports_ilonly( WINE_MODREF *wm, LPCWSTR load_path, void **entry )
{
- static const WCHAR mscoreeW[] = {'m','s','c','o','r','e','e','.','d','l','l',0};
IMAGE_EXPORT_DIRECTORY *exports;
DWORD exp_size;
NTSTATUS status;
@@ -1082,7 +1071,7 @@ static NTSTATUS fixup_imports_ilonly( WINE_MODREF *wm, LPCWSTR load_path, void *
prev = current_modref;
current_modref = wm;
- if (!(status = load_dll( load_path, mscoreeW, NULL, 0, &imp ))) wm->deps[0] = imp;
+ if (!(status = load_dll( load_path, L"mscoree.dll", NULL, 0, &imp ))) wm->deps[0] = imp;
current_modref = prev;
if (status)
{
@@ -2099,8 +2088,6 @@ static inline WCHAR *append_path( WCHAR *p, const WCHAR *str, int len )
*/
static NTSTATUS get_dll_load_path( LPCWSTR module, LPCWSTR dll_dir, ULONG safe_mode, WCHAR **path )
{
- static const WCHAR pathW[] = {'P','A','T','H',0};
-
const WCHAR *mod_end = module;
UNICODE_STRING name, value;
WCHAR *p, *ret;
@@ -2112,7 +2099,7 @@ static NTSTATUS get_dll_load_path( LPCWSTR module, LPCWSTR dll_dir, ULONG safe_m
len += (mod_end - module) + 1;
}
- RtlInitUnicodeString( &name, pathW );
+ RtlInitUnicodeString( &name, L"PATH" );
value.Length = 0;
value.MaximumLength = 0;
value.Buffer = NULL;
@@ -2126,9 +2113,9 @@ static NTSTATUS get_dll_load_path( LPCWSTR module, LPCWSTR dll_dir, ULONG safe_m
p = append_path( p, module, mod_end - module );
if (dll_dir) p = append_path( p, dll_dir, -1 );
- else if (!safe_mode) p = append_path( p, dotW, -1 );
+ else if (!safe_mode) p = append_path( p, L".", -1 );
p = append_path( p, system_path, -1 );
- if (!dll_dir && safe_mode) p = append_path( p, dotW, -1 );
+ if (!dll_dir && safe_mode) p = append_path( p, L".", -1 );
value.Buffer = p;
value.MaximumLength = path_len;
@@ -2400,7 +2387,6 @@ static NTSTATUS load_builtin_dll( LPCWSTR load_path, const UNICODE_STRING *nt_na
static NTSTATUS find_actctx_dll( LPCWSTR libname, LPWSTR *fullname )
{
static const WCHAR winsxsW[] = {'\\','w','i','n','s','x','s','\\'};
- static const WCHAR dotManifestW[] = {'.','m','a','n','i','f','e','s','t',0};
ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION *info;
ACTCTX_SECTION_KEYED_DATA data;
@@ -2446,7 +2432,7 @@ static NTSTATUS find_actctx_dll( LPCWSTR libname, LPWSTR *fullname )
len = wcslen( p );
if (!dirlen || len <= dirlen ||
RtlCompareUnicodeStrings( p, dirlen, info->lpAssemblyDirectoryName, dirlen, TRUE ) ||
- wcsicmp( p + dirlen, dotManifestW ))
+ wcsicmp( p + dirlen, L".manifest" ))
{
/* manifest name does not match directory name, so it's not a global
* windows/winsxs manifest; use the manifest directory name instead */
@@ -2794,7 +2780,7 @@ NTSTATUS WINAPI DECLSPEC_HOTPATCH LdrLoadDll(LPCWSTR path_name, DWORD flags,
RtlEnterCriticalSection( &loader_section );
if (!path_name) path_name = NtCurrentTeb()->Peb->ProcessParameters->DllPath.Buffer;
- nts = load_dll( path_name, libname->Buffer, dllW, flags, &wm );
+ nts = load_dll( path_name, libname->Buffer, L".dll", flags, &wm );
if (nts == STATUS_SUCCESS && !(wm->ldr.Flags & LDR_DONT_RESOLVE_REFS))
{
@@ -2828,7 +2814,7 @@ NTSTATUS WINAPI LdrGetDllHandle( LPCWSTR load_path, ULONG flags, const UNICODE_S
if (!load_path) load_path = NtCurrentTeb()->Peb->ProcessParameters->DllPath.Buffer;
- status = find_dll_file( load_path, name->Buffer, dllW, &nt_name, &wm, &module, &image_info, &id );
+ status = find_dll_file( load_path, name->Buffer, L".dll", &nt_name, &wm, &module, &image_info, &id );
if (wm) *base = wm->ldr.DllBase;
else
@@ -3574,20 +3560,6 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR
*/
static void load_global_options(void)
{
- static const WCHAR sessionW[] = {'M','a','c','h','i','n','e','\\',
- 'S','y','s','t','e','m','\\',
- 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\',
- 'C','o','n','t','r','o','l','\\',
- 'S','e','s','s','i','o','n',' ','M','a','n','a','g','e','r',0};
- static const WCHAR globalflagW[] = {'G','l','o','b','a','l','F','l','a','g',0};
- static const WCHAR safesearchW[] = {'S','a','f','e','P','r','o','c','e','s','s','S','e','a','r','c','h','M','o','d','e',0};
- static const WCHAR safedllmodeW[] = {'S','a','f','e','D','l','l','S','e','a','r','c','h','M','o','d','e',0};
- static const WCHAR critsectW[] = {'C','r','i','t','i','c','a','l','S','e','c','t','i','o','n','T','i','m','e','o','u','t',0};
- static const WCHAR heapresW[] = {'H','e','a','p','S','e','g','m','e','n','t','R','e','s','e','r','v','e',0};
- static const WCHAR heapcommitW[] = {'H','e','a','p','S','e','g','m','e','n','t','C','o','m','m','i','t',0};
- static const WCHAR decommittotalW[] = {'H','e','a','p','D','e','C','o','m','m','i','t','T','o','t','a','l','F','r','e','e','T','h','r','e','s','h','o','l','d',0};
- static const WCHAR decommitfreeW[] = {'H','e','a','p','D','e','C','o','m','m','i','t','F','r','e','e','B','l','o','c','k','T','h','r','e','s','h','o','l','d',0};
-
OBJECT_ATTRIBUTES attr;
UNICODE_STRING name_str;
HANDLE hkey;
@@ -3599,33 +3571,33 @@ static void load_global_options(void)
attr.Attributes = OBJ_CASE_INSENSITIVE;
attr.SecurityDescriptor = NULL;
attr.SecurityQualityOfService = NULL;
- RtlInitUnicodeString( &name_str, sessionW );
+ RtlInitUnicodeString( &name_str, L"Machine\\System\\CurrentControlSet\\Control\\Session Manager" );
if (!NtOpenKey( &hkey, KEY_QUERY_VALUE, &attr ))
{
- query_dword_option( hkey, globalflagW, &NtCurrentTeb()->Peb->NtGlobalFlag );
- query_dword_option( hkey, safesearchW, &path_safe_mode );
- query_dword_option( hkey, safedllmodeW, &dll_safe_mode );
+ query_dword_option( hkey, L"GlobalFlag", &NtCurrentTeb()->Peb->NtGlobalFlag );
+ query_dword_option( hkey, L"SafeProcessSearchMode", &path_safe_mode );
+ query_dword_option( hkey, L"SafeDllSearchMode", &dll_safe_mode );
- if (!query_dword_option( hkey, critsectW, &value ))
+ if (!query_dword_option( hkey, L"CriticalSectionTimeout", &value ))
NtCurrentTeb()->Peb->CriticalSectionTimeout.QuadPart = (ULONGLONG)value * -10000000;
- if (!query_dword_option( hkey, heapresW, &value ))
+ if (!query_dword_option( hkey, L"HeapSegmentReserve", &value ))
NtCurrentTeb()->Peb->HeapSegmentReserve = value;
- if (!query_dword_option( hkey, heapcommitW, &value ))
+ if (!query_dword_option( hkey, L"HeapSegmentCommit", &value ))
NtCurrentTeb()->Peb->HeapSegmentCommit = value;
- if (!query_dword_option( hkey, decommittotalW, &value ))
+ if (!query_dword_option( hkey, L"HeapDeCommitTotalFreeThreshold", &value ))
NtCurrentTeb()->Peb->HeapDeCommitTotalFreeThreshold = value;
- if (!query_dword_option( hkey, decommitfreeW, &value ))
+ if (!query_dword_option( hkey, L"HeapDeCommitFreeBlockThreshold", &value ))
NtCurrentTeb()->Peb->HeapDeCommitFreeBlockThreshold = value;
NtClose( hkey );
}
LdrQueryImageFileExecutionOptions( &NtCurrentTeb()->Peb->ProcessParameters->ImagePathName,
- globalflagW, REG_DWORD, &NtCurrentTeb()->Peb->NtGlobalFlag,
+ L"GlobalFlag", REG_DWORD, &NtCurrentTeb()->Peb->NtGlobalFlag,
sizeof(DWORD), NULL );
heap_set_debug_flags( GetProcessHeap() );
}
@@ -3918,21 +3890,17 @@ NTSTATUS WINAPI RtlSetSearchPathMode( ULONG flags )
*/
NTSTATUS WINAPI RtlGetExePath( PCWSTR name, PWSTR *path )
{
- static const WCHAR emptyW[1];
- const WCHAR *dlldir = dotW;
+ const WCHAR *dlldir = L".";
const WCHAR *module = NtCurrentTeb()->Peb->ProcessParameters->ImagePathName.Buffer;
/* same check as NeedCurrentDirectoryForExePathW */
if (!wcschr( name, '\\' ))
{
- static const WCHAR env_name[] = {'N','o','D','e','f','a','u','l','t','C','u','r','r','e','n','t',
- 'D','i','r','e','c','t','o','r','y','I','n',
- 'E','x','e','P','a','t','h',0};
UNICODE_STRING name, value = { 0 };
- RtlInitUnicodeString( &name, env_name );
+ RtlInitUnicodeString( &name, L"NoDefaultCurrentDirectoryInExePath" );
if (RtlQueryEnvironmentVariable_U( NULL, &name, &value ) != STATUS_VARIABLE_NOT_FOUND)
- dlldir = emptyW;
+ dlldir = L"";
}
return get_dll_load_path( module, dlldir, FALSE, path );
}
@@ -3995,12 +3963,6 @@ static void restart_winevdm( RTL_USER_PROCESS_PARAMETERS *params )
*/
static NTSTATUS process_init(void)
{
- static const WCHAR ntdllW[] = {'\\','?','?','\\','C',':','\\','w','i','n','d','o','w','s','\\',
- 's','y','s','t','e','m','3','2','\\',
- 'n','t','d','l','l','.','d','l','l',0};
- static const WCHAR kernel32W[] = {'C',':','\\','w','i','n','d','o','w','s','\\',
- 's','y','s','t','e','m','3','2','\\',
- 'k','e','r','n','e','l','3','2','.','d','l','l',0};
RTL_USER_PROCESS_PARAMETERS *params;
WINE_MODREF *wm;
NTSTATUS status;
@@ -4046,13 +4008,14 @@ static NTSTATUS process_init(void)
version_init();
/* setup the load callback and create ntdll modref */
- RtlInitUnicodeString( &nt_name, ntdllW );
+ RtlInitUnicodeString( &nt_name, L"\\??\\C:\\windows\\system32\\ntdll.dll" );
NtQueryVirtualMemory( GetCurrentProcess(), process_init, MemoryBasicInformation,
&meminfo, sizeof(meminfo), NULL );
status = build_builtin_module( params->DllPath.Buffer, &nt_name, meminfo.AllocationBase, 0, &wm );
assert( !status );
- if ((status = load_dll( params->DllPath.Buffer, kernel32W, NULL, 0, &wm )) != STATUS_SUCCESS)
+ if ((status = load_dll( params->DllPath.Buffer, L"C:\\windows\\system32\\kernel32.dll",
+ NULL, 0, &wm )) != STATUS_SUCCESS)
{
MESSAGE( "wine: could not load kernel32.dll, status %x\n", status );
NtTerminateProcess( GetCurrentProcess(), status );
diff --git a/dlls/ntdll/loadorder.c b/dlls/ntdll/loadorder.c
index c55806df2b8..e4aaf9dd74f 100644
--- a/dlls/ntdll/loadorder.c
+++ b/dlls/ntdll/loadorder.c
@@ -49,7 +49,7 @@ struct loadorder_list
module_loadorder_t *order;
};
-static const WCHAR separatorsW[] = {',',' ','\t',0};
+static const WCHAR separatorsW[] = L", \t";
static BOOL init_done;
static struct loadorder_list env_list;
@@ -89,10 +89,9 @@ static const WCHAR *get_basename( const WCHAR *name )
*/
static inline void remove_dll_ext( WCHAR *name )
{
- static const WCHAR dllW[] = {'.','d','l','l',0};
WCHAR *p = wcsrchr( name, '.' );
- if (p && !wcsicmp( p, dllW )) *p = 0;
+ if (p && !wcsicmp( p, L".dll" )) *p = 0;
}
@@ -224,7 +223,6 @@ static void add_load_order_set( WCHAR *entry )
*/
static void init_load_order(void)
{
- static const WCHAR winedlloverridesW[] = {'W','I','N','E','D','L','L','O','V','E','R','R','I','D','E','S',0};
WCHAR *entry, *next, *order;
SIZE_T len = 1024;
NTSTATUS status;
@@ -234,7 +232,7 @@ static void init_load_order(void)
for (;;)
{
order = RtlAllocateHeap( GetProcessHeap(), 0, len * sizeof(WCHAR) );
- status = RtlQueryEnvironmentVariable( NULL, winedlloverridesW, wcslen(winedlloverridesW),
+ status = RtlQueryEnvironmentVariable( NULL, L"WINEDLLOVERRIDES", wcslen(L"WINEDLLOVERRIDES"),
order, len - 1, &len );
if (!status)
{
@@ -290,8 +288,6 @@ static inline enum loadorder get_env_load_order( const WCHAR *module )
*/
static HANDLE get_standard_key(void)
{
- static const WCHAR DllOverridesW[] = {'S','o','f','t','w','a','r','e','\\','W','i','n','e','\\',
- 'D','l','l','O','v','e','r','r','i','d','e','s',0};
static HANDLE std_key = (HANDLE)-1;
if (std_key == (HANDLE)-1)
@@ -307,7 +303,7 @@ static HANDLE get_standard_key(void)
attr.Attributes = 0;
attr.SecurityDescriptor = NULL;
attr.SecurityQualityOfService = NULL;
- RtlInitUnicodeString( &nameW, DllOverridesW );
+ RtlInitUnicodeString( &nameW, L"Software\\Wine\\DllOverrides" );
/* @@ Wine registry key: HKCU\Software\Wine\DllOverrides */
if (NtOpenKey( &std_key, KEY_ALL_ACCESS, &attr )) std_key = 0;
@@ -328,20 +324,17 @@ static HANDLE get_app_key( const WCHAR *app_name )
UNICODE_STRING nameW;
HANDLE root;
WCHAR *str;
- static const WCHAR AppDefaultsW[] = {'S','o','f','t','w','a','r','e','\\','W','i','n','e','\\',
- 'A','p','p','D','e','f','a','u','l','t','s','\\',0};
- static const WCHAR DllOverridesW[] = {'\\','D','l','l','O','v','e','r','r','i','d','e','s',0};
static HANDLE app_key = (HANDLE)-1;
if (app_key != (HANDLE)-1) return app_key;
str = RtlAllocateHeap( GetProcessHeap(), 0,
- sizeof(AppDefaultsW) + sizeof(DllOverridesW) +
+ sizeof(L"Software\\Wine\\AppDefaults\\") + sizeof(L"\\DllOverrides") +
wcslen(app_name) * sizeof(WCHAR) );
if (!str) return 0;
- wcscpy( str, AppDefaultsW );
+ wcscpy( str, L"Software\\Wine\\AppDefaults\\" );
wcscat( str, app_name );
- wcscat( str, DllOverridesW );
+ wcscat( str, L"\\DllOverrides" );
RtlOpenCurrentUser( KEY_ALL_ACCESS, &root );
attr.Length = sizeof(attr);
@@ -425,7 +418,6 @@ static enum loadorder get_load_order_value( HANDLE std_key, HANDLE app_key, cons
*/
enum loadorder get_load_order( const WCHAR *app_name, const UNICODE_STRING *nt_name )
{
- static const WCHAR nt_prefixW[] = {'\\','?','?','\\',0};
enum loadorder ret = LO_INVALID;
HANDLE std_key, app_key = 0;
const WCHAR *path = nt_name->Buffer;
@@ -435,7 +427,7 @@ enum loadorder get_load_order( const WCHAR *app_name, const UNICODE_STRING *nt_n
if (!init_done) init_load_order();
std_key = get_standard_key();
if (app_name) app_key = get_app_key( app_name );
- if (!wcsncmp( path, nt_prefixW, 4 )) path += 4;
+ if (!wcsncmp( path, L"\\??\\", 4 )) path += 4;
TRACE("looking for %s\n", debugstr_w(path));
diff --git a/dlls/ntdll/locale.c b/dlls/ntdll/locale.c
index e3cc0d183c4..3979f41089b 100644
--- a/dlls/ntdll/locale.c
+++ b/dlls/ntdll/locale.c
@@ -1269,8 +1269,6 @@ NTSTATUS WINAPI RtlLocaleNameToLcid( const WCHAR *name, LCID *lcid, ULONG flags
{
/* locale name format is: lang[-script][-country][_modifier] */
- static const WCHAR sepW[] = {'-','_',0};
-
const IMAGE_RESOURCE_DIRECTORY *resdir;
const IMAGE_RESOURCE_DIRECTORY_ENTRY *et;
LDR_RESOURCE_INFO info;
@@ -1291,16 +1289,16 @@ NTSTATUS WINAPI RtlLocaleNameToLcid( const WCHAR *name, LCID *lcid, ULONG flags
if (wcslen( name ) >= LOCALE_NAME_MAX_LENGTH) return STATUS_INVALID_PARAMETER_1;
wcscpy( lang, name );
- if ((p = wcspbrk( lang, sepW )) && *p == '-')
+ if ((p = wcspbrk( lang, L"-_" )) && *p == '-')
{
*p++ = 0;
country = p;
- if ((p = wcspbrk( p, sepW )) && *p == '-')
+ if ((p = wcspbrk( p, L"-_" )) && *p == '-')
{
*p++ = 0;
script = country;
country = p;
- p = wcspbrk( p, sepW );
+ p = wcspbrk( p, L"-_" );
}
if (p) *p = 0; /* FIXME: modifier is ignored */
/* second value can be script or country, check length to resolve the ambiguity */
diff --git a/dlls/ntdll/path.c b/dlls/ntdll/path.c
index 53470b4f357..86760f178e1 100644
--- a/dlls/ntdll/path.c
+++ b/dlls/ntdll/path.c
@@ -31,10 +31,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(file);
-static const WCHAR DeviceRootW[] = {'\\','\\','.','\\',0};
-static const WCHAR NTDosPrefixW[] = {'\\','?','?','\\',0};
-static const WCHAR UncPfxW[] = {'U','N','C','\\',0};
-
#define IS_SEPARATOR(ch) ((ch) == '\\' || (ch) == '/')
/***********************************************************************
@@ -69,7 +65,6 @@ DOS_PATHNAME_TYPE WINAPI RtlDetermineDosPathNameType_U( PCWSTR path )
*/
ULONG WINAPI RtlIsDosDeviceName_U( PCWSTR dos_name )
{
- static const WCHAR consoleW[] = {'\\','\\','.','\\','C','O','N',0};
static const WCHAR auxW[] = {'A','U','X'};
static const WCHAR comW[] = {'C','O','M'};
static const WCHAR conW[] = {'C','O','N'};
@@ -87,7 +82,7 @@ ULONG WINAPI RtlIsDosDeviceName_U( PCWSTR dos_name )
case UNC_PATH:
return 0;
case DEVICE_PATH:
- if (!wcsicmp( dos_name, consoleW ))
+ if (!wcsicmp( dos_name, L"\\\\.\\CON" ))
return MAKELONG( sizeof(conW), 4 * sizeof(WCHAR) ); /* 4 is length of \\.\ prefix */
return 0;
case ABSOLUTE_DRIVE_PATH:
@@ -207,12 +202,12 @@ NTSTATUS WINAPI RtlDosPathNameToNtPathName_U_WithStatus(const WCHAR *dos_path, U
return STATUS_NO_MEMORY;
}
- wcscpy(ntpath->Buffer, NTDosPrefixW);
+ wcscpy(ntpath->Buffer, L"\\??\\");
switch (RtlDetermineDosPathNameType_U(ptr))
{
case UNC_PATH: /* \\foo */
offset = 2;
- wcscat(ntpath->Buffer, UncPfxW);
+ wcscat(ntpath->Buffer, L"UNC\\");
break;
case DEVICE_PATH: /* \\.\foo */
offset = 4;
@@ -661,7 +656,7 @@ DWORD WINAPI RtlGetFullPathName_U(const WCHAR* name, ULONG size, WCHAR* buffer,
DWORD sz = LOWORD(dosdev); /* in bytes */
if (8 + sz + 2 > size) return sz + 10;
- wcscpy(buffer, DeviceRootW);
+ wcscpy(buffer, L"\\\\.\\");
memmove(buffer + 4, name + offset, sz);
buffer[4 + sz / sizeof(WCHAR)] = '\0';
/* file_part isn't set in this case */
@@ -874,7 +869,7 @@ NTSTATUS WINAPI RtlSetCurrentDirectory_U(const UNICODE_STRING* dir)
if (size && ptr[size - 1] != '\\') ptr[size++] = '\\';
/* convert \??\UNC\ path to \\ prefix */
- if (size >= 4 && !wcsnicmp(ptr, UncPfxW, 4))
+ if (size >= 4 && !wcsnicmp(ptr, L"UNC\\", 4))
{
ptr += 2;
size -= 2;
diff --git a/dlls/ntdll/reg.c b/dlls/ntdll/reg.c
index 5a54d7fee26..54f01049abf 100644
--- a/dlls/ntdll/reg.c
+++ b/dlls/ntdll/reg.c
@@ -402,49 +402,30 @@ static NTSTATUS RTL_KeyHandleCreateObject(ULONG RelativeTo, PCWSTR Path, POBJECT
PCWSTR base;
INT len;
- static const WCHAR empty[] = {0};
- static const WCHAR control[] = {'\\','R','e','g','i','s','t','r','y','\\','M','a','c','h','i','n','e',
- '\\','S','y','s','t','e','m','\\','C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\',
- 'C','o','n','t','r','o','l','\\',0};
-
- static const WCHAR devicemap[] = {'\\','R','e','g','i','s','t','r','y','\\','M','a','c','h','i','n','e','\\',
- 'H','a','r','d','w','a','r','e','\\','D','e','v','i','c','e','M','a','p','\\',0};
-
- static const WCHAR services[] = {'\\','R','e','g','i','s','t','r','y','\\','M','a','c','h','i','n','e','\\',
- 'S','y','s','t','e','m','\\','C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\',
- 'S','e','r','v','i','c','e','s','\\',0};
-
- static const WCHAR user[] = {'\\','R','e','g','i','s','t','r','y','\\','U','s','e','r','\\',
- 'C','u','r','r','e','n','t','U','s','e','r','\\',0};
-
- static const WCHAR windows_nt[] = {'\\','R','e','g','i','s','t','r','y','\\','M','a','c','h','i','n','e','\\',
- 'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\',
- 'W','i','n','d','o','w','s',' ','N','T','\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',0};
-
switch (RelativeTo & 0xff)
{
case RTL_REGISTRY_ABSOLUTE:
- base = empty;
+ base = L"";
break;
case RTL_REGISTRY_CONTROL:
- base = control;
+ base = L"\\Registry\\Machine\\System\\CurrentControlSet\\Control\\";
break;
case RTL_REGISTRY_DEVICEMAP:
- base = devicemap;
+ base = L"\\Registry\\Machine\\Hardware\\DeviceMap\\";
break;
case RTL_REGISTRY_SERVICES:
- base = services;
+ base = L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\";
break;
case RTL_REGISTRY_USER:
- base = user;
+ base = L"\\Registry\\User\\CurrentUser\\";
break;
case RTL_REGISTRY_WINDOWS_NT:
- base = windows_nt;
+ base = L"\\Registry\\Machine\\Software\\Microsoft\\Windows NT\\CurrentVersion\\";
break;
default:
diff --git a/dlls/ntdll/relay.c b/dlls/ntdll/relay.c
index e1596312491..ee7d9951c59 100644
--- a/dlls/ntdll/relay.c
+++ b/dlls/ntdll/relay.c
@@ -167,17 +167,6 @@ static DWORD WINAPI init_debug_lists( RTL_RUN_ONCE *once, void *param, void **co
OBJECT_ATTRIBUTES attr;
UNICODE_STRING name;
HANDLE root, hkey;
- static const WCHAR configW[] = {'S','o','f','t','w','a','r','e','\\',
- 'W','i','n','e','\\',
- 'D','e','b','u','g',0};
- static const WCHAR RelayIncludeW[] = {'R','e','l','a','y','I','n','c','l','u','d','e',0};
- static const WCHAR RelayExcludeW[] = {'R','e','l','a','y','E','x','c','l','u','d','e',0};
- static const WCHAR SnoopIncludeW[] = {'S','n','o','o','p','I','n','c','l','u','d','e',0};
- static const WCHAR SnoopExcludeW[] = {'S','n','o','o','p','E','x','c','l','u','d','e',0};
- static const WCHAR RelayFromIncludeW[] = {'R','e','l','a','y','F','r','o','m','I','n','c','l','u','d','e',0};
- static const WCHAR RelayFromExcludeW[] = {'R','e','l','a','y','F','r','o','m','E','x','c','l','u','d','e',0};
- static const WCHAR SnoopFromIncludeW[] = {'S','n','o','o','p','F','r','o','m','I','n','c','l','u','d','e',0};
- static const WCHAR SnoopFromExcludeW[] = {'S','n','o','o','p','F','r','o','m','E','x','c','l','u','d','e',0};
RtlOpenCurrentUser( KEY_ALL_ACCESS, &root );
attr.Length = sizeof(attr);
@@ -186,21 +175,21 @@ static DWORD WINAPI init_debug_lists( RTL_RUN_ONCE *once, void *param, void **co
attr.Attributes = 0;
attr.SecurityDescriptor = NULL;
attr.SecurityQualityOfService = NULL;
- RtlInitUnicodeString( &name, configW );
+ RtlInitUnicodeString( &name, L"Software\\Wine\\Debug" );
/* @@ Wine registry key: HKCU\Software\Wine\Debug */
if (NtOpenKey( &hkey, KEY_ALL_ACCESS, &attr )) hkey = 0;
NtClose( root );
if (!hkey) return TRUE;
- debug_relay_includelist = load_list( hkey, RelayIncludeW );
- debug_relay_excludelist = load_list( hkey, RelayExcludeW );
- debug_snoop_includelist = load_list( hkey, SnoopIncludeW );
- debug_snoop_excludelist = load_list( hkey, SnoopExcludeW );
- debug_from_relay_includelist = load_list( hkey, RelayFromIncludeW );
- debug_from_relay_excludelist = load_list( hkey, RelayFromExcludeW );
- debug_from_snoop_includelist = load_list( hkey, SnoopFromIncludeW );
- debug_from_snoop_excludelist = load_list( hkey, SnoopFromExcludeW );
+ debug_relay_includelist = load_list( hkey, L"RelayInclude" );
+ debug_relay_excludelist = load_list( hkey, L"RelayExclude" );
+ debug_snoop_includelist = load_list( hkey, L"SnoopInclude" );
+ debug_snoop_excludelist = load_list( hkey, L"SnoopExclude" );
+ debug_from_relay_includelist = load_list( hkey, L"RelayFromInclude" );
+ debug_from_relay_excludelist = load_list( hkey, L"RelayFromExclude" );
+ debug_from_snoop_includelist = load_list( hkey, L"SnoopFromInclude" );
+ debug_from_snoop_excludelist = load_list( hkey, L"SnoopFromExclude" );
NtClose( hkey );
return TRUE;
@@ -259,7 +248,6 @@ static BOOL check_relay_include( const WCHAR *module, int ordinal, const char *f
*/
static BOOL check_from_module( const WCHAR **includelist, const WCHAR **excludelist, const WCHAR *module )
{
- static const WCHAR dllW[] = {'.','d','l','l',0 };
const WCHAR **listitem;
BOOL show;
@@ -281,7 +269,7 @@ static BOOL check_from_module( const WCHAR **includelist, const WCHAR **excludel
if (!wcsicmp( *listitem, module )) return !show;
len = wcslen( *listitem );
- if (!wcsnicmp( *listitem, module, len ) && !wcsicmp( module + len, dllW ))
+ if (!wcsnicmp( *listitem, module, len ) && !wcsicmp( module + len, L".dll" ))
return !show;
}
return show;
diff --git a/dlls/ntdll/rtl.c b/dlls/ntdll/rtl.c
index 11dbc63a3b3..cf21c980a45 100644
--- a/dlls/ntdll/rtl.c
+++ b/dlls/ntdll/rtl.c
@@ -1314,8 +1314,6 @@ NTSTATUS WINAPI RtlIpv6StringToAddressA(const char *str, const char **terminator
NTSTATUS WINAPI RtlIpv4AddressToStringExW(const IN_ADDR *pin, USHORT port, LPWSTR buffer, PULONG psize)
{
WCHAR tmp_ip[32];
- static const WCHAR fmt_ip[] = {'%','u','.','%','u','.','%','u','.','%','u',0};
- static const WCHAR fmt_port[] = {':','%','u',0};
ULONG needed;
if (!pin || !buffer || !psize)
@@ -1323,11 +1321,11 @@ NTSTATUS WINAPI RtlIpv4AddressToStringExW(const IN_ADDR *pin, USHORT port, LPWST
TRACE("(%p:0x%x, %d, %p, %p:%d)\n", pin, pin->S_un.S_addr, port, buffer, psize, *psize);
- needed = swprintf(tmp_ip, ARRAY_SIZE(tmp_ip), fmt_ip,
+ needed = swprintf(tmp_ip, ARRAY_SIZE(tmp_ip), L"%u.%u.%u.%u",
pin->S_un.S_un_b.s_b1, pin->S_un.S_un_b.s_b2,
pin->S_un.S_un_b.s_b3, pin->S_un.S_un_b.s_b4);
- if (port) needed += swprintf(tmp_ip + needed, ARRAY_SIZE(tmp_ip) - needed, fmt_port, ntohs(port));
+ if (port) needed += swprintf(tmp_ip + needed, ARRAY_SIZE(tmp_ip) - needed, L":%u", ntohs(port));
if (*psize > needed) {
*psize = needed + 1;
diff --git a/dlls/ntdll/rtlstr.c b/dlls/ntdll/rtlstr.c
index d8ff81b8050..90f32ceecf0 100644
--- a/dlls/ntdll/rtlstr.c
+++ b/dlls/ntdll/rtlstr.c
@@ -1160,8 +1160,6 @@ NTSTATUS WINAPI RtlFindCharInUnicodeString(
*/
BOOLEAN WINAPI RtlIsTextUnicode( LPCVOID buf, INT len, INT *pf )
{
- static const WCHAR std_control_chars[] = {'\r','\n','\t',' ',0x3000,0};
- static const WCHAR byterev_control_chars[] = {0x0d00,0x0a00,0x0900,0x2000,0};
const WCHAR *s = buf;
int i;
unsigned int flags = ~0U, out_flags = 0;
@@ -1225,7 +1223,7 @@ BOOLEAN WINAPI RtlIsTextUnicode( LPCVOID buf, INT len, INT *pf )
{
for (i = 0; i < len; i++)
{
- if (wcschr(std_control_chars, s[i]))
+ if (wcschr(L"\r\n\t \x3000", s[i]))
{
out_flags |= IS_TEXT_UNICODE_CONTROLS;
break;
@@ -1237,7 +1235,7 @@ BOOLEAN WINAPI RtlIsTextUnicode( LPCVOID buf, INT len, INT *pf )
{
for (i = 0; i < len; i++)
{
- if (wcschr(byterev_control_chars, s[i]))
+ if (wcschr(L"\x0d00\x0a00\x0900\x2000", s[i]))
{
out_flags |= IS_TEXT_UNICODE_REVERSE_CONTROLS;
break;
@@ -1684,11 +1682,6 @@ NTSTATUS WINAPI RtlGUIDFromString(PUNICODE_STRING str, GUID* guid)
*/
NTSTATUS WINAPI RtlStringFromGUID(const GUID* guid, UNICODE_STRING *str)
{
- static const WCHAR szFormat[] = { '{','%','0','8','l','X','-',
- '%','0','4','X','-', '%','0','4','X','-','%','0','2','X','%','0','2','X',
- '-', '%','0','2','X','%','0','2','X','%','0','2','X','%','0','2','X',
- '%','0','2','X','%','0','2','X','}','\0' };
-
TRACE("(%p,%p)\n", guid, str);
str->Length = GUID_STRING_LENGTH * sizeof(WCHAR);
@@ -1699,7 +1692,8 @@ NTSTATUS WINAPI RtlStringFromGUID(const GUID* guid, UNICODE_STRING *str)
str->Length = str->MaximumLength = 0;
return STATUS_NO_MEMORY;
}
- swprintf(str->Buffer, str->MaximumLength/sizeof(WCHAR), szFormat, guid->Data1, guid->Data2, guid->Data3,
+ swprintf(str->Buffer, str->MaximumLength/sizeof(WCHAR),
+ L"{%08lX-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}", guid->Data1, guid->Data2, guid->Data3,
guid->Data4[0], guid->Data4[1], guid->Data4[2], guid->Data4[3],
guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7]);
@@ -1739,7 +1733,6 @@ static UINT64 get_arg( int nr, struct format_message_args *args_data, BOOL is64
static NTSTATUS add_format( WCHAR **buffer, WCHAR *end, const WCHAR **src, int insert, BOOLEAN ansi,
struct format_message_args *args_data )
{
- static const WCHAR modifiers[] = {'0','1','2','3','4','5','6','7','8','9',' ','+','-','*','#','.',0};
const WCHAR *format = *src;
WCHAR *p, fmt[32];
ULONG_PTR args[5] = { 0 };
@@ -1757,7 +1750,7 @@ static NTSTATUS add_format( WCHAR **buffer, WCHAR *end, const WCHAR **src, int i
if (!end || end - format > ARRAY_SIZE(fmt) - 2) return STATUS_INVALID_PARAMETER;
*src = end + 1;
- while (wcschr( modifiers, *format ))
+ while (wcschr( L"0123456789 +-*#.", *format ))
{
if (*format == '*') stars++;
*p++ = *format++;
@@ -1829,7 +1822,6 @@ NTSTATUS WINAPI RtlFormatMessageEx( const WCHAR *src, ULONG width, BOOLEAN ignor
BOOLEAN ansi, BOOLEAN is_array, __ms_va_list *args,
WCHAR *buffer, ULONG size, ULONG *retsize, ULONG flags )
{
- static const WCHAR emptyW = 0;
static const WCHAR spaceW = ' ';
static const WCHAR crW = '\r';
static const WCHAR tabW = '\t';
@@ -1945,7 +1937,7 @@ NTSTATUS WINAPI RtlFormatMessageEx( const WCHAR *src, ULONG width, BOOLEAN ignor
}
}
- if ((status = add_chars( &buffer, end, &emptyW, 1 ))) return status;
+ if ((status = add_chars( &buffer, end, L"", 1 ))) return status;
*retsize = (buffer - start) * sizeof(WCHAR);
return STATUS_SUCCESS;
diff --git a/dlls/ntdll/sec.c b/dlls/ntdll/sec.c
index c0f962f0562..0d45bbf02aa 100644
--- a/dlls/ntdll/sec.c
+++ b/dlls/ntdll/sec.c
@@ -1617,21 +1617,20 @@ NTSTATUS WINAPI RtlConvertSidToUnicodeString(
PSID pSid,
BOOLEAN AllocateString)
{
- static const WCHAR formatW[] = {'-','%','u',0};
WCHAR buffer[2 + 10 + 10 + 10 * SID_MAX_SUB_AUTHORITIES];
WCHAR *p = buffer;
const SID *sid = pSid;
DWORD i, len;
*p++ = 'S';
- p += swprintf( p, ARRAY_SIZE(buffer) - (p - buffer), formatW, sid->Revision );
- p += swprintf( p, ARRAY_SIZE(buffer) - (p - buffer), formatW,
+ p += swprintf( p, ARRAY_SIZE(buffer) - (p - buffer), L"-%u", sid->Revision );
+ p += swprintf( p, ARRAY_SIZE(buffer) - (p - buffer), L"-%u",
MAKELONG( MAKEWORD( sid->IdentifierAuthority.Value[5],
sid->IdentifierAuthority.Value[4] ),
MAKEWORD( sid->IdentifierAuthority.Value[3],
sid->IdentifierAuthority.Value[2] )));
for (i = 0; i < sid->SubAuthorityCount; i++)
- p += swprintf( p, ARRAY_SIZE(buffer) - (p - buffer), formatW, sid->SubAuthority[i] );
+ p += swprintf( p, ARRAY_SIZE(buffer) - (p - buffer), L"-%u", sid->SubAuthority[i] );
len = (p + 1 - buffer) * sizeof(WCHAR);
--
2.26.2
Dec. 3, 2020
[PATCH] ntdll: Use wide-char string literals in version.c.
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/ntdll/version.c | 177 ++++++++++++++++---------------------------
1 file changed, 64 insertions(+), 113 deletions(-)
diff --git a/dlls/ntdll/version.c b/dlls/ntdll/version.c
index 46715575225..740d8403f5e 100644
--- a/dlls/ntdll/version.c
+++ b/dlls/ntdll/version.c
@@ -66,20 +66,17 @@ static const RTL_OSVERSIONINFOEXW VersionData[NB_WINDOWS_VERSIONS] =
/* WIN20 FIXME: verify values */
{
sizeof(RTL_OSVERSIONINFOEXW), 2, 0, 0, VER_PLATFORM_WIN32s,
- {'W','i','n','3','2','s',' ','1','.','3',0},
- 0, 0, 0, 0, 0
+ L"Win32s 1.3", 0, 0, 0, 0, 0
},
/* WIN30 FIXME: verify values */
{
sizeof(RTL_OSVERSIONINFOEXW), 3, 0, 0, VER_PLATFORM_WIN32s,
- {'W','i','n','3','2','s',' ','1','.','3',0},
- 0, 0, 0, 0, 0
+ L"Win32s 1.3", 0, 0, 0, 0, 0
},
/* WIN31 */
{
sizeof(RTL_OSVERSIONINFOEXW), 3, 10, 0, VER_PLATFORM_WIN32s,
- {'W','i','n','3','2','s',' ','1','.','3',0},
- 0, 0, 0, 0, 0
+ L"Win32s 1.3", 0, 0, 0, 0, 0
},
/* WIN95 */
{
@@ -91,8 +88,7 @@ static const RTL_OSVERSIONINFOEXW VersionData[NB_WINDOWS_VERSIONS] =
* Win95a/b can be discerned via regkey SubVersionNumber
*/
sizeof(RTL_OSVERSIONINFOEXW), 4, 0, 0x40003B6, VER_PLATFORM_WIN32_WINDOWS,
- {0},
- 0, 0, 0, 0, 0
+ L"", 0, 0, 0, 0, 0
},
/* WIN98 (second edition) */
{
@@ -100,121 +96,111 @@ static const RTL_OSVERSIONINFOEXW VersionData[NB_WINDOWS_VERSIONS] =
* Win98SE: 4, 10, 0x40A08AE, " A " 4.10.2222
*/
sizeof(RTL_OSVERSIONINFOEXW), 4, 10, 0x40A08AE, VER_PLATFORM_WIN32_WINDOWS,
- {' ','A',' ',0},
- 0, 0, 0, 0, 0
+ L" A ", 0, 0, 0, 0, 0
},
/* WINME */
{
sizeof(RTL_OSVERSIONINFOEXW), 4, 90, 0x45A0BB8, VER_PLATFORM_WIN32_WINDOWS,
- {' ',0},
- 0, 0, 0, 0, 0
+ L" ", 0, 0, 0, 0, 0
},
/* NT351 */
{
sizeof(RTL_OSVERSIONINFOEXW), 3, 51, 0x421, VER_PLATFORM_WIN32_NT,
- {'S','e','r','v','i','c','e',' ','P','a','c','k',' ','5',0},
- 5, 0, 0, VER_NT_WORKSTATION, 0
+ L"Service Pack 5", 5, 0, 0, VER_NT_WORKSTATION, 0
},
/* NT40 */
{
sizeof(RTL_OSVERSIONINFOEXW), 4, 0, 0x565, VER_PLATFORM_WIN32_NT,
- {'S','e','r','v','i','c','e',' ','P','a','c','k',' ','6','a',0},
- 6, 0, 0, VER_NT_WORKSTATION, 0
+ L"Service Pack 6a", 6, 0, 0, VER_NT_WORKSTATION, 0
},
/* NT2K */
{
sizeof(RTL_OSVERSIONINFOEXW), 5, 0, 0x893, VER_PLATFORM_WIN32_NT,
- {'S','e','r','v','i','c','e',' ','P','a','c','k',' ','4',0},
- 4, 0, 0, VER_NT_WORKSTATION, 30 /* FIXME: Great, a reserved field with a value! */
+ L"Service Pack 4", 4, 0, 0, VER_NT_WORKSTATION,
+ 30 /* FIXME: Great, a reserved field with a value! */
},
/* WINXP */
{
sizeof(RTL_OSVERSIONINFOEXW), 5, 1, 0xA28, VER_PLATFORM_WIN32_NT,
- {'S','e','r','v','i','c','e',' ','P','a','c','k',' ','3',0},
- 3, 0, VER_SUITE_SINGLEUSERTS, VER_NT_WORKSTATION, 30 /* FIXME: Great, a reserved field with a value! */
+ L"Service Pack 3", 3, 0, VER_SUITE_SINGLEUSERTS, VER_NT_WORKSTATION,
+ 30 /* FIXME: Great, a reserved field with a value! */
},
/* WINXP64 */
{
sizeof(RTL_OSVERSIONINFOEXW), 5, 2, 0xECE, VER_PLATFORM_WIN32_NT,
- {'S','e','r','v','i','c','e',' ','P','a','c','k',' ','2',0},
- 2, 0, VER_SUITE_SINGLEUSERTS, VER_NT_WORKSTATION, 0
+ L"Service Pack 2", 2, 0, VER_SUITE_SINGLEUSERTS, VER_NT_WORKSTATION, 0
},
/* WIN2K3 */
{
sizeof(RTL_OSVERSIONINFOEXW), 5, 2, 0xECE, VER_PLATFORM_WIN32_NT,
- {'S','e','r','v','i','c','e',' ','P','a','c','k',' ','2',0},
- 2, 0, VER_SUITE_SINGLEUSERTS, VER_NT_SERVER, 0
+ L"Service Pack 2", 2, 0, VER_SUITE_SINGLEUSERTS, VER_NT_SERVER, 0
},
/* WINVISTA */
{
sizeof(RTL_OSVERSIONINFOEXW), 6, 0, 0x1772, VER_PLATFORM_WIN32_NT,
- {'S','e','r','v','i','c','e',' ','P','a','c','k',' ','2',0},
- 2, 0, VER_SUITE_SINGLEUSERTS, VER_NT_WORKSTATION, 0
+ L"Service Pack 2", 2, 0, VER_SUITE_SINGLEUSERTS, VER_NT_WORKSTATION, 0
},
/* WIN2K8 */
{
sizeof(RTL_OSVERSIONINFOEXW), 6, 0, 0x1772, VER_PLATFORM_WIN32_NT,
- {'S','e','r','v','i','c','e',' ','P','a','c','k',' ','2',0},
- 2, 0, VER_SUITE_SINGLEUSERTS, VER_NT_SERVER, 0
+ L"Service Pack 2", 2, 0, VER_SUITE_SINGLEUSERTS, VER_NT_SERVER, 0
},
/* WIN7 */
{
sizeof(RTL_OSVERSIONINFOEXW), 6, 1, 0x1DB1, VER_PLATFORM_WIN32_NT,
- {'S','e','r','v','i','c','e',' ','P','a','c','k',' ','1',0},
- 1, 0, VER_SUITE_SINGLEUSERTS, VER_NT_WORKSTATION, 0
+ L"Service Pack 1", 1, 0, VER_SUITE_SINGLEUSERTS, VER_NT_WORKSTATION, 0
},
/* WIN2K8R2 */
{
sizeof(RTL_OSVERSIONINFOEXW), 6, 1, 0x1DB1, VER_PLATFORM_WIN32_NT,
- {'S','e','r','v','i','c','e',' ','P','a','c','k',' ','1',0},
- 1, 0, VER_SUITE_SINGLEUSERTS, VER_NT_SERVER, 0
+ L"Service Pack 1", 1, 0, VER_SUITE_SINGLEUSERTS, VER_NT_SERVER, 0
},
/* WIN8 */
{
sizeof(RTL_OSVERSIONINFOEXW), 6, 2, 0x23F0, VER_PLATFORM_WIN32_NT,
- {0}, 0, 0, VER_SUITE_SINGLEUSERTS, VER_NT_WORKSTATION, 0
+ L"", 0, 0, VER_SUITE_SINGLEUSERTS, VER_NT_WORKSTATION, 0
},
/* WIN81 */
{
sizeof(RTL_OSVERSIONINFOEXW), 6, 3, 0x2580, VER_PLATFORM_WIN32_NT,
- {0}, 0, 0, VER_SUITE_SINGLEUSERTS, VER_NT_WORKSTATION, 0
+ L"", 0, 0, VER_SUITE_SINGLEUSERTS, VER_NT_WORKSTATION, 0
},
/* WIN10 */
{
sizeof(RTL_OSVERSIONINFOEXW), 10, 0, 0x4563, VER_PLATFORM_WIN32_NT,
- {0}, 0, 0, VER_SUITE_SINGLEUSERTS, VER_NT_WORKSTATION, 0
+ L"", 0, 0, VER_SUITE_SINGLEUSERTS, VER_NT_WORKSTATION, 0
},
};
static const struct { WCHAR name[12]; WINDOWS_VERSION ver; } version_names[] =
{
- { {'w','i','n','2','0',0}, WIN20 },
- { {'w','i','n','3','0',0}, WIN30 },
- { {'w','i','n','3','1',0}, WIN31 },
- { {'w','i','n','9','5',0}, WIN95 },
- { {'w','i','n','9','8',0}, WIN98 },
- { {'w','i','n','m','e',0}, WINME },
- { {'n','t','3','5','1',0}, NT351 },
- { {'n','t','4','0',0}, NT40 },
- { {'w','i','n','2','0','0','0',0}, NT2K },
- { {'w','i','n','2','k',0}, NT2K },
- { {'n','t','2','k',0}, NT2K },
- { {'n','t','2','0','0','0',0}, NT2K },
- { {'w','i','n','x','p',0}, WINXP },
- { {'w','i','n','x','p','6','4',0}, WINXP64 },
- { {'w','i','n','2','0','0','3',0}, WIN2K3 },
- { {'w','i','n','2','k','3',0}, WIN2K3 },
- { {'v','i','s','t','a',0}, WINVISTA },
- { {'w','i','n','v','i','s','t','a',0}, WINVISTA },
- { {'w','i','n','2','0','0','8',0}, WIN2K8 },
- { {'w','i','n','2','k','8',0}, WIN2K8 },
- { {'w','i','n','2','0','0','8','r','2',0}, WIN2K8R2 },
- { {'w','i','n','2','k','8','r','2',0}, WIN2K8R2 },
- { {'w','i','n','7',0}, WIN7 },
- { {'w','i','n','8',0}, WIN8 },
- { {'w','i','n','8','1',0}, WIN81 },
- { {'w','i','n','1','0',0}, WIN10 },
+ { L"win20", WIN20 },
+ { L"win30", WIN30 },
+ { L"win31", WIN31 },
+ { L"win95", WIN95 },
+ { L"win98", WIN98 },
+ { L"winme", WINME },
+ { L"nt351", NT351 },
+ { L"nt40", NT40 },
+ { L"win2000", NT2K },
+ { L"win2k", NT2K },
+ { L"nt2k", NT2K },
+ { L"nt2000", NT2K },
+ { L"winxp", WINXP },
+ { L"winxp64", WINXP64 },
+ { L"win2003", WIN2K3 },
+ { L"win2k3", WIN2K3 },
+ { L"vista", WINVISTA },
+ { L"winvista", WINVISTA },
+ { L"win2008", WIN2K8 },
+ { L"win2k8", WIN2K8 },
+ { L"win2008r2", WIN2K8R2 },
+ { L"win2k8r2", WIN2K8R2 },
+ { L"win7", WIN7 },
+ { L"win8", WIN8 },
+ { L"win81", WIN81 },
+ { L"win10", WIN10 },
};
@@ -229,29 +215,6 @@ static const RTL_OSVERSIONINFOEXW *current_version;
*/
static BOOL get_nt_registry_version( RTL_OSVERSIONINFOEXW *version )
{
- static const WCHAR version_keyW[] = {'M','a','c','h','i','n','e','\\',
- 'S','o','f','t','w','a','r','e','\\',
- 'M','i','c','r','o','s','o','f','t','\\',
- 'W','i','n','d','o','w','s',' ','N','T','\\',
- 'C','u','r','r','e','n','t','V','e','r','s','i','o','n',0};
- static const WCHAR service_pack_keyW[] = {'M','a','c','h','i','n','e','\\',
- 'S','y','s','t','e','m','\\',
- 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\',
- 'C','o','n','t','r','o','l','\\',
- 'W','i','n','d','o','w','s',0};
- static const WCHAR product_keyW[] = {'M','a','c','h','i','n','e','\\',
- 'S','y','s','t','e','m','\\',
- 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\',
- 'C','o','n','t','r','o','l','\\',
- 'P','r','o','d','u','c','t','O','p','t','i','o','n','s',0};
- static const WCHAR CurrentBuildNumberW[] = {'C','u','r','r','e','n','t','B','u','i','l','d','N','u','m','b','e','r',0};
- static const WCHAR CSDVersionW[] = {'C','S','D','V','e','r','s','i','o','n',0};
- static const WCHAR CurrentVersionW[] = {'C','u','r','r','e','n','t','V','e','r','s','i','o','n',0};
- static const WCHAR ProductTypeW[] = {'P','r','o','d','u','c','t','T','y','p','e',0};
- static const WCHAR WinNTW[] = {'W','i','n','N','T',0};
- static const WCHAR ServerNTW[] = {'S','e','r','v','e','r','N','T',0};
- static const WCHAR LanmanNTW[] = {'L','a','n','m','a','n','N','T',0};
-
OBJECT_ATTRIBUTES attr;
UNICODE_STRING nameW, valueW;
HANDLE hkey, hkey2;
@@ -266,13 +229,13 @@ static BOOL get_nt_registry_version( RTL_OSVERSIONINFOEXW *version )
attr.Attributes = 0;
attr.SecurityDescriptor = NULL;
attr.SecurityQualityOfService = NULL;
- RtlInitUnicodeString( &nameW, version_keyW );
+ RtlInitUnicodeString( &nameW, L"Machine\\Software\\Microsoft\\Windows NT\\CurrentVersion" );
if (NtOpenKey( &hkey, KEY_ALL_ACCESS, &attr )) return FALSE;
memset( version, 0, sizeof(*version) );
- RtlInitUnicodeString( &valueW, CurrentVersionW );
+ RtlInitUnicodeString( &valueW, L"CurrentVersion" );
if (!NtQueryValueKey( hkey, &valueW, KeyValuePartialInformation, tmp, sizeof(tmp)-1, &count ))
{
WCHAR *p, *str = (WCHAR *)info->Data;
@@ -293,7 +256,7 @@ static BOOL get_nt_registry_version( RTL_OSVERSIONINFOEXW *version )
/* get build number */
- RtlInitUnicodeString( &valueW, CurrentBuildNumberW );
+ RtlInitUnicodeString( &valueW, L"CurrentBuildNumber" );
if (!NtQueryValueKey( hkey, &valueW, KeyValuePartialInformation, tmp, sizeof(tmp)-1, &count ))
{
WCHAR *str = (WCHAR *)info->Data;
@@ -303,7 +266,7 @@ static BOOL get_nt_registry_version( RTL_OSVERSIONINFOEXW *version )
/* get version description */
- RtlInitUnicodeString( &valueW, CSDVersionW );
+ RtlInitUnicodeString( &valueW, L"CSDVersion" );
if (!NtQueryValueKey( hkey, &valueW, KeyValuePartialInformation, tmp, sizeof(tmp)-1, &count ))
{
DWORD len = min( info->DataLength, sizeof(version->szCSDVersion) - sizeof(WCHAR) );
@@ -313,10 +276,10 @@ static BOOL get_nt_registry_version( RTL_OSVERSIONINFOEXW *version )
/* get service pack version */
- RtlInitUnicodeString( &nameW, service_pack_keyW );
+ RtlInitUnicodeString( &nameW, L"Machine\\System\\CurrentControlSet\\Control\\Windows" );
if (!NtOpenKey( &hkey2, KEY_ALL_ACCESS, &attr ))
{
- RtlInitUnicodeString( &valueW, CSDVersionW );
+ RtlInitUnicodeString( &valueW, L"CSDVersion" );
if (!NtQueryValueKey( hkey2, &valueW, KeyValuePartialInformation, tmp, sizeof(tmp), &count ))
{
if (info->DataLength >= sizeof(DWORD))
@@ -331,17 +294,17 @@ static BOOL get_nt_registry_version( RTL_OSVERSIONINFOEXW *version )
/* get product type */
- RtlInitUnicodeString( &nameW, product_keyW );
+ RtlInitUnicodeString( &nameW, L"Machine\\System\\CurrentControlSet\\Control\\ProductOptions" );
if (!NtOpenKey( &hkey2, KEY_ALL_ACCESS, &attr ))
{
- RtlInitUnicodeString( &valueW, ProductTypeW );
+ RtlInitUnicodeString( &valueW, L"ProductType" );
if (!NtQueryValueKey( hkey2, &valueW, KeyValuePartialInformation, tmp, sizeof(tmp)-1, &count ))
{
WCHAR *str = (WCHAR *)info->Data;
str[info->DataLength / sizeof(WCHAR)] = 0;
- if (!wcsicmp( str, WinNTW )) version->wProductType = VER_NT_WORKSTATION;
- else if (!wcsicmp( str, LanmanNTW )) version->wProductType = VER_NT_DOMAIN_CONTROLLER;
- else if (!wcsicmp( str, ServerNTW )) version->wProductType = VER_NT_SERVER;
+ if (!wcsicmp( str, L"WinNT" )) version->wProductType = VER_NT_WORKSTATION;
+ else if (!wcsicmp( str, L"LanmanNT" )) version->wProductType = VER_NT_DOMAIN_CONTROLLER;
+ else if (!wcsicmp( str, L"ServerNT" )) version->wProductType = VER_NT_SERVER;
}
NtClose( hkey2 );
}
@@ -361,14 +324,6 @@ static BOOL get_nt_registry_version( RTL_OSVERSIONINFOEXW *version )
*/
static BOOL get_win9x_registry_version( RTL_OSVERSIONINFOEXW *version )
{
- static const WCHAR version_keyW[] = {'M','a','c','h','i','n','e','\\',
- 'S','o','f','t','w','a','r','e','\\',
- 'M','i','c','r','o','s','o','f','t','\\',
- 'W','i','n','d','o','w','s','\\',
- 'C','u','r','r','e','n','t','V','e','r','s','i','o','n',0};
- static const WCHAR VersionNumberW[] = {'V','e','r','s','i','o','n','N','u','m','b','e','r',0};
- static const WCHAR SubVersionNumberW[] = {'S','u','b','V','e','r','s','i','o','n','N','u','m','b','e','r',0};
-
OBJECT_ATTRIBUTES attr;
UNICODE_STRING nameW, valueW;
HANDLE hkey;
@@ -383,13 +338,13 @@ static BOOL get_win9x_registry_version( RTL_OSVERSIONINFOEXW *version )
attr.Attributes = 0;
attr.SecurityDescriptor = NULL;
attr.SecurityQualityOfService = NULL;
- RtlInitUnicodeString( &nameW, version_keyW );
+ RtlInitUnicodeString( &nameW, L"Machine\\Software\\Microsoft\\Windows\\CurrentVersion" );
if (NtOpenKey( &hkey, KEY_ALL_ACCESS, &attr )) return FALSE;
memset( version, 0, sizeof(*version) );
- RtlInitUnicodeString( &valueW, VersionNumberW );
+ RtlInitUnicodeString( &valueW, L"VersionNumber" );
if (!NtQueryValueKey( hkey, &valueW, KeyValuePartialInformation, tmp, sizeof(tmp)-1, &count ))
{
WCHAR *p, *str = (WCHAR *)info->Data;
@@ -417,7 +372,7 @@ static BOOL get_win9x_registry_version( RTL_OSVERSIONINFOEXW *version )
ret = TRUE;
version->dwPlatformId = VER_PLATFORM_WIN32_WINDOWS;
- RtlInitUnicodeString( &valueW, SubVersionNumberW );
+ RtlInitUnicodeString( &valueW, L"SubVersionNumber" );
if (!NtQueryValueKey( hkey, &valueW, KeyValuePartialInformation, tmp, sizeof(tmp)-1, &count ))
{
DWORD len = min( info->DataLength, sizeof(version->szCSDVersion) - sizeof(WCHAR) );
@@ -438,14 +393,12 @@ static BOOL get_win9x_registry_version( RTL_OSVERSIONINFOEXW *version )
*/
static BOOL parse_win_version( HANDLE hkey )
{
- static const WCHAR VersionW[] = {'V','e','r','s','i','o','n',0};
-
UNICODE_STRING valueW;
WCHAR *name, tmp[64];
KEY_VALUE_PARTIAL_INFORMATION *info = (KEY_VALUE_PARTIAL_INFORMATION *)tmp;
DWORD i, count;
- RtlInitUnicodeString( &valueW, VersionW );
+ RtlInitUnicodeString( &valueW, L"Version" );
if (NtQueryValueKey( hkey, &valueW, KeyValuePartialInformation, tmp, sizeof(tmp) - sizeof(WCHAR), &count ))
return FALSE;
@@ -470,8 +423,6 @@ static BOOL parse_win_version( HANDLE hkey )
*/
void version_init(void)
{
- static const WCHAR configW[] = {'S','o','f','t','w','a','r','e','\\','W','i','n','e',0};
- static const WCHAR appdefaultsW[] = {'A','p','p','D','e','f','a','u','l','t','s','\\',0};
OBJECT_ATTRIBUTES attr;
UNICODE_STRING nameW;
HANDLE root, hkey, config_key;
@@ -488,7 +439,7 @@ void version_init(void)
attr.Attributes = 0;
attr.SecurityDescriptor = NULL;
attr.SecurityQualityOfService = NULL;
- RtlInitUnicodeString( &nameW, configW );
+ RtlInitUnicodeString( &nameW, L"Software\\Wine" );
/* @@ Wine registry key: HKCU\Software\Wine */
if (NtOpenKey( &config_key, KEY_ALL_ACCESS, &attr )) config_key = 0;
@@ -500,7 +451,7 @@ void version_init(void)
if ((p = wcsrchr( appname, '/' ))) appname = p + 1;
if ((p = wcsrchr( appname, '\\' ))) appname = p + 1;
- wcscpy( appversion, appdefaultsW );
+ wcscpy( appversion, L"AppDefaults\\" );
wcscat( appversion, appname );
RtlInitUnicodeString( &nameW, appversion );
attr.RootDirectory = config_key;
--
2.26.2
Dec. 3, 2020
[PATCH 2/2] ntdll: Use wide-char string literals in actctx.c.
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/ntdll/actctx.c | 532 ++++++++++++++++----------------------------
1 file changed, 194 insertions(+), 338 deletions(-)
diff --git a/dlls/ntdll/actctx.c b/dlls/ntdll/actctx.c
index faccd21d4b1..5db464a383e 100644
--- a/dlls/ntdll/actctx.c
+++ b/dlls/ntdll/actctx.c
@@ -565,125 +565,25 @@ struct actctx_loader
static const xmlstr_t empty_xmlstr;
#ifdef __i386__
-static const WCHAR current_archW[] = {'x','8','6',0};
+static const WCHAR current_archW[] = L"x86";
#elif defined __x86_64__
-static const WCHAR current_archW[] = {'a','m','d','6','4',0};
+static const WCHAR current_archW[] = L"amd64";
#elif defined __arm__
-static const WCHAR current_archW[] = {'a','r','m',0};
+static const WCHAR current_archW[] = L"arm";
#elif defined __aarch64__
-static const WCHAR current_archW[] = {'a','r','m','6','4',0};
+static const WCHAR current_archW[] = L"arm64";
#else
-static const WCHAR current_archW[] = {'n','o','n','e',0};
+static const WCHAR current_archW[] = L"none";
#endif
-static const WCHAR asmv1W[] = {'u','r','n',':','s','c','h','e','m','a','s','-','m','i','c','r','o','s','o','f','t','-','c','o','m',':','a','s','m','.','v','1',0};
-static const WCHAR asmv2W[] = {'u','r','n',':','s','c','h','e','m','a','s','-','m','i','c','r','o','s','o','f','t','-','c','o','m',':','a','s','m','.','v','2',0};
-static const WCHAR asmv3W[] = {'u','r','n',':','s','c','h','e','m','a','s','-','m','i','c','r','o','s','o','f','t','-','c','o','m',':','a','s','m','.','v','3',0};
-static const WCHAR assemblyW[] = {'a','s','s','e','m','b','l','y',0};
-static const WCHAR assemblyIdentityW[] = {'a','s','s','e','m','b','l','y','I','d','e','n','t','i','t','y',0};
-static const WCHAR bindingRedirectW[] = {'b','i','n','d','i','n','g','R','e','d','i','r','e','c','t',0};
-static const WCHAR clrClassW[] = {'c','l','r','C','l','a','s','s',0};
-static const WCHAR clrSurrogateW[] = {'c','l','r','S','u','r','r','o','g','a','t','e',0};
-static const WCHAR comClassW[] = {'c','o','m','C','l','a','s','s',0};
-static const WCHAR comInterfaceExternalProxyStubW[] = {'c','o','m','I','n','t','e','r','f','a','c','e','E','x','t','e','r','n','a','l','P','r','o','x','y','S','t','u','b',0};
-static const WCHAR comInterfaceProxyStubW[] = {'c','o','m','I','n','t','e','r','f','a','c','e','P','r','o','x','y','S','t','u','b',0};
-static const WCHAR dependencyW[] = {'d','e','p','e','n','d','e','n','c','y',0};
-static const WCHAR dependentAssemblyW[] = {'d','e','p','e','n','d','e','n','t','A','s','s','e','m','b','l','y',0};
-static const WCHAR descriptionW[] = {'d','e','s','c','r','i','p','t','i','o','n',0};
-static const WCHAR fileW[] = {'f','i','l','e',0};
-static const WCHAR hashW[] = {'h','a','s','h',0};
-static const WCHAR noInheritW[] = {'n','o','I','n','h','e','r','i','t',0};
-static const WCHAR noInheritableW[] = {'n','o','I','n','h','e','r','i','t','a','b','l','e',0};
-static const WCHAR typelibW[] = {'t','y','p','e','l','i','b',0};
-static const WCHAR windowClassW[] = {'w','i','n','d','o','w','C','l','a','s','s',0};
-
-static const WCHAR clsidW[] = {'c','l','s','i','d',0};
-static const WCHAR hashalgW[] = {'h','a','s','h','a','l','g',0};
-static const WCHAR helpdirW[] = {'h','e','l','p','d','i','r',0};
-static const WCHAR iidW[] = {'i','i','d',0};
-static const WCHAR languageW[] = {'l','a','n','g','u','a','g','e',0};
-static const WCHAR manifestVersionW[] = {'m','a','n','i','f','e','s','t','V','e','r','s','i','o','n',0};
-static const WCHAR nameW[] = {'n','a','m','e',0};
-static const WCHAR neutralW[] = {'n','e','u','t','r','a','l',0};
-static const WCHAR newVersionW[] = {'n','e','w','V','e','r','s','i','o','n',0};
-static const WCHAR oldVersionW[] = {'o','l','d','V','e','r','s','i','o','n',0};
-static const WCHAR optionalW[] = {'o','p','t','i','o','n','a','l',0};
-static const WCHAR processorArchitectureW[] = {'p','r','o','c','e','s','s','o','r','A','r','c','h','i','t','e','c','t','u','r','e',0};
-static const WCHAR progidW[] = {'p','r','o','g','i','d',0};
-static const WCHAR publicKeyTokenW[] = {'p','u','b','l','i','c','K','e','y','T','o','k','e','n',0};
-static const WCHAR threadingmodelW[] = {'t','h','r','e','a','d','i','n','g','M','o','d','e','l',0};
-static const WCHAR tlbidW[] = {'t','l','b','i','d',0};
-static const WCHAR typeW[] = {'t','y','p','e',0};
-static const WCHAR versionW[] = {'v','e','r','s','i','o','n',0};
-static const WCHAR xmlnsW[] = {'x','m','l','n','s',0};
-static const WCHAR versionedW[] = {'v','e','r','s','i','o','n','e','d',0};
-static const WCHAR yesW[] = {'y','e','s',0};
-static const WCHAR noW[] = {'n','o',0};
-static const WCHAR restrictedW[] = {'R','E','S','T','R','I','C','T','E','D',0};
-static const WCHAR controlW[] = {'C','O','N','T','R','O','L',0};
-static const WCHAR hiddenW[] = {'H','I','D','D','E','N',0};
-static const WCHAR hasdiskimageW[] = {'H','A','S','D','I','S','K','I','M','A','G','E',0};
-static const WCHAR flagsW[] = {'f','l','a','g','s',0};
-static const WCHAR miscstatusW[] = {'m','i','s','c','S','t','a','t','u','s',0};
-static const WCHAR miscstatusiconW[] = {'m','i','s','c','S','t','a','t','u','s','I','c','o','n',0};
-static const WCHAR miscstatuscontentW[] = {'m','i','s','c','S','t','a','t','u','s','C','o','n','t','e','n','t',0};
-static const WCHAR miscstatusthumbnailW[] = {'m','i','s','c','S','t','a','t','u','s','T','h','u','m','b','n','a','i','l',0};
-static const WCHAR miscstatusdocprintW[] = {'m','i','s','c','S','t','a','t','u','s','D','o','c','P','r','i','n','t',0};
-static const WCHAR baseInterfaceW[] = {'b','a','s','e','I','n','t','e','r','f','a','c','e',0};
-static const WCHAR nummethodsW[] = {'n','u','m','M','e','t','h','o','d','s',0};
-static const WCHAR proxyStubClsid32W[] = {'p','r','o','x','y','S','t','u','b','C','l','s','i','d','3','2',0};
-static const WCHAR runtimeVersionW[] = {'r','u','n','t','i','m','e','V','e','r','s','i','o','n',0};
-static const WCHAR mscoreeW[] = {'M','S','C','O','R','E','E','.','D','L','L',0};
-static const WCHAR mscoree2W[] = {'m','s','c','o','r','e','e','.','d','l','l',0};
-
-static const WCHAR activatewhenvisibleW[] = {'a','c','t','i','v','a','t','e','w','h','e','n','v','i','s','i','b','l','e',0};
-static const WCHAR actslikebuttonW[] = {'a','c','t','s','l','i','k','e','b','u','t','t','o','n',0};
-static const WCHAR actslikelabelW[] = {'a','c','t','s','l','i','k','e','l','a','b','e','l',0};
-static const WCHAR alignableW[] = {'a','l','i','g','n','a','b','l','e',0};
-static const WCHAR alwaysrunW[] = {'a','l','w','a','y','s','r','u','n',0};
-static const WCHAR canlinkbyole1W[] = {'c','a','n','l','i','n','k','b','y','o','l','e','1',0};
-static const WCHAR cantlinkinsideW[] = {'c','a','n','t','l','i','n','k','i','n','s','i','d','e',0};
-static const WCHAR ignoreactivatewhenvisibleW[] = {'i','g','n','o','r','e','a','c','t','i','v','a','t','e','w','h','e','n','v','i','s','i','b','l','e',0};
-static const WCHAR imemodeW[] = {'i','m','e','m','o','d','e',0};
-static const WCHAR insertnotreplaceW[] = {'i','n','s','e','r','t','n','o','t','r','e','p','l','a','c','e',0};
-static const WCHAR insideoutW[] = {'i','n','s','i','d','e','o','u','t',0};
-static const WCHAR invisibleatruntimeW[] = {'i','n','v','i','s','i','b','l','e','a','t','r','u','n','t','i','m','e',0};
-static const WCHAR islinkobjectW[] = {'i','s','l','i','n','k','o','b','j','e','c','t',0};
-static const WCHAR nouiactivateW[] = {'n','o','u','i','a','c','t','i','v','a','t','e',0};
-static const WCHAR onlyiconicW[] = {'o','n','l','y','i','c','o','n','i','c',0};
-static const WCHAR recomposeonresizeW[] = {'r','e','c','o','m','p','o','s','e','o','n','r','e','s','i','z','e',0};
-static const WCHAR renderingisdeviceindependentW[] = {'r','e','n','d','e','r','i','n','g','i','s','d','e','v','i','c','e','i','n','d','e','p','e','n','d','e','n','t',0};
-static const WCHAR setclientsitefirstW[] = {'s','e','t','c','l','i','e','n','t','s','i','t','e','f','i','r','s','t',0};
-static const WCHAR simpleframeW[] = {'s','i','m','p','l','e','f','r','a','m','e',0};
-static const WCHAR staticW[] = {'s','t','a','t','i','c',0};
-static const WCHAR supportsmultilevelundoW[] = {'s','u','p','p','o','r','t','s','m','u','l','t','i','l','e','v','e','l','u','n','d','o',0};
-static const WCHAR wantstomenumergeW[] = {'w','a','n','t','s','t','o','m','e','n','u','m','e','r','g','e',0};
-
-static const WCHAR compatibilityW[] = {'c','o','m','p','a','t','i','b','i','l','i','t','y',0};
-static const WCHAR compatibilityNSW[] = {'u','r','n',':','s','c','h','e','m','a','s','-','m','i','c','r','o','s','o','f','t','-','c','o','m',':','c','o','m','p','a','t','i','b','i','l','i','t','y','.','v','1',0};
-static const WCHAR applicationW[] = {'a','p','p','l','i','c','a','t','i','o','n',0};
-static const WCHAR supportedOSW[] = {'s','u','p','p','o','r','t','e','d','O','S',0};
-static const WCHAR IdW[] = {'I','d',0};
-static const WCHAR requestedExecutionLevelW[] = {'r','e','q','u','e','s','t','e','d','E','x','e','c','u','t','i','o','n','L','e','v','e','l',0};
-static const WCHAR requestedPrivilegesW[] = {'r','e','q','u','e','s','t','e','d','P','r','i','v','i','l','e','g','e','s',0};
-static const WCHAR securityW[] = {'s','e','c','u','r','i','t','y',0};
-static const WCHAR trustInfoW[] = {'t','r','u','s','t','I','n','f','o',0};
-static const WCHAR windowsSettingsW[] = {'w','i','n','d','o','w','s','S','e','t','t','i','n','g','s',0};
-static const WCHAR autoElevateW[] = {'a','u','t','o','E','l','e','v','a','t','e',0};
-static const WCHAR disableThemingW[] = {'d','i','s','a','b','l','e','T','h','e','m','i','n','g',0};
-static const WCHAR disableWindowFilteringW[] = {'d','i','s','a','b','l','e','W','i','n','d','o','w','F','i','l','t','e','r','i','n','g',0};
-static const WCHAR windowsSettings2005NSW[] = {'h','t','t','p',':','/','/','s','c','h','e','m','a','s','.','m','i','c','r','o','s','o','f','t','.','c','o','m','/','S','M','I','/','2','0','0','5','/','W','i','n','d','o','w','s','S','e','t','t','i','n','g','s',0};
-static const WCHAR windowsSettings2011NSW[] = {'h','t','t','p',':','/','/','s','c','h','e','m','a','s','.','m','i','c','r','o','s','o','f','t','.','c','o','m','/','S','M','I','/','2','0','1','1','/','W','i','n','d','o','w','s','S','e','t','t','i','n','g','s',0};
-static const WCHAR windowsSettings2016NSW[] = {'h','t','t','p',':','/','/','s','c','h','e','m','a','s','.','m','i','c','r','o','s','o','f','t','.','c','o','m','/','S','M','I','/','2','0','1','6','/','W','i','n','d','o','w','s','S','e','t','t','i','n','g','s',0};
-static const WCHAR windowsSettings2017NSW[] = {'h','t','t','p',':','/','/','s','c','h','e','m','a','s','.','m','i','c','r','o','s','o','f','t','.','c','o','m','/','S','M','I','/','2','0','1','7','/','W','i','n','d','o','w','s','S','e','t','t','i','n','g','s',0};
-static const WCHAR dpiAwareW[] = {'d','p','i','A','w','a','r','e',0};
-static const WCHAR dpiAwarenessW[] = {'d','p','i','A','w','a','r','e','n','e','s','s',0};
-static const WCHAR gdiScalingW[] = {'g','d','i','S','c','a','l','i','n','g',0};
-static const WCHAR highResolutionScrollingAwareW[] = {'h','i','g','h','R','e','s','o','l','u','t','i','o','n','S','c','r','o','l','l','i','n','g','A','w','a','r','e',0};
-static const WCHAR longPathAwareW[] = {'l','o','n','g','P','a','t','h','A','w','a','r','e',0};
-static const WCHAR magicFutureSettingW[] = {'m','a','g','i','c','F','u','t','u','r','e','S','e','t','t','i','n','g',0};
-static const WCHAR printerDriverIsolationW[] = {'p','r','i','n','t','e','r','D','r','i','v','e','r','I','s','o','l','a','t','i','o','n',0};
-static const WCHAR ultraHighResolutionScrollingAwareW[] = {'u','l','t','r','a','H','i','g','h','R','e','s','o','l','u','t','i','o','n','S','c','r','o','l','l','i','n','g','A','w','a','r','e',0};
+static const WCHAR asmv1W[] = L"urn:schemas-microsoft-com:asm.v1";
+static const WCHAR asmv2W[] = L"urn:schemas-microsoft-com:asm.v2";
+static const WCHAR asmv3W[] = L"urn:schemas-microsoft-com:asm.v3";
+static const WCHAR compatibilityNSW[] = L"urn:schemas-microsoft-com:compatibility.v1";
+static const WCHAR windowsSettings2005NSW[] = L"http://schemas.microsoft.com/SMI/2005/WindowsSettings";
+static const WCHAR windowsSettings2011NSW[] = L"http://schemas.microsoft.com/SMI/2011/WindowsSettings";
+static const WCHAR windowsSettings2016NSW[] = L"http://schemas.microsoft.com/SMI/2016/WindowsSettings";
+static const WCHAR windowsSettings2017NSW[] = L"http://schemas.microsoft.com/SMI/2017/WindowsSettings";
struct olemisc_entry
{
@@ -693,35 +593,30 @@ struct olemisc_entry
static const struct olemisc_entry olemisc_values[] =
{
- { activatewhenvisibleW, OLEMISC_ACTIVATEWHENVISIBLE },
- { actslikebuttonW, OLEMISC_ACTSLIKEBUTTON },
- { actslikelabelW, OLEMISC_ACTSLIKELABEL },
- { alignableW, OLEMISC_ALIGNABLE },
- { alwaysrunW, OLEMISC_ALWAYSRUN },
- { canlinkbyole1W, OLEMISC_CANLINKBYOLE1 },
- { cantlinkinsideW, OLEMISC_CANTLINKINSIDE },
- { ignoreactivatewhenvisibleW, OLEMISC_IGNOREACTIVATEWHENVISIBLE },
- { imemodeW, OLEMISC_IMEMODE },
- { insertnotreplaceW, OLEMISC_INSERTNOTREPLACE },
- { insideoutW, OLEMISC_INSIDEOUT },
- { invisibleatruntimeW, OLEMISC_INVISIBLEATRUNTIME },
- { islinkobjectW, OLEMISC_ISLINKOBJECT },
- { nouiactivateW, OLEMISC_NOUIACTIVATE },
- { onlyiconicW, OLEMISC_ONLYICONIC },
- { recomposeonresizeW, OLEMISC_RECOMPOSEONRESIZE },
- { renderingisdeviceindependentW, OLEMISC_RENDERINGISDEVICEINDEPENDENT },
- { setclientsitefirstW, OLEMISC_SETCLIENTSITEFIRST },
- { simpleframeW, OLEMISC_SIMPLEFRAME },
- { staticW, OLEMISC_STATIC },
- { supportsmultilevelundoW, OLEMISC_SUPPORTSMULTILEVELUNDO },
- { wantstomenumergeW, OLEMISC_WANTSTOMENUMERGE }
+ { L"activatewhenvisible", OLEMISC_ACTIVATEWHENVISIBLE },
+ { L"actslikebutton", OLEMISC_ACTSLIKEBUTTON },
+ { L"actslikelabel", OLEMISC_ACTSLIKELABEL },
+ { L"alignable", OLEMISC_ALIGNABLE },
+ { L"alwaysrun", OLEMISC_ALWAYSRUN },
+ { L"canlinkbyole1", OLEMISC_CANLINKBYOLE1 },
+ { L"cantlinkinside", OLEMISC_CANTLINKINSIDE },
+ { L"ignoreactivatewhenvisible", OLEMISC_IGNOREACTIVATEWHENVISIBLE },
+ { L"imemode", OLEMISC_IMEMODE },
+ { L"insertnotreplace", OLEMISC_INSERTNOTREPLACE },
+ { L"insideout", OLEMISC_INSIDEOUT },
+ { L"invisibleatruntime", OLEMISC_INVISIBLEATRUNTIME },
+ { L"islinkobject", OLEMISC_ISLINKOBJECT },
+ { L"nouiactivate", OLEMISC_NOUIACTIVATE },
+ { L"onlyiconic", OLEMISC_ONLYICONIC },
+ { L"recomposeonresize", OLEMISC_RECOMPOSEONRESIZE },
+ { L"renderingisdeviceindependent", OLEMISC_RENDERINGISDEVICEINDEPENDENT },
+ { L"setclientsitefirst", OLEMISC_SETCLIENTSITEFIRST },
+ { L"simpleframe", OLEMISC_SIMPLEFRAME },
+ { L"static", OLEMISC_STATIC },
+ { L"supportsmultilevelundo", OLEMISC_SUPPORTSMULTILEVELUNDO },
+ { L"wantstomenumerge", OLEMISC_WANTSTOMENUMERGE }
};
-static const WCHAR xmlW[] = {'?','x','m','l',0};
-static const WCHAR dotManifestW[] = {'.','m','a','n','i','f','e','s','t',0};
-static const WCHAR version_formatW[] = {'%','u','.','%','u','.','%','u','.','%','u',0};
-static const WCHAR wildcardW[] = {'*',0};
-
static ACTIVATION_CONTEXT system_actctx = { ACTCTX_MAGIC, 1 };
static ACTIVATION_CONTEXT *process_actctx = &system_actctx;
@@ -1008,7 +903,7 @@ static BOOL is_matching_identity( const struct assembly_identity *id1,
if (id1->language && id2->language && !is_matching_string( id1->language, id2->language ))
{
- if (wcscmp( wildcardW, id1->language ) && wcscmp( wildcardW, id2->language ))
+ if (wcscmp( L"*", id1->language ) && wcscmp( L"*", id2->language ))
return FALSE;
}
if (id1->version.major != id2->version.major) return FALSE;
@@ -1078,14 +973,11 @@ static void free_depend_manifests(struct actctx_loader* acl)
static WCHAR *build_assembly_dir(struct assembly_identity* ai)
{
- static const WCHAR undW[] = {'_',0};
- static const WCHAR noneW[] = {'n','o','n','e',0};
- static const WCHAR mskeyW[] = {'d','e','a','d','b','e','e','f',0};
-
- const WCHAR *arch = ai->arch ? ai->arch : noneW;
- const WCHAR *key = ai->public_key ? ai->public_key : noneW;
- const WCHAR *lang = ai->language ? ai->language : noneW;
- const WCHAR *name = ai->name ? ai->name : noneW;
+ static const WCHAR mskeyW[] = L"deadbeef";
+ const WCHAR *arch = ai->arch ? ai->arch : L"none";
+ const WCHAR *key = ai->public_key ? ai->public_key : L"none";
+ const WCHAR *lang = ai->language ? ai->language : L"none";
+ const WCHAR *name = ai->name ? ai->name : L"none";
SIZE_T size = (wcslen(arch) + 1 + wcslen(name) + 1 + wcslen(key) + 24 + 1 +
wcslen(lang) + 1) * sizeof(WCHAR) + sizeof(mskeyW);
WCHAR *ret;
@@ -1093,16 +985,16 @@ static WCHAR *build_assembly_dir(struct assembly_identity* ai)
if (!(ret = RtlAllocateHeap( GetProcessHeap(), 0, size ))) return NULL;
wcscpy( ret, arch );
- wcscat( ret, undW );
+ wcscat( ret, L"_" );
wcscat( ret, name );
- wcscat( ret, undW );
+ wcscat( ret, L"_" );
wcscat( ret, key );
- wcscat( ret, undW );
- swprintf( ret + wcslen(ret), size - wcslen(ret), version_formatW,
+ wcscat( ret, L"_" );
+ swprintf( ret + wcslen(ret), size - wcslen(ret), L"%u.%u.%u.%u",
ai->version.major, ai->version.minor, ai->version.build, ai->version.revision );
- wcscat( ret, undW );
+ wcscat( ret, L"_" );
wcscat( ret, lang );
- wcscat( ret, undW );
+ wcscat( ret, L"_" );
wcscat( ret, mskeyW );
return ret;
}
@@ -1123,35 +1015,26 @@ static inline void append_string( WCHAR *buffer, const WCHAR *prefix, const WCHA
static WCHAR *build_assembly_id( const struct assembly_identity *ai )
{
- static const WCHAR archW[] =
- {',','p','r','o','c','e','s','s','o','r','A','r','c','h','i','t','e','c','t','u','r','e','=',0};
- static const WCHAR public_keyW[] =
- {',','p','u','b','l','i','c','K','e','y','T','o','k','e','n','=',0};
- static const WCHAR typeW[] =
- {',','t','y','p','e','=',0};
- static const WCHAR versionW[] =
- {',','v','e','r','s','i','o','n','=',0};
-
WCHAR version[64], *ret;
SIZE_T size = 0;
- swprintf( version, ARRAY_SIZE(version), version_formatW,
+ swprintf( version, ARRAY_SIZE(version), L"%u.%u.%u.%u",
ai->version.major, ai->version.minor, ai->version.build, ai->version.revision );
if (ai->name) size += wcslen(ai->name) * sizeof(WCHAR);
- if (ai->arch) size += wcslen(archW) + wcslen(ai->arch) + 2;
- if (ai->public_key) size += wcslen(public_keyW) + wcslen(ai->public_key) + 2;
- if (ai->type) size += wcslen(typeW) + wcslen(ai->type) + 2;
- size += wcslen(versionW) + wcslen(version) + 2;
+ if (ai->arch) size += wcslen(L",processorArchitecture=") + wcslen(ai->arch) + 2;
+ if (ai->public_key) size += wcslen(L",publicKeyToken=") + wcslen(ai->public_key) + 2;
+ if (ai->type) size += wcslen(L",type=") + wcslen(ai->type) + 2;
+ size += wcslen(L",version=") + wcslen(version) + 2;
if (!(ret = RtlAllocateHeap( GetProcessHeap(), 0, (size + 1) * sizeof(WCHAR) )))
return NULL;
if (ai->name) wcscpy( ret, ai->name );
else *ret = 0;
- append_string( ret, archW, ai->arch );
- append_string( ret, public_keyW, ai->public_key );
- append_string( ret, typeW, ai->type );
- append_string( ret, versionW, version );
+ append_string( ret, L",processorArchitecture=", ai->arch );
+ append_string( ret, L",publicKeyToken=", ai->public_key );
+ append_string( ret, L",type=", ai->type );
+ append_string( ret, L",version=", version );
return ret;
}
@@ -1222,15 +1105,15 @@ static BOOL set_error( xmlbuf_t *xmlbuf )
static BOOL is_xmlns_attr( const struct xml_attr *attr )
{
- const int len = wcslen( xmlnsW );
+ const int len = wcslen( L"xmlns" );
if (attr->name.len < len) return FALSE;
- if (wcsncmp( attr->name.ptr, xmlnsW, len )) return FALSE;
+ if (wcsncmp( attr->name.ptr, L"xmlns", len )) return FALSE;
return (attr->name.len == len || attr->name.ptr[len] == ':');
}
static void push_xmlns( xmlbuf_t *xmlbuf, const struct xml_attr *attr )
{
- const int len = wcslen( xmlnsW );
+ const int len = wcslen( L"xmlns" );
struct xml_attr *ns;
if (xmlbuf->ns_pos == MAX_NAMESPACES - 1)
@@ -1527,27 +1410,27 @@ static void parse_assembly_identity_elem(xmlbuf_t *xmlbuf, ACTIVATION_CONTEXT *a
while (next_xml_attr(xmlbuf, &attr, &end))
{
- if (xml_attr_cmp(&attr, nameW))
+ if (xml_attr_cmp(&attr, L"name"))
{
if (!(ai->name = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
- else if (xml_attr_cmp(&attr, typeW))
+ else if (xml_attr_cmp(&attr, L"type"))
{
if (!(ai->type = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
- else if (xml_attr_cmp(&attr, versionW))
+ else if (xml_attr_cmp(&attr, L"version"))
{
if (!parse_version(&attr.value, &ai->version)) set_error( xmlbuf );
}
- else if (xml_attr_cmp(&attr, processorArchitectureW))
+ else if (xml_attr_cmp(&attr, L"processorArchitecture"))
{
if (!(ai->arch = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
- else if (xml_attr_cmp(&attr, publicKeyTokenW))
+ else if (xml_attr_cmp(&attr, L"publicKeyToken"))
{
if (!(ai->public_key = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
- else if (xml_attr_cmp(&attr, languageW))
+ else if (xml_attr_cmp(&attr, L"language"))
{
if (!(ai->language = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
@@ -1565,19 +1448,14 @@ static void parse_assembly_identity_elem(xmlbuf_t *xmlbuf, ACTIVATION_CONTEXT *a
static enum comclass_threadingmodel parse_com_class_threadingmodel(xmlstr_t *value)
{
- static const WCHAR apartW[] = {'A','p','a','r','t','m','e','n','t',0};
- static const WCHAR neutralW[] = {'N','e','u','t','r','a','l',0};
- static const WCHAR freeW[] = {'F','r','e','e',0};
- static const WCHAR bothW[] = {'B','o','t','h',0};
-
if (value->len == 0) return ThreadingModel_No;
- if (xmlstr_cmp(value, apartW))
+ if (xmlstr_cmp(value, L"Apartment"))
return ThreadingModel_Apartment;
- else if (xmlstr_cmp(value, freeW))
+ else if (xmlstr_cmp(value, L"Free"))
return ThreadingModel_Free;
- else if (xmlstr_cmp(value, bothW))
+ else if (xmlstr_cmp(value, L"Both"))
return ThreadingModel_Both;
- else if (xmlstr_cmp(value, neutralW))
+ else if (xmlstr_cmp(value, L"Neutral"))
return ThreadingModel_Neutral;
else
return ThreadingModel_No;
@@ -1686,43 +1564,43 @@ static void parse_com_class_elem( xmlbuf_t *xmlbuf, struct dll_redirect *dll, st
while (next_xml_attr(xmlbuf, &attr, &end))
{
- if (xml_attr_cmp(&attr, clsidW))
+ if (xml_attr_cmp(&attr, L"clsid"))
{
if (!(entity->u.comclass.clsid = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
- else if (xml_attr_cmp(&attr, progidW))
+ else if (xml_attr_cmp(&attr, L"progid"))
{
if (!(entity->u.comclass.progid = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
- else if (xml_attr_cmp(&attr, tlbidW))
+ else if (xml_attr_cmp(&attr, L"tlbid"))
{
if (!(entity->u.comclass.tlbid = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
- else if (xml_attr_cmp(&attr, threadingmodelW))
+ else if (xml_attr_cmp(&attr, L"threadingModel"))
{
entity->u.comclass.model = parse_com_class_threadingmodel(&attr.value);
}
- else if (xml_attr_cmp(&attr, miscstatusW))
+ else if (xml_attr_cmp(&attr, L"miscStatus"))
{
entity->u.comclass.miscstatus = parse_com_class_misc(&attr.value);
}
- else if (xml_attr_cmp(&attr, miscstatuscontentW))
+ else if (xml_attr_cmp(&attr, L"miscStatusContent"))
{
entity->u.comclass.miscstatuscontent = parse_com_class_misc(&attr.value);
}
- else if (xml_attr_cmp(&attr, miscstatusthumbnailW))
+ else if (xml_attr_cmp(&attr, L"miscStatusThumbnail"))
{
entity->u.comclass.miscstatusthumbnail = parse_com_class_misc(&attr.value);
}
- else if (xml_attr_cmp(&attr, miscstatusiconW))
+ else if (xml_attr_cmp(&attr, L"miscStatusIcon"))
{
entity->u.comclass.miscstatusicon = parse_com_class_misc(&attr.value);
}
- else if (xml_attr_cmp(&attr, miscstatusdocprintW))
+ else if (xml_attr_cmp(&attr, L"miscStatusDocPrint"))
{
entity->u.comclass.miscstatusdocprint = parse_com_class_misc(&attr.value);
}
- else if (xml_attr_cmp(&attr, descriptionW))
+ else if (xml_attr_cmp(&attr, L"description"))
{
/* not stored */
}
@@ -1740,7 +1618,7 @@ static void parse_com_class_elem( xmlbuf_t *xmlbuf, struct dll_redirect *dll, st
while (next_xml_elem(xmlbuf, &elem, parent))
{
- if (xml_elem_cmp(&elem, progidW, asmv1W))
+ if (xml_elem_cmp(&elem, L"progid", asmv1W))
{
parse_com_class_progid(xmlbuf, entity, &elem);
}
@@ -1818,34 +1696,34 @@ static void parse_cominterface_proxy_stub_elem( xmlbuf_t *xmlbuf, struct dll_red
while (next_xml_attr(xmlbuf, &attr, &end))
{
- if (xml_attr_cmp(&attr, iidW))
+ if (xml_attr_cmp(&attr, L"iid"))
{
if (!(entity->u.ifaceps.iid = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
- else if (xml_attr_cmp(&attr, nameW))
+ else if (xml_attr_cmp(&attr, L"name"))
{
if (!(entity->u.ifaceps.name = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
- else if (xml_attr_cmp(&attr, baseInterfaceW))
+ else if (xml_attr_cmp(&attr, L"baseInterface"))
{
if (!(entity->u.ifaceps.base = xmlstrdupW(&attr.value))) set_error( xmlbuf );
entity->u.ifaceps.mask |= BaseIface;
}
- else if (xml_attr_cmp(&attr, nummethodsW))
+ else if (xml_attr_cmp(&attr, L"numMethods"))
{
if (!(parse_nummethods(&attr.value, entity))) set_error( xmlbuf );
entity->u.ifaceps.mask |= NumMethods;
}
- else if (xml_attr_cmp(&attr, tlbidW))
+ else if (xml_attr_cmp(&attr, L"tlbid"))
{
if (!(entity->u.ifaceps.tlib = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
- else if (xml_attr_cmp(&attr, proxyStubClsid32W))
+ else if (xml_attr_cmp(&attr, L"proxyStubClsid32"))
{
if (!(psclsid = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
/* not used */
- else if (xml_attr_cmp(&attr, threadingmodelW))
+ else if (xml_attr_cmp(&attr, L"threadingModel"))
{
}
else if (!is_xmlns_attr( &attr ))
@@ -1876,13 +1754,13 @@ static BOOL parse_typelib_flags(const xmlstr_t *value, struct entity *entity)
start = str;
while (*str != ',' && (i++ < value->len)) str++;
- if (!wcsnicmp(start, restrictedW, str-start))
+ if (!wcsnicmp(start, L"RESTRICTED", str-start))
*flags |= LIBFLAG_FRESTRICTED;
- else if (!wcsnicmp(start, controlW, str-start))
+ else if (!wcsnicmp(start, L"CONTROL", str-start))
*flags |= LIBFLAG_FCONTROL;
- else if (!wcsnicmp(start, hiddenW, str-start))
+ else if (!wcsnicmp(start, L"HIDDEN", str-start))
*flags |= LIBFLAG_FHIDDEN;
- else if (!wcsnicmp(start, hasdiskimageW, str-start))
+ else if (!wcsnicmp(start, L"HASDISKIMAGE", str-start))
*flags |= LIBFLAG_FHASDISKIMAGE;
else
{
@@ -1943,19 +1821,19 @@ static void parse_typelib_elem( xmlbuf_t *xmlbuf, struct dll_redirect *dll,
while (next_xml_attr(xmlbuf, &attr, &end))
{
- if (xml_attr_cmp(&attr, tlbidW))
+ if (xml_attr_cmp(&attr, L"tlbid"))
{
if (!(entity->u.typelib.tlbid = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
- else if (xml_attr_cmp(&attr, versionW))
+ else if (xml_attr_cmp(&attr, L"version"))
{
if (!parse_typelib_version(&attr.value, entity)) set_error( xmlbuf );
}
- else if (xml_attr_cmp(&attr, helpdirW))
+ else if (xml_attr_cmp(&attr, L"helpdir"))
{
if (!(entity->u.typelib.helpdir = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
- else if (xml_attr_cmp(&attr, flagsW))
+ else if (xml_attr_cmp(&attr, L"flags"))
{
if (!parse_typelib_flags(&attr.value, entity)) set_error( xmlbuf );
}
@@ -1976,12 +1854,11 @@ static inline int aligned_string_len(int len)
static int get_assembly_version(struct assembly *assembly, WCHAR *ret)
{
- static const WCHAR fmtW[] = {'%','u','.','%','u','.','%','u','.','%','u',0};
struct assembly_version *ver = &assembly->id.version;
WCHAR buff[25];
if (!ret) ret = buff;
- return swprintf(ret, ARRAY_SIZE(buff), fmtW, ver->major, ver->minor, ver->build, ver->revision);
+ return swprintf(ret, ARRAY_SIZE(buff), L"%u.%u.%u.%u", ver->major, ver->minor, ver->build, ver->revision);
}
static void parse_window_class_elem( xmlbuf_t *xmlbuf, struct dll_redirect *dll,
@@ -2001,11 +1878,11 @@ static void parse_window_class_elem( xmlbuf_t *xmlbuf, struct dll_redirect *dll,
entity->u.class.versioned = TRUE;
while (next_xml_attr(xmlbuf, &attr, &end))
{
- if (xml_attr_cmp(&attr, versionedW))
+ if (xml_attr_cmp(&attr, L"versioned"))
{
- if (xmlstr_cmpi(&attr.value, noW))
+ if (xmlstr_cmpi(&attr.value, L"no"))
entity->u.class.versioned = FALSE;
- else if (!xmlstr_cmpi(&attr.value, yesW))
+ else if (!xmlstr_cmpi(&attr.value, L"yes"))
set_error( xmlbuf );
}
else if (!is_xmlns_attr( &attr ))
@@ -2035,11 +1912,11 @@ static void parse_binding_redirect_elem( xmlbuf_t *xmlbuf, const struct xml_elem
while (next_xml_attr(xmlbuf, &attr, &end))
{
- if (xml_attr_cmp(&attr, oldVersionW))
+ if (xml_attr_cmp(&attr, L"oldVersion"))
{
FIXME("Not stored yet %s\n", debugstr_xml_attr(&attr));
}
- else if (xml_attr_cmp(&attr, newVersionW))
+ else if (xml_attr_cmp(&attr, L"newVersion"))
{
FIXME("Not stored yet %s\n", debugstr_xml_attr(&attr));
}
@@ -2093,29 +1970,29 @@ static void parse_com_interface_external_proxy_stub_elem(xmlbuf_t *xmlbuf,
while (next_xml_attr(xmlbuf, &attr, &end))
{
- if (xml_attr_cmp(&attr, iidW))
+ if (xml_attr_cmp(&attr, L"iid"))
{
if (!(entity->u.ifaceps.iid = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
- else if (xml_attr_cmp(&attr, nameW))
+ else if (xml_attr_cmp(&attr, L"name"))
{
if (!(entity->u.ifaceps.name = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
- else if (xml_attr_cmp(&attr, baseInterfaceW))
+ else if (xml_attr_cmp(&attr, L"baseInterface"))
{
if (!(entity->u.ifaceps.base = xmlstrdupW(&attr.value))) set_error( xmlbuf );
entity->u.ifaceps.mask |= BaseIface;
}
- else if (xml_attr_cmp(&attr, nummethodsW))
+ else if (xml_attr_cmp(&attr, L"numMethods"))
{
if (!(parse_nummethods(&attr.value, entity))) set_error( xmlbuf );
entity->u.ifaceps.mask |= NumMethods;
}
- else if (xml_attr_cmp(&attr, proxyStubClsid32W))
+ else if (xml_attr_cmp(&attr, L"proxyStubClsid32"))
{
if (!(entity->u.ifaceps.ps32 = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
- else if (xml_attr_cmp(&attr, tlbidW))
+ else if (xml_attr_cmp(&attr, L"tlbid"))
{
if (!(entity->u.ifaceps.tlib = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
@@ -2146,27 +2023,27 @@ static void parse_clr_class_elem( xmlbuf_t* xmlbuf, struct assembly* assembly,
while (next_xml_attr(xmlbuf, &attr, &end))
{
- if (xml_attr_cmp(&attr, nameW))
+ if (xml_attr_cmp(&attr, L"name"))
{
if (!(entity->u.comclass.name = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
- else if (xml_attr_cmp(&attr, clsidW))
+ else if (xml_attr_cmp(&attr, L"clsid"))
{
if (!(entity->u.comclass.clsid = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
- else if (xml_attr_cmp(&attr, progidW))
+ else if (xml_attr_cmp(&attr, L"progid"))
{
if (!(entity->u.comclass.progid = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
- else if (xml_attr_cmp(&attr, tlbidW))
+ else if (xml_attr_cmp(&attr, L"tlbid"))
{
if (!(entity->u.comclass.tlbid = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
- else if (xml_attr_cmp(&attr, threadingmodelW))
+ else if (xml_attr_cmp(&attr, L"threadingModel"))
{
entity->u.comclass.model = parse_com_class_threadingmodel(&attr.value);
}
- else if (xml_attr_cmp(&attr, runtimeVersionW))
+ else if (xml_attr_cmp(&attr, L"runtimeVersion"))
{
if (!(entity->u.comclass.version = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
@@ -2183,7 +2060,7 @@ static void parse_clr_class_elem( xmlbuf_t* xmlbuf, struct assembly* assembly,
while (next_xml_elem(xmlbuf, &elem, parent))
{
- if (xml_elem_cmp(&elem, progidW, asmv1W))
+ if (xml_elem_cmp(&elem, L"progid", asmv1W))
{
parse_com_class_progid(xmlbuf, entity, &elem);
}
@@ -2213,15 +2090,15 @@ static void parse_clr_surrogate_elem( xmlbuf_t *xmlbuf, struct assembly *assembl
while (next_xml_attr(xmlbuf, &attr, &end))
{
- if (xml_attr_cmp(&attr, nameW))
+ if (xml_attr_cmp(&attr, L"name"))
{
if (!(entity->u.clrsurrogate.name = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
- else if (xml_attr_cmp(&attr, clsidW))
+ else if (xml_attr_cmp(&attr, L"clsid"))
{
if (!(entity->u.clrsurrogate.clsid = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
- else if (xml_attr_cmp(&attr, runtimeVersionW))
+ else if (xml_attr_cmp(&attr, L"runtimeVersion"))
{
if (!(entity->u.clrsurrogate.version = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
@@ -2248,11 +2125,8 @@ static void parse_dependent_assembly_elem( xmlbuf_t *xmlbuf, struct actctx_loade
while (next_xml_attr(xmlbuf, &attr, &end))
{
- static const WCHAR allowDelayedBindingW[] = {'a','l','l','o','w','D','e','l','a','y','e','d','B','i','n','d','i','n','g',0};
- static const WCHAR trueW[] = {'t','r','u','e',0};
-
- if (xml_attr_cmp(&attr, allowDelayedBindingW))
- ai.delayed = xmlstr_cmp(&attr.value, trueW);
+ if (xml_attr_cmp(&attr, L"allowDelayedBinding"))
+ ai.delayed = xmlstr_cmp(&attr.value, L"true");
else if (!is_xmlns_attr( &attr ))
WARN("unknown attr %s\n", debugstr_xml_attr(&attr));
}
@@ -2261,11 +2135,11 @@ static void parse_dependent_assembly_elem( xmlbuf_t *xmlbuf, struct actctx_loade
while (next_xml_elem(xmlbuf, &elem, parent))
{
- if (xml_elem_cmp(&elem, assemblyIdentityW, asmv1W))
+ if (xml_elem_cmp(&elem, L"assemblyIdentity", asmv1W))
{
parse_assembly_identity_elem(xmlbuf, acl->actctx, &ai, &elem);
/* store the newly found identity for later loading */
- if (ai.arch && !wcscmp(ai.arch, wildcardW))
+ if (ai.arch && !wcscmp(ai.arch, L"*"))
{
RtlFreeHeap( GetProcessHeap(), 0, ai.arch );
ai.arch = strdupW( current_archW );
@@ -2274,7 +2148,7 @@ static void parse_dependent_assembly_elem( xmlbuf_t *xmlbuf, struct actctx_loade
debugstr_w(ai.name), debugstr_version(&ai.version), debugstr_w(ai.arch) );
if (!add_dependent_assembly_id(acl, &ai)) set_error( xmlbuf );
}
- else if (xml_elem_cmp(&elem, bindingRedirectW, asmv1W))
+ else if (xml_elem_cmp(&elem, L"bindingRedirect", asmv1W))
{
parse_binding_redirect_elem(xmlbuf, &elem);
}
@@ -2296,9 +2170,9 @@ static void parse_dependency_elem( xmlbuf_t *xmlbuf, struct actctx_loader *acl,
while (next_xml_attr(xmlbuf, &attr, &end))
{
- if (xml_attr_cmp(&attr, optionalW))
+ if (xml_attr_cmp(&attr, L"optional"))
{
- optional = xmlstr_cmpi( &attr.value, yesW );
+ optional = xmlstr_cmpi( &attr.value, L"yes" );
TRACE("optional=%s\n", debugstr_xmlstr(&attr.value));
}
else if (!is_xmlns_attr( &attr ))
@@ -2311,7 +2185,7 @@ static void parse_dependency_elem( xmlbuf_t *xmlbuf, struct actctx_loader *acl,
while (next_xml_elem(xmlbuf, &elem, parent))
{
- if (xml_elem_cmp(&elem, dependentAssemblyW, asmv1W))
+ if (xml_elem_cmp(&elem, L"dependentAssembly", asmv1W))
{
parse_dependent_assembly_elem(xmlbuf, acl, &elem, optional);
}
@@ -2355,19 +2229,18 @@ static void parse_file_elem( xmlbuf_t* xmlbuf, struct assembly* assembly,
while (next_xml_attr(xmlbuf, &attr, &end))
{
- if (xml_attr_cmp(&attr, nameW))
+ if (xml_attr_cmp(&attr, L"name"))
{
if (!(dll->name = xmlstrdupW(&attr.value))) set_error( xmlbuf );
TRACE("name=%s\n", debugstr_xmlstr(&attr.value));
}
- else if (xml_attr_cmp(&attr, hashW))
+ else if (xml_attr_cmp(&attr, L"hash"))
{
if (!(dll->hash = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
- else if (xml_attr_cmp(&attr, hashalgW))
+ else if (xml_attr_cmp(&attr, L"hashalg"))
{
- static const WCHAR sha1W[] = {'S','H','A','1',0};
- if (!xmlstr_cmpi(&attr.value, sha1W))
+ if (!xmlstr_cmpi(&attr.value, L"SHA1"))
FIXME("hashalg should be SHA1, got %s\n", debugstr_xmlstr(&attr.value));
}
else if (!is_xmlns_attr( &attr ))
@@ -2384,24 +2257,24 @@ static void parse_file_elem( xmlbuf_t* xmlbuf, struct assembly* assembly,
while (next_xml_elem(xmlbuf, &elem, parent))
{
- if (xml_elem_cmp(&elem, comClassW, asmv1W))
+ if (xml_elem_cmp(&elem, L"comClass", asmv1W))
{
parse_com_class_elem(xmlbuf, dll, acl, &elem);
}
- else if (xml_elem_cmp(&elem, comInterfaceProxyStubW, asmv1W))
+ else if (xml_elem_cmp(&elem, L"comInterfaceProxyStub", asmv1W))
{
parse_cominterface_proxy_stub_elem(xmlbuf, dll, acl, &elem);
}
- else if (xml_elem_cmp(&elem, hashW, asmv2W))
+ else if (xml_elem_cmp(&elem, L"hash", asmv2W))
{
WARN("asmv2:hash (undocumented) not supported\n");
parse_unknown_elem(xmlbuf, &elem);
}
- else if (xml_elem_cmp(&elem, typelibW, asmv1W))
+ else if (xml_elem_cmp(&elem, L"typelib", asmv1W))
{
parse_typelib_elem(xmlbuf, dll, acl, &elem);
}
- else if (xml_elem_cmp(&elem, windowClassW, asmv1W))
+ else if (xml_elem_cmp(&elem, L"windowClass", asmv1W))
{
parse_window_class_elem(xmlbuf, dll, acl, &elem);
}
@@ -2421,7 +2294,7 @@ static void parse_supportedos_elem( xmlbuf_t *xmlbuf, struct assembly *assembly,
while (next_xml_attr(xmlbuf, &attr, &end))
{
- if (xml_attr_cmp(&attr, IdW))
+ if (xml_attr_cmp(&attr, L"Id"))
{
COMPATIBILITY_CONTEXT_ELEMENT *compat;
UNICODE_STRING str;
@@ -2460,7 +2333,7 @@ static void parse_compatibility_application_elem(xmlbuf_t *xmlbuf, struct assemb
while (next_xml_elem(xmlbuf, &elem, parent))
{
- if (xml_elem_cmp(&elem, supportedOSW, compatibilityNSW))
+ if (xml_elem_cmp(&elem, L"supportedOS", compatibilityNSW))
{
parse_supportedos_elem(xmlbuf, assembly, acl, &elem);
}
@@ -2479,7 +2352,7 @@ static void parse_compatibility_elem(xmlbuf_t *xmlbuf, struct assembly *assembly
while (next_xml_elem(xmlbuf, &elem, parent))
{
- if (xml_elem_cmp(&elem, applicationW, compatibilityNSW))
+ if (xml_elem_cmp(&elem, L"application", compatibilityNSW))
{
parse_compatibility_application_elem(xmlbuf, assembly, acl, &elem);
}
@@ -2534,17 +2407,17 @@ static void parse_windows_settings_elem( xmlbuf_t *xmlbuf, struct assembly *asse
while (next_xml_elem( xmlbuf, &elem, parent ))
{
- if (xml_elem_cmp( &elem, autoElevateW, windowsSettings2005NSW ) ||
- xml_elem_cmp( &elem, disableThemingW, windowsSettings2005NSW ) ||
- xml_elem_cmp( &elem, disableWindowFilteringW, windowsSettings2011NSW ) ||
- xml_elem_cmp( &elem, dpiAwareW, windowsSettings2005NSW ) ||
- xml_elem_cmp( &elem, dpiAwarenessW, windowsSettings2016NSW ) ||
- xml_elem_cmp( &elem, gdiScalingW, windowsSettings2017NSW ) ||
- xml_elem_cmp( &elem, highResolutionScrollingAwareW, windowsSettings2017NSW ) ||
- xml_elem_cmp( &elem, longPathAwareW, windowsSettings2016NSW ) ||
- xml_elem_cmp( &elem, magicFutureSettingW, windowsSettings2017NSW ) ||
- xml_elem_cmp( &elem, printerDriverIsolationW, windowsSettings2011NSW ) ||
- xml_elem_cmp( &elem, ultraHighResolutionScrollingAwareW, windowsSettings2017NSW ))
+ if (xml_elem_cmp( &elem, L"autoElevate", windowsSettings2005NSW ) ||
+ xml_elem_cmp( &elem, L"disableTheming", windowsSettings2005NSW ) ||
+ xml_elem_cmp( &elem, L"disableWindowFiltering", windowsSettings2011NSW ) ||
+ xml_elem_cmp( &elem, L"dpiAware", windowsSettings2005NSW ) ||
+ xml_elem_cmp( &elem, L"dpiAwareness", windowsSettings2016NSW ) ||
+ xml_elem_cmp( &elem, L"gdiScaling", windowsSettings2017NSW ) ||
+ xml_elem_cmp( &elem, L"highResolutionScrollingAware", windowsSettings2017NSW ) ||
+ xml_elem_cmp( &elem, L"longPathAware", windowsSettings2016NSW ) ||
+ xml_elem_cmp( &elem, L"magicFutureSetting", windowsSettings2017NSW ) ||
+ xml_elem_cmp( &elem, L"printerDriverIsolation", windowsSettings2011NSW ) ||
+ xml_elem_cmp( &elem, L"ultraHighResolutionScrollingAware", windowsSettings2017NSW ))
{
parse_settings_elem( xmlbuf, assembly, acl, &elem );
}
@@ -2563,7 +2436,7 @@ static void parse_application_elem( xmlbuf_t *xmlbuf, struct assembly *assembly,
while (next_xml_elem( xmlbuf, &elem, parent ))
{
- if (xml_elem_cmp( &elem, windowsSettingsW, asmv3W ))
+ if (xml_elem_cmp( &elem, L"windowsSettings", asmv3W ))
{
parse_windows_settings_elem( xmlbuf, assembly, acl, &elem );
}
@@ -2578,14 +2451,6 @@ static void parse_application_elem( xmlbuf_t *xmlbuf, struct assembly *assembly,
static void parse_requested_execution_level_elem( xmlbuf_t *xmlbuf, struct assembly *assembly,
struct actctx_loader *acl, const struct xml_elem *parent )
{
- static const WCHAR levelW[] = {'l','e','v','e','l',0};
- static const WCHAR asInvokerW[] = {'a','s','I','n','v','o','k','e','r',0};
- static const WCHAR requireAdministratorW[] = {'r','e','q','u','i','r','e','A','d','m','i','n','i','s','t','r','a','t','o','r',0};
- static const WCHAR highestAvailableW[] = {'h','i','g','h','e','s','t','A','v','a','i','l','a','b','l','e',0};
- static const WCHAR uiAccessW[] = {'u','i','A','c','c','e','s','s',0};
- static const WCHAR falseW[] = {'f','a','l','s','e',0};
- static const WCHAR trueW[] = {'t','r','u','e',0};
-
struct xml_elem elem;
struct xml_attr attr;
BOOL end = FALSE;
@@ -2595,22 +2460,22 @@ static void parse_requested_execution_level_elem( xmlbuf_t *xmlbuf, struct assem
while (next_xml_attr(xmlbuf, &attr, &end))
{
- if (xml_attr_cmp(&attr, levelW))
+ if (xml_attr_cmp(&attr, L"level"))
{
- if (xmlstr_cmpi(&attr.value, asInvokerW))
+ if (xmlstr_cmpi(&attr.value, L"asInvoker"))
assembly->run_level = ACTCTX_RUN_LEVEL_AS_INVOKER;
- else if (xmlstr_cmpi(&attr.value, highestAvailableW))
+ else if (xmlstr_cmpi(&attr.value, L"highestAvailable"))
assembly->run_level = ACTCTX_RUN_LEVEL_HIGHEST_AVAILABLE;
- else if (xmlstr_cmpi(&attr.value, requireAdministratorW))
+ else if (xmlstr_cmpi(&attr.value, L"requireAdministrator"))
assembly->run_level = ACTCTX_RUN_LEVEL_REQUIRE_ADMIN;
else
FIXME("unknown execution level: %s\n", debugstr_xmlstr(&attr.value));
}
- else if (xml_attr_cmp(&attr, uiAccessW))
+ else if (xml_attr_cmp(&attr, L"uiAccess"))
{
- if (xmlstr_cmpi(&attr.value, falseW))
+ if (xmlstr_cmpi(&attr.value, L"false"))
assembly->ui_access = FALSE;
- else if (xmlstr_cmpi(&attr.value, trueW))
+ else if (xmlstr_cmpi(&attr.value, L"true"))
assembly->ui_access = TRUE;
else
FIXME("unknown uiAccess value: %s\n", debugstr_xmlstr(&attr.value));
@@ -2635,7 +2500,7 @@ static void parse_requested_privileges_elem( xmlbuf_t *xmlbuf, struct assembly *
while (next_xml_elem(xmlbuf, &elem, parent))
{
- if (xml_elem_cmp(&elem, requestedExecutionLevelW, asmv1W))
+ if (xml_elem_cmp(&elem, L"requestedExecutionLevel", asmv1W))
{
parse_requested_execution_level_elem(xmlbuf, assembly, acl, &elem);
}
@@ -2654,7 +2519,7 @@ static void parse_security_elem( xmlbuf_t *xmlbuf, struct assembly *assembly,
while (next_xml_elem(xmlbuf, &elem, parent))
{
- if (xml_elem_cmp(&elem, requestedPrivilegesW, asmv1W))
+ if (xml_elem_cmp(&elem, L"requestedPrivileges", asmv1W))
{
parse_requested_privileges_elem(xmlbuf, assembly, acl, &elem);
}
@@ -2673,7 +2538,7 @@ static void parse_trust_info_elem( xmlbuf_t *xmlbuf, struct assembly *assembly,
while (next_xml_elem(xmlbuf, &elem, parent))
{
- if (xml_elem_cmp(&elem, securityW, asmv1W))
+ if (xml_elem_cmp(&elem, L"security", asmv1W))
{
parse_security_elem(xmlbuf, assembly, acl, &elem);
}
@@ -2697,10 +2562,9 @@ static void parse_assembly_elem( xmlbuf_t *xmlbuf, struct assembly* assembly,
while (next_xml_attr(xmlbuf, &attr, &end))
{
- if (xml_attr_cmp(&attr, manifestVersionW))
+ if (xml_attr_cmp(&attr, L"manifestVersion"))
{
- static const WCHAR v10W[] = {'1','.','0',0};
- if (!xmlstr_cmp(&attr.value, v10W))
+ if (!xmlstr_cmp(&attr.value, L"1.0"))
{
FIXME("wrong version %s\n", debugstr_xmlstr(&attr.value));
break;
@@ -2721,44 +2585,44 @@ static void parse_assembly_elem( xmlbuf_t *xmlbuf, struct assembly* assembly,
while (next_xml_elem(xmlbuf, &elem, parent))
{
- if (assembly->type == APPLICATION_MANIFEST && xml_elem_cmp(&elem, noInheritW, asmv1W))
+ if (assembly->type == APPLICATION_MANIFEST && xml_elem_cmp(&elem, L"noInherit", asmv1W))
{
parse_noinherit_elem(xmlbuf, &elem);
assembly->no_inherit = TRUE;
}
- else if (xml_elem_cmp(&elem, noInheritableW, asmv1W))
+ else if (xml_elem_cmp(&elem, L"noInheritable", asmv1W))
{
parse_noinheritable_elem(xmlbuf, &elem);
}
- else if (xml_elem_cmp(&elem, descriptionW, asmv1W))
+ else if (xml_elem_cmp(&elem, L"description", asmv1W))
{
parse_description_elem(xmlbuf, &elem);
}
- else if (xml_elem_cmp(&elem, comInterfaceExternalProxyStubW, asmv1W))
+ else if (xml_elem_cmp(&elem, L"comInterfaceExternalProxyStub", asmv1W))
{
parse_com_interface_external_proxy_stub_elem(xmlbuf, assembly, acl, &elem);
}
- else if (xml_elem_cmp(&elem, dependencyW, asmv1W))
+ else if (xml_elem_cmp(&elem, L"dependency", asmv1W))
{
parse_dependency_elem(xmlbuf, acl, &elem);
}
- else if (xml_elem_cmp(&elem, fileW, asmv1W))
+ else if (xml_elem_cmp(&elem, L"file", asmv1W))
{
parse_file_elem(xmlbuf, assembly, acl, &elem);
}
- else if (xml_elem_cmp(&elem, clrClassW, asmv1W))
+ else if (xml_elem_cmp(&elem, L"clrClass", asmv1W))
{
parse_clr_class_elem(xmlbuf, assembly, acl, &elem);
}
- else if (xml_elem_cmp(&elem, clrSurrogateW, asmv1W))
+ else if (xml_elem_cmp(&elem, L"clrSurrogate", asmv1W))
{
parse_clr_surrogate_elem(xmlbuf, assembly, acl, &elem);
}
- else if (xml_elem_cmp(&elem, trustInfoW, asmv1W))
+ else if (xml_elem_cmp(&elem, L"trustInfo", asmv1W))
{
parse_trust_info_elem(xmlbuf, assembly, acl, &elem);
}
- else if (xml_elem_cmp(&elem, assemblyIdentityW, asmv1W))
+ else if (xml_elem_cmp(&elem, L"assemblyIdentity", asmv1W))
{
parse_assembly_identity_elem(xmlbuf, acl->actctx, &assembly->id, &elem);
@@ -2787,11 +2651,11 @@ static void parse_assembly_elem( xmlbuf_t *xmlbuf, struct assembly* assembly,
}
}
}
- else if (xml_elem_cmp(&elem, compatibilityW, compatibilityNSW))
+ else if (xml_elem_cmp(&elem, L"compatibility", compatibilityNSW))
{
parse_compatibility_elem(xmlbuf, assembly, acl, &elem);
}
- else if (xml_elem_cmp(&elem, applicationW, asmv3W))
+ else if (xml_elem_cmp(&elem, L"application", asmv3W))
{
parse_application_elem(xmlbuf, assembly, acl, &elem);
}
@@ -2820,11 +2684,11 @@ static NTSTATUS parse_manifest_buffer( struct actctx_loader* acl, struct assembl
if (!next_xml_elem(xmlbuf, &elem, &parent)) return STATUS_SXS_CANT_GEN_ACTCTX;
- if (xmlstr_cmp(&elem.name, xmlW) &&
+ if (xmlstr_cmp(&elem.name, L"?xml") &&
(!parse_xml_header(xmlbuf) || !next_xml_elem(xmlbuf, &elem, &parent)))
return STATUS_SXS_CANT_GEN_ACTCTX;
- if (!xml_elem_cmp(&elem, assemblyW, asmv1W))
+ if (!xml_elem_cmp(&elem, L"assembly", asmv1W))
{
FIXME("root element is %s, not <assembly>\n", debugstr_xml_elem(&elem));
return STATUS_SXS_CANT_GEN_ACTCTX;
@@ -3080,7 +2944,6 @@ static NTSTATUS get_manifest_in_manifest_file( struct actctx_loader* acl, struct
static NTSTATUS get_manifest_in_associated_manifest( struct actctx_loader* acl, struct assembly_identity* ai,
LPCWSTR filename, LPCWSTR directory, HMODULE module, LPCWSTR resname )
{
- static const WCHAR fmtW[] = { '.','%','l','u',0 };
WCHAR *buffer;
NTSTATUS status;
UNICODE_STRING nameW;
@@ -3095,10 +2958,10 @@ static NTSTATUS get_manifest_in_associated_manifest( struct actctx_loader* acl,
{
UNICODE_STRING name;
- if (!(status = get_module_filename( module, &name, sizeof(dotManifestW) + 10*sizeof(WCHAR) )))
+ if (!(status = get_module_filename( module, &name, sizeof(L".manifest") + 10*sizeof(WCHAR) )))
{
- if (resid != 1) swprintf( name.Buffer + wcslen(name.Buffer), 10, fmtW, resid );
- wcscat( name.Buffer, dotManifestW );
+ if (resid != 1) swprintf( name.Buffer + wcslen(name.Buffer), 10, L".%lu", resid );
+ wcscat( name.Buffer, L".manifest" );
if (!RtlDosPathNameToNtPathName_U( name.Buffer, &nameW, NULL, NULL ))
status = STATUS_RESOURCE_DATA_NOT_FOUND;
RtlFreeUnicodeString( &name );
@@ -3108,11 +2971,11 @@ static NTSTATUS get_manifest_in_associated_manifest( struct actctx_loader* acl,
else
{
if (!(buffer = RtlAllocateHeap( GetProcessHeap(), 0,
- (wcslen(filename) + 10) * sizeof(WCHAR) + sizeof(dotManifestW) )))
+ (wcslen(filename) + 10) * sizeof(WCHAR) + sizeof(L".manifest") )))
return STATUS_NO_MEMORY;
wcscpy( buffer, filename );
- if (resid != 1) swprintf( buffer + wcslen(buffer), 10, fmtW, resid );
- wcscat( buffer, dotManifestW );
+ if (resid != 1) swprintf( buffer + wcslen(buffer), 10, L".%lu", resid );
+ wcscat( buffer, L".manifest" );
RtlInitUnicodeString( &nameW, buffer );
}
@@ -3128,9 +2991,7 @@ static NTSTATUS get_manifest_in_associated_manifest( struct actctx_loader* acl,
static WCHAR *lookup_manifest_file( HANDLE dir, struct assembly_identity *ai )
{
- static const WCHAR lookup_fmtW[] =
- {'%','s','_','%','s','_','%','s','_','%','u','.','%','u','.','*','.','*','_',
- '%','s','_','*','.','m','a','n','i','f','e','s','t',0};
+ static const WCHAR lookup_fmtW[] = L"%s_%s_%s_%u.%u.*.*_%s_*.manifest";
static const WCHAR wine_trailerW[] = {'d','e','a','d','b','e','e','f','.','m','a','n','i','f','e','s','t'};
WCHAR *lookup, *ret = NULL;
@@ -3140,7 +3001,7 @@ static WCHAR *lookup_manifest_file( HANDLE dir, struct assembly_identity *ai )
unsigned int data_pos = 0, data_len, len;
char buffer[8192];
- if (!lang || !wcsicmp( lang, neutralW )) lang = wildcardW;
+ if (!lang || !wcsicmp( lang, L"neutral" )) lang = L"*";
len = wcslen(ai->arch) + wcslen(ai->name) + wcslen(ai->public_key) + wcslen(lang) + 20 + ARRAY_SIZE(lookup_fmtW);
if (!(lookup = RtlAllocateHeap( GetProcessHeap(), 0, len * sizeof(WCHAR) ))) return NULL;
@@ -3217,17 +3078,14 @@ static NTSTATUS lookup_winsxs(struct actctx_loader* acl, struct assembly_identit
WCHAR *path, *file = NULL;
HANDLE handle;
- static const WCHAR manifest_dirW[] =
- {'\\','w','i','n','s','x','s','\\','m','a','n','i','f','e','s','t','s',0};
-
if (!ai->arch || !ai->name || !ai->public_key) return STATUS_NO_SUCH_FILE;
- if (!(path = RtlAllocateHeap( GetProcessHeap(), 0, sizeof(manifest_dirW) +
+ if (!(path = RtlAllocateHeap( GetProcessHeap(), 0, sizeof(L"\\winsxs\\manifests") +
wcslen(windows_dir) * sizeof(WCHAR) )))
return STATUS_NO_MEMORY;
wcscpy( path, windows_dir );
- wcscat( path, manifest_dirW );
+ wcscat( path, L"\\winsxs\\manifests" );
if (!RtlDosPathNameToNtPathName_U( path, &path_us, NULL, NULL ))
{
@@ -3285,7 +3143,6 @@ static NTSTATUS lookup_winsxs(struct actctx_loader* acl, struct assembly_identit
static NTSTATUS lookup_assembly(struct actctx_loader* acl,
struct assembly_identity* ai)
{
- static const WCHAR dotDllW[] = {'.','d','l','l',0};
unsigned int i;
WCHAR *buffer, *p, *directory;
NTSTATUS status;
@@ -3305,7 +3162,7 @@ static NTSTATUS lookup_assembly(struct actctx_loader* acl,
nameW.Buffer = NULL;
if (!(buffer = RtlAllocateHeap( GetProcessHeap(), 0,
- (len + 2 * wcslen(ai->name) + 2) * sizeof(WCHAR) + sizeof(dotManifestW) )))
+ (len + 2 * wcslen(ai->name) + 2) * sizeof(WCHAR) + sizeof(L".manifest") )))
return STATUS_NO_MEMORY;
if (!(directory = build_assembly_dir( ai )))
@@ -3336,7 +3193,7 @@ static NTSTATUS lookup_assembly(struct actctx_loader* acl,
wcscpy( p, ai->name );
p += wcslen(p);
- wcscpy( p, dotDllW );
+ wcscpy( p, L".dll" );
if (RtlDosPathNameToNtPathName_U( buffer, &nameW, NULL, NULL ))
{
status = open_nt_file( &file, &nameW );
@@ -3351,7 +3208,7 @@ static NTSTATUS lookup_assembly(struct actctx_loader* acl,
RtlFreeUnicodeString( &nameW );
}
- wcscpy( p, dotManifestW );
+ wcscpy( p, L".manifest" );
if (RtlDosPathNameToNtPathName_U( buffer, &nameW, NULL, NULL ))
{
status = open_nt_file( &file, &nameW );
@@ -3684,7 +3541,6 @@ static NTSTATUS build_wndclass_section(ACTIVATION_CONTEXT* actctx, struct strsec
struct entity *entity = &dll->entities.base[k];
if (entity->kind == ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION)
{
- static const WCHAR exclW[] = {'!',0};
ULONG versioned_len, module_len;
UNICODE_STRING str;
WCHAR *ptrW;
@@ -3733,7 +3589,7 @@ static NTSTATUS build_wndclass_section(ACTIVATION_CONTEXT* actctx, struct strsec
if (entity->u.class.versioned)
{
get_assembly_version(assembly, ptrW);
- wcscat(ptrW, exclW);
+ wcscat(ptrW, L"!");
wcscat(ptrW, entity->u.class.name);
}
else
@@ -4037,7 +3893,7 @@ static void get_comserver_datalen(const struct entity_array *entities, const str
*len += aligned_string_len(str_len*sizeof(WCHAR));
/* module name is forced to mscoree.dll, and stored two times with different case */
- *module_len += sizeof(mscoreeW) + sizeof(mscoree2W);
+ *module_len += sizeof(L"MSCOREE.DLL") + sizeof(L"mscoree.dll");
}
else
{
@@ -4076,7 +3932,7 @@ static void add_comserver_record(const struct guidsection_header *section, const
else
progid_len = 0;
- module_len = dll ? wcslen(dll->name)*sizeof(WCHAR) : wcslen(mscoreeW)*sizeof(WCHAR);
+ module_len = dll ? wcslen(dll->name)*sizeof(WCHAR) : wcslen(L"MSCOREE.DLL")*sizeof(WCHAR);
/* setup new index entry */
RtlInitUnicodeString(&str, entity->u.comclass.clsid);
@@ -4142,7 +3998,7 @@ static void add_comserver_record(const struct guidsection_header *section, const
clrdata->size = sizeof(*clrdata);
clrdata->res[0] = 0;
clrdata->res[1] = 2; /* FIXME: unknown field */
- clrdata->module_len = wcslen(mscoreeW)*sizeof(WCHAR);
+ clrdata->module_len = wcslen(L"MSCOREE.DLL")*sizeof(WCHAR);
clrdata->module_offset = *module_offset + data->name_len + sizeof(WCHAR);
clrdata->name_len = wcslen(entity->u.comclass.name)*sizeof(WCHAR);
clrdata->name_offset = clrdata->size;
@@ -4155,11 +4011,11 @@ static void add_comserver_record(const struct guidsection_header *section, const
/* module name */
ptrW = (WCHAR*)((BYTE*)section + clrdata->module_offset);
- memcpy(ptrW, mscoree2W, clrdata->module_len);
+ memcpy(ptrW, L"mscoree.dll", clrdata->module_len);
ptrW[clrdata->module_len/sizeof(WCHAR)] = 0;
ptrW = (WCHAR*)((BYTE*)section + data->name_offset);
- memcpy(ptrW, mscoreeW, data->name_len);
+ memcpy(ptrW, L"MSCOREE.DLL", data->name_len);
ptrW[data->name_len/sizeof(WCHAR)] = 0;
/* class name */
--
2.26.2
Dec. 3, 2020
[PATCH 1/2] ntdll: Print the correct debug string and not a random global variable.
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/ntdll/actctx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/actctx.c b/dlls/ntdll/actctx.c
index b99d1655d22..faccd21d4b1 100644
--- a/dlls/ntdll/actctx.c
+++ b/dlls/ntdll/actctx.c
@@ -3533,7 +3533,7 @@ static struct string_index *find_string_index(const struct strsection_header *se
break;
}
else
- WARN("hash collision 0x%08x, %s, %s\n", hash, debugstr_us(name), debugstr_w(nameW));
+ WARN("hash collision 0x%08x, %s, %s\n", hash, debugstr_us(name), debugstr_us(&str));
}
iter++;
}
@@ -3794,7 +3794,7 @@ static NTSTATUS find_window_class(ACTIVATION_CONTEXT* actctx, const UNICODE_STRI
break;
}
else
- WARN("hash collision 0x%08x, %s, %s\n", hash, debugstr_us(name), debugstr_w(nameW));
+ WARN("hash collision 0x%08x, %s, %s\n", hash, debugstr_us(name), debugstr_us(&str));
}
iter++;
}
--
2.26.2
Dec. 3, 2020
Re: [PATCH 17/17] winegstreamer: Implement Get(Input/Output)CurrentType functions for color converter transform.
by Marvin
Hi,
While running your changed tests, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=83080
Your paranoid android.
=== debiant (build log) ===
error: patch failed: dlls/winegstreamer/Makefile.in:7
error: patch failed: dlls/winegstreamer/gst_private.h:87
error: patch failed: dlls/winegstreamer/mfplat.c:407
error: patch failed: dlls/winegstreamer/winegstreamer_classes.idl:67
error: patch failed: dlls/winegstreamer/mfplat.c:455
Task: Patch failed to apply
=== debiant (build log) ===
error: patch failed: dlls/winegstreamer/Makefile.in:7
error: patch failed: dlls/winegstreamer/gst_private.h:87
error: patch failed: dlls/winegstreamer/mfplat.c:407
error: patch failed: dlls/winegstreamer/winegstreamer_classes.idl:67
error: patch failed: dlls/winegstreamer/mfplat.c:455
Task: Patch failed to apply
Dec. 3, 2020
Re: [PATCH 16/17] winegstreamer: Implement Get*Attributes functions for color converter transform.
by Marvin
Hi,
While running your changed tests, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=83079
Your paranoid android.
=== debiant (build log) ===
error: patch failed: dlls/winegstreamer/Makefile.in:7
error: patch failed: dlls/winegstreamer/gst_private.h:87
error: patch failed: dlls/winegstreamer/mfplat.c:407
error: patch failed: dlls/winegstreamer/winegstreamer_classes.idl:67
error: patch failed: dlls/winegstreamer/mfplat.c:455
Task: Patch failed to apply
=== debiant (build log) ===
error: patch failed: dlls/winegstreamer/Makefile.in:7
error: patch failed: dlls/winegstreamer/gst_private.h:87
error: patch failed: dlls/winegstreamer/mfplat.c:407
error: patch failed: dlls/winegstreamer/winegstreamer_classes.idl:67
error: patch failed: dlls/winegstreamer/mfplat.c:455
Task: Patch failed to apply
Dec. 3, 2020
Re: [PATCH 15/17] winegstreamer: Implement ::Get(Input/Output)StreamInfo for color conversion transform.
by Marvin
Hi,
While running your changed tests, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=83078
Your paranoid android.
=== debiant (build log) ===
error: patch failed: dlls/winegstreamer/Makefile.in:7
error: patch failed: dlls/winegstreamer/gst_private.h:87
error: patch failed: dlls/winegstreamer/mfplat.c:407
error: patch failed: dlls/winegstreamer/winegstreamer_classes.idl:67
error: patch failed: dlls/winegstreamer/mfplat.c:455
Task: Patch failed to apply
=== debiant (build log) ===
error: patch failed: dlls/winegstreamer/Makefile.in:7
error: patch failed: dlls/winegstreamer/gst_private.h:87
error: patch failed: dlls/winegstreamer/mfplat.c:407
error: patch failed: dlls/winegstreamer/winegstreamer_classes.idl:67
error: patch failed: dlls/winegstreamer/mfplat.c:455
Task: Patch failed to apply
Dec. 3, 2020
Re: [PATCH 14/17] winegstreamer: Implement ::ProcessMessage for color conversion MFT.
by Marvin
Hi,
While running your changed tests, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=83077
Your paranoid android.
=== debiant (build log) ===
error: patch failed: dlls/winegstreamer/Makefile.in:7
error: patch failed: dlls/winegstreamer/gst_private.h:87
error: patch failed: dlls/winegstreamer/mfplat.c:407
error: patch failed: dlls/winegstreamer/winegstreamer_classes.idl:67
error: patch failed: dlls/winegstreamer/mfplat.c:455
Task: Patch failed to apply
=== debiant (build log) ===
error: patch failed: dlls/winegstreamer/Makefile.in:7
error: patch failed: dlls/winegstreamer/gst_private.h:87
error: patch failed: dlls/winegstreamer/mfplat.c:407
error: patch failed: dlls/winegstreamer/winegstreamer_classes.idl:67
error: patch failed: dlls/winegstreamer/mfplat.c:455
Task: Patch failed to apply
Dec. 3, 2020
Re: [PATCH 13/17] winegstreamer: Implement ::Process(Input/Output) for color conversion transform.
by Marvin
Hi,
While running your changed tests, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=83076
Your paranoid android.
=== debiant (build log) ===
error: patch failed: dlls/winegstreamer/Makefile.in:7
error: patch failed: dlls/winegstreamer/gst_private.h:87
error: patch failed: dlls/winegstreamer/mfplat.c:407
error: patch failed: dlls/winegstreamer/winegstreamer_classes.idl:67
error: patch failed: dlls/winegstreamer/mfplat.c:455
Task: Patch failed to apply
=== debiant (build log) ===
error: patch failed: dlls/winegstreamer/Makefile.in:7
error: patch failed: dlls/winegstreamer/gst_private.h:87
error: patch failed: dlls/winegstreamer/mfplat.c:407
error: patch failed: dlls/winegstreamer/winegstreamer_classes.idl:67
error: patch failed: dlls/winegstreamer/mfplat.c:455
Task: Patch failed to apply
Dec. 3, 2020
Re: [PATCH 12/17] winegstreamer: Implement ::SetOutputType for color conversion transform.
by Marvin
Hi,
While running your changed tests, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=83075
Your paranoid android.
=== debiant (build log) ===
error: patch failed: dlls/winegstreamer/Makefile.in:7
error: patch failed: dlls/winegstreamer/gst_private.h:87
error: patch failed: dlls/winegstreamer/mfplat.c:407
error: patch failed: dlls/winegstreamer/winegstreamer_classes.idl:67
error: patch failed: dlls/winegstreamer/mfplat.c:455
Task: Patch failed to apply
=== debiant (build log) ===
error: patch failed: dlls/winegstreamer/Makefile.in:7
error: patch failed: dlls/winegstreamer/gst_private.h:87
error: patch failed: dlls/winegstreamer/mfplat.c:407
error: patch failed: dlls/winegstreamer/winegstreamer_classes.idl:67
error: patch failed: dlls/winegstreamer/mfplat.c:455
Task: Patch failed to apply
Dec. 3, 2020
Re: [PATCH 11/17] winegstreamer: Implement ::GetOutputAvailableType for color conversion transform.
by Marvin
Hi,
While running your changed tests, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=83074
Your paranoid android.
=== debiant (build log) ===
error: patch failed: dlls/winegstreamer/Makefile.in:7
error: patch failed: dlls/winegstreamer/gst_private.h:87
error: patch failed: dlls/winegstreamer/mfplat.c:407
error: patch failed: dlls/winegstreamer/winegstreamer_classes.idl:67
error: patch failed: dlls/winegstreamer/mfplat.c:455
Task: Patch failed to apply
=== debiant (build log) ===
error: patch failed: dlls/winegstreamer/Makefile.in:7
error: patch failed: dlls/winegstreamer/gst_private.h:87
error: patch failed: dlls/winegstreamer/mfplat.c:407
error: patch failed: dlls/winegstreamer/winegstreamer_classes.idl:67
error: patch failed: dlls/winegstreamer/mfplat.c:455
Task: Patch failed to apply
Dec. 3, 2020
Re: [PATCH 10/17] winegstreamer: Implement ::SetInputType for color conversion transform.
by Marvin
Hi,
While running your changed tests, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=83073
Your paranoid android.
=== debiant (build log) ===
error: patch failed: dlls/winegstreamer/Makefile.in:7
error: patch failed: dlls/winegstreamer/gst_private.h:87
error: patch failed: dlls/winegstreamer/mfplat.c:407
error: patch failed: dlls/winegstreamer/winegstreamer_classes.idl:67
error: patch failed: dlls/winegstreamer/mfplat.c:455
Task: Patch failed to apply
=== debiant (build log) ===
error: patch failed: dlls/winegstreamer/Makefile.in:7
error: patch failed: dlls/winegstreamer/gst_private.h:87
error: patch failed: dlls/winegstreamer/mfplat.c:407
error: patch failed: dlls/winegstreamer/winegstreamer_classes.idl:67
error: patch failed: dlls/winegstreamer/mfplat.c:455
Task: Patch failed to apply
Dec. 3, 2020
Re: [PATCH 09/17] winegstreamer: Implement ::GetInputAvailableType for color conversion transform.
by Marvin
Hi,
While running your changed tests, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=83072
Your paranoid android.
=== debiant (build log) ===
error: patch failed: dlls/winegstreamer/Makefile.in:7
error: patch failed: dlls/winegstreamer/gst_private.h:87
error: patch failed: dlls/winegstreamer/mfplat.c:407
error: patch failed: dlls/winegstreamer/winegstreamer_classes.idl:67
error: patch failed: dlls/winegstreamer/mfplat.c:455
Task: Patch failed to apply
=== debiant (build log) ===
error: patch failed: dlls/winegstreamer/Makefile.in:7
error: patch failed: dlls/winegstreamer/gst_private.h:87
error: patch failed: dlls/winegstreamer/mfplat.c:407
error: patch failed: dlls/winegstreamer/winegstreamer_classes.idl:67
error: patch failed: dlls/winegstreamer/mfplat.c:455
Task: Patch failed to apply
Dec. 3, 2020
Re: [PATCH 08/17] winegstreamer: Register the color conversion transform.
by Marvin
Hi,
While running your changed tests, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=83071
Your paranoid android.
=== debiant (build log) ===
error: patch failed: dlls/winegstreamer/Makefile.in:7
error: patch failed: dlls/winegstreamer/gst_private.h:87
error: patch failed: dlls/winegstreamer/mfplat.c:407
error: patch failed: dlls/winegstreamer/winegstreamer_classes.idl:67
error: patch failed: dlls/winegstreamer/mfplat.c:455
Task: Patch failed to apply
=== debiant (build log) ===
error: patch failed: dlls/winegstreamer/Makefile.in:7
error: patch failed: dlls/winegstreamer/gst_private.h:87
error: patch failed: dlls/winegstreamer/mfplat.c:407
error: patch failed: dlls/winegstreamer/winegstreamer_classes.idl:67
error: patch failed: dlls/winegstreamer/mfplat.c:455
Task: Patch failed to apply
Dec. 3, 2020
Re: [PATCH 07/17] winegstreamer: Introduce color conversion transform.
by Marvin
Hi,
While running your changed tests, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=83070
Your paranoid android.
=== debiant (build log) ===
error: patch failed: dlls/winegstreamer/Makefile.in:7
error: patch failed: dlls/winegstreamer/gst_private.h:87
error: patch failed: dlls/winegstreamer/mfplat.c:407
error: patch failed: dlls/winegstreamer/winegstreamer_classes.idl:67
Task: Patch failed to apply
=== debiant (build log) ===
error: patch failed: dlls/winegstreamer/Makefile.in:7
error: patch failed: dlls/winegstreamer/gst_private.h:87
error: patch failed: dlls/winegstreamer/mfplat.c:407
error: patch failed: dlls/winegstreamer/winegstreamer_classes.idl:67
Task: Patch failed to apply
Dec. 3, 2020
Re: [PATCH 06/17] winegstreamer: Implement Get(Input/Output)CurrentType functions for audio converter transform.
by Marvin
Hi,
While running your changed tests, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=83069
Your paranoid android.
=== debiant (build log) ===
Task: Patch failed to apply
=== debiant (build log) ===
Task: Patch failed to apply
Dec. 3, 2020
Re: [PATCH 05/17] winegstreamer: Implement Get*Attributes functions for audio converter transform.
by Marvin
Hi,
While running your changed tests, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=83068
Your paranoid android.
=== debiant (build log) ===
Task: Patch failed to apply
=== debiant (build log) ===
Task: Patch failed to apply
Dec. 3, 2020
Re: [PATCH 04/17] winegstreamer: Implement ::Get(Input/Output)StreamInfo for audio conversion transform.
by Marvin
Hi,
While running your changed tests, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=83067
Your paranoid android.
=== debiant (build log) ===
Task: Patch failed to apply
=== debiant (build log) ===
Task: Patch failed to apply
Dec. 3, 2020
Re: [PATCH 03/17] winegstreamer: Implement ::Process(Input/Output) for audio conversion transform.
by Marvin
Hi,
While running your changed tests, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=83066
Your paranoid android.
=== debiant (build log) ===
Task: Patch failed to apply
=== debiant (build log) ===
Task: Patch failed to apply
Dec. 3, 2020