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 2019
- 73 participants
- 1394 messages
[PATCH 02/10] d3d10: Implement scalar effect variable set methods.
by Connor McAdams
Implement SetFloat/SetFloatArray, SetInt/SetIntArray, and
SetBool/SetBoolArray methods for the scalar effect variable interface.
Signed-off-by: Connor McAdams <conmanx360(a)gmail.com>
---
dlls/d3d10/effect.c | 83 ++++++++++++++++++++++++++++++++++++++-------
1 file changed, 71 insertions(+), 12 deletions(-)
diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c
index f0932409b1..4ecc0753de 100644
--- a/dlls/d3d10/effect.c
+++ b/dlls/d3d10/effect.c
@@ -4212,6 +4212,43 @@ static const struct ID3D10EffectConstantBufferVtbl d3d10_effect_constant_buffer_
d3d10_effect_constant_buffer_GetTextureBuffer,
};
+static inline void write_variable_to_cbuffer(struct d3d10_effect_variable *variable, void *data)
+{
+ memcpy(variable->buffer->u.buffer.local_buffer + variable->buffer_offset, data, variable->type->size_packed);
+
+ variable->buffer->u.buffer.changed = 1;
+}
+
+static void write_variable_array_to_cbuffer(struct d3d10_effect_variable *variable, void *data, UINT count)
+{
+ char *cbuf = variable->buffer->u.buffer.local_buffer + variable->buffer_offset;
+ char *cur_element = data;
+ DWORD element_size;
+ UINT i;
+
+ /*
+ * If for some reason we try to use an array write on a variable that
+ * isn't an array, just default back to the normal variable write.
+ */
+ if (!variable->type->element_count)
+ {
+ write_variable_to_cbuffer(variable, data);
+ return;
+ }
+
+ element_size = variable->type->elementtype->size_packed;
+
+ for (i = 0; i < count; i++)
+ {
+ memcpy(cbuf, cur_element, element_size);
+
+ cur_element += element_size;
+ cbuf += variable->type->stride;
+ }
+
+ variable->buffer->u.buffer.changed = 1;
+}
+
/* ID3D10EffectVariable methods */
static BOOL STDMETHODCALLTYPE d3d10_effect_scalar_variable_IsValid(ID3D10EffectScalarVariable *iface)
@@ -4370,9 +4407,12 @@ static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetRawValue(ID3D10
static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_SetFloat(ID3D10EffectScalarVariable *iface,
float value)
{
- FIXME("iface %p, value %.8e stub!\n", iface, value);
+ struct d3d10_effect_variable *effect_var = impl_from_ID3D10EffectVariable((ID3D10EffectVariable *)iface);
- return E_NOTIMPL;
+ TRACE("iface %p, value %.8e.\n", iface, value);
+ write_variable_to_cbuffer(effect_var, &value);
+
+ return S_OK;
}
static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetFloat(ID3D10EffectScalarVariable *iface,
@@ -4383,12 +4423,19 @@ static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetFloat(ID3D10Eff
return E_NOTIMPL;
}
+/*
+ * According to MSDN, array writing functions for Scalar/Vector effect
+ * variables have offset go unused.
+ */
static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_SetFloatArray(ID3D10EffectScalarVariable *iface,
float *values, UINT offset, UINT count)
{
- FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
+ struct d3d10_effect_variable *effect_var = impl_from_ID3D10EffectVariable((ID3D10EffectVariable *)iface);
- return E_NOTIMPL;
+ TRACE("iface %p, values %p, offset %u, count %u.\n", iface, values, offset, count);
+ write_variable_array_to_cbuffer(effect_var, values, count);
+
+ return S_OK;
}
static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetFloatArray(ID3D10EffectScalarVariable *iface,
@@ -4402,9 +4449,12 @@ static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetFloatArray(ID3D
static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_SetInt(ID3D10EffectScalarVariable *iface,
int value)
{
- FIXME("iface %p, value %d stub!\n", iface, value);
+ struct d3d10_effect_variable *effect_var = impl_from_ID3D10EffectVariable((ID3D10EffectVariable *)iface);
- return E_NOTIMPL;
+ TRACE("iface %p, value %d.\n", iface, value);
+ write_variable_to_cbuffer(effect_var, &value);
+
+ return S_OK;
}
static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetInt(ID3D10EffectScalarVariable *iface,
@@ -4418,9 +4468,12 @@ static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetInt(ID3D10Effec
static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_SetIntArray(ID3D10EffectScalarVariable *iface,
int *values, UINT offset, UINT count)
{
- FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
+ struct d3d10_effect_variable *effect_var = impl_from_ID3D10EffectVariable((ID3D10EffectVariable *)iface);
- return E_NOTIMPL;
+ TRACE("iface %p, values %p, offset %u, count %u.\n", iface, values, offset, count);
+ write_variable_array_to_cbuffer(effect_var, values, count);
+
+ return S_OK;
}
static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetIntArray(ID3D10EffectScalarVariable *iface,
@@ -4434,9 +4487,12 @@ static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetIntArray(ID3D10
static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_SetBool(ID3D10EffectScalarVariable *iface,
BOOL value)
{
- FIXME("iface %p, value %d stub!\n", iface, value);
+ struct d3d10_effect_variable *effect_var = impl_from_ID3D10EffectVariable((ID3D10EffectVariable *)iface);
- return E_NOTIMPL;
+ TRACE("iface %p, value %d.\n", iface, value);
+ write_variable_to_cbuffer(effect_var, &value);
+
+ return S_OK;
}
static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetBool(ID3D10EffectScalarVariable *iface,
@@ -4450,9 +4506,12 @@ static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetBool(ID3D10Effe
static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_SetBoolArray(ID3D10EffectScalarVariable *iface,
BOOL *values, UINT offset, UINT count)
{
- FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, count);
+ struct d3d10_effect_variable *effect_var = impl_from_ID3D10EffectVariable((ID3D10EffectVariable *)iface);
- return E_NOTIMPL;
+ TRACE("iface %p, values %p, offset %u, count %u.\n", iface, values, offset, count);
+ write_variable_array_to_cbuffer(effect_var, values, count);
+
+ return S_OK;
}
static HRESULT STDMETHODCALLTYPE d3d10_effect_scalar_variable_GetBoolArray(ID3D10EffectScalarVariable *iface,
--
2.20.1
Dec. 7, 2019
[PATCH 01/10] d3d10: Allocate buffers for effect interface local_buffers.
by Connor McAdams
Create ID3D10Buffer interfaces for the constant buffers within the
effect shader.
Signed-off-by: Connor McAdams <conmanx360(a)gmail.com>
---
dlls/d3d10/d3d10_private.h | 10 ++++++
dlls/d3d10/effect.c | 62 ++++++++++++++++++++++++++++++++++++++
2 files changed, 72 insertions(+)
diff --git a/dlls/d3d10/d3d10_private.h b/dlls/d3d10/d3d10_private.h
index 96020cd4a0..5c6c7a2d72 100644
--- a/dlls/d3d10/d3d10_private.h
+++ b/dlls/d3d10/d3d10_private.h
@@ -114,6 +114,15 @@ struct d3d10_effect_state_object_variable
} object;
};
+struct d3d10_effect_buffer_variable
+{
+ ID3D10Buffer *buffer;
+ ID3D10ShaderResourceView *resource_view;
+
+ UINT changed;
+ char *local_buffer;
+};
+
/* ID3D10EffectType */
struct d3d10_effect_type
{
@@ -169,6 +178,7 @@ struct d3d10_effect_variable
{
struct d3d10_effect_state_object_variable state;
struct d3d10_effect_shader_variable shader;
+ struct d3d10_effect_buffer_variable buffer;
} u;
};
diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c
index 91e713bdf5..f0932409b1 100644
--- a/dlls/d3d10/effect.c
+++ b/dlls/d3d10/effect.c
@@ -2096,6 +2096,53 @@ static HRESULT parse_fx10_local_variable(const char *data, size_t data_size,
return S_OK;
}
+static HRESULT create_variable_buffer(struct d3d10_effect_variable *l, D3D10_CBUFFER_TYPE d3d10_cbuffer_type)
+{
+ D3D10_BUFFER_DESC buffer_desc;
+ D3D10_SUBRESOURCE_DATA subresource_data;
+ D3D10_SHADER_RESOURCE_VIEW_DESC srv_desc;
+ ID3D10Device *device = l->effect->device;
+ HRESULT hr;
+
+ if (!(l->u.buffer.local_buffer = heap_calloc(l->type->size_unpacked, sizeof(unsigned char))))
+ {
+ ERR("Failed to allocate local constant buffer memory.\n");
+ return E_OUTOFMEMORY;
+ }
+
+ buffer_desc.ByteWidth = l->type->size_unpacked;
+ buffer_desc.Usage = D3D10_USAGE_DEFAULT;
+ buffer_desc.CPUAccessFlags = 0;
+ buffer_desc.MiscFlags = 0;
+ if (d3d10_cbuffer_type == D3D10_CT_CBUFFER)
+ buffer_desc.BindFlags = D3D10_BIND_CONSTANT_BUFFER;
+ else if (d3d10_cbuffer_type == D3D10_CT_TBUFFER)
+ buffer_desc.BindFlags = D3D10_BIND_SHADER_RESOURCE;
+
+ subresource_data.pSysMem = (const void *)l->u.buffer.local_buffer;
+ subresource_data.SysMemPitch = 0;
+ subresource_data.SysMemSlicePitch = 0;
+
+ if (FAILED(hr = ID3D10Device_CreateBuffer(device, &buffer_desc, &subresource_data, &l->u.buffer.buffer)))
+ return hr;
+
+ if (d3d10_cbuffer_type == D3D10_CT_TBUFFER)
+ {
+ srv_desc.Format = DXGI_FORMAT_R32G32B32A32_UINT;
+ srv_desc.ViewDimension = D3D_SRV_DIMENSION_BUFFER;
+ srv_desc.Buffer.ElementOffset = 0;
+ srv_desc.Buffer.ElementWidth = l->type->size_unpacked / 16;
+
+ if (FAILED(hr = ID3D10Device_CreateShaderResourceView(device, (ID3D10Resource *)l->u.buffer.buffer,
+ (const D3D10_SHADER_RESOURCE_VIEW_DESC *)&srv_desc, &l->u.buffer.resource_view)))
+ return hr;
+ }
+ else
+ l->u.buffer.resource_view = NULL;
+
+ return S_OK;
+}
+
static HRESULT parse_fx10_local_buffer(const char *data, size_t data_size,
const char **ptr, struct d3d10_effect_variable *l)
{
@@ -2282,6 +2329,12 @@ static HRESULT parse_fx10_local_buffer(const char *data, size_t data_size,
TRACE("\tBasetype: %s.\n", debug_d3d10_shader_variable_type(l->type->basetype));
TRACE("\tTypeclass: %s.\n", debug_d3d10_shader_variable_class(l->type->type_class));
+ if (l->type->size_unpacked && l->type->size_packed)
+ {
+ if (FAILED(hr = create_variable_buffer(l, d3d10_cbuffer_type)))
+ return hr;
+ }
+
return S_OK;
}
@@ -2760,6 +2813,15 @@ static void d3d10_effect_local_buffer_destroy(struct d3d10_effect_variable *l)
}
heap_free(l->annotations);
}
+
+ if (l->u.buffer.buffer)
+ ID3D10Buffer_Release(l->u.buffer.buffer);
+
+ if (l->u.buffer.local_buffer)
+ heap_free(l->u.buffer.local_buffer);
+
+ if (l->u.buffer.resource_view)
+ ID3D10ShaderResourceView_Release(l->u.buffer.resource_view);
}
/* IUnknown methods */
--
2.20.1
Dec. 7, 2019
[PATCH 00/10] Implement d3d10 effect framework functionality
by Connor McAdams
Patch series to implement the functions that are used by steam big
picture mode. Submitting for feedback/ideas on how to improve/change
things.
Connor McAdams (10):
d3d10: Allocate buffers for effect interface local_buffers.
d3d10: Implement scalar effect variable set methods.
d3d10: Implement scalar effect variable get methods.
d3d10: Implement vector effect variable set methods.
d3d10: Implement vector effect variable get methods.
d3d10: Implement matrix effect variable set methods.
d3d10: Implement matrix effect variable get methods.
d3d10: Implement ShaderResource effect variable set method.
d3d10: Get resources used by effect shaders.
d3d10: Apply shader resources for shaders used in pass.
dlls/d3d10/d3d10_private.h | 28 ++
dlls/d3d10/effect.c | 758 +++++++++++++++++++++++++++++++++----
2 files changed, 718 insertions(+), 68 deletions(-)
--
2.20.1
Dec. 7, 2019
Re: [wine-devel] Wine staging 4.21 release
by Olivier F. R. Dierick
Le samedi 07 décembre 2019 à 00:48 -0800, Alan W. Irwin a écrit :
> On 2019-12-05 14:03+0100 Olivier F. R. Dierick wrote:
>
> > Le mercredi 04 décembre 2019 à 14:56 -0800, Alan W. Irwin a écrit :
> > > On 2019-11-30 04:56-0000 Alistair Leslie-Hughes wrote:
> > >
> > > > Added:
> > > > * [47668] kernelbase: Improve stub for ReOpenFile and add small
> > >
> > > [...]
> > >
> > > Could you explain how these patch numbers in your report are
> > > related
> > > with each other?
> > >
> >
> > Hello,
> >
> > The numbers between brackets are winehq.org bugzilla bug numbers.
> >
>
> Hi Olivier:
>
> Thanks for trying to be helpful, but your answer did not respond to
> the question which was about how to account for the total number of
> patches in each category mentioned in these reports.
>
Hello,
Yes it did. The whole point is that you assume patch numbers where it
is in fact patch sets referred to with bug numbers. That's why they
don't account for the total number of patches.
That is enough information for you to know that your assumptions are
wrong and do a bit of research.
You could have found that yourself had you put more effort into looking
at the wine-staging code than into thinking out an over-complicated
pointless formula.
> Could you let me know what the correct formula is for predicting the
> rebased patch number from report to report (which helps to evaluate
> the reliability of the staging patch number statistics that you
> present), and if that formula depends on information (my guess is it
> is the number of patches in staging that have just been deleted by
> thestaging maintainers because they judge those patches to not be
> worthwhile) that you currently do not include in your reports, could
> you include that important information in your following reports?
What makes you think that the information in the report is not
reliable? Have you anything against the staging maintainers?
You're the only one that want to make a formula out of the reports. We
don't have to provide you the formula you seek or provide the
"important" (to you; What makes it important?) information that formula
would need.
Your whole 'predicting to evaluate the reliability of the report' thing
is nonsense. Predicting the future number of patch from report
statistics is pointless as the number of patches is determined by
specific issues and development and there is no way to predict what
will be done next, and it certainly doesn't depend on the previous
changes.
To me, you're just making ground for an argument in a convoluted way.
Regards.
--
Olivier F. R. Dierick
o.dierick(a)piezo-forte.be
Dec. 7, 2019
Re: [PATCH 5/5] d3d9: Stop setting the device state when setting the default ZENABLE state.
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=61574
Your paranoid android.
=== debian10 (32 bit report) ===
d3d9:
Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x7e8611a4).
Report errors:
d3d9:visual crashed (c0000005)
=== debian10 (32 bit Chinese:China report) ===
d3d9:
Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x7ead8738).
Report errors:
d3d9:visual crashed (c0000005)
=== debian10 (32 bit WoW report) ===
d3d9:
Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x7e85e738).
Report errors:
d3d9:visual crashed (c0000005)
=== debian10 (64 bit WoW report) ===
d3d9:
Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x7e85e738).
Report errors:
d3d9:visual crashed (c0000005)
Dec. 7, 2019
Re: [PATCH 4/5] d3d9: Stop setting the device state in d3d9_device_SetRenderState().
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=61573
Your paranoid android.
=== debian10 (32 bit report) ===
d3d9:
Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x7e85e738).
Report errors:
d3d9:visual crashed (c0000005)
=== debian10 (32 bit Chinese:China report) ===
d3d9:
Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x7ead8738).
Report errors:
d3d9:visual crashed (c0000005)
=== debian10 (32 bit WoW report) ===
d3d9:
Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x7e85e738).
Report errors:
d3d9:visual crashed (c0000005)
=== debian10 (64 bit WoW report) ===
d3d9:
Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x7e8e4c70).
Report errors:
d3d9:visual crashed (c0000005)
Dec. 7, 2019
Re: [PATCH 3/5] d3d9: Handle multisample depth resolve in d3d9_device_SetRenderState().
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=61572
Your paranoid android.
=== debian10 (32 bit report) ===
d3d9:
Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x7e8611a4).
Report errors:
d3d9:visual crashed (c0000005)
=== debian10 (32 bit Chinese:China report) ===
d3d9:
Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x7ead8738).
Report errors:
d3d9:visual crashed (c0000005)
=== debian10 (32 bit WoW report) ===
d3d9:
Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x7e8611a4).
Report errors:
d3d9:visual crashed (c0000005)
=== debian10 (64 bit WoW report) ===
d3d9:
Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x7e85e738).
Report errors:
d3d9:visual crashed (c0000005)
Dec. 7, 2019
Re: [PATCH 2/5] d3d9: Apply the device state before executing a draw call.
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=61571
Your paranoid android.
=== debian10 (32 bit report) ===
d3d9:
Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x7e8611a4).
Report errors:
d3d9:visual crashed (c0000005)
=== debian10 (32 bit Chinese:China report) ===
d3d9:
Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x7eadb1a4).
Report errors:
d3d9:visual crashed (c0000005)
=== debian10 (32 bit WoW report) ===
d3d9:
Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x7e8611a4).
Report errors:
d3d9:visual crashed (c0000005)
=== debian10 (64 bit WoW report) ===
d3d9:
Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x7e85e738).
Report errors:
d3d9:visual crashed (c0000005)
Dec. 7, 2019
[PATCH 5/5] d3d9: Stop setting the device state when setting the default ZENABLE state.
by Zebediah Figura
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
dlls/d3d9/device.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c
index 54271240e11..a45f4baa21b 100644
--- a/dlls/d3d9/device.c
+++ b/dlls/d3d9/device.c
@@ -1020,8 +1020,6 @@ static HRESULT d3d9_device_reset(struct d3d9_device *device,
device->auto_mipmaps = 0;
wined3d_stateblock_set_render_state(device->state, WINED3D_RS_ZENABLE,
!!swapchain_desc.enable_auto_depth_stencil);
- wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_ZENABLE,
- !!swapchain_desc.enable_auto_depth_stencil);
device_reset_viewport_state(device);
}
@@ -4673,8 +4671,6 @@ HRESULT device_init(struct d3d9_device *device, struct d3d9 *parent, struct wine
wined3d_stateblock_set_render_state(device->state, WINED3D_RS_ZENABLE,
!!swapchain_desc->enable_auto_depth_stencil);
- wined3d_device_set_render_state(device->wined3d_device,
- WINED3D_RS_ZENABLE, !!swapchain_desc->enable_auto_depth_stencil);
device_reset_viewport_state(device);
if (FAILED(hr = d3d9_device_get_swapchains(device)))
--
2.23.0
Dec. 7, 2019
[PATCH 4/5] d3d9: Stop setting the device state in d3d9_device_SetRenderState().
by Zebediah Figura
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
dlls/d3d9/device.c | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c
index 35364046936..54271240e11 100644
--- a/dlls/d3d9/device.c
+++ b/dlls/d3d9/device.c
@@ -2331,22 +2331,11 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_device_SetRenderState(IDirect3DDevi
D3DRENDERSTATETYPE state, DWORD value)
{
struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface);
- struct wined3d_color factor;
TRACE("iface %p, state %#x, value %#x.\n", iface, state, value);
wined3d_mutex_lock();
wined3d_stateblock_set_render_state(device->update_state, state, value);
- if (!device->recording)
- {
- if (state == D3DRS_BLENDFACTOR)
- {
- wined3d_color_from_d3dcolor(&factor, value);
- wined3d_device_set_blend_state(device->wined3d_device, NULL, &factor);
- }
- else
- wined3d_device_set_render_state(device->wined3d_device, state, value);
- }
if (state == D3DRS_POINTSIZE && value == WINED3D_RESZ_CODE)
resolve_depth_buffer(device);
wined3d_mutex_unlock();
--
2.23.0
Dec. 7, 2019
[PATCH 3/5] d3d9: Handle multisample depth resolve in d3d9_device_SetRenderState().
by Zebediah Figura
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
dlls/d3d9/device.c | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c
index be9c2a9d5a1..35364046936 100644
--- a/dlls/d3d9/device.c
+++ b/dlls/d3d9/device.c
@@ -2299,6 +2299,34 @@ static HRESULT WINAPI d3d9_device_GetClipPlane(IDirect3DDevice9Ex *iface, DWORD
return hr;
}
+static void resolve_depth_buffer(struct d3d9_device *device)
+{
+ const struct wined3d_stateblock_state *state = wined3d_stateblock_get_state(device->state);
+ struct wined3d_rendertarget_view *wined3d_dsv;
+ struct wined3d_resource *dst_resource;
+ struct wined3d_texture *dst_texture;
+ struct wined3d_resource_desc desc;
+ struct d3d9_surface *d3d9_dsv;
+
+ if (!(dst_texture = state->textures[0]))
+ return;
+ dst_resource = wined3d_texture_get_resource(dst_texture);
+ wined3d_resource_get_desc(dst_resource, &desc);
+ if (desc.format != WINED3DFMT_D24_UNORM_S8_UINT
+ && desc.format != WINED3DFMT_X8D24_UNORM
+ && desc.format != MAKEFOURCC('D','F','1','6')
+ && desc.format != MAKEFOURCC('D','F','2','4')
+ && desc.format != WINED3DFMT_INTZ)
+ return;
+
+ if (!(wined3d_dsv = wined3d_device_get_depth_stencil_view(device->wined3d_device)))
+ return;
+ d3d9_dsv = wined3d_rendertarget_view_get_sub_resource_parent(wined3d_dsv);
+
+ wined3d_device_resolve_sub_resource(device->wined3d_device, dst_resource, 0,
+ wined3d_rendertarget_view_get_resource(wined3d_dsv), d3d9_dsv->sub_resource_idx, desc.format);
+}
+
static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_device_SetRenderState(IDirect3DDevice9Ex *iface,
D3DRENDERSTATETYPE state, DWORD value)
{
@@ -2319,6 +2347,8 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_device_SetRenderState(IDirect3DDevi
else
wined3d_device_set_render_state(device->wined3d_device, state, value);
}
+ if (state == D3DRS_POINTSIZE && value == WINED3D_RESZ_CODE)
+ resolve_depth_buffer(device);
wined3d_mutex_unlock();
return D3D_OK;
--
2.23.0
Dec. 7, 2019
[PATCH 2/5] d3d9: Apply the device state before executing a draw call.
by Zebediah Figura
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
dlls/d3d9/device.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c
index 82fba25ce73..be9c2a9d5a1 100644
--- a/dlls/d3d9/device.c
+++ b/dlls/d3d9/device.c
@@ -1821,6 +1821,7 @@ static HRESULT WINAPI d3d9_device_ColorFill(IDirect3DDevice9Ex *iface,
return D3DERR_INVALIDCALL;
}
+ wined3d_device_apply_stateblock(device->wined3d_device, device->state);
rtv = d3d9_surface_acquire_rendertarget_view(surface_impl);
hr = wined3d_device_clear_rendertarget_view(device->wined3d_device,
rtv, rect, WINED3DCLEAR_TARGET, &c, 0.0f, 0);
@@ -2071,6 +2072,7 @@ static HRESULT WINAPI d3d9_device_Clear(IDirect3DDevice9Ex *iface, DWORD rect_co
wined3d_color_from_d3dcolor(&c, color);
wined3d_mutex_lock();
+ wined3d_device_apply_stateblock(device->wined3d_device, device->state);
hr = wined3d_device_clear(device->wined3d_device, rect_count, (const RECT *)rects, flags, &c, z, stencil);
if (SUCCEEDED(hr))
d3d9_rts_flag_auto_gen_mipmap(device);
@@ -2654,6 +2656,7 @@ static HRESULT WINAPI d3d9_device_ValidateDevice(IDirect3DDevice9Ex *iface, DWOR
TRACE("iface %p, pass_count %p.\n", iface, pass_count);
wined3d_mutex_lock();
+ wined3d_device_apply_stateblock(device->wined3d_device, device->state);
hr = wined3d_device_validate_device(device->wined3d_device, pass_count);
wined3d_mutex_unlock();
@@ -2885,6 +2888,7 @@ static HRESULT WINAPI d3d9_device_DrawPrimitive(IDirect3DDevice9Ex *iface,
WARN("Called without a valid vertex declaration set.\n");
return D3DERR_INVALIDCALL;
}
+ wined3d_device_apply_stateblock(device->wined3d_device, device->state);
vertex_count = vertex_count_from_primitive_count(primitive_type, primitive_count);
d3d9_device_upload_sysmem_vertex_buffers(device, 0, start_vertex, vertex_count);
d3d9_generate_auto_mipmaps(device);
@@ -2917,6 +2921,7 @@ static HRESULT WINAPI d3d9_device_DrawIndexedPrimitive(IDirect3DDevice9Ex *iface
WARN("Called without a valid vertex declaration set.\n");
return D3DERR_INVALIDCALL;
}
+ wined3d_device_apply_stateblock(device->wined3d_device, device->state);
index_count = vertex_count_from_primitive_count(primitive_type, primitive_count);
d3d9_device_upload_sysmem_vertex_buffers(device, base_vertex_idx, min_vertex_idx, vertex_count);
d3d9_device_upload_sysmem_index_buffer(device, start_idx, index_count);
@@ -3003,6 +3008,7 @@ static HRESULT WINAPI d3d9_device_DrawPrimitiveUP(IDirect3DDevice9Ex *iface,
return D3DERR_INVALIDCALL;
}
+ wined3d_device_apply_stateblock(device->wined3d_device, device->state);
hr = d3d9_device_prepare_vertex_buffer(device, size);
if (FAILED(hr))
goto done;
@@ -3119,6 +3125,7 @@ static HRESULT WINAPI d3d9_device_DrawIndexedPrimitiveUP(IDirect3DDevice9Ex *ifa
return D3DERR_INVALIDCALL;
}
+ wined3d_device_apply_stateblock(device->wined3d_device, device->state);
hr = d3d9_device_prepare_vertex_buffer(device, vtx_size);
if (FAILED(hr))
goto done;
@@ -3203,6 +3210,8 @@ static HRESULT WINAPI d3d9_device_ProcessVertices(IDirect3DDevice9Ex *iface,
wined3d_mutex_lock();
+ wined3d_device_apply_stateblock(device->wined3d_device, device->state);
+
/* Note that an alternative approach would be to simply create these
* buffers with WINED3D_RESOURCE_ACCESS_MAP_R and update them here like we
* do for draws. In some regards that would be easier, but it seems less
--
2.23.0
Dec. 7, 2019
[PATCH 1/5] wined3d: Introduce wined3d_device_apply_stateblock().
by Zebediah Figura
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
dlls/wined3d/device.c | 93 +++++++++++++++++++++++++++++++++++++++
dlls/wined3d/wined3d.spec | 1 +
include/wine/wined3d.h | 1 +
3 files changed, 95 insertions(+)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 0ae841d4e35..50029dfbec2 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3829,6 +3829,99 @@ struct wined3d_texture * CDECL wined3d_device_get_texture(const struct wined3d_d
return device->state.textures[stage];
}
+void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device,
+ struct wined3d_stateblock *stateblock)
+{
+ const struct wined3d_d3d_info *d3d_info = &stateblock->device->adapter->d3d_info;
+ const struct wined3d_stateblock_state *state = &stateblock->stateblock_state;
+ unsigned int i, j;
+
+ TRACE("device %p, stateblock %p.\n", device, stateblock);
+
+ wined3d_stateblock_init_contained_states(stateblock);
+
+ wined3d_device_set_vertex_shader(device, state->vs);
+ wined3d_device_set_pixel_shader(device, state->ps);
+
+ for (i = 0; i < d3d_info->limits.vs_uniform_count; ++i)
+ wined3d_device_set_vs_consts_f(device, i, 1, &state->vs_consts_f[i]);
+ for (i = 0; i < ARRAY_SIZE(state->vs_consts_i); ++i)
+ wined3d_device_set_vs_consts_i(device, i, 1, &state->vs_consts_i[i]);
+ for (i = 0; i < ARRAY_SIZE(state->vs_consts_b); ++i)
+ wined3d_device_set_vs_consts_b(device, i, 1, &state->vs_consts_b[i]);
+
+ for (i = 0; i < ARRAY_SIZE(state->ps_consts_f); ++i)
+ wined3d_device_set_ps_consts_f(device, i, 1, &state->ps_consts_f[i]);
+ for (i = 0; i < ARRAY_SIZE(state->ps_consts_i); ++i)
+ wined3d_device_set_ps_consts_i(device, i, 1, &state->ps_consts_i[i]);
+ for (i = 0; i < ARRAY_SIZE(state->ps_consts_b); ++i)
+ wined3d_device_set_ps_consts_b(device, i, 1, &state->ps_consts_b[i]);
+
+ for (i = 0; i < ARRAY_SIZE(state->light_state->light_map); ++i)
+ {
+ const struct wined3d_light_info *light;
+
+ LIST_FOR_EACH_ENTRY(light, &state->light_state->light_map[i], struct wined3d_light_info, entry)
+ {
+ wined3d_device_set_light(device, light->OriginalIndex, &light->OriginalParms);
+ wined3d_device_set_light_enable(device, light->OriginalIndex, light->glIndex != -1);
+ }
+ }
+
+ for (i = 0; i < ARRAY_SIZE(state->rs); ++i)
+ {
+ if (i == WINED3D_RS_BLENDFACTOR)
+ {
+ struct wined3d_color color;
+ wined3d_color_from_d3dcolor(&color, state->rs[i]);
+ wined3d_device_set_blend_state(device, NULL, &color);
+ }
+ else
+ wined3d_device_set_render_state(device, i, state->rs[i]);
+ }
+
+ for (i = 0; i < ARRAY_SIZE(state->texture_states); ++i)
+ {
+ for (j = 0; j < ARRAY_SIZE(state->texture_states[i]); ++j)
+ wined3d_device_set_texture_stage_state(device, i, j, state->texture_states[i][j]);
+ }
+
+ for (i = 0; i < ARRAY_SIZE(state->sampler_states); ++i)
+ {
+ DWORD stage = i;
+ if (stage >= WINED3D_MAX_FRAGMENT_SAMPLERS) stage += WINED3DVERTEXTEXTURESAMPLER0 - WINED3D_MAX_FRAGMENT_SAMPLERS;
+ for (j = 0; j < ARRAY_SIZE(state->sampler_states[j]); ++j)
+ wined3d_device_set_sampler_state(device, stage, j, state->sampler_states[i][j]);
+ }
+
+ for (i = 0; i < ARRAY_SIZE(state->transforms); ++i)
+ wined3d_device_set_transform(device, i, &state->transforms[i]);
+
+ wined3d_device_set_index_buffer(device, state->index_buffer, state->index_format, 0);
+ wined3d_device_set_base_vertex_index(device, state->base_vertex_index);
+ wined3d_device_set_vertex_declaration(device, state->vertex_declaration);
+ wined3d_device_set_material(device, &state->material);
+ wined3d_device_set_viewports(device, 1, &state->viewport);
+ wined3d_device_set_scissor_rects(device, 1, &state->scissor_rect);
+
+ for (i = 0; i < ARRAY_SIZE(state->streams); ++i)
+ {
+ wined3d_device_set_stream_source(device, i, state->streams[i].buffer,
+ state->streams[i].offset, state->streams[i].stride);
+ wined3d_device_set_stream_source_freq(device, i,
+ state->streams[i].frequency | state->streams[i].flags);
+ }
+
+ for (i = 0; i < ARRAY_SIZE(state->textures); ++i)
+ wined3d_device_set_texture(device, i < WINED3D_MAX_FRAGMENT_SAMPLERS ? i
+ : WINED3DVERTEXTEXTURESAMPLER0 + i - WINED3D_MAX_FRAGMENT_SAMPLERS, state->textures[i]);
+
+ for (i = 0; i < ARRAY_SIZE(state->clip_planes); ++i)
+ wined3d_device_set_clip_plane(device, i, &state->clip_planes[i]);
+
+ TRACE("Applied stateblock %p.\n", stateblock);
+}
+
HRESULT CDECL wined3d_device_get_device_caps(const struct wined3d_device *device, struct wined3d_caps *caps)
{
TRACE("device %p, caps %p.\n", device, caps);
diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec
index e03c57055b7..c8ef442c72d 100644
--- a/dlls/wined3d/wined3d.spec
+++ b/dlls/wined3d/wined3d.spec
@@ -37,6 +37,7 @@
@ cdecl wined3d_buffer_incref(ptr)
@ cdecl wined3d_device_acquire_focus_window(ptr ptr)
+@ cdecl wined3d_device_apply_stateblock(ptr ptr)
@ cdecl wined3d_device_begin_scene(ptr)
@ cdecl wined3d_device_clear(ptr long ptr long ptr float long)
@ cdecl wined3d_device_clear_rendertarget_view(ptr ptr ptr long ptr float long)
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index 4b5d4e02f9b..a6eaaca468c 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -2287,6 +2287,7 @@ struct wined3d_resource * __cdecl wined3d_buffer_get_resource(struct wined3d_buf
ULONG __cdecl wined3d_buffer_incref(struct wined3d_buffer *buffer);
HRESULT __cdecl wined3d_device_acquire_focus_window(struct wined3d_device *device, HWND window);
+void __cdecl wined3d_device_apply_stateblock(struct wined3d_device *device, struct wined3d_stateblock *stateblock);
HRESULT __cdecl wined3d_device_begin_scene(struct wined3d_device *device);
HRESULT __cdecl wined3d_device_clear(struct wined3d_device *device, DWORD rect_count, const RECT *rects, DWORD flags,
const struct wined3d_color *color, float z, DWORD stencil);
--
2.23.0
Dec. 7, 2019
Re: [PATCH] wineqtdecoder: Fix macos compile error
by Zebediah Figura
On 12/7/19 12:03 AM, Alistair Leslie-Hughes wrote:
> Regression of 498179b4482026091bf7376c0d2ac9a036e7ca0e
>
> Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com>
> ---
> dlls/wineqtdecoder/qtsplitter.c | 10 ++++------
> 1 file changed, 4 insertions(+), 6 deletions(-)
>
Hello Alistair, thanks for catching these errors.
> diff --git a/dlls/wineqtdecoder/qtsplitter.c b/dlls/wineqtdecoder/qtsplitter.c
> index 5b1e82ebc9b..956dd0a7d0d 100644
> --- a/dlls/wineqtdecoder/qtsplitter.c
> +++ b/dlls/wineqtdecoder/qtsplitter.c
> @@ -285,7 +285,7 @@ static HRESULT qt_splitter_start_stream(struct strmbase_filter *iface, REFERENCE
> QTSplitter *filter = impl_from_strmbase_filter(iface);
> HRESULT hr = VFW_E_NOT_CONNECTED, pin_hr;
>
> - EnterCriticalSection(&This->csReceive);
> + EnterCriticalSection(&filter->csReceive);
>
> if (filter->pVideo_Pin)
> pin_hr = BaseOutputPinImpl_Active(&filter->pVideo_Pin->pin);
> @@ -297,7 +297,7 @@ static HRESULT qt_splitter_start_stream(struct strmbase_filter *iface, REFERENCE
> hr = pin_hr;
> SetEvent(filter->runEvent);
>
> - LeaveCriticalSection(&This->csReceive);
> + LeaveCriticalSection(&filter->csReceive);
>
> return hr;
> }
> @@ -306,10 +306,10 @@ static HRESULT qt_splitter_cleanup_stream(struct strmbase_filter *iface)
> {
> QTSplitter *filter = impl_from_strmbase_filter(iface);
>
> - EnterCriticalSection(&This->csReceive);
> + EnterCriticalSection(&filter->csReceive);
> IAsyncReader_BeginFlush(filter->pInputPin.pReader);
> IAsyncReader_EndFlush(filter->pInputPin.pReader);
> - LeaveCriticalSection(&This->csReceive);
> + LeaveCriticalSection(&filter->csReceive);
>
> return S_OK;
> }
> @@ -1170,8 +1170,6 @@ static HRESULT WINAPI QTOutPin_QueryInterface(IPin *iface, REFIID riid, void **p
> *ppv = iface;
> else if (IsEqualIID(riid, &IID_IPin))
> *ppv = iface;
> - else if (IsEqualIID(riid, &IID_IMediaSeeking))
> - *ppv = &This->sourceSeeking.IMediaSeeking_iface;
> else if (IsEqualIID(riid, &IID_IQualityControl))
> *ppv = &This->IQualityControl_iface;
>
>
Did you mean to do this?
Dec. 7, 2019
Re: Winter is coming
by Sveinar Søpler
All i want for christmas is... for someone to make a huge push towards
releasing vkd3d_1.2, so that it would not pass yet another year to
actually have working D3D12 out-of-the-box with a release version of wine :)
Yeah, i know its a huge wish in the likes of "world peace" and the
likes, but well.. one can always wish :)
Sveinar
On 06.12.2019 20:25, Alexandre Julliard wrote:
> Folks,
>
> As you are probably aware, we are now entering the code freeze season.
> The plan is to start the code freeze after the next release, i.e. one
> week from today. So if there are things you want to see in Wine 5.0, now
> is the last moment to submit them...
>
Dec. 7, 2019
[PATCH vkd3d v4] Support RS 1.0 VOLATILE descriptors
by Sveinar Søpler
This fixes bug: https://bugs.winehq.org/show_bug.cgi?id=46410
v4: Rebase and resubmit patch.
Original commit message:
From: post(a)arntzen-software.no
Use EXT_descriptor_indexing's UPDATE_AFTER_BIND feature to support
semantics required by RS 1.0 VOLATILE descriptors. We implement this by
deferring all updates of desciptor sets until Submit time.
This is fine, as command buffers cannot be executed simultaneously on
D3D12, so at Submit time, we know that the command buffer is not being
executed on the GPU, and updating descriptors for multiple submissions
is correct.
If EXT_descriptor_indexing is not available, the fallback is the older
method, which matches RS 1.1 STATIC descriptor model.
Signed-off-by: Sveinar Søpler <cybermax(a)dexter.no>
Dec. 7, 2019
[PATCH vkd3d v4] Allocate one large buffer for a heap and offset into it.
by Hans-Kristian Arntzen
Greatly reduce VA allocations we have to make and makes returned VA more
sensible, and better matches returned VAs we see on native drivers.
D3D12 usage flags for buffers seem generic enough that there is no
obvious benefit to place smaller VkBuffers on top of VkDeviceMemory.
Ideally, physical_buffer_address is used here, but this works as a good
fallback if that path is added later.
With this patch and previous VA optimization, I'm observing a 2.0-2.5%
FPS uplift on SOTTR when CPU bound.
Signed-off-by: Hans-Kristian Arntzen <post(a)arntzen-software.no>
---
libs/vkd3d/command.c | 14 ++--
libs/vkd3d/resource.c | 133 ++++++++++++++++++++++++++++++++-----
libs/vkd3d/vkd3d_private.h | 2 +
3 files changed, 128 insertions(+), 21 deletions(-)
diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c
index 8a7ff66..8bff7ea 100644
--- a/libs/vkd3d/command.c
+++ b/libs/vkd3d/command.c
@@ -3081,8 +3081,8 @@ static void STDMETHODCALLTYPE d3d12_command_list_CopyBufferRegion(ID3D12Graphics
d3d12_command_list_end_current_render_pass(list);
- buffer_copy.srcOffset = src_offset;
- buffer_copy.dstOffset = dst_offset;
+ buffer_copy.srcOffset = src_offset + src_resource->heap_offset;
+ buffer_copy.dstOffset = dst_offset + dst_resource->heap_offset;
buffer_copy.size = byte_count;
VK_CALL(vkCmdCopyBuffer(list->vk_command_buffer,
@@ -3395,6 +3395,7 @@ static void STDMETHODCALLTYPE d3d12_command_list_CopyTextureRegion(ID3D12Graphic
vk_image_buffer_copy_from_d3d12(&buffer_image_copy, &dst->u.PlacedFootprint,
src->u.SubresourceIndex, &src_resource->desc, dst_format, src_box, dst_x, dst_y, dst_z);
+ buffer_image_copy.bufferOffset += dst_resource->heap_offset;
VK_CALL(vkCmdCopyImageToBuffer(list->vk_command_buffer,
src_resource->u.vk_image, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
dst_resource->u.vk_buffer, 1, &buffer_image_copy));
@@ -3424,6 +3425,7 @@ static void STDMETHODCALLTYPE d3d12_command_list_CopyTextureRegion(ID3D12Graphic
vk_buffer_image_copy_from_d3d12(&buffer_image_copy, &src->u.PlacedFootprint,
dst->u.SubresourceIndex, &dst_resource->desc, src_format, src_box, dst_x, dst_y, dst_z);
+ buffer_image_copy.bufferOffset += src_resource->heap_offset;
VK_CALL(vkCmdCopyBufferToImage(list->vk_command_buffer,
src_resource->u.vk_buffer, dst_resource->u.vk_image,
VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 1, &buffer_image_copy));
@@ -3504,8 +3506,8 @@ static void STDMETHODCALLTYPE d3d12_command_list_CopyResource(ID3D12GraphicsComm
assert(d3d12_resource_is_buffer(src_resource));
assert(src_resource->desc.Width == dst_resource->desc.Width);
- vk_buffer_copy.srcOffset = 0;
- vk_buffer_copy.dstOffset = 0;
+ vk_buffer_copy.srcOffset = src_resource->heap_offset;
+ vk_buffer_copy.dstOffset = dst_resource->heap_offset;
vk_buffer_copy.size = dst_resource->desc.Width;
VK_CALL(vkCmdCopyBuffer(list->vk_command_buffer,
src_resource->u.vk_buffer, dst_resource->u.vk_buffer, 1, &vk_buffer_copy));
@@ -3962,8 +3964,8 @@ static void STDMETHODCALLTYPE d3d12_command_list_ResourceBarrier(ID3D12GraphicsC
vk_barrier.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
vk_barrier.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
vk_barrier.buffer = resource->u.vk_buffer;
- vk_barrier.offset = 0;
- vk_barrier.size = VK_WHOLE_SIZE;
+ vk_barrier.offset = resource->heap_offset;
+ vk_barrier.size = resource->desc.Width;
VK_CALL(vkCmdPipelineBarrier(list->vk_command_buffer, src_stage_mask, dst_stage_mask, 0,
0, NULL, 1, &vk_barrier, 0, NULL));
diff --git a/libs/vkd3d/resource.c b/libs/vkd3d/resource.c
index f40d986..ed2b18f 100644
--- a/libs/vkd3d/resource.c
+++ b/libs/vkd3d/resource.c
@@ -315,6 +315,8 @@ static ULONG STDMETHODCALLTYPE d3d12_heap_AddRef(ID3D12Heap *iface)
return refcount;
}
+static ULONG d3d12_resource_decref(struct d3d12_resource *resource);
+
static void d3d12_heap_destroy(struct d3d12_heap *heap)
{
struct d3d12_device *device = heap->device;
@@ -322,6 +324,9 @@ static void d3d12_heap_destroy(struct d3d12_heap *heap)
TRACE("Destroying heap %p.\n", heap);
+ if (heap->buffer_resource)
+ d3d12_resource_decref(heap->buffer_resource);
+
vkd3d_private_store_destroy(&heap->private_store);
VK_CALL(vkFreeMemory(device->vk_device, heap->vk_memory, NULL));
@@ -562,6 +567,12 @@ static HRESULT validate_heap_desc(const D3D12_HEAP_DESC *desc, const struct d3d1
return S_OK;
}
+static HRESULT d3d12_resource_create(struct d3d12_device *device,
+ const D3D12_HEAP_PROPERTIES *heap_properties, D3D12_HEAP_FLAGS heap_flags,
+ const D3D12_RESOURCE_DESC *desc, D3D12_RESOURCE_STATES initial_state,
+ const D3D12_CLEAR_VALUE *optimized_clear_value, bool placed,
+ struct d3d12_resource **resource);
+
static HRESULT d3d12_heap_init(struct d3d12_heap *heap,
struct d3d12_device *device, const D3D12_HEAP_DESC *desc, const struct d3d12_resource *resource)
{
@@ -569,6 +580,9 @@ static HRESULT d3d12_heap_init(struct d3d12_heap *heap,
VkDeviceSize vk_memory_size;
HRESULT hr;
int rc;
+ bool buffers_allowed;
+ D3D12_RESOURCE_DESC resource_desc;
+ D3D12_RESOURCE_STATES initial_resource_state;
heap->ID3D12Heap_iface.lpVtbl = &d3d12_heap_vtbl;
heap->refcount = 1;
@@ -579,6 +593,7 @@ static HRESULT d3d12_heap_init(struct d3d12_heap *heap,
heap->map_ptr = NULL;
heap->map_count = 0;
+ heap->buffer_resource = NULL;
if (!heap->desc.Properties.CreationNodeMask)
heap->desc.Properties.CreationNodeMask = 1;
@@ -606,6 +621,53 @@ static HRESULT d3d12_heap_init(struct d3d12_heap *heap,
return hr;
}
+ buffers_allowed = !(heap->desc.Flags & D3D12_HEAP_FLAG_DENY_BUFFERS);
+ if (buffers_allowed && !resource)
+ {
+ /* Create a single omnipotent buffer which fills the entire heap.
+ * Whenever we place buffer resources on this heap, we'll just offset this VkBuffer.
+ * This allows us to keep VA space somewhat sane, and keeps number of (limited) VA allocations down.
+ * One possible downside is that the buffer might be slightly slower to access,
+ * but D3D12 has very lenient usage flags for buffers. */
+
+ memset(&resource_desc, 0, sizeof(resource_desc));
+ resource_desc.Dimension = D3D12_RESOURCE_DIMENSION_BUFFER;
+ resource_desc.Width = desc->SizeInBytes;
+ resource_desc.Height = 1;
+ resource_desc.DepthOrArraySize = 1;
+ resource_desc.MipLevels = 1;
+ resource_desc.SampleDesc.Count = 1;
+ resource_desc.Layout = D3D12_TEXTURE_LAYOUT_ROW_MAJOR;
+
+ switch (desc->Properties.Type)
+ {
+ case D3D12_HEAP_TYPE_UPLOAD:
+ initial_resource_state = D3D12_RESOURCE_STATE_GENERIC_READ;
+ break;
+
+ case D3D12_HEAP_TYPE_READBACK:
+ initial_resource_state = D3D12_RESOURCE_STATE_COPY_DEST;
+ break;
+
+ default:
+ /* Upload and readback heaps do not allow UAV access, only enable this flag for other heaps. */
+ resource_desc.Flags |= D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS;
+ initial_resource_state = D3D12_RESOURCE_STATE_COMMON;
+ break;
+ }
+
+ if (FAILED(hr = d3d12_resource_create(device, &desc->Properties, desc->Flags,
+ &resource_desc, initial_resource_state,
+ NULL, false, &heap->buffer_resource)))
+ {
+ heap->buffer_resource = NULL;
+ return hr;
+ }
+ /* This internal resource should not own a reference on the device.
+ * d3d12_resource_create takes a reference on the device. */
+ d3d12_device_release(device);
+ }
+
if (resource)
{
if (d3d12_resource_is_buffer(resource))
@@ -623,8 +685,16 @@ static HRESULT d3d12_heap_init(struct d3d12_heap *heap,
heap->desc.SizeInBytes = vk_memory_size;
}
+ else if (heap->buffer_resource)
+ {
+ hr = vkd3d_allocate_buffer_memory(device, heap->buffer_resource->u.vk_buffer,
+ &heap->desc.Properties, heap->desc.Flags,
+ &heap->vk_memory, &heap->vk_memory_type, &vk_memory_size);
+ }
else
{
+ /* Allocate generic memory which should hopefully match up with whatever resources
+ * we want to place here. */
memory_requirements.size = heap->desc.SizeInBytes;
memory_requirements.alignment = heap->desc.Alignment;
memory_requirements.memoryTypeBits = ~(uint32_t)0;
@@ -637,6 +707,11 @@ static HRESULT d3d12_heap_init(struct d3d12_heap *heap,
{
vkd3d_private_store_destroy(&heap->private_store);
pthread_mutex_destroy(&heap->mutex);
+ if (heap->buffer_resource)
+ {
+ d3d12_resource_decref(heap->buffer_resource);
+ heap->buffer_resource = NULL;
+ }
return hr;
}
@@ -1030,13 +1105,16 @@ static void d3d12_resource_destroy(struct d3d12_resource *resource, struct d3d12
if (resource->flags & VKD3D_RESOURCE_EXTERNAL)
return;
- if (resource->gpu_address)
- vkd3d_gpu_va_allocator_free(&device->gpu_va_allocator, resource->gpu_address);
+ if (!(resource->flags & VKD3D_RESOURCE_PLACED_BUFFER))
+ {
+ if (resource->gpu_address)
+ vkd3d_gpu_va_allocator_free(&device->gpu_va_allocator, resource->gpu_address);
- if (d3d12_resource_is_buffer(resource))
- VK_CALL(vkDestroyBuffer(device->vk_device, resource->u.vk_buffer, NULL));
- else
- VK_CALL(vkDestroyImage(device->vk_device, resource->u.vk_image, NULL));
+ if (d3d12_resource_is_buffer(resource))
+ VK_CALL(vkDestroyBuffer(device->vk_device, resource->u.vk_buffer, NULL));
+ else
+ VK_CALL(vkDestroyImage(device->vk_device, resource->u.vk_image, NULL));
+ }
if (resource->flags & VKD3D_RESOURCE_DEDICATED_HEAP)
d3d12_heap_destroy(resource->heap);
@@ -1738,7 +1816,7 @@ static bool d3d12_resource_validate_heap_properties(const struct d3d12_resource
static HRESULT d3d12_resource_init(struct d3d12_resource *resource, struct d3d12_device *device,
const D3D12_HEAP_PROPERTIES *heap_properties, D3D12_HEAP_FLAGS heap_flags,
const D3D12_RESOURCE_DESC *desc, D3D12_RESOURCE_STATES initial_state,
- const D3D12_CLEAR_VALUE *optimized_clear_value)
+ const D3D12_CLEAR_VALUE *optimized_clear_value, bool placed)
{
HRESULT hr;
@@ -1768,6 +1846,8 @@ static HRESULT d3d12_resource_init(struct d3d12_resource *resource, struct d3d12
resource->gpu_address = 0;
resource->flags = 0;
+ if (placed && d3d12_resource_is_buffer(resource))
+ resource->flags |= VKD3D_RESOURCE_PLACED_BUFFER;
if (FAILED(hr = d3d12_resource_validate_desc(&resource->desc, device)))
return hr;
@@ -1775,6 +1855,13 @@ static HRESULT d3d12_resource_init(struct d3d12_resource *resource, struct d3d12
switch (desc->Dimension)
{
case D3D12_RESOURCE_DIMENSION_BUFFER:
+ /* We'll inherit a VkBuffer reference from the heap with an implied offset. */
+ if (placed)
+ {
+ resource->u.vk_buffer = VK_NULL_HANDLE;
+ break;
+ }
+
if (FAILED(hr = vkd3d_create_buffer(device, heap_properties, heap_flags,
&resource->desc, &resource->u.vk_buffer)))
return hr;
@@ -1825,7 +1912,7 @@ static HRESULT d3d12_resource_init(struct d3d12_resource *resource, struct d3d12
static HRESULT d3d12_resource_create(struct d3d12_device *device,
const D3D12_HEAP_PROPERTIES *heap_properties, D3D12_HEAP_FLAGS heap_flags,
const D3D12_RESOURCE_DESC *desc, D3D12_RESOURCE_STATES initial_state,
- const D3D12_CLEAR_VALUE *optimized_clear_value, struct d3d12_resource **resource)
+ const D3D12_CLEAR_VALUE *optimized_clear_value, bool placed, struct d3d12_resource **resource)
{
struct d3d12_resource *object;
HRESULT hr;
@@ -1834,7 +1921,7 @@ static HRESULT d3d12_resource_create(struct d3d12_device *device,
return E_OUTOFMEMORY;
if (FAILED(hr = d3d12_resource_init(object, device, heap_properties, heap_flags,
- desc, initial_state, optimized_clear_value)))
+ desc, initial_state, optimized_clear_value, placed)))
{
vkd3d_free(object);
return hr;
@@ -1876,7 +1963,7 @@ HRESULT d3d12_committed_resource_create(struct d3d12_device *device,
}
if (FAILED(hr = d3d12_resource_create(device, heap_properties, heap_flags,
- desc, initial_state, optimized_clear_value, &object)))
+ desc, initial_state, optimized_clear_value, false, &object)))
return hr;
if (FAILED(hr = vkd3d_allocate_resource_memory(device, object, heap_properties, heap_flags)))
@@ -1900,6 +1987,16 @@ static HRESULT vkd3d_bind_heap_memory(struct d3d12_device *device,
VkMemoryRequirements requirements;
VkResult vr;
+ if (resource->flags & VKD3D_RESOURCE_PLACED_BUFFER)
+ {
+ /* Just inherit the buffer from the heap. */
+ resource->u.vk_buffer = heap->buffer_resource->u.vk_buffer;
+ resource->heap = heap;
+ resource->heap_offset = heap_offset;
+ resource->gpu_address = heap->buffer_resource->gpu_address + heap_offset;
+ return S_OK;
+ }
+
if (d3d12_resource_is_buffer(resource))
VK_CALL(vkGetBufferMemoryRequirements(vk_device, resource->u.vk_buffer, &requirements));
else
@@ -1949,7 +2046,7 @@ HRESULT d3d12_placed_resource_create(struct d3d12_device *device, struct d3d12_h
HRESULT hr;
if (FAILED(hr = d3d12_resource_create(device, &heap->desc.Properties, heap->desc.Flags,
- desc, initial_state, optimized_clear_value, &object)))
+ desc, initial_state, optimized_clear_value, true, &object)))
return hr;
if (FAILED(hr = vkd3d_bind_heap_memory(device, object, heap, heap_offset)))
@@ -1973,7 +2070,7 @@ HRESULT d3d12_reserved_resource_create(struct d3d12_device *device,
HRESULT hr;
if (FAILED(hr = d3d12_resource_create(device, NULL, 0,
- desc, initial_state, optimized_clear_value, &object)))
+ desc, initial_state, optimized_clear_value, false, &object)))
return hr;
TRACE("Created reserved resource %p.\n", object);
@@ -2275,7 +2372,7 @@ static bool vkd3d_create_buffer_view_for_resource(struct d3d12_device *device,
assert(d3d12_resource_is_buffer(resource));
return vkd3d_create_buffer_view(device, resource->u.vk_buffer,
- format, offset * element_size, size * element_size, view);
+ format, resource->heap_offset + offset * element_size, size * element_size, view);
}
static void vkd3d_set_view_swizzle_for_format(VkComponentMapping *components,
@@ -2869,7 +2966,7 @@ static void vkd3d_create_buffer_uav(struct d3d12_desc *descriptor, struct d3d12_
format = vkd3d_get_format(device, DXGI_FORMAT_R32_UINT, false);
if (!vkd3d_create_vk_buffer_view(device, counter_resource->u.vk_buffer, format,
- desc->u.Buffer.CounterOffsetInBytes, sizeof(uint32_t), &view->vk_counter_view))
+ desc->u.Buffer.CounterOffsetInBytes + resource->heap_offset, sizeof(uint32_t), &view->vk_counter_view))
{
WARN("Failed to create counter buffer view.\n");
view->vk_counter_view = VK_NULL_HANDLE;
@@ -2960,12 +3057,18 @@ bool vkd3d_create_raw_buffer_view(struct d3d12_device *device,
{
const struct vkd3d_format *format;
struct d3d12_resource *resource;
+ uint64_t range;
+ uint64_t offset;
format = vkd3d_get_format(device, DXGI_FORMAT_R32_UINT, false);
resource = vkd3d_gpu_va_allocator_dereference(&device->gpu_va_allocator, gpu_address);
assert(d3d12_resource_is_buffer(resource));
+
+ offset = gpu_address - resource->gpu_address;
+ range = min(resource->desc.Width - offset, device->vk_info.device_limits.maxStorageBufferRange);
+
return vkd3d_create_vk_buffer_view(device, resource->u.vk_buffer, format,
- gpu_address - resource->gpu_address, VK_WHOLE_SIZE, vk_buffer_view);
+ offset, range, vk_buffer_view);
}
/* samplers */
diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h
index 0c031d2..206e550 100644
--- a/libs/vkd3d/vkd3d_private.h
+++ b/libs/vkd3d/vkd3d_private.h
@@ -379,6 +379,7 @@ struct d3d12_heap
unsigned int map_count;
uint32_t vk_memory_type;
+ struct d3d12_resource *buffer_resource;
struct d3d12_device *device;
struct vkd3d_private_store private_store;
@@ -393,6 +394,7 @@ struct d3d12_heap *unsafe_impl_from_ID3D12Heap(ID3D12Heap *iface) DECLSPEC_HIDDE
#define VKD3D_RESOURCE_EXTERNAL 0x00000004
#define VKD3D_RESOURCE_DEDICATED_HEAP 0x00000008
#define VKD3D_RESOURCE_LINEAR_TILING 0x00000010
+#define VKD3D_RESOURCE_PLACED_BUFFER 0x00000020
/* ID3D12Resource */
struct d3d12_resource
--
2.24.0
Dec. 7, 2019
Re: [PATCH] kernel32/tests: Trace the mapped string when FoldStringW fails.
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=61569
Your paranoid android.
=== wxppro (32 bit report) ===
kernel32:
locale.c:3586: Test failed: Got unexpected string L"Wine\0348\0551\1323\280dWine\03c5\0308j\030c\00a0\00aa".
=== w2003std (32 bit report) ===
kernel32:
locale.c:3586: Test failed: Got unexpected string L"Wine\0348\0551\1323\280dWine\03c5\0308j\030c\00a0\00aa".
Dec. 7, 2019
[PATCH] kernel32/tests: Trace the mapped string when FoldStringW fails.
by Mathew Hodson
Signed-off-by: Mathew Hodson <mathew.hodson(a)gmail.com>
---
dlls/kernel32/tests/locale.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c
index e43eee2..9328666 100644
--- a/dlls/kernel32/tests/locale.c
+++ b/dlls/kernel32/tests/locale.c
@@ -3585,7 +3585,7 @@ static void test_FoldStringW(void)
ok(ret == ARRAY_SIZE(foldczone_dst), "Got %d, error %d\n", ret, GetLastError());
ok(!memcmp(dst, foldczone_dst, sizeof(foldczone_dst))
|| broken(!memcmp(dst, foldczone_broken_dst, sizeof(foldczone_broken_dst))),
- "MAP_FOLDCZONE: Expanded incorrectly\n");
+ "Got unexpected string %s.\n", wine_dbgstr_w(dst));
/* MAP_EXPAND_LIGATURES */
SetLastError(0);
@@ -3594,7 +3594,7 @@ static void test_FoldStringW(void)
if (!(ret == 0 && GetLastError() == ERROR_INVALID_FLAGS)) {
ok(ret == ARRAY_SIZE(ligatures_dst), "Got %d, error %d\n", ret, GetLastError());
ok(!memcmp(dst, ligatures_dst, sizeof(ligatures_dst)),
- "MAP_EXPAND_LIGATURES: Expanded incorrectly\n");
+ "Got unexpected string %s.\n", wine_dbgstr_w(dst));
}
/* FIXME: MAP_PRECOMPOSED : MAP_COMPOSITE */
--
2.7.4
Dec. 7, 2019
[PATCH 4/4] d3d8: Support texture dirty regions.
by Akihiro Sagawa
Signed-off-by: Akihiro Sagawa <sagawa.aki(a)gmail.com>
---
dlls/d3d8/tests/visual.c | 12 ++++++------
dlls/d3d8/texture.c | 12 +++++++++++-
2 files changed, 17 insertions(+), 7 deletions(-)
Dec. 7, 2019
[PATCH 3/4] wined3d: Update a part of the texture if dirty regions is tracked.
by Akihiro Sagawa
Wine-Bugs: https://bugs.winehq.org/show_bug.cgi?id=35205
Signed-off-by: Akihiro Sagawa <sagawa.aki(a)gmail.com>
---
dlls/d3d9/tests/visual.c | 12 ++++++------
dlls/wined3d/device.c | 49 +++++++++++++++++++++++++++++++++++++++++-------
dlls/wined3d/texture.c | 11 ++++-------
3 files changed, 52 insertions(+), 20 deletions(-)
Dec. 7, 2019
[PATCH 2/4] wined3d: Record texture dirty regions.
by Akihiro Sagawa
Signed-off-by: Akihiro Sagawa <sagawa.aki(a)gmail.com>
---
dlls/wined3d/device.c | 2 ++
dlls/wined3d/texture.c | 66 ++++++++++++++++++++++++++++++++++++++++++
dlls/wined3d/wined3d_private.h | 3 ++
3 files changed, 71 insertions(+)
Dec. 7, 2019
[PATCH 1/4] wined3d: Add dirty region members for d3d9 textures.
by Akihiro Sagawa
Signed-off-by: Akihiro Sagawa <sagawa.aki(a)gmail.com>
---
dlls/d3d9/texture.c | 9 ++++++++-
dlls/wined3d/texture.c | 13 +++++++++++++
dlls/wined3d/wined3d_private.h | 7 +++++++
include/wine/wined3d.h | 1 +
4 files changed, 29 insertions(+), 1 deletion(-)
Dec. 7, 2019
Re: [wine-devel] Wine staging 4.21 release
by Alistair Leslie-Hughes
Hi Alan,
On 7/12/19 7:48 pm, Alan W. Irwin wrote:
> On 2019-12-05 14:03+0100 Olivier F. R. Dierick wrote:
>
> Version rebased upstreamed added updated predicted predicted-rebased
> T U A u P D
>
> 4.17 855 5 9 7 n/a n/a
> 4.18 850 1 1 3 855 5
> 4.19 840 8 1 1 843 3
> 4.20 832 8 1 3 833 1
> 4.21 833 0 6 2 838 5
>
These rebased number is the total number of patches applied to the
current wine. The numbers aren't always going to add up as you expect,
For example: we might disable a patchset from one version to another
while we workout a regression or drop a patch(s) because they aren't
correct or add patches to a patchset to increase functionally.
This release will have two patches listed as upstreamed but were
actually part of the previous release since I initial disabled the
patchset until I could verify that these patches were no longer
required. Likewise we might drop/disable the remaining wusa patch since
we are unable to verify whether is actually required anymore, which wont
be listed in the release notes.
Regards
Alistair.
Dec. 7, 2019
Re: [wine-devel] Wine staging 4.21 release
by Alan W. Irwin
On 2019-12-05 14:03+0100 Olivier F. R. Dierick wrote:
> Le mercredi 04 décembre 2019 à 14:56 -0800, Alan W. Irwin a écrit :
>> On 2019-11-30 04:56-0000 Alistair Leslie-Hughes wrote:
>>
>>> Added:
>>> * [47668] kernelbase: Improve stub for ReOpenFile and add small
>> [...]
>>
>> Could you explain how these patch numbers in your report are related
>> with each other?
>>
>
> Hello,
>
> The numbers between brackets are winehq.org bugzilla bug numbers.
>
Hi Olivier:
Thanks for trying to be helpful, but your answer did not respond to
the question which was about how to account for the total number of
patches in each category mentioned in these reports.
To explain further, my curiosity about this question was stimulated by
these staging "accounting" numbers from recent reports:
Version rebased upstreamed added updated predicted predicted-rebased
T U A u P D
4.17 855 5 9 7 n/a n/a
4.18 850 1 1 3 855 5
4.19 840 8 1 1 843 3
4.20 832 8 1 3 833 1
4.21 833 0 6 2 838 5
I assume the "T" column is the total number of patches in staging,
i.e., the report is only sent out when the rebasing work is completed,
but could someone confirm that? I also assume U reduces the total
number in staging by that number, A increases the total number in
staging by that number, and u leaves the total number in staging
unchanged. And I have used
P = T' - U - A
to calculate the predicted number of patches from one report to the next
and
D = P - T
to calculate the discrepancy between predicted and actual values where
T' is taken from the previous report and T, U and A are taken from the
current report.
In every case D is positive (P always greater than T) so I hypothesize
there is another kind of patch category not currently mentioned in the
report that explains this discrepancy (e.g., patches which the staging
developers have removed from staging). Could someone please describe
the true reason why D is always positive?
Furthermore, my view is it would be helpful if patch categories
(deletions from staging or whatever) that are currently not mentioned
in these reports should be mentioned in future reports.
Alan
__________________________
Alan W. Irwin
Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net) the Time
Ephemerides project (timeephem.sf.net) PLplot scientific plotting
software package (plplot.org) the libLASi project
(unifont.org/lasi) the Loads of Linux Links project (loll.sf.net)
and the Linux Brochure Project (lbproject.sf.net)
__________________________
Linux-powered Science
__________________________
Dec. 7, 2019
[PATCH] wtsapi32: Make WTSRegisterSessionNotificationEx's return consistant with WTSRegisterSessionNotification.
by Patrick Hibbs
No point in these returning different values, considering one is a superset of the other.
Fix as per Zebediah Figura's bug comment (#12).
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47433
Signed-off-by: Patrick Hibbs <hibbsncc1701(a)gmail.com>
---
dlls/wtsapi32/wtsapi32.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/wtsapi32/wtsapi32.c b/dlls/wtsapi32/wtsapi32.c
index c2b817a6ed..026e7f4369 100644
--- a/dlls/wtsapi32/wtsapi32.c
+++ b/dlls/wtsapi32/wtsapi32.c
@@ -385,7 +385,7 @@ BOOL WINAPI WTSRegisterSessionNotification(HWND hWnd, DWORD dwFlags)
BOOL WINAPI WTSRegisterSessionNotificationEx(HANDLE hServer, HWND hWnd, DWORD dwFlags)
{
FIXME("Stub %p %p 0x%08x\n", hServer, hWnd, dwFlags);
- return FALSE;
+ return TRUE;
}
--
2.24.0
Dec. 7, 2019
Re: [PATCH v3 3/3] xmllite: Expand test for any unparsed data at end of XML.
by Jeff Smith
On Fri, Dec 6, 2019 at 4:19 PM Nikolay Sivov <nsivov(a)codeweavers.com> wrote:
>
> On 12/7/19 12:24 AM, Jeff Smith wrote:
> > On Fri, Dec 6, 2019 at 11:16 AM Nikolay Sivov <nsivov(a)codeweavers.com> wrote:
> >> On 12/5/19 10:53 PM, Jeff Smith wrote:
> >>> @@ -2662,7 +2663,7 @@ static HRESULT reader_parse_nextnode(xmlreader *reader)
> >>> hr = reader_parse_misc(reader);
> >>> if (hr != S_FALSE) return hr;
> >>>
> >>> - if (*reader_get_ptr(reader))
> >>> + if (buffer->cur*sizeof(WCHAR) < buffer->written)
> >>> {
> >>> WARN("found garbage in the end of XML\n");
> >>> return WC_E_SYNTAX;
> > Hi Nikolay,
> >
> >> That means we don't have enough data,
> > How do you figure that?
> >
> >> it's another change not backed by tests
> > This fixes two tests, and does not break any others.
> >
> >> and potentially depending on current read-ahead buffer size/filled level.
> > I'm pretty sure reader_parse_misc would have read at least one byte
> > ahead, which is all that is required for this to trigger, though I
> > could double-check that.
> > However, to your point made in the patch 2 of the set about not
> > exposing the buffer at this level, I will also consider this something
> > that potentially needs to be handled elsewhere.
> My point is that we should always hit this single invalid syntax/garbage
> at the end condition that we already have,
That garbage-at-the-end condition, as it exists, is explicitly NOT
triggered by a null character, but it should.
So what we have here currently is not sufficient.
While there may be cases that my patch does not cover, based on
existing test cases, it is an improvement.
> instead of doing fixups for specific node types.
On Windows, the context in which the null character is encountered is
significant.
For instance, if any character other than '<' is encountered at the
end of a whitespace sequence, it raises the syntax error without
returning a Whitespace node.
So we need to catch the invalid character and interrupt before a
Whitespace node is returned.
Dec. 7, 2019
[PATCH] wineqtdecoder: Fix macos compile error
by Alistair Leslie-Hughes
Regression of 498179b4482026091bf7376c0d2ac9a036e7ca0e
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com>
---
dlls/wineqtdecoder/qtsplitter.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/dlls/wineqtdecoder/qtsplitter.c b/dlls/wineqtdecoder/qtsplitter.c
index 5b1e82ebc9b..956dd0a7d0d 100644
--- a/dlls/wineqtdecoder/qtsplitter.c
+++ b/dlls/wineqtdecoder/qtsplitter.c
@@ -285,7 +285,7 @@ static HRESULT qt_splitter_start_stream(struct strmbase_filter *iface, REFERENCE
QTSplitter *filter = impl_from_strmbase_filter(iface);
HRESULT hr = VFW_E_NOT_CONNECTED, pin_hr;
- EnterCriticalSection(&This->csReceive);
+ EnterCriticalSection(&filter->csReceive);
if (filter->pVideo_Pin)
pin_hr = BaseOutputPinImpl_Active(&filter->pVideo_Pin->pin);
@@ -297,7 +297,7 @@ static HRESULT qt_splitter_start_stream(struct strmbase_filter *iface, REFERENCE
hr = pin_hr;
SetEvent(filter->runEvent);
- LeaveCriticalSection(&This->csReceive);
+ LeaveCriticalSection(&filter->csReceive);
return hr;
}
@@ -306,10 +306,10 @@ static HRESULT qt_splitter_cleanup_stream(struct strmbase_filter *iface)
{
QTSplitter *filter = impl_from_strmbase_filter(iface);
- EnterCriticalSection(&This->csReceive);
+ EnterCriticalSection(&filter->csReceive);
IAsyncReader_BeginFlush(filter->pInputPin.pReader);
IAsyncReader_EndFlush(filter->pInputPin.pReader);
- LeaveCriticalSection(&This->csReceive);
+ LeaveCriticalSection(&filter->csReceive);
return S_OK;
}
@@ -1170,8 +1170,6 @@ static HRESULT WINAPI QTOutPin_QueryInterface(IPin *iface, REFIID riid, void **p
*ppv = iface;
else if (IsEqualIID(riid, &IID_IPin))
*ppv = iface;
- else if (IsEqualIID(riid, &IID_IMediaSeeking))
- *ppv = &This->sourceSeeking.IMediaSeeking_iface;
else if (IsEqualIID(riid, &IID_IQualityControl))
*ppv = &This->IQualityControl_iface;
--
2.24.0
Dec. 7, 2019
Re: [PATCH 6/6] strmbase: Get rid of the "vtbl" argument to strmbase_source_init().
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=61549
Your paranoid android.
=== w1064v1809_he (32 bit report) ===
quartz:
videorenderer.c:928: Test failed: Thread should block in Receive().
Dec. 7, 2019
[PATCH] bcrypt: Add fallback when gnutls_decode_rs_value isn't present.
by Derek Lesho
Signed-off-by: Derek Lesho <dlesho(a)codeweavers.com>
---
I overlooked the fact that wine won't compile on systems where gnutls headers are too old.
---
dlls/bcrypt/gnutls.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/dlls/bcrypt/gnutls.c b/dlls/bcrypt/gnutls.c
index 1c31b5625f..868f898bbb 100644
--- a/dlls/bcrypt/gnutls.c
+++ b/dlls/bcrypt/gnutls.c
@@ -86,13 +86,15 @@ static int (*pgnutls_privkey_export_rsa_raw)(gnutls_privkey_t, gnutls_datum_t *,
gnutls_datum_t *);
static int (*pgnutls_privkey_generate)(gnutls_privkey_t, gnutls_pk_algorithm_t, unsigned int, unsigned int);
+/* Not present in gnutls version < 3.6.0 */
+static int (*pgnutls_decode_rs_value)(const gnutls_datum_t *, gnutls_datum_t *, gnutls_datum_t *);
+
static void *libgnutls_handle;
#define MAKE_FUNCPTR(f) static typeof(f) * p##f
MAKE_FUNCPTR(gnutls_cipher_decrypt2);
MAKE_FUNCPTR(gnutls_cipher_deinit);
MAKE_FUNCPTR(gnutls_cipher_encrypt2);
MAKE_FUNCPTR(gnutls_cipher_init);
-MAKE_FUNCPTR(gnutls_decode_rs_value);
MAKE_FUNCPTR(gnutls_global_deinit);
MAKE_FUNCPTR(gnutls_global_init);
MAKE_FUNCPTR(gnutls_global_set_log_function);
@@ -164,6 +166,11 @@ static int compat_gnutls_privkey_generate(gnutls_privkey_t key, gnutls_pk_algori
return GNUTLS_E_UNKNOWN_PK_ALGORITHM;
}
+static int compat_gnutls_decode_rs_value(const gnutls_datum_t * sig_value, gnutls_datum_t * r, gnutls_datum_t * s)
+{
+ return GNUTLS_E_INTERNAL_ERROR;
+}
+
static void gnutls_log( int level, const char *msg )
{
TRACE( "<%d> %s", level, msg );
@@ -190,7 +197,6 @@ BOOL gnutls_initialize(void)
LOAD_FUNCPTR(gnutls_cipher_deinit)
LOAD_FUNCPTR(gnutls_cipher_encrypt2)
LOAD_FUNCPTR(gnutls_cipher_init)
- LOAD_FUNCPTR(gnutls_decode_rs_value)
LOAD_FUNCPTR(gnutls_global_deinit)
LOAD_FUNCPTR(gnutls_global_init)
LOAD_FUNCPTR(gnutls_global_set_log_function)
@@ -259,6 +265,11 @@ BOOL gnutls_initialize(void)
WARN("gnutls_privkey_generate not found\n");
pgnutls_privkey_generate = compat_gnutls_privkey_generate;
}
+ if (!(pgnutls_decode_rs_value = wine_dlsym( libgnutls_handle, "gnutls_decode_rs_value", NULL, 0 )))
+ {
+ WARN("gnutls_decode_rs_value not found\n");
+ pgnutls_decode_rs_value = compat_gnutls_decode_rs_value;
+ }
if (TRACE_ON( bcrypt ))
{
--
2.24.0
Dec. 7, 2019
[PATCH 6/6] strmbase: Get rid of the "vtbl" argument to strmbase_source_init().
by Zebediah Figura
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
dlls/qcap/avico.c | 24 +---------------
dlls/qcap/avimux.c | 24 +---------------
dlls/qcap/smartteefilter.c | 48 ++-----------------------------
dlls/qcap/vfwcapture.c | 25 +---------------
dlls/qedit/samplegrabber.c | 24 +---------------
dlls/quartz/filesource.c | 26 +----------------
dlls/quartz/tests/videorenderer.c | 24 +---------------
dlls/quartz/tests/vmr7.c | 24 +---------------
dlls/quartz/tests/vmr9.c | 24 +---------------
dlls/strmbase/pin.c | 38 ++++++++++++++++++------
dlls/strmbase/transform.c | 26 +----------------
dlls/winegstreamer/gstdemux.c | 25 +---------------
dlls/wineqtdecoder/qtsplitter.c | 25 +---------------
include/wine/strmbase.h | 10 +------
14 files changed, 44 insertions(+), 323 deletions(-)
diff --git a/dlls/qcap/avico.c b/dlls/qcap/avico.c
index 9365c437b4f..debe6bca386 100644
--- a/dlls/qcap/avico.c
+++ b/dlls/qcap/avico.c
@@ -473,27 +473,6 @@ static const struct strmbase_sink_ops sink_ops =
.pfnReceive = AVICompressorIn_Receive,
};
-static const IPinVtbl AVICompressorOutputPinVtbl = {
- BasePinImpl_QueryInterface,
- BasePinImpl_AddRef,
- BasePinImpl_Release,
- BaseOutputPinImpl_Connect,
- BaseOutputPinImpl_ReceiveConnection,
- BaseOutputPinImpl_Disconnect,
- BasePinImpl_ConnectedTo,
- BasePinImpl_ConnectionMediaType,
- BasePinImpl_QueryPinInfo,
- BasePinImpl_QueryDirection,
- BasePinImpl_QueryId,
- BasePinImpl_QueryAccept,
- BasePinImpl_EnumMediaTypes,
- BasePinImpl_QueryInternalConnections,
- BaseOutputPinImpl_EndOfStream,
- BaseOutputPinImpl_BeginFlush,
- BaseOutputPinImpl_EndFlush,
- BasePinImpl_NewSegment
-};
-
static HRESULT source_get_media_type(struct strmbase_pin *base, unsigned int iPosition, AM_MEDIA_TYPE *amt)
{
AVICompressor *This = impl_from_strmbase_filter(base->filter);
@@ -564,8 +543,7 @@ IUnknown* WINAPI QCAP_createAVICompressor(IUnknown *outer, HRESULT *phr)
strmbase_sink_init(&compressor->sink, &AVICompressorInputPinVtbl,
&compressor->filter, sink_name, &sink_ops, NULL);
- strmbase_source_init(&compressor->source, &AVICompressorOutputPinVtbl,
- &compressor->filter, source_name, &source_ops);
+ strmbase_source_init(&compressor->source, &compressor->filter, source_name, &source_ops);
*phr = S_OK;
return &compressor->filter.IUnknown_inner;
diff --git a/dlls/qcap/avimux.c b/dlls/qcap/avimux.c
index 677e79ef68f..c344ab47266 100644
--- a/dlls/qcap/avimux.c
+++ b/dlls/qcap/avimux.c
@@ -1217,27 +1217,6 @@ static const struct strmbase_source_ops source_ops =
.pfnDecideAllocator = AviMuxOut_DecideAllocator,
};
-static const IPinVtbl AviMuxOut_PinVtbl = {
- BasePinImpl_QueryInterface,
- BasePinImpl_AddRef,
- BasePinImpl_Release,
- BaseOutputPinImpl_Connect,
- BaseOutputPinImpl_ReceiveConnection,
- BaseOutputPinImpl_Disconnect,
- BasePinImpl_ConnectedTo,
- BasePinImpl_ConnectionMediaType,
- BasePinImpl_QueryPinInfo,
- BasePinImpl_QueryDirection,
- BasePinImpl_QueryId,
- BasePinImpl_QueryAccept,
- BasePinImpl_EnumMediaTypes,
- BasePinImpl_QueryInternalConnections,
- BaseOutputPinImpl_EndOfStream,
- BaseOutputPinImpl_BeginFlush,
- BaseOutputPinImpl_EndFlush,
- BasePinImpl_NewSegment
-};
-
static inline AviMux* impl_from_out_IQualityControl(IQualityControl *iface)
{
return CONTAINING_RECORD(iface, AviMux, IQualityControl_iface);
@@ -1923,8 +1902,7 @@ IUnknown * WINAPI QCAP_createAVIMux(IUnknown *outer, HRESULT *phr)
info.dir = PINDIR_OUTPUT;
info.pFilter = &avimux->filter.IBaseFilter_iface;
lstrcpyW(info.achName, output_name);
- strmbase_source_init(&avimux->source, &AviMuxOut_PinVtbl, &avimux->filter,
- output_name, &source_ops);
+ strmbase_source_init(&avimux->source, &avimux->filter, output_name, &source_ops);
avimux->IQualityControl_iface.lpVtbl = &AviMuxOut_QualityControlVtbl;
avimux->cur_stream = 0;
avimux->cur_time = 0;
diff --git a/dlls/qcap/smartteefilter.c b/dlls/qcap/smartteefilter.c
index 7762ec1e500..929929632f1 100644
--- a/dlls/qcap/smartteefilter.c
+++ b/dlls/qcap/smartteefilter.c
@@ -275,27 +275,6 @@ static const struct strmbase_sink_ops sink_ops =
.pfnReceive = SmartTeeFilterInput_Receive,
};
-static const IPinVtbl SmartTeeFilterCaptureVtbl = {
- BasePinImpl_QueryInterface,
- BasePinImpl_AddRef,
- BasePinImpl_Release,
- BaseOutputPinImpl_Connect,
- BaseOutputPinImpl_ReceiveConnection,
- BaseOutputPinImpl_Disconnect,
- BasePinImpl_ConnectedTo,
- BasePinImpl_ConnectionMediaType,
- BasePinImpl_QueryPinInfo,
- BasePinImpl_QueryDirection,
- BasePinImpl_QueryId,
- BasePinImpl_QueryAccept,
- BasePinImpl_EnumMediaTypes,
- BasePinImpl_QueryInternalConnections,
- BaseOutputPinImpl_EndOfStream,
- BaseOutputPinImpl_BeginFlush,
- BaseOutputPinImpl_EndFlush,
- BasePinImpl_NewSegment
-};
-
static HRESULT capture_query_accept(struct strmbase_pin *base, const AM_MEDIA_TYPE *amt)
{
FIXME("(%p) stub\n", base);
@@ -339,27 +318,6 @@ static const struct strmbase_source_ops capture_ops =
.pfnDecideAllocator = SmartTeeFilterCapture_DecideAllocator,
};
-static const IPinVtbl SmartTeeFilterPreviewVtbl = {
- BasePinImpl_QueryInterface,
- BasePinImpl_AddRef,
- BasePinImpl_Release,
- BaseOutputPinImpl_Connect,
- BaseOutputPinImpl_ReceiveConnection,
- BaseOutputPinImpl_Disconnect,
- BasePinImpl_ConnectedTo,
- BasePinImpl_ConnectionMediaType,
- BasePinImpl_QueryPinInfo,
- BasePinImpl_QueryDirection,
- BasePinImpl_QueryId,
- BasePinImpl_QueryAccept,
- BasePinImpl_EnumMediaTypes,
- BasePinImpl_QueryInternalConnections,
- BaseOutputPinImpl_EndOfStream,
- BaseOutputPinImpl_BeginFlush,
- BaseOutputPinImpl_EndFlush,
- BasePinImpl_NewSegment
-};
-
static HRESULT preview_query_accept(struct strmbase_pin *base, const AM_MEDIA_TYPE *amt)
{
FIXME("(%p) stub\n", base);
@@ -410,10 +368,8 @@ IUnknown* WINAPI QCAP_createSmartTeeFilter(IUnknown *outer, HRESULT *phr)
return NULL;
}
- strmbase_source_init(&object->capture, &SmartTeeFilterCaptureVtbl,
- &object->filter, captureW, &capture_ops);
- strmbase_source_init(&object->preview, &SmartTeeFilterPreviewVtbl,
- &object->filter, previewW, &preview_ops);
+ strmbase_source_init(&object->capture, &object->filter, captureW, &capture_ops);
+ strmbase_source_init(&object->preview, &object->filter, previewW, &preview_ops);
*phr = S_OK;
return &object->filter.IUnknown_inner;
diff --git a/dlls/qcap/vfwcapture.c b/dlls/qcap/vfwcapture.c
index e7522ea9b36..2185053ecd0 100644
--- a/dlls/qcap/vfwcapture.c
+++ b/dlls/qcap/vfwcapture.c
@@ -559,28 +559,6 @@ static const struct strmbase_source_ops source_ops =
.pfnDecideAllocator = BaseOutputPinImpl_DecideAllocator,
};
-static const IPinVtbl VfwPin_Vtbl =
-{
- BasePinImpl_QueryInterface,
- BasePinImpl_AddRef,
- BasePinImpl_Release,
- BaseOutputPinImpl_Connect,
- BaseOutputPinImpl_ReceiveConnection,
- BaseOutputPinImpl_Disconnect,
- BasePinImpl_ConnectedTo,
- BasePinImpl_ConnectionMediaType,
- BasePinImpl_QueryPinInfo,
- BasePinImpl_QueryDirection,
- BasePinImpl_QueryId,
- BasePinImpl_QueryAccept,
- BasePinImpl_EnumMediaTypes,
- BasePinImpl_QueryInternalConnections,
- BaseOutputPinImpl_EndOfStream,
- BaseOutputPinImpl_BeginFlush,
- BaseOutputPinImpl_EndFlush,
- BasePinImpl_NewSegment
-};
-
IUnknown * WINAPI QCAP_createVFWCaptureFilter(IUnknown *outer, HRESULT *phr)
{
static const WCHAR source_name[] = {'O','u','t','p','u','t',0};
@@ -599,8 +577,7 @@ IUnknown * WINAPI QCAP_createVFWCaptureFilter(IUnknown *outer, HRESULT *phr)
object->IPersistPropertyBag_iface.lpVtbl = &IPersistPropertyBag_VTable;
object->init = FALSE;
- strmbase_source_init(&object->source, &VfwPin_Vtbl, &object->filter,
- source_name, &source_ops);
+ strmbase_source_init(&object->source, &object->filter, source_name, &source_ops);
object->IKsPropertySet_iface.lpVtbl = &IKsPropertySet_VTable;
diff --git a/dlls/qedit/samplegrabber.c b/dlls/qedit/samplegrabber.c
index 019af5c35de..f8d90a5c0df 100644
--- a/dlls/qedit/samplegrabber.c
+++ b/dlls/qedit/samplegrabber.c
@@ -660,28 +660,6 @@ static const struct strmbase_source_ops source_ops =
.pfnAttemptConnection = sample_grabber_source_AttemptConnection,
};
-static const IPinVtbl source_vtbl =
-{
- BasePinImpl_QueryInterface,
- BasePinImpl_AddRef,
- BasePinImpl_Release,
- BaseOutputPinImpl_Connect,
- BaseOutputPinImpl_ReceiveConnection,
- BaseOutputPinImpl_Disconnect,
- BasePinImpl_ConnectedTo,
- BasePinImpl_ConnectionMediaType,
- BasePinImpl_QueryPinInfo,
- BasePinImpl_QueryDirection,
- BasePinImpl_QueryId,
- BasePinImpl_QueryAccept,
- BasePinImpl_EnumMediaTypes,
- BasePinImpl_QueryInternalConnections,
- BaseOutputPinImpl_EndOfStream,
- BaseOutputPinImpl_BeginFlush,
- BaseOutputPinImpl_EndFlush,
- BasePinImpl_NewSegment,
-};
-
HRESULT SampleGrabber_create(IUnknown *outer, void **out)
{
SG_Impl* obj = NULL;
@@ -700,7 +678,7 @@ HRESULT SampleGrabber_create(IUnknown *outer, void **out)
obj->IMemInputPin_iface.lpVtbl = &IMemInputPin_VTable;
strmbase_sink_init(&obj->sink, &sink_vtbl, &obj->filter, L"In", &sink_ops, NULL);
- strmbase_source_init(&obj->source, &source_vtbl, &obj->filter, L"Out", &source_ops);
+ strmbase_source_init(&obj->source, &obj->filter, L"Out", &source_ops);
obj->mtype.majortype = GUID_NULL;
obj->mtype.subtype = MEDIASUBTYPE_None;
diff --git a/dlls/quartz/filesource.c b/dlls/quartz/filesource.c
index e841391e83a..fb8adb4a3fb 100644
--- a/dlls/quartz/filesource.c
+++ b/dlls/quartz/filesource.c
@@ -77,7 +77,6 @@ typedef struct AsyncReader
HANDLE *handle_list;
} AsyncReader;
-static const IPinVtbl FileAsyncReaderPin_Vtbl;
static const struct strmbase_source_ops source_ops;
static inline AsyncReader *impl_from_strmbase_filter(struct strmbase_filter *iface)
@@ -468,8 +467,7 @@ static HRESULT WINAPI FileSource_Load(IFileSourceFilter * iface, LPCOLESTR pszFi
return HRESULT_FROM_WIN32(GetLastError());
}
- strmbase_source_init(&This->source, &FileAsyncReaderPin_Vtbl, &This->filter,
- wszOutputPinName, &source_ops);
+ strmbase_source_init(&This->source, &This->filter, wszOutputPinName, &source_ops);
BaseFilterImpl_IncrementPinVersion(&This->filter);
This->file = hFile;
@@ -594,28 +592,6 @@ static HRESULT source_query_interface(struct strmbase_pin *iface, REFIID iid, vo
return S_OK;
}
-static const IPinVtbl FileAsyncReaderPin_Vtbl =
-{
- BasePinImpl_QueryInterface,
- BasePinImpl_AddRef,
- BasePinImpl_Release,
- BaseOutputPinImpl_Connect,
- BaseOutputPinImpl_ReceiveConnection,
- BasePinImpl_Disconnect,
- BasePinImpl_ConnectedTo,
- BasePinImpl_ConnectionMediaType,
- BasePinImpl_QueryPinInfo,
- BasePinImpl_QueryDirection,
- BasePinImpl_QueryId,
- BasePinImpl_QueryAccept,
- BasePinImpl_EnumMediaTypes,
- BasePinImpl_QueryInternalConnections,
- BaseOutputPinImpl_EndOfStream,
- BaseOutputPinImpl_BeginFlush,
- BaseOutputPinImpl_EndFlush,
- BasePinImpl_NewSegment
-};
-
/* Function called as a helper to IPin_Connect */
/* specific AM_MEDIA_TYPE - it cannot be NULL */
/* this differs from standard OutputPin_AttemptConnection only in that it
diff --git a/dlls/quartz/tests/videorenderer.c b/dlls/quartz/tests/videorenderer.c
index d4d9622b415..00a9041a8b4 100644
--- a/dlls/quartz/tests/videorenderer.c
+++ b/dlls/quartz/tests/videorenderer.c
@@ -521,28 +521,6 @@ static const struct strmbase_filter_ops testfilter_ops =
.filter_destroy = testfilter_destroy,
};
-static const IPinVtbl testsource_vtbl =
-{
- BasePinImpl_QueryInterface,
- BasePinImpl_AddRef,
- BasePinImpl_Release,
- BaseOutputPinImpl_Connect,
- BaseOutputPinImpl_ReceiveConnection,
- BasePinImpl_Disconnect,
- BasePinImpl_ConnectedTo,
- BasePinImpl_ConnectionMediaType,
- BasePinImpl_QueryPinInfo,
- BasePinImpl_QueryDirection,
- BasePinImpl_QueryId,
- BasePinImpl_QueryAccept,
- BasePinImpl_EnumMediaTypes,
- BasePinImpl_QueryInternalConnections,
- BaseOutputPinImpl_EndOfStream,
- BaseOutputPinImpl_BeginFlush,
- BaseOutputPinImpl_EndFlush,
- BasePinImpl_NewSegment,
-};
-
static HRESULT testsource_query_accept(struct strmbase_pin *iface, const AM_MEDIA_TYPE *mt)
{
return S_OK;
@@ -579,7 +557,7 @@ static void testfilter_init(struct testfilter *filter)
{
static const GUID clsid = {0xabacab};
strmbase_filter_init(&filter->filter, NULL, &clsid, &testfilter_ops);
- strmbase_source_init(&filter->source, &testsource_vtbl, &filter->filter, L"", &testsource_ops);
+ strmbase_source_init(&filter->source, &filter->filter, L"", &testsource_ops);
}
static void test_allocator(IMemInputPin *input)
diff --git a/dlls/quartz/tests/vmr7.c b/dlls/quartz/tests/vmr7.c
index 008c84ab30f..dae86bd3fa9 100644
--- a/dlls/quartz/tests/vmr7.c
+++ b/dlls/quartz/tests/vmr7.c
@@ -881,28 +881,6 @@ static const struct strmbase_filter_ops testfilter_ops =
.filter_destroy = testfilter_destroy,
};
-static const IPinVtbl testsource_vtbl =
-{
- BasePinImpl_QueryInterface,
- BasePinImpl_AddRef,
- BasePinImpl_Release,
- BaseOutputPinImpl_Connect,
- BaseOutputPinImpl_ReceiveConnection,
- BasePinImpl_Disconnect,
- BasePinImpl_ConnectedTo,
- BasePinImpl_ConnectionMediaType,
- BasePinImpl_QueryPinInfo,
- BasePinImpl_QueryDirection,
- BasePinImpl_QueryId,
- BasePinImpl_QueryAccept,
- BasePinImpl_EnumMediaTypes,
- BasePinImpl_QueryInternalConnections,
- BaseOutputPinImpl_EndOfStream,
- BaseOutputPinImpl_BeginFlush,
- BaseOutputPinImpl_EndFlush,
- BasePinImpl_NewSegment,
-};
-
static HRESULT testsource_query_accept(struct strmbase_pin *iface, const AM_MEDIA_TYPE *mt)
{
return S_OK;
@@ -939,7 +917,7 @@ static void testfilter_init(struct testfilter *filter)
{
static const GUID clsid = {0xabacab};
strmbase_filter_init(&filter->filter, NULL, &clsid, &testfilter_ops);
- strmbase_source_init(&filter->source, &testsource_vtbl, &filter->filter, L"", &testsource_ops);
+ strmbase_source_init(&filter->source, &filter->filter, L"", &testsource_ops);
}
static void test_allocator(IMemInputPin *input)
diff --git a/dlls/quartz/tests/vmr9.c b/dlls/quartz/tests/vmr9.c
index fd6901d2117..5ece5c6f7bb 100644
--- a/dlls/quartz/tests/vmr9.c
+++ b/dlls/quartz/tests/vmr9.c
@@ -885,28 +885,6 @@ static const struct strmbase_filter_ops testfilter_ops =
.filter_destroy = testfilter_destroy,
};
-static const IPinVtbl testsource_vtbl =
-{
- BasePinImpl_QueryInterface,
- BasePinImpl_AddRef,
- BasePinImpl_Release,
- BaseOutputPinImpl_Connect,
- BaseOutputPinImpl_ReceiveConnection,
- BasePinImpl_Disconnect,
- BasePinImpl_ConnectedTo,
- BasePinImpl_ConnectionMediaType,
- BasePinImpl_QueryPinInfo,
- BasePinImpl_QueryDirection,
- BasePinImpl_QueryId,
- BasePinImpl_QueryAccept,
- BasePinImpl_EnumMediaTypes,
- BasePinImpl_QueryInternalConnections,
- BaseOutputPinImpl_EndOfStream,
- BaseOutputPinImpl_BeginFlush,
- BaseOutputPinImpl_EndFlush,
- BasePinImpl_NewSegment,
-};
-
static HRESULT testsource_query_accept(struct strmbase_pin *iface, const AM_MEDIA_TYPE *mt)
{
return S_OK;
@@ -943,7 +921,7 @@ static void testfilter_init(struct testfilter *filter)
{
static const GUID clsid = {0xabacab};
strmbase_filter_init(&filter->filter, NULL, &clsid, &testfilter_ops);
- strmbase_source_init(&filter->source, &testsource_vtbl, &filter->filter, L"", &testsource_ops);
+ strmbase_source_init(&filter->source, &filter->filter, L"", &testsource_ops);
}
static void test_allocator(IMemInputPin *input)
diff --git a/dlls/strmbase/pin.c b/dlls/strmbase/pin.c
index bdc827c6f60..bcac22eb3c4 100644
--- a/dlls/strmbase/pin.c
+++ b/dlls/strmbase/pin.c
@@ -284,7 +284,7 @@ static inline struct strmbase_source *impl_source_from_IPin( IPin *iface )
return CONTAINING_RECORD(iface, struct strmbase_source, pin.IPin_iface);
}
-HRESULT WINAPI BaseOutputPinImpl_Connect(IPin * iface, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt)
+static HRESULT WINAPI source_Connect(IPin *iface, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
{
HRESULT hr;
struct strmbase_source *This = impl_source_from_IPin(iface);
@@ -375,13 +375,13 @@ HRESULT WINAPI BaseOutputPinImpl_Connect(IPin * iface, IPin * pReceivePin, const
return hr;
}
-HRESULT WINAPI BaseOutputPinImpl_ReceiveConnection(IPin *iface, IPin *pin, const AM_MEDIA_TYPE *pmt)
+static HRESULT WINAPI source_ReceiveConnection(IPin *iface, IPin *pin, const AM_MEDIA_TYPE *pmt)
{
ERR("(%p)->(%p, %p) incoming connection on an output pin!\n", iface, pin, pmt);
return E_UNEXPECTED;
}
-HRESULT WINAPI BaseOutputPinImpl_Disconnect(IPin * iface)
+static HRESULT WINAPI source_Disconnect(IPin *iface)
{
HRESULT hr;
struct strmbase_source *This = impl_source_from_IPin(iface);
@@ -418,7 +418,7 @@ HRESULT WINAPI BaseOutputPinImpl_Disconnect(IPin * iface)
return hr;
}
-HRESULT WINAPI BaseOutputPinImpl_EndOfStream(IPin * iface)
+static HRESULT WINAPI source_EndOfStream(IPin *iface)
{
TRACE("(%p)->()\n", iface);
@@ -427,7 +427,7 @@ HRESULT WINAPI BaseOutputPinImpl_EndOfStream(IPin * iface)
return E_UNEXPECTED;
}
-HRESULT WINAPI BaseOutputPinImpl_BeginFlush(IPin * iface)
+static HRESULT WINAPI source_BeginFlush(IPin *iface)
{
TRACE("(%p)->()\n", iface);
@@ -436,7 +436,7 @@ HRESULT WINAPI BaseOutputPinImpl_BeginFlush(IPin * iface)
return E_UNEXPECTED;
}
-HRESULT WINAPI BaseOutputPinImpl_EndFlush(IPin * iface)
+static HRESULT WINAPI source_EndFlush(IPin *iface)
{
TRACE("(%p)->()\n", iface);
@@ -445,6 +445,28 @@ HRESULT WINAPI BaseOutputPinImpl_EndFlush(IPin * iface)
return E_UNEXPECTED;
}
+static const IPinVtbl source_vtbl =
+{
+ BasePinImpl_QueryInterface,
+ BasePinImpl_AddRef,
+ BasePinImpl_Release,
+ source_Connect,
+ source_ReceiveConnection,
+ source_Disconnect,
+ BasePinImpl_ConnectedTo,
+ BasePinImpl_ConnectionMediaType,
+ BasePinImpl_QueryPinInfo,
+ BasePinImpl_QueryDirection,
+ BasePinImpl_QueryId,
+ BasePinImpl_QueryAccept,
+ BasePinImpl_EnumMediaTypes,
+ BasePinImpl_QueryInternalConnections,
+ source_EndOfStream,
+ source_BeginFlush,
+ source_EndFlush,
+ BasePinImpl_NewSegment,
+};
+
HRESULT WINAPI BaseOutputPinImpl_GetDeliveryBuffer(struct strmbase_source *This,
IMediaSample **ppSample, REFERENCE_TIME *tStart, REFERENCE_TIME *tStop, DWORD dwFlags)
{
@@ -595,11 +617,11 @@ HRESULT WINAPI BaseOutputPinImpl_AttemptConnection(struct strmbase_source *This,
return hr;
}
-void strmbase_source_init(struct strmbase_source *pin, const IPinVtbl *vtbl, struct strmbase_filter *filter,
+void strmbase_source_init(struct strmbase_source *pin, struct strmbase_filter *filter,
const WCHAR *name, const struct strmbase_source_ops *func_table)
{
memset(pin, 0, sizeof(*pin));
- pin->pin.IPin_iface.lpVtbl = vtbl;
+ pin->pin.IPin_iface.lpVtbl = &source_vtbl;
pin->pin.filter = filter;
pin->pin.dir = PINDIR_OUTPUT;
lstrcpyW(pin->pin.name, name);
diff --git a/dlls/strmbase/transform.c b/dlls/strmbase/transform.c
index 5c079d38e76..7a79f709055 100644
--- a/dlls/strmbase/transform.c
+++ b/dlls/strmbase/transform.c
@@ -27,7 +27,6 @@ static const WCHAR wcsInputPinName[] = {'I','n',0};
static const WCHAR wcsOutputPinName[] = {'O','u','t',0};
static const IPinVtbl TransformFilter_InputPin_Vtbl;
-static const IPinVtbl TransformFilter_OutputPin_Vtbl;
static inline TransformFilter *impl_from_strmbase_filter(struct strmbase_filter *iface)
{
@@ -338,8 +337,7 @@ static HRESULT strmbase_transform_init(IUnknown *outer, const CLSID *clsid,
strmbase_sink_init(&filter->sink, &TransformFilter_InputPin_Vtbl, &filter->filter,
wcsInputPinName, &sink_ops, NULL);
- strmbase_source_init(&filter->source, &TransformFilter_OutputPin_Vtbl, &filter->filter,
- wcsOutputPinName, &source_ops);
+ strmbase_source_init(&filter->source, &filter->filter, wcsOutputPinName, &source_ops);
filter->source_IQualityControl_iface.lpVtbl = &source_qc_vtbl;
filter->seekthru_unk = NULL;
@@ -503,25 +501,3 @@ static const IPinVtbl TransformFilter_InputPin_Vtbl =
TransformFilter_InputPin_EndFlush,
TransformFilter_InputPin_NewSegment
};
-
-static const IPinVtbl TransformFilter_OutputPin_Vtbl =
-{
- BasePinImpl_QueryInterface,
- BasePinImpl_AddRef,
- BasePinImpl_Release,
- BaseOutputPinImpl_Connect,
- BaseOutputPinImpl_ReceiveConnection,
- BaseOutputPinImpl_Disconnect,
- BasePinImpl_ConnectedTo,
- BasePinImpl_ConnectionMediaType,
- BasePinImpl_QueryPinInfo,
- BasePinImpl_QueryDirection,
- BasePinImpl_QueryId,
- BasePinImpl_QueryAccept,
- BasePinImpl_EnumMediaTypes,
- BasePinImpl_QueryInternalConnections,
- BaseOutputPinImpl_EndOfStream,
- BaseOutputPinImpl_BeginFlush,
- BaseOutputPinImpl_EndFlush,
- BasePinImpl_NewSegment
-};
diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c
index 04fb54915c6..e7d0313d7ce 100644
--- a/dlls/winegstreamer/gstdemux.c
+++ b/dlls/winegstreamer/gstdemux.c
@@ -97,7 +97,6 @@ const char* media_quark_string = "media-sample";
static const WCHAR wcsInputPinName[] = {'i','n','p','u','t',' ','p','i','n',0};
static const IMediaSeekingVtbl GST_Seeking_Vtbl;
-static const IPinVtbl GST_OutputPin_Vtbl;
static const IPinVtbl GST_InputPin_Vtbl;
static const IQualityControlVtbl GSTOutPin_QualityControl_Vtbl;
@@ -1836,27 +1835,6 @@ static void free_source_pin(struct gstdemux_source *pin)
heap_free(pin);
}
-static const IPinVtbl GST_OutputPin_Vtbl = {
- BasePinImpl_QueryInterface,
- BasePinImpl_AddRef,
- BasePinImpl_Release,
- BaseOutputPinImpl_Connect,
- BaseOutputPinImpl_ReceiveConnection,
- BaseOutputPinImpl_Disconnect,
- BasePinImpl_ConnectedTo,
- BasePinImpl_ConnectionMediaType,
- BasePinImpl_QueryPinInfo,
- BasePinImpl_QueryDirection,
- BasePinImpl_QueryId,
- BasePinImpl_QueryAccept,
- BasePinImpl_EnumMediaTypes,
- BasePinImpl_QueryInternalConnections,
- BaseOutputPinImpl_EndOfStream,
- BaseOutputPinImpl_BeginFlush,
- BaseOutputPinImpl_EndFlush,
- BasePinImpl_NewSegment
-};
-
static const struct strmbase_source_ops source_ops =
{
.base.pin_query_interface = source_query_interface,
@@ -1879,8 +1857,7 @@ static struct gstdemux_source *create_pin(struct gstdemux *filter, const WCHAR *
if (!(pin = heap_alloc_zero(sizeof(*pin))))
return NULL;
- strmbase_source_init(&pin->pin, &GST_OutputPin_Vtbl, &filter->filter, name,
- &source_ops);
+ strmbase_source_init(&pin->pin, &filter->filter, name, &source_ops);
pin->caps_event = CreateEventW(NULL, FALSE, FALSE, NULL);
pin->segment = gst_segment_new();
gst_segment_init(pin->segment, GST_FORMAT_TIME);
diff --git a/dlls/wineqtdecoder/qtsplitter.c b/dlls/wineqtdecoder/qtsplitter.c
index 2b05eefa8f4..03100c7a93e 100644
--- a/dlls/wineqtdecoder/qtsplitter.c
+++ b/dlls/wineqtdecoder/qtsplitter.c
@@ -171,7 +171,6 @@ typedef struct QTSplitter {
HANDLE splitterThread;
} QTSplitter;
-static const IPinVtbl QT_OutputPin_Vtbl;
static const IPinVtbl QT_InputPin_Vtbl;
static const IBaseFilterVtbl QT_Vtbl;
static const IMediaSeekingVtbl QT_Seeking_Vtbl;
@@ -1211,27 +1210,6 @@ static HRESULT WINAPI QTOutPin_DecideAllocator(struct strmbase_source *iface,
return hr;
}
-static const IPinVtbl QT_OutputPin_Vtbl = {
- BasePinImpl_QueryInterface,
- BasePinImpl_AddRef,
- BasePinImpl_Release,
- BaseOutputPinImpl_Connect,
- BaseOutputPinImpl_ReceiveConnection,
- BaseOutputPinImpl_Disconnect,
- BasePinImpl_ConnectedTo,
- BasePinImpl_ConnectionMediaType,
- BasePinImpl_QueryPinInfo,
- BasePinImpl_QueryDirection,
- BasePinImpl_QueryId,
- BasePinImpl_QueryAccept,
- BasePinImpl_EnumMediaTypes,
- BasePinImpl_QueryInternalConnections,
- BaseOutputPinImpl_EndOfStream,
- BaseOutputPinImpl_BeginFlush,
- BaseOutputPinImpl_EndFlush,
- BasePinImpl_NewSegment
-};
-
static inline QTOutPin *impl_from_IQualityControl( IQualityControl *iface )
{
return CONTAINING_RECORD(iface, QTOutPin, IQualityControl_iface);
@@ -1304,8 +1282,7 @@ static HRESULT QT_AddPin(QTSplitter *filter, const WCHAR *name,
else
filter->pAudio_Pin = pin;
- strmbase_source_init(&pin->pin, &QT_OutputPin_Vtbl, &filter->filter, name,
- &source_ops);
+ strmbase_source_init(&pin->pin, &filter->filter, name, &source_ops);
pin->pmt = CoTaskMemAlloc(sizeof(AM_MEDIA_TYPE));
CopyMediaType(pin->pmt, mt);
pin->IQualityControl_iface.lpVtbl = &QTOutPin_QualityControl_Vtbl;
diff --git a/include/wine/strmbase.h b/include/wine/strmbase.h
index 75eac504209..c3699f19253 100644
--- a/include/wine/strmbase.h
+++ b/include/wine/strmbase.h
@@ -113,14 +113,6 @@ HRESULT WINAPI BasePinImpl_EnumMediaTypes(IPin * iface, IEnumMediaTypes ** ppEnu
HRESULT WINAPI BasePinImpl_QueryInternalConnections(IPin * iface, IPin ** apPin, ULONG * cPin);
HRESULT WINAPI BasePinImpl_NewSegment(IPin * iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate);
-/* Base Output Pin */
-HRESULT WINAPI BaseOutputPinImpl_Connect(IPin * iface, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt);
-HRESULT WINAPI BaseOutputPinImpl_ReceiveConnection(IPin * iface, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt);
-HRESULT WINAPI BaseOutputPinImpl_Disconnect(IPin * iface);
-HRESULT WINAPI BaseOutputPinImpl_EndOfStream(IPin * iface);
-HRESULT WINAPI BaseOutputPinImpl_BeginFlush(IPin * iface);
-HRESULT WINAPI BaseOutputPinImpl_EndFlush(IPin * iface);
-
HRESULT WINAPI BaseOutputPinImpl_GetDeliveryBuffer(struct strmbase_source *pin,
IMediaSample **sample, REFERENCE_TIME *start, REFERENCE_TIME *stop, DWORD flags);
HRESULT WINAPI BaseOutputPinImpl_Active(struct strmbase_source *pin);
@@ -130,7 +122,7 @@ HRESULT WINAPI BaseOutputPinImpl_DecideAllocator(struct strmbase_source *pin, IM
HRESULT WINAPI BaseOutputPinImpl_AttemptConnection(struct strmbase_source *pin, IPin *peer, const AM_MEDIA_TYPE *mt);
void strmbase_source_cleanup(struct strmbase_source *pin);
-void strmbase_source_init(struct strmbase_source *pin, const IPinVtbl *vtbl, struct strmbase_filter *filter,
+void strmbase_source_init(struct strmbase_source *pin, struct strmbase_filter *filter,
const WCHAR *name, const struct strmbase_source_ops *func_table);
/* Base Input Pin */
--
2.23.0
Dec. 7, 2019
[PATCH 5/6] qcap/avimux: Use BaseOutputPinImpl_Connect().
by Zebediah Figura
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
dlls/qcap/avimux.c | 58 +++++++++++++++++-----------------------------
1 file changed, 21 insertions(+), 37 deletions(-)
diff --git a/dlls/qcap/avimux.c b/dlls/qcap/avimux.c
index d2f29dbbeb0..677e79ef68f 100644
--- a/dlls/qcap/avimux.c
+++ b/dlls/qcap/avimux.c
@@ -1132,19 +1132,35 @@ static HRESULT source_query_accept(struct strmbase_pin *base, const AM_MEDIA_TYP
return S_OK;
}
-static HRESULT WINAPI AviMuxOut_AttemptConnection(struct strmbase_source *base,
+static HRESULT WINAPI AviMuxOut_AttemptConnection(struct strmbase_source *iface,
IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
{
+ AviMux *filter = impl_from_source_pin(&iface->pin);
PIN_DIRECTION dir;
+ unsigned int i;
HRESULT hr;
- TRACE("(%p)->(%p AM_MEDIA_TYPE(%p))\n", base, pReceivePin, pmt);
-
hr = IPin_QueryDirection(pReceivePin, &dir);
if(hr==S_OK && dir!=PINDIR_INPUT)
return VFW_E_INVALID_DIRECTION;
- return BaseOutputPinImpl_AttemptConnection(base, pReceivePin, pmt);
+ if (FAILED(hr = BaseOutputPinImpl_AttemptConnection(iface, pReceivePin, pmt)))
+ return hr;
+
+ for (i = 0; i < filter->input_pin_no; ++i)
+ {
+ if (!filter->in[i]->pin.pin.peer)
+ continue;
+
+ hr = IFilterGraph_Reconnect(filter->filter.filterInfo.pGraph, &filter->in[i]->pin.pin.IPin_iface);
+ if (FAILED(hr))
+ {
+ IPin_Disconnect(&iface->pin.IPin_iface);
+ break;
+ }
+ }
+
+ return hr;
}
static HRESULT source_get_media_type(struct strmbase_pin *base, unsigned int iPosition, AM_MEDIA_TYPE *amt)
@@ -1201,43 +1217,11 @@ static const struct strmbase_source_ops source_ops =
.pfnDecideAllocator = AviMuxOut_DecideAllocator,
};
-static inline AviMux *impl_from_out_IPin(IPin *iface)
-{
- return CONTAINING_RECORD(iface, AviMux, source.pin.IPin_iface);
-}
-
-static HRESULT WINAPI AviMuxOut_Connect(IPin *iface,
- IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
-{
- AviMux *This = impl_from_out_IPin(iface);
- HRESULT hr;
- int i;
-
- TRACE("(%p)->(%p AM_MEDIA_TYPE(%p))\n", This, pReceivePin, pmt);
-
- hr = BaseOutputPinImpl_Connect(iface, pReceivePin, pmt);
- if(FAILED(hr))
- return hr;
-
- for(i=0; i<This->input_pin_no; i++) {
- if(!This->in[i]->pin.pin.peer)
- continue;
-
- hr = IFilterGraph_Reconnect(This->filter.filterInfo.pGraph, &This->in[i]->pin.pin.IPin_iface);
- if(FAILED(hr)) {
- BaseOutputPinImpl_Disconnect(iface);
- break;
- }
- }
-
- return hr;
-}
-
static const IPinVtbl AviMuxOut_PinVtbl = {
BasePinImpl_QueryInterface,
BasePinImpl_AddRef,
BasePinImpl_Release,
- AviMuxOut_Connect,
+ BaseOutputPinImpl_Connect,
BaseOutputPinImpl_ReceiveConnection,
BaseOutputPinImpl_Disconnect,
BasePinImpl_ConnectedTo,
--
2.23.0
Dec. 7, 2019
[PATCH 4/6] qcap/avimux: Use BaseOutputPinImpl_Disconnect().
by Zebediah Figura
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
dlls/qcap/avimux.c | 17 +----------------
1 file changed, 1 insertion(+), 16 deletions(-)
diff --git a/dlls/qcap/avimux.c b/dlls/qcap/avimux.c
index 645f0b7d5e4..d2f29dbbeb0 100644
--- a/dlls/qcap/avimux.c
+++ b/dlls/qcap/avimux.c
@@ -1230,21 +1230,6 @@ static HRESULT WINAPI AviMuxOut_Connect(IPin *iface,
}
}
- if(hr == S_OK)
- IBaseFilter_AddRef(&This->filter.IBaseFilter_iface);
- return hr;
-}
-
-static HRESULT WINAPI AviMuxOut_Disconnect(IPin *iface)
-{
- AviMux *This = impl_from_out_IPin(iface);
- HRESULT hr;
-
- TRACE("(%p)\n", This);
-
- hr = BaseOutputPinImpl_Disconnect(iface);
- if(hr == S_OK)
- IBaseFilter_Release(&This->filter.IBaseFilter_iface);
return hr;
}
@@ -1254,7 +1239,7 @@ static const IPinVtbl AviMuxOut_PinVtbl = {
BasePinImpl_Release,
AviMuxOut_Connect,
BaseOutputPinImpl_ReceiveConnection,
- AviMuxOut_Disconnect,
+ BaseOutputPinImpl_Disconnect,
BasePinImpl_ConnectedTo,
BasePinImpl_ConnectionMediaType,
BasePinImpl_QueryPinInfo,
--
2.23.0
Dec. 7, 2019
[PATCH 3/6] qcap/avimux: Use BasePinImpl_QueryInterface().
by Zebediah Figura
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
dlls/qcap/avimux.c | 94 +++++++++++++++++++++++-----------------------
1 file changed, 46 insertions(+), 48 deletions(-)
diff --git a/dlls/qcap/avimux.c b/dlls/qcap/avimux.c
index dc28104c80a..645f0b7d5e4 100644
--- a/dlls/qcap/avimux.c
+++ b/dlls/qcap/avimux.c
@@ -1108,6 +1108,24 @@ static const ISpecifyPropertyPagesVtbl SpecifyPropertyPagesVtbl = {
SpecifyPropertyPages_GetPages
};
+static inline AviMux *impl_from_source_pin(struct strmbase_pin *iface)
+{
+ return CONTAINING_RECORD(iface, AviMux, source.pin);
+}
+
+static HRESULT source_query_interface(struct strmbase_pin *iface, REFIID iid, void **out)
+{
+ AviMux *filter = impl_from_source_pin(iface);
+
+ if (IsEqualGUID(iid, &IID_IQualityControl))
+ *out = &filter->IQualityControl_iface;
+ else
+ return E_NOINTERFACE;
+
+ IUnknown_AddRef((IUnknown *)*out);
+ return S_OK;
+}
+
static HRESULT source_query_accept(struct strmbase_pin *base, const AM_MEDIA_TYPE *amt)
{
FIXME("(%p) stub\n", base);
@@ -1176,6 +1194,7 @@ static HRESULT WINAPI AviMuxOut_DecideAllocator(struct strmbase_source *base,
static const struct strmbase_source_ops source_ops =
{
+ .base.pin_query_interface = source_query_interface,
.base.pin_query_accept = source_query_accept,
.base.pin_get_media_type = source_get_media_type,
.pfnAttemptConnection = AviMuxOut_AttemptConnection,
@@ -1187,26 +1206,6 @@ static inline AviMux *impl_from_out_IPin(IPin *iface)
return CONTAINING_RECORD(iface, AviMux, source.pin.IPin_iface);
}
-static HRESULT WINAPI AviMuxOut_QueryInterface(IPin *iface, REFIID riid, void **ppv)
-{
- AviMux *This = impl_from_out_IPin(iface);
-
- TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
-
- if(IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IPin))
- *ppv = iface;
- else if(IsEqualIID(riid, &IID_IQualityControl))
- *ppv = &This->IQualityControl_iface;
- else {
- FIXME("no interface for %s\n", debugstr_guid(riid));
- *ppv = NULL;
- return E_NOINTERFACE;
- }
-
- IUnknown_AddRef((IUnknown*)*ppv);
- return S_OK;
-}
-
static HRESULT WINAPI AviMuxOut_Connect(IPin *iface,
IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
{
@@ -1250,7 +1249,7 @@ static HRESULT WINAPI AviMuxOut_Disconnect(IPin *iface)
}
static const IPinVtbl AviMuxOut_PinVtbl = {
- AviMuxOut_QueryInterface,
+ BasePinImpl_QueryInterface,
BasePinImpl_AddRef,
BasePinImpl_Release,
AviMuxOut_Connect,
@@ -1321,6 +1320,30 @@ static const IQualityControlVtbl AviMuxOut_QualityControlVtbl = {
AviMuxOut_QualityControl_SetSink
};
+static inline AviMuxIn *impl_sink_from_strmbase_pin(struct strmbase_pin *iface)
+{
+ return CONTAINING_RECORD(iface, AviMuxIn, pin.pin.IPin_iface);
+}
+
+static HRESULT sink_query_interface(struct strmbase_pin *iface, REFIID iid, void **out)
+{
+ AviMuxIn *pin = impl_sink_from_strmbase_pin(iface);
+
+ if (IsEqualGUID(iid, &IID_IAMStreamControl))
+ *out = &pin->IAMStreamControl_iface;
+ else if (IsEqualGUID(iid, &IID_IMemInputPin))
+ *out = &pin->pin.IMemInputPin_iface;
+ else if (IsEqualGUID(iid, &IID_IPropertyBag))
+ *out = &pin->IPropertyBag_iface;
+ else if (IsEqualGUID(iid, &IID_IQualityControl))
+ *out = &pin->IQualityControl_iface;
+ else
+ return E_NOINTERFACE;
+
+ IUnknown_AddRef((IUnknown *)*out);
+ return S_OK;
+}
+
static HRESULT sink_query_accept(struct strmbase_pin *base, const AM_MEDIA_TYPE *pmt)
{
if(IsEqualIID(&pmt->majortype, &MEDIATYPE_Audio) &&
@@ -1441,6 +1464,7 @@ static HRESULT WINAPI AviMuxIn_Receive(struct strmbase_sink *base, IMediaSample
static const struct strmbase_sink_ops sink_ops =
{
+ .base.pin_query_interface = sink_query_interface,
.base.pin_query_accept = sink_query_accept,
.base.pin_get_media_type = strmbase_pin_get_media_type,
.pfnReceive = AviMuxIn_Receive,
@@ -1457,32 +1481,6 @@ static inline AviMuxIn* AviMuxIn_from_IPin(IPin *iface)
return CONTAINING_RECORD(iface, AviMuxIn, pin.pin.IPin_iface);
}
-static HRESULT WINAPI AviMuxIn_QueryInterface(IPin *iface, REFIID riid, void **ppv)
-{
- AviMuxIn *avimuxin = AviMuxIn_from_IPin(iface);
-
- TRACE("pin %p, riid %s, ppv %p.\n", avimuxin, debugstr_guid(riid), ppv);
-
- if(IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IPin))
- *ppv = &avimuxin->pin.pin.IPin_iface;
- else if(IsEqualIID(riid, &IID_IAMStreamControl))
- *ppv = &avimuxin->IAMStreamControl_iface;
- else if(IsEqualIID(riid, &IID_IMemInputPin))
- *ppv = &avimuxin->pin.IMemInputPin_iface;
- else if(IsEqualIID(riid, &IID_IPropertyBag))
- *ppv = &avimuxin->IPropertyBag_iface;
- else if(IsEqualIID(riid, &IID_IQualityControl))
- *ppv = &avimuxin->IQualityControl_iface;
- else {
- FIXME("no interface for %s\n", debugstr_guid(riid));
- *ppv = NULL;
- return E_NOINTERFACE;
- }
-
- IUnknown_AddRef((IUnknown*)*ppv);
- return S_OK;
-}
-
static HRESULT WINAPI AviMuxIn_ReceiveConnection(IPin *iface,
IPin *pConnector, const AM_MEDIA_TYPE *pmt)
{
@@ -1576,7 +1574,7 @@ static HRESULT WINAPI AviMuxIn_Disconnect(IPin *iface)
}
static const IPinVtbl AviMuxIn_PinVtbl = {
- AviMuxIn_QueryInterface,
+ BasePinImpl_QueryInterface,
BasePinImpl_AddRef,
BasePinImpl_Release,
BaseInputPinImpl_Connect,
--
2.23.0
Dec. 7, 2019
[PATCH 2/6] wineqtdecoder: Use BasePinImpl_QueryInterface().
by Zebediah Figura
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
dlls/wineqtdecoder/qtsplitter.c | 45 ++++++++++-----------------------
1 file changed, 13 insertions(+), 32 deletions(-)
diff --git a/dlls/wineqtdecoder/qtsplitter.c b/dlls/wineqtdecoder/qtsplitter.c
index 5b1e82ebc9b..2b05eefa8f4 100644
--- a/dlls/wineqtdecoder/qtsplitter.c
+++ b/dlls/wineqtdecoder/qtsplitter.c
@@ -1140,15 +1140,7 @@ static const IPinVtbl QT_InputPin_Vtbl = {
QTInPin_NewSegment
};
-/*
- * Output Pin
- */
-static inline QTOutPin *impl_QTOutPin_from_IPin( IPin *iface )
-{
- return CONTAINING_RECORD(iface, QTOutPin, pin.pin.IPin_iface);
-}
-
-static inline QTOutPin *impl_sink_from_strmbase_pin(struct strmbase_pin *iface)
+static inline QTOutPin *impl_source_from_strmbase_pin(struct strmbase_pin *iface)
{
return CONTAINING_RECORD(iface, QTOutPin, pin.pin);
}
@@ -1158,30 +1150,19 @@ static inline QTOutPin *impl_QTOutPin_from_BaseOutputPin(struct strmbase_source
return CONTAINING_RECORD(iface, QTOutPin, pin);
}
-static HRESULT WINAPI QTOutPin_QueryInterface(IPin *iface, REFIID riid, void **ppv)
+static HRESULT source_query_interface(struct strmbase_pin *iface, REFIID iid, void **out)
{
- QTOutPin *This = impl_QTOutPin_from_IPin(iface);
-
- TRACE("(%s, %p)\n", debugstr_guid(riid), ppv);
-
- *ppv = NULL;
+ QTOutPin *pin = impl_source_from_strmbase_pin(&iface->IPin_iface);
- if (IsEqualIID(riid, &IID_IUnknown))
- *ppv = iface;
- else if (IsEqualIID(riid, &IID_IPin))
- *ppv = iface;
- else if (IsEqualIID(riid, &IID_IMediaSeeking))
- *ppv = &This->sourceSeeking.IMediaSeeking_iface;
- else if (IsEqualIID(riid, &IID_IQualityControl))
- *ppv = &This->IQualityControl_iface;
+ if (IsEqualGUID(iid, &IID_IMediaSeeking))
+ *out = &pin->sourceSeeking.IMediaSeeking_iface;
+ else if (IsEqualGUID(iid, &IID_IQualityControl))
+ *out = &pin->IQualityControl_iface;
+ else
+ return E_NOINTERFACE;
- if (*ppv)
- {
- IUnknown_AddRef((IUnknown *)(*ppv));
- return S_OK;
- }
- FIXME("No interface for %s!\n", debugstr_guid(riid));
- return E_NOINTERFACE;
+ IUnknown_AddRef((IUnknown *)*out);
+ return S_OK;
}
static HRESULT source_query_accept(struct strmbase_pin *base, const AM_MEDIA_TYPE *amt)
@@ -1192,7 +1173,7 @@ static HRESULT source_query_accept(struct strmbase_pin *base, const AM_MEDIA_TYP
static HRESULT source_get_media_type(struct strmbase_pin *iface, unsigned int iPosition, AM_MEDIA_TYPE *pmt)
{
- QTOutPin *This = impl_sink_from_strmbase_pin(iface);
+ QTOutPin *This = impl_source_from_strmbase_pin(iface);
if (iPosition > 0)
return VFW_S_NO_MORE_ITEMS;
@@ -1231,7 +1212,7 @@ static HRESULT WINAPI QTOutPin_DecideAllocator(struct strmbase_source *iface,
}
static const IPinVtbl QT_OutputPin_Vtbl = {
- QTOutPin_QueryInterface,
+ BasePinImpl_QueryInterface,
BasePinImpl_AddRef,
BasePinImpl_Release,
BaseOutputPinImpl_Connect,
--
2.23.0
Dec. 7, 2019
[PATCH 1/6] winegstreamer: Use BasePinImpl_QueryInterface().
by Zebediah Figura
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
dlls/winegstreamer/gstdemux.c | 63 ++++++++---------------------------
1 file changed, 13 insertions(+), 50 deletions(-)
diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c
index 78c8e38701a..04fb54915c6 100644
--- a/dlls/winegstreamer/gstdemux.c
+++ b/dlls/winegstreamer/gstdemux.c
@@ -1735,29 +1735,19 @@ static inline struct gstdemux_source *impl_source_from_IPin(IPin *iface)
return CONTAINING_RECORD(iface, struct gstdemux_source, pin.pin.IPin_iface);
}
-static HRESULT WINAPI GSTOutPin_QueryInterface(IPin *iface, REFIID riid, void **ppv)
+static HRESULT source_query_interface(struct strmbase_pin *iface, REFIID iid, void **out)
{
- struct gstdemux_source *This = impl_source_from_IPin(iface);
+ struct gstdemux_source *pin = impl_source_from_IPin(&iface->IPin_iface);
- TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), ppv);
-
- *ppv = NULL;
-
- if (IsEqualIID(riid, &IID_IUnknown))
- *ppv = iface;
- else if (IsEqualIID(riid, &IID_IPin))
- *ppv = iface;
- else if (IsEqualIID(riid, &IID_IMediaSeeking))
- *ppv = &This->seek;
- else if (IsEqualIID(riid, &IID_IQualityControl))
- *ppv = &This->IQualityControl_iface;
+ if (IsEqualGUID(iid, &IID_IMediaSeeking))
+ *out = &pin->seek.IMediaSeeking_iface;
+ else if (IsEqualGUID(iid, &IID_IQualityControl))
+ *out = &pin->IQualityControl_iface;
+ else
+ return E_NOINTERFACE;
- if (*ppv) {
- IUnknown_AddRef((IUnknown *)(*ppv));
- return S_OK;
- }
- FIXME("No interface for %s!\n", debugstr_guid(riid));
- return E_NOINTERFACE;
+ IUnknown_AddRef((IUnknown *)*out);
+ return S_OK;
}
static HRESULT source_query_accept(struct strmbase_pin *base, const AM_MEDIA_TYPE *amt)
@@ -1847,7 +1837,7 @@ static void free_source_pin(struct gstdemux_source *pin)
}
static const IPinVtbl GST_OutputPin_Vtbl = {
- GSTOutPin_QueryInterface,
+ BasePinImpl_QueryInterface,
BasePinImpl_AddRef,
BasePinImpl_Release,
BaseOutputPinImpl_Connect,
@@ -1869,6 +1859,7 @@ static const IPinVtbl GST_OutputPin_Vtbl = {
static const struct strmbase_source_ops source_ops =
{
+ .base.pin_query_interface = source_query_interface,
.base.pin_query_accept = source_query_accept,
.base.pin_get_media_type = source_get_media_type,
.pfnAttemptConnection = BaseOutputPinImpl_AttemptConnection,
@@ -2071,36 +2062,8 @@ static HRESULT WINAPI GSTInPin_NewSegment(IPin *iface, REFERENCE_TIME start,
return S_OK;
}
-static HRESULT WINAPI GSTInPin_QueryInterface(IPin * iface, REFIID riid, LPVOID * ppv)
-{
- struct gstdemux *filter = impl_from_sink_IPin(iface);
-
- TRACE("filter %p, riid %s, ppv %p.\n", filter, debugstr_guid(riid), ppv);
-
- *ppv = NULL;
-
- if (IsEqualIID(riid, &IID_IUnknown))
- *ppv = iface;
- else if (IsEqualIID(riid, &IID_IPin))
- *ppv = iface;
- else if (IsEqualIID(riid, &IID_IMediaSeeking))
- {
- return IBaseFilter_QueryInterface(&filter->filter.IBaseFilter_iface, &IID_IMediaSeeking, ppv);
- }
-
- if (*ppv)
- {
- IUnknown_AddRef((IUnknown *)(*ppv));
- return S_OK;
- }
-
- FIXME("No interface for %s!\n", debugstr_guid(riid));
-
- return E_NOINTERFACE;
-}
-
static const IPinVtbl GST_InputPin_Vtbl = {
- GSTInPin_QueryInterface,
+ BasePinImpl_QueryInterface,
BasePinImpl_AddRef,
BasePinImpl_Release,
BaseInputPinImpl_Connect,
--
2.23.0
Dec. 7, 2019
Re: [PATCH v3 3/3] xmllite: Expand test for any unparsed data at end of XML.
by Nikolay Sivov
On 12/7/19 12:24 AM, Jeff Smith wrote:
> On Fri, Dec 6, 2019 at 11:16 AM Nikolay Sivov <nsivov(a)codeweavers.com> wrote:
>> On 12/5/19 10:53 PM, Jeff Smith wrote:
>>> @@ -2662,7 +2663,7 @@ static HRESULT reader_parse_nextnode(xmlreader *reader)
>>> hr = reader_parse_misc(reader);
>>> if (hr != S_FALSE) return hr;
>>>
>>> - if (*reader_get_ptr(reader))
>>> + if (buffer->cur*sizeof(WCHAR) < buffer->written)
>>> {
>>> WARN("found garbage in the end of XML\n");
>>> return WC_E_SYNTAX;
> Hi Nikolay,
>
>> That means we don't have enough data,
> How do you figure that?
>
>> it's another change not backed by tests
> This fixes two tests, and does not break any others.
>
>> and potentially depending on current read-ahead buffer size/filled level.
> I'm pretty sure reader_parse_misc would have read at least one byte
> ahead, which is all that is required for this to trigger, though I
> could double-check that.
> However, to your point made in the patch 2 of the set about not
> exposing the buffer at this level, I will also consider this something
> that potentially needs to be handled elsewhere.
My point is that we should always hit this single invalid syntax/garbage
at the end condition that we already have,
instead of doing fixups for specific node types.
>
> Regards,
> Jeff
Dec. 6, 2019
[PATCH 3/3] kernel32/tests: Test invalid parent handle in test_parent_process_attribute().
by Paul Gofman
Signed-off-by: Paul Gofman <gofmanp(a)gmail.com>
---
dlls/kernel32/tests/process.c | 87 ++++++++++++++++++++++++++++++++++-
1 file changed, 86 insertions(+), 1 deletion(-)
diff --git a/dlls/kernel32/tests/process.c b/dlls/kernel32/tests/process.c
index 6d7a9a74c3..b8df8b8dce 100644
--- a/dlls/kernel32/tests/process.c
+++ b/dlls/kernel32/tests/process.c
@@ -3825,7 +3825,8 @@ static void test_ProcThreadAttributeList(void)
/* level 0: Main test process
* level 1: Process created by level 0 process without handle inheritance
* level 2: Process created by level 1 process with handle inheritance and level 0
- * process parent substitute. */
+ * process parent substitute.
+ * level 255: Process created by level 1 process during invalid parent handles testing. */
void test_parent_process_attribute(unsigned int level, HANDLE read_pipe)
{
PROCESS_BASIC_INFORMATION pbi;
@@ -3848,6 +3849,9 @@ void test_parent_process_attribute(unsigned int level, HANDLE read_pipe)
}
parent_data;
+ if (level == 255)
+ return;
+
if (!pInitializeProcThreadAttributeList)
{
win_skip("No support for ProcThreadAttributeList.\n");
@@ -3891,11 +3895,92 @@ void test_parent_process_attribute(unsigned int level, HANDLE read_pipe)
if (level)
{
+ HANDLE handle;
SIZE_T size;
ret = pInitializeProcThreadAttributeList(NULL, 1, 0, &size);
ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER,
"Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError());
+
+ sprintf(buffer, "\"%s\" tests/process.c parent %u %p %p", selfname, 255, read_pipe, NULL);
+
+#if 0
+ /* Crashes on some Windows installations, otherwise successfully creates process. */
+ ret = CreateProcessA(NULL, buffer, NULL, NULL, FALSE, EXTENDED_STARTUPINFO_PRESENT,
+ NULL, NULL, (STARTUPINFOA *)&si, &info);
+ ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError());
+ ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n");
+ CloseHandle(info.hThread);
+ CloseHandle(info.hProcess);
+#endif
+ si.lpAttributeList = heap_alloc(size);
+ ret = pInitializeProcThreadAttributeList(si.lpAttributeList, 1, 0, &size);
+ ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError());
+ handle = INVALID_HANDLE_VALUE;
+ ret = pUpdateProcThreadAttribute(si.lpAttributeList, 0, PROC_THREAD_ATTRIBUTE_PARENT_PROCESS,
+ &handle, sizeof(handle), NULL, NULL);
+ ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError());
+ ret = CreateProcessA(NULL, buffer, NULL, NULL, TRUE, EXTENDED_STARTUPINFO_PRESENT,
+ NULL, NULL, (STARTUPINFOA *)&si, &info);
+ /* Broken on w7u/w8. */
+ ok((!ret && GetLastError() == ERROR_INVALID_HANDLE) || broken(ret),
+ "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError());
+ if (ret)
+ {
+ ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n");
+ CloseHandle(info.hThread);
+ CloseHandle(info.hProcess);
+ }
+ pDeleteProcThreadAttributeList(si.lpAttributeList);
+ heap_free(si.lpAttributeList);
+
+ si.lpAttributeList = heap_alloc(size);
+ ret = pInitializeProcThreadAttributeList(si.lpAttributeList, 1, 0, &size);
+ ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError());
+ handle = (HANDLE)0xdeadbeef;
+ ret = pUpdateProcThreadAttribute(si.lpAttributeList, 0, PROC_THREAD_ATTRIBUTE_PARENT_PROCESS,
+ &handle, sizeof(handle), NULL, NULL);
+ ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError());
+ ret = CreateProcessA(NULL, buffer, NULL, NULL, TRUE, EXTENDED_STARTUPINFO_PRESENT,
+ NULL, NULL, (STARTUPINFOA *)&si, &info);
+ ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError());
+ pDeleteProcThreadAttributeList(si.lpAttributeList);
+ heap_free(si.lpAttributeList);
+
+ si.lpAttributeList = heap_alloc(size);
+ ret = pInitializeProcThreadAttributeList(si.lpAttributeList, 1, 0, &size);
+ ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError());
+ handle = NULL;
+ ret = pUpdateProcThreadAttribute(si.lpAttributeList, 0, PROC_THREAD_ATTRIBUTE_PARENT_PROCESS,
+ &handle, sizeof(handle), NULL, NULL);
+ ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError());
+ ret = CreateProcessA(NULL, buffer, NULL, NULL, TRUE, EXTENDED_STARTUPINFO_PRESENT,
+ NULL, NULL, (STARTUPINFOA *)&si, &info);
+ ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError());
+ pDeleteProcThreadAttributeList(si.lpAttributeList);
+ heap_free(si.lpAttributeList);
+
+ si.lpAttributeList = heap_alloc(size);
+ ret = pInitializeProcThreadAttributeList(si.lpAttributeList, 1, 0, &size);
+ ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError());
+ handle = GetCurrentProcess();
+ ret = pUpdateProcThreadAttribute(si.lpAttributeList, 0, PROC_THREAD_ATTRIBUTE_PARENT_PROCESS,
+ &handle, sizeof(handle), NULL, NULL);
+ ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError());
+ ret = CreateProcessA(NULL, buffer, NULL, NULL, TRUE, EXTENDED_STARTUPINFO_PRESENT,
+ NULL, NULL, (STARTUPINFOA *)&si, &info);
+ /* Broken on w7u/w8. */
+ ok((!ret && GetLastError() == ERROR_INVALID_HANDLE) || broken(ret),
+ "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError());
+ if (ret)
+ {
+ ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n");
+ CloseHandle(info.hThread);
+ CloseHandle(info.hProcess);
+ }
+ pDeleteProcThreadAttributeList(si.lpAttributeList);
+ heap_free(si.lpAttributeList);
+
si.lpAttributeList = heap_alloc(size);
ret = pInitializeProcThreadAttributeList(si.lpAttributeList, 1, 0, &size);
ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError());
--
2.23.0
Dec. 6, 2019
[PATCH 2/3] ntdll: Support creating processes with specified parent.
by Paul Gofman
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47817
Signed-off-by: Paul Gofman <gofmanp(a)gmail.com>
---
dlls/kernel32/tests/process.c | 4 ++--
dlls/ntdll/process.c | 11 +++++++++--
include/wine/server_protocol.h | 4 +++-
server/process.c | 30 ++++++++++++++++++++++++------
server/protocol.def | 1 +
server/request.h | 17 +++++++++--------
server/trace.c | 3 ++-
7 files changed, 50 insertions(+), 20 deletions(-)
diff --git a/dlls/kernel32/tests/process.c b/dlls/kernel32/tests/process.c
index 3efbfa2402..6d7a9a74c3 100644
--- a/dlls/kernel32/tests/process.c
+++ b/dlls/kernel32/tests/process.c
@@ -3874,14 +3874,14 @@ void test_parent_process_attribute(unsigned int level, HANDLE read_pipe)
memset(&parent_data, 0, sizeof(parent_data));
ret = ReadFile(read_pipe, &parent_data, sizeof(parent_data), &size, NULL);
- todo_wine_if(level == 2) ok((level == 2 && ret) || (level == 1 && !ret && GetLastError() == ERROR_INVALID_HANDLE),
+ ok((level == 2 && ret) || (level == 1 && !ret && GetLastError() == ERROR_INVALID_HANDLE),
"Got unexpected ret %#x, level %u, GetLastError() %u.\n",
ret, level, GetLastError());
}
if (level == 2)
{
- todo_wine ok(parent_id == parent_data.parent_id, "Got parent id %u, parent_data.parent_id %u.\n",
+ ok(parent_id == parent_data.parent_id, "Got parent id %u, parent_data.parent_id %u.\n",
parent_id, parent_data.parent_id);
return;
}
diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c
index 52d7ea429e..5d75a27e97 100644
--- a/dlls/ntdll/process.c
+++ b/dlls/ntdll/process.c
@@ -1667,8 +1667,14 @@ NTSTATUS WINAPI RtlCreateUserProcess( UNICODE_STRING *path, ULONG attributes,
RtlNormalizeProcessParams( params );
- TRACE( "%s image %s cmdline %s\n", debugstr_us( path ),
- debugstr_us( ¶ms->ImagePathName ), debugstr_us( ¶ms->CommandLine ));
+ TRACE( "%s image %s cmdline %s, parent %p.\n", debugstr_us( path ),
+ debugstr_us( ¶ms->ImagePathName ), debugstr_us( ¶ms->CommandLine ), parent);
+
+ if (parent == INVALID_HANDLE_VALUE)
+ {
+ memset(info, 0, sizeof(*info));
+ return STATUS_INVALID_HANDLE;
+ }
if ((status = get_pe_file_info( path, attributes, &file_handle, &pe_info )))
{
@@ -1709,6 +1715,7 @@ NTSTATUS WINAPI RtlCreateUserProcess( UNICODE_STRING *path, ULONG attributes,
SERVER_START_REQ( new_process )
{
+ req->parent_process = wine_server_obj_handle(parent);
req->inherit_all = inherit;
req->create_flags = params->DebugFlags; /* hack: creation flags stored in DebugFlags for now */
req->socket_fd = socketfd[1];
diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h
index aaa5fd2e33..98ecd98b08 100644
--- a/include/wine/server_protocol.h
+++ b/include/wine/server_protocol.h
@@ -769,6 +769,7 @@ struct rawinput_device
struct new_process_request
{
struct request_header __header;
+ obj_handle_t parent_process;
int inherit_all;
unsigned int create_flags;
int socket_fd;
@@ -779,6 +780,7 @@ struct new_process_request
/* VARARG(objattr,object_attributes); */
/* VARARG(info,startup_info,info_size); */
/* VARARG(env,unicode_str); */
+ char __pad_44[4];
};
struct new_process_reply
{
@@ -6702,6 +6704,6 @@ union generic_reply
struct resume_process_reply resume_process_reply;
};
-#define SERVER_PROTOCOL_VERSION 593
+#define SERVER_PROTOCOL_VERSION 594
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */
diff --git a/server/process.c b/server/process.c
index 16bb5d57e7..195f54fa79 100644
--- a/server/process.c
+++ b/server/process.c
@@ -1117,6 +1117,7 @@ DECL_HANDLER(new_process)
const struct object_attributes *objattr = get_req_object_attributes( &sd, &name, NULL );
struct process *process = NULL;
struct process *parent = current->process;
+ struct thread *parent_thread = current;
int socket_fd = thread_get_inflight_fd( current, req->socket_fd );
if (socket_fd == -1)
@@ -1148,11 +1149,26 @@ DECL_HANDLER(new_process)
return;
}
+ if (req->parent_process)
+ {
+ if (!(parent = get_process_from_handle( req->parent_process, PROCESS_CREATE_PROCESS)))
+ {
+ set_error(STATUS_INVALID_HANDLE);
+ close(socket_fd);
+ return;
+ }
+ parent_thread = get_process_first_thread(parent);
+ }
+
if (parent->job && (req->create_flags & CREATE_BREAKAWAY_FROM_JOB) &&
!(parent->job->limit_flags & (JOB_OBJECT_LIMIT_BREAKAWAY_OK | JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK)))
{
set_error( STATUS_ACCESS_DENIED );
close( socket_fd );
+
+ if (req->parent_process)
+ release_object(parent);
+
return;
}
@@ -1222,7 +1238,7 @@ DECL_HANDLER(new_process)
}
/* connect to the window station */
- connect_process_winstation( process, current );
+ connect_process_winstation( process, parent_thread );
/* set the process console */
if (!(req->create_flags & (DETACHED_PROCESS | CREATE_NEW_CONSOLE)))
@@ -1231,7 +1247,7 @@ DECL_HANDLER(new_process)
* like if hConOut and hConIn are console handles, then they should be on the same
* physical console
*/
- inherit_console( current, process, req->inherit_all ? info->data->hstdin : 0 );
+ inherit_console( parent_thread, process, req->inherit_all ? info->data->hstdin : 0 );
}
if (!req->inherit_all && !(req->create_flags & CREATE_NEW_CONSOLE))
@@ -1246,16 +1262,15 @@ DECL_HANDLER(new_process)
if (get_error() == STATUS_INVALID_HANDLE ||
get_error() == STATUS_OBJECT_TYPE_MISMATCH) clear_error();
}
-
/* attach to the debugger if requested */
if (req->create_flags & (DEBUG_PROCESS | DEBUG_ONLY_THIS_PROCESS))
{
set_process_debugger( process, current );
process->debug_children = !(req->create_flags & DEBUG_ONLY_THIS_PROCESS);
}
- else if (parent->debugger && parent->debug_children)
+ else if (current->process->debugger && current->process->debug_children)
{
- set_process_debugger( process, parent->debugger );
+ set_process_debugger( process, current->process->debugger );
/* debug_children is set to 1 by default */
}
@@ -1265,9 +1280,12 @@ DECL_HANDLER(new_process)
info->process = (struct process *)grab_object( process );
reply->info = alloc_handle( current->process, info, SYNCHRONIZE, 0 );
reply->pid = get_process_id( process );
- reply->handle = alloc_handle_no_access_check( parent, process, req->access, objattr->attributes );
+ reply->handle = alloc_handle_no_access_check( current->process, process, req->access, objattr->attributes );
done:
+ if (req->parent_process)
+ release_object(parent);
+
if (process) release_object( process );
release_object( info );
}
diff --git a/server/protocol.def b/server/protocol.def
index 1cb1fea602..7f9ec3a149 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -783,6 +783,7 @@ struct rawinput_device
/* Create a new process from the context of the parent */
@REQ(new_process)
+ obj_handle_t parent_process; /* parent process */
int inherit_all; /* inherit all handles from parent */
unsigned int create_flags; /* creation flags */
int socket_fd; /* file descriptor for process socket */
diff --git a/server/request.h b/server/request.h
index 90a3180a6c..9f36bcb711 100644
--- a/server/request.h
+++ b/server/request.h
@@ -745,14 +745,15 @@ C_ASSERT( sizeof(unsigned char) == 1 );
C_ASSERT( sizeof(unsigned int) == 4 );
C_ASSERT( sizeof(unsigned short) == 2 );
C_ASSERT( sizeof(user_handle_t) == 4 );
-C_ASSERT( FIELD_OFFSET(struct new_process_request, inherit_all) == 12 );
-C_ASSERT( FIELD_OFFSET(struct new_process_request, create_flags) == 16 );
-C_ASSERT( FIELD_OFFSET(struct new_process_request, socket_fd) == 20 );
-C_ASSERT( FIELD_OFFSET(struct new_process_request, exe_file) == 24 );
-C_ASSERT( FIELD_OFFSET(struct new_process_request, access) == 28 );
-C_ASSERT( FIELD_OFFSET(struct new_process_request, cpu) == 32 );
-C_ASSERT( FIELD_OFFSET(struct new_process_request, info_size) == 36 );
-C_ASSERT( sizeof(struct new_process_request) == 40 );
+C_ASSERT( FIELD_OFFSET(struct new_process_request, parent_process) == 12 );
+C_ASSERT( FIELD_OFFSET(struct new_process_request, inherit_all) == 16 );
+C_ASSERT( FIELD_OFFSET(struct new_process_request, create_flags) == 20 );
+C_ASSERT( FIELD_OFFSET(struct new_process_request, socket_fd) == 24 );
+C_ASSERT( FIELD_OFFSET(struct new_process_request, exe_file) == 28 );
+C_ASSERT( FIELD_OFFSET(struct new_process_request, access) == 32 );
+C_ASSERT( FIELD_OFFSET(struct new_process_request, cpu) == 36 );
+C_ASSERT( FIELD_OFFSET(struct new_process_request, info_size) == 40 );
+C_ASSERT( sizeof(struct new_process_request) == 48 );
C_ASSERT( FIELD_OFFSET(struct new_process_reply, info) == 8 );
C_ASSERT( FIELD_OFFSET(struct new_process_reply, pid) == 12 );
C_ASSERT( FIELD_OFFSET(struct new_process_reply, handle) == 16 );
diff --git a/server/trace.c b/server/trace.c
index 411369a4f6..026aba9c50 100644
--- a/server/trace.c
+++ b/server/trace.c
@@ -1243,7 +1243,8 @@ typedef void (*dump_func)( const void *req );
static void dump_new_process_request( const struct new_process_request *req )
{
- fprintf( stderr, " inherit_all=%d", req->inherit_all );
+ fprintf( stderr, " parent_process=%04x", req->parent_process );
+ fprintf( stderr, ", inherit_all=%d", req->inherit_all );
fprintf( stderr, ", create_flags=%08x", req->create_flags );
fprintf( stderr, ", socket_fd=%d", req->socket_fd );
fprintf( stderr, ", exe_file=%04x", req->exe_file );
--
2.23.0
Dec. 6, 2019
[PATCH 1/3] kernelbase: Support PROC_THREAD_ATTRIBUTE_PARENT_PROCESS in CreateProcessInternalW().
by Paul Gofman
Signed-off-by: Paul Gofman <gofmanp(a)gmail.com>
---
dlls/kernelbase/process.c | 85 ++++++++++++++++++++++++++-------------
1 file changed, 56 insertions(+), 29 deletions(-)
diff --git a/dlls/kernelbase/process.c b/dlls/kernelbase/process.c
index 90ea299416..ec034aa75d 100644
--- a/dlls/kernelbase/process.c
+++ b/dlls/kernelbase/process.c
@@ -244,7 +244,7 @@ static RTL_USER_PROCESS_PARAMETERS *create_process_params( const WCHAR *filename
*/
static NTSTATUS create_nt_process( SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTES *tsa,
BOOL inherit, DWORD flags, RTL_USER_PROCESS_PARAMETERS *params,
- RTL_USER_PROCESS_INFORMATION *info )
+ RTL_USER_PROCESS_INFORMATION *info, HANDLE parent )
{
NTSTATUS status;
UNICODE_STRING nameW;
@@ -257,7 +257,7 @@ static NTSTATUS create_nt_process( SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTES
status = RtlCreateUserProcess( &nameW, OBJ_CASE_INSENSITIVE, params,
psa ? psa->lpSecurityDescriptor : NULL,
tsa ? tsa->lpSecurityDescriptor : NULL,
- 0, inherit, 0, 0, info );
+ parent, inherit, 0, 0, info );
RtlFreeUnicodeString( &nameW );
}
return status;
@@ -288,7 +288,7 @@ static NTSTATUS create_vdm_process( SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTE
winevdm, params->ImagePathName.Buffer, params->CommandLine.Buffer );
RtlInitUnicodeString( ¶ms->ImagePathName, winevdm );
RtlInitUnicodeString( ¶ms->CommandLine, newcmdline );
- status = create_nt_process( psa, tsa, inherit, flags, params, info );
+ status = create_nt_process( psa, tsa, inherit, flags, params, info, NULL );
HeapFree( GetProcessHeap(), 0, newcmdline );
return status;
}
@@ -316,7 +316,7 @@ static NTSTATUS create_cmd_process( SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTE
swprintf( newcmdline, len, L"%s /s/c \"%s\"", comspec, params->CommandLine.Buffer );
RtlInitUnicodeString( ¶ms->ImagePathName, comspec );
RtlInitUnicodeString( ¶ms->CommandLine, newcmdline );
- status = create_nt_process( psa, tsa, inherit, flags, params, info );
+ status = create_nt_process( psa, tsa, inherit, flags, params, info, NULL );
RtlFreeHeap( GetProcessHeap(), 0, newcmdline );
return status;
}
@@ -368,7 +368,6 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessAsUserW( HANDLE token, const WCHAR *a
inherit, flags, env, cur_dir, startup_info, info, NULL );
}
-
/**********************************************************************
* CreateProcessInternalA (kernelbase.@)
*/
@@ -382,7 +381,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessInternalA( HANDLE token, const char *
BOOL ret = FALSE;
WCHAR *app_nameW = NULL, *cmd_lineW = NULL, *cur_dirW = NULL;
UNICODE_STRING desktopW, titleW;
- STARTUPINFOW infoW;
+ STARTUPINFOEXW infoW;
desktopW.Buffer = NULL;
titleW.Buffer = NULL;
@@ -393,12 +392,15 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessInternalA( HANDLE token, const char *
if (startup_info->lpDesktop) RtlCreateUnicodeStringFromAsciiz( &desktopW, startup_info->lpDesktop );
if (startup_info->lpTitle) RtlCreateUnicodeStringFromAsciiz( &titleW, startup_info->lpTitle );
- memcpy( &infoW, startup_info, sizeof(infoW) );
- infoW.lpDesktop = desktopW.Buffer;
- infoW.lpTitle = titleW.Buffer;
+ memcpy( &infoW.StartupInfo, startup_info, sizeof(infoW.StartupInfo) );
+ infoW.StartupInfo.lpDesktop = desktopW.Buffer;
+ infoW.StartupInfo.lpTitle = titleW.Buffer;
+
+ if (flags & EXTENDED_STARTUPINFO_PRESENT)
+ infoW.lpAttributeList = ((STARTUPINFOEXW *)startup_info)->lpAttributeList;
ret = CreateProcessInternalW( token, app_nameW, cmd_lineW, process_attr, thread_attr,
- inherit, flags, env, cur_dirW, &infoW, info, new_token );
+ inherit, flags, env, cur_dirW, (STARTUPINFOW *)&infoW, info, new_token );
done:
RtlFreeHeap( GetProcessHeap(), 0, app_nameW );
RtlFreeHeap( GetProcessHeap(), 0, cmd_lineW );
@@ -408,6 +410,22 @@ done:
return ret;
}
+struct proc_thread_attr
+{
+ DWORD_PTR attr;
+ SIZE_T size;
+ void *value;
+};
+
+struct _PROC_THREAD_ATTRIBUTE_LIST
+{
+ DWORD mask; /* bitmask of items in list */
+ DWORD size; /* max number of items in list */
+ DWORD count; /* number of items in list */
+ DWORD pad;
+ DWORD_PTR unk;
+ struct proc_thread_attr attrs[1];
+};
/**********************************************************************
* CreateProcessInternalW (kernelbase.@)
@@ -423,6 +441,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessInternalW( HANDLE token, const WCHAR
WCHAR *p, *tidy_cmdline = cmd_line;
RTL_USER_PROCESS_PARAMETERS *params = NULL;
RTL_USER_PROCESS_INFORMATION rtl_info;
+ HANDLE parent = NULL;
NTSTATUS status;
/* Process the AppName and/or CmdLine to get module name and path */
@@ -473,7 +492,33 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessInternalW( HANDLE token, const WCHAR
goto done;
}
- status = create_nt_process( process_attr, thread_attr, inherit, flags, params, &rtl_info );
+ if (flags & EXTENDED_STARTUPINFO_PRESENT)
+ {
+ struct _PROC_THREAD_ATTRIBUTE_LIST *attrs =
+ (struct _PROC_THREAD_ATTRIBUTE_LIST *)((STARTUPINFOEXW *)startup_info)->lpAttributeList;
+ unsigned int i;
+
+ if (attrs)
+ {
+ for (i = 0; i < attrs->count; ++i)
+ {
+ switch(attrs->attrs[i].attr)
+ {
+ case PROC_THREAD_ATTRIBUTE_PARENT_PROCESS:
+ parent = *(HANDLE *)attrs->attrs[i].value;
+ TRACE("PROC_THREAD_ATTRIBUTE_PARENT_PROCESS parent %p.\n", parent);
+ if (!parent)
+ parent = INVALID_HANDLE_VALUE;
+ break;
+ default:
+ FIXME("Unsupported attribute %#lx.\n", attrs->attrs[i].attr);
+ break;
+ }
+ }
+ }
+ }
+
+ status = create_nt_process( process_attr, thread_attr, inherit, flags, params, &rtl_info, parent );
switch (status)
{
case STATUS_SUCCESS:
@@ -1301,24 +1346,6 @@ BOOL WINAPI DECLSPEC_HOTPATCH SetEnvironmentVariableW( LPCWSTR name, LPCWSTR val
* Process/thread attribute lists
***********************************************************************/
-
-struct proc_thread_attr
-{
- DWORD_PTR attr;
- SIZE_T size;
- void *value;
-};
-
-struct _PROC_THREAD_ATTRIBUTE_LIST
-{
- DWORD mask; /* bitmask of items in list */
- DWORD size; /* max number of items in list */
- DWORD count; /* number of items in list */
- DWORD pad;
- DWORD_PTR unk;
- struct proc_thread_attr attrs[1];
-};
-
/***********************************************************************
* InitializeProcThreadAttributeList (kernelbase.@)
*/
--
2.23.0
Dec. 6, 2019
Re: [PATCH v3 3/3] xmllite: Expand test for any unparsed data at end of XML.
by Jeff Smith
On Fri, Dec 6, 2019 at 11:16 AM Nikolay Sivov <nsivov(a)codeweavers.com> wrote:
>
> On 12/5/19 10:53 PM, Jeff Smith wrote:
> > @@ -2662,7 +2663,7 @@ static HRESULT reader_parse_nextnode(xmlreader *reader)
> > hr = reader_parse_misc(reader);
> > if (hr != S_FALSE) return hr;
> >
> > - if (*reader_get_ptr(reader))
> > + if (buffer->cur*sizeof(WCHAR) < buffer->written)
> > {
> > WARN("found garbage in the end of XML\n");
> > return WC_E_SYNTAX;
Hi Nikolay,
> That means we don't have enough data,
How do you figure that?
> it's another change not backed by tests
This fixes two tests, and does not break any others.
> and potentially depending on current read-ahead buffer size/filled level.
I'm pretty sure reader_parse_misc would have read at least one byte
ahead, which is all that is required for this to trigger, though I
could double-check that.
However, to your point made in the patch 2 of the set about not
exposing the buffer at this level, I will also consider this something
that potentially needs to be handled elsewhere.
Regards,
Jeff
Dec. 6, 2019
Re: [PATCH v3 2/3] xmllite: Whitespace node not returned when followed by invalid character.
by Jeff Smith
On Fri, Dec 6, 2019 at 11:13 AM Nikolay Sivov <nsivov(a)codeweavers.com> wrote:
>
> On 12/5/19 10:53 PM, Jeff Smith wrote:
> > Signed-off-by: Jeff Smith <whydoubt(a)gmail.com>
> > ---
> > dlls/xmllite/reader.c | 12 ++++++++++--
> > dlls/xmllite/tests/reader.c | 2 --
> > 2 files changed, 10 insertions(+), 4 deletions(-)
> >
> > diff --git a/dlls/xmllite/reader.c b/dlls/xmllite/reader.c
> > index eddc4d8eec..79e5c2253a 100644
> > --- a/dlls/xmllite/reader.c
> > +++ b/dlls/xmllite/reader.c
> > @@ -1113,8 +1113,8 @@ static inline UINT reader_get_cur(xmlreader *reader)
> > static inline WCHAR *reader_get_ptr(xmlreader *reader)
> > {
> > encoded_buffer *buffer = &reader->input->buffer->utf16;
> > - WCHAR *ptr = (WCHAR*)buffer->data + buffer->cur;
> > - if (!*ptr) reader_more(reader);
> > + if (buffer->cur*sizeof(WCHAR) >= buffer->written)
> > + reader_more(reader);
> > return (WCHAR*)buffer->data + buffer->cur;
> > }
Hi Nikolay,
> Why do you need to change that? It's used everywhere.
Since the test is fixed even without this, I will probably take this
chunk out of this patch set.
> >
> > @@ -1714,8 +1714,16 @@ static HRESULT reader_parse_whitespace(xmlreader *reader)
> > {
> > strval value;
> > UINT start;
> > + const encoded_buffer *buffer = &reader->input->buffer->utf16;
> >
> > reader_skipspaces(reader);
> > +
> > + /* Do NOT return Whitespace node if followed by a character other than '<'.
> > + * The reader_skipspaces call should have already read in the character. */
> > + if (buffer->cur*sizeof(WCHAR) < buffer->written &&
> > + *reader_get_ptr2(reader, buffer->cur) != '<')
> > + return WC_E_SYNTAX;
> > +
> Buffer access should not be exposed like that.
OK, I will try to improve where that is handled. Though that could
potentially entail changing more things that are used everywhere.
Regards,
Jeff
Dec. 6, 2019
Winter is coming
by Alexandre Julliard
Folks,
As you are probably aware, we are now entering the code freeze season.
The plan is to start the code freeze after the next release, i.e. one
week from today. So if there are things you want to see in Wine 5.0, now
is the last moment to submit them...
--
Alexandre Julliard
julliard(a)winehq.org
Dec. 6, 2019
[PATCH 3/3] wined3d: Unload resources in wined3d_device_uninit_3d().
by Henri Verbeet
Instead of in wined3d_device_delete_opengl_contexts_cs(), which is specific to
the GL backend.
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
dlls/wined3d/device.c | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 90c08876505..0ae841d4e35 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -939,7 +939,6 @@ static void device_init_swapchain_state(struct wined3d_device *device, struct wi
void wined3d_device_delete_opengl_contexts_cs(void *object)
{
- struct wined3d_resource *resource, *cursor;
struct wined3d_swapchain_gl *swapchain_gl;
struct wined3d_device *device = object;
struct wined3d_context_gl *context_gl;
@@ -949,12 +948,6 @@ void wined3d_device_delete_opengl_contexts_cs(void *object)
device_gl = wined3d_device_gl(device);
- LIST_FOR_EACH_ENTRY_SAFE(resource, cursor, &device->resources, struct wined3d_resource, resource_list_entry)
- {
- TRACE("Unloading resource %p.\n", resource);
- wined3d_cs_emit_unload_resource(device->cs, resource);
- }
-
LIST_FOR_EACH_ENTRY(shader, &device->shaders, struct wined3d_shader, shader_list_entry)
{
device->shader_backend->shader_destroy(shader);
@@ -1106,6 +1099,7 @@ static void device_free_sampler(struct wine_rb_entry *entry, void *context)
void wined3d_device_uninit_3d(struct wined3d_device *device)
{
BOOL no3d = device->wined3d->flags & WINED3D_NO3D;
+ struct wined3d_resource *resource, *cursor;
struct wined3d_rendertarget_view *view;
struct wined3d_texture *texture;
unsigned int i;
@@ -1145,6 +1139,12 @@ void wined3d_device_uninit_3d(struct wined3d_device *device)
wine_rb_clear(&device->samplers, device_free_sampler, NULL);
+ LIST_FOR_EACH_ENTRY_SAFE(resource, cursor, &device->resources, struct wined3d_resource, resource_list_entry)
+ {
+ TRACE("Unloading resource %p.\n", resource);
+ wined3d_cs_emit_unload_resource(device->cs, resource);
+ }
+
device->adapter->adapter_ops->adapter_uninit_3d(device);
device->d3d_initialized = FALSE;
@@ -5298,6 +5298,12 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
wined3d_cs_emit_reset_state(device->cs);
state_cleanup(&device->state);
+ LIST_FOR_EACH_ENTRY_SAFE(resource, cursor, &device->resources, struct wined3d_resource, resource_list_entry)
+ {
+ TRACE("Unloading resource %p.\n", resource);
+ wined3d_cs_emit_unload_resource(device->cs, resource);
+ }
+
if (device->d3d_initialized)
device->adapter->adapter_ops->adapter_uninit_3d(device);
--
2.11.0
Dec. 6, 2019
[PATCH 2/3] wined3d: Unload texture resources through texture ops.
by Henri Verbeet
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
dlls/wined3d/adapter_gl.c | 57 +-----------
dlls/wined3d/device.c | 3 +-
dlls/wined3d/texture.c | 200 +++++++++++++++++++++++++----------------
dlls/wined3d/wined3d_private.h | 3 +-
4 files changed, 125 insertions(+), 138 deletions(-)
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c
index 3408439660f..a8a8e93c0b2 100644
--- a/dlls/wined3d/adapter_gl.c
+++ b/dlls/wined3d/adapter_gl.c
@@ -4746,61 +4746,6 @@ static HRESULT adapter_gl_create_texture(struct wined3d_device *device,
return hr;
}
-static void wined3d_texture_gl_destroy_object(void *object)
-{
- struct wined3d_renderbuffer_entry *entry, *entry2;
- struct wined3d_texture_gl *texture_gl = object;
- struct wined3d_context *context = NULL;
- const struct wined3d_gl_info *gl_info;
- struct wined3d_device *device;
- unsigned int sub_count, i;
- GLuint buffer_object;
-
- TRACE("texture_gl %p.\n", texture_gl);
-
- sub_count = texture_gl->t.level_count * texture_gl->t.layer_count;
- for (i = 0; i < sub_count; ++i)
- {
- if (!(buffer_object = texture_gl->t.sub_resources[i].buffer_object))
- continue;
-
- TRACE("Deleting buffer object %u.\n", buffer_object);
-
- if (!context)
- {
- context = context_acquire(texture_gl->t.resource.device, NULL, 0);
- gl_info = wined3d_context_gl(context)->gl_info;
- }
-
- GL_EXTCALL(glDeleteBuffers(1, &buffer_object));
- }
-
- if (!list_empty(&texture_gl->renderbuffers))
- {
- device = texture_gl->t.resource.device;
- if (!context)
- {
- context = context_acquire(device, NULL, 0);
- gl_info = wined3d_context_gl(context)->gl_info;
- }
-
- LIST_FOR_EACH_ENTRY_SAFE(entry, entry2, &texture_gl->renderbuffers, struct wined3d_renderbuffer_entry, entry)
- {
- TRACE("Deleting renderbuffer %u.\n", entry->id);
- context_gl_resource_released(device, entry->id, TRUE);
- gl_info->fbo_ops.glDeleteRenderbuffers(1, &entry->id);
- heap_free(entry);
- }
- }
-
- if (context)
- context_release(context);
-
- wined3d_texture_gl_unload_texture(texture_gl);
-
- heap_free(texture_gl);
-}
-
static void adapter_gl_destroy_texture(struct wined3d_texture *texture)
{
struct wined3d_texture_gl *texture_gl = wined3d_texture_gl(texture);
@@ -4820,7 +4765,7 @@ static void adapter_gl_destroy_texture(struct wined3d_texture *texture)
texture->resource.parent_ops->wined3d_object_destroyed(texture->resource.parent);
wined3d_texture_cleanup(&texture_gl->t);
- wined3d_cs_destroy_object(device->cs, wined3d_texture_gl_destroy_object, texture_gl);
+ wined3d_cs_destroy_object(device->cs, heap_free, texture_gl);
if (swapchain_count)
wined3d_device_decref(device);
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 98559e4f6c6..90c08876505 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1146,6 +1146,7 @@ void wined3d_device_uninit_3d(struct wined3d_device *device)
wine_rb_clear(&device->samplers, device_free_sampler, NULL);
device->adapter->adapter_ops->adapter_uninit_3d(device);
+ device->d3d_initialized = FALSE;
if ((view = device->fb.depth_stencil))
{
@@ -1170,8 +1171,6 @@ void wined3d_device_uninit_3d(struct wined3d_device *device)
heap_free(device->swapchains);
device->swapchains = NULL;
-
- device->d3d_initialized = FALSE;
}
/* Enables thread safety in the wined3d device and its resources. Called by DirectDraw
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 1c315a1dd77..7c9c8298519 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -636,51 +636,6 @@ static void wined3d_texture_gl_allocate_immutable_storage(struct wined3d_texture
checkGLcall("allocate immutable storage");
}
-void wined3d_texture_gl_unload_texture(struct wined3d_texture_gl *texture_gl)
-{
- struct wined3d_device *device = texture_gl->t.resource.device;
- const struct wined3d_gl_info *gl_info = NULL;
- struct wined3d_context *context = NULL;
-
- if (texture_gl->t.resource.bind_count)
- device_invalidate_state(device, STATE_SAMPLER(texture_gl->t.sampler));
-
- if (texture_gl->texture_rgb.name || texture_gl->texture_srgb.name
- || texture_gl->rb_multisample || texture_gl->rb_resolved)
- {
- context = context_acquire(device, NULL, 0);
- gl_info = wined3d_context_gl(context)->gl_info;
- }
-
- if (texture_gl->texture_rgb.name)
- gltexture_delete(device, gl_info, &texture_gl->texture_rgb);
-
- if (texture_gl->texture_srgb.name)
- gltexture_delete(device, gl_info, &texture_gl->texture_srgb);
-
- if (texture_gl->rb_multisample)
- {
- TRACE("Deleting multisample renderbuffer %u.\n", texture_gl->rb_multisample);
- context_gl_resource_released(device, texture_gl->rb_multisample, TRUE);
- gl_info->fbo_ops.glDeleteRenderbuffers(1, &texture_gl->rb_multisample);
- texture_gl->rb_multisample = 0;
- }
-
- if (texture_gl->rb_resolved)
- {
- TRACE("Deleting resolved renderbuffer %u.\n", texture_gl->rb_resolved);
- context_gl_resource_released(device, texture_gl->rb_resolved, TRUE);
- gl_info->fbo_ops.glDeleteRenderbuffers(1, &texture_gl->rb_resolved);
- texture_gl->rb_resolved = 0;
- }
-
- if (context) context_release(context);
-
- wined3d_texture_set_dirty(&texture_gl->t);
-
- resource_unload(&texture_gl->t.resource);
-}
-
void wined3d_texture_sub_resources_destroyed(struct wined3d_texture *texture)
{
unsigned int sub_count = texture->level_count * texture->layer_count;
@@ -1119,12 +1074,14 @@ ULONG CDECL wined3d_texture_incref(struct wined3d_texture *texture)
static void wined3d_texture_destroy_object(void *object)
{
struct wined3d_texture *texture = object;
+ struct wined3d_resource *resource;
struct wined3d_dc_info *dc_info;
unsigned int sub_count;
unsigned int i;
TRACE("texture %p.\n", texture);
+ resource = &texture->resource;
sub_count = texture->level_count * texture->layer_count;
if ((dc_info = texture->dc_info))
@@ -1156,12 +1113,14 @@ static void wined3d_texture_destroy_object(void *object)
}
heap_free(texture->overlay_info);
}
+
+ resource->resource_ops->resource_unload(resource);
}
void wined3d_texture_cleanup(struct wined3d_texture *texture)
{
- resource_cleanup(&texture->resource);
wined3d_cs_destroy_object(texture->resource.device->cs, wined3d_texture_destroy_object, texture);
+ resource_cleanup(&texture->resource);
}
static void wined3d_texture_cleanup_sync(struct wined3d_texture *texture)
@@ -1789,6 +1748,12 @@ BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture,
return texture->texture_ops->texture_prepare_location(texture, sub_resource_idx, context, location);
}
+static void wined3d_texture_unload_location(struct wined3d_texture *texture,
+ struct wined3d_context *context, unsigned int location)
+{
+ texture->texture_ops->texture_unload_location(texture, context, location);
+}
+
static struct wined3d_texture_sub_resource *wined3d_texture_get_sub_resource(struct wined3d_texture *texture,
unsigned int sub_resource_idx)
{
@@ -2903,10 +2868,79 @@ static BOOL wined3d_texture_gl_load_location(struct wined3d_texture *texture,
}
}
+static void wined3d_texture_gl_unload_location(struct wined3d_texture *texture,
+ struct wined3d_context *context, unsigned int location)
+{
+ struct wined3d_texture_gl *texture_gl = wined3d_texture_gl(texture);
+ struct wined3d_context_gl *context_gl = wined3d_context_gl(context);
+ struct wined3d_renderbuffer_entry *entry, *entry2;
+ unsigned int i, sub_count;
+
+ TRACE("texture %p, context %p, location %s.\n", texture, context, wined3d_debug_location(location));
+
+ switch (location)
+ {
+ case WINED3D_LOCATION_BUFFER:
+ sub_count = texture->level_count * texture->layer_count;
+ for (i = 0; i < sub_count; ++i)
+ {
+ if (texture_gl->t.sub_resources[i].buffer_object)
+ wined3d_texture_remove_buffer_object(&texture_gl->t, i, context_gl->gl_info);
+ }
+ break;
+
+ case WINED3D_LOCATION_TEXTURE_RGB:
+ if (texture_gl->texture_rgb.name)
+ gltexture_delete(texture_gl->t.resource.device, context_gl->gl_info, &texture_gl->texture_rgb);
+ break;
+
+ case WINED3D_LOCATION_TEXTURE_SRGB:
+ if (texture_gl->texture_srgb.name)
+ gltexture_delete(texture_gl->t.resource.device, context_gl->gl_info, &texture_gl->texture_srgb);
+ break;
+
+ case WINED3D_LOCATION_RB_MULTISAMPLE:
+ if (texture_gl->rb_multisample)
+ {
+ TRACE("Deleting multisample renderbuffer %u.\n", texture_gl->rb_multisample);
+ context_gl_resource_released(texture_gl->t.resource.device, texture_gl->rb_multisample, TRUE);
+ context_gl->gl_info->fbo_ops.glDeleteRenderbuffers(1, &texture_gl->rb_multisample);
+ texture_gl->rb_multisample = 0;
+ }
+ break;
+
+ case WINED3D_LOCATION_RB_RESOLVED:
+ LIST_FOR_EACH_ENTRY_SAFE(entry, entry2, &texture_gl->renderbuffers,
+ struct wined3d_renderbuffer_entry, entry)
+ {
+ context_gl_resource_released(texture_gl->t.resource.device, entry->id, TRUE);
+ context_gl->gl_info->fbo_ops.glDeleteRenderbuffers(1, &entry->id);
+ list_remove(&entry->entry);
+ heap_free(entry);
+ }
+ list_init(&texture_gl->renderbuffers);
+ texture_gl->current_renderbuffer = NULL;
+
+ if (texture_gl->rb_resolved)
+ {
+ TRACE("Deleting resolved renderbuffer %u.\n", texture_gl->rb_resolved);
+ context_gl_resource_released(texture_gl->t.resource.device, texture_gl->rb_resolved, TRUE);
+ context_gl->gl_info->fbo_ops.glDeleteRenderbuffers(1, &texture_gl->rb_resolved);
+ texture_gl->rb_resolved = 0;
+ }
+ break;
+
+ default:
+ ERR("Unhandled location %s.\n", wined3d_debug_location(location));
+ break;
+ }
+}
+
static const struct wined3d_texture_ops texture_gl_ops =
{
wined3d_texture_gl_prepare_location,
wined3d_texture_gl_load_location,
+ wined3d_texture_gl_unload_location,
wined3d_texture_gl_upload_data,
wined3d_texture_gl_download_data,
};
@@ -2936,65 +2970,59 @@ static void texture_resource_preload(struct wined3d_resource *resource)
context_release(context);
}
-static void wined3d_texture_gl_unload(struct wined3d_resource *resource)
+static void texture_resource_unload(struct wined3d_resource *resource)
{
- struct wined3d_texture_gl *texture_gl = wined3d_texture_gl(texture_from_resource(resource));
- UINT sub_count = texture_gl->t.level_count * texture_gl->t.layer_count;
- struct wined3d_renderbuffer_entry *entry, *entry2;
+ struct wined3d_texture *texture = texture_from_resource(resource);
struct wined3d_device *device = resource->device;
unsigned int location = resource->map_binding;
- const struct wined3d_gl_info *gl_info;
struct wined3d_context *context;
- UINT i;
+ unsigned int sub_count, i;
+
+ TRACE("resource %p.\n", resource);
- TRACE("texture_gl %p.\n", texture_gl);
+ /* D3D is not initialised, so no GPU locations should currently exist.
+ * Moreover, we may not be able to acquire a valid context. */
+ if (!device->d3d_initialized)
+ return;
context = context_acquire(device, NULL, 0);
- gl_info = wined3d_context_gl(context)->gl_info;
if (location == WINED3D_LOCATION_BUFFER)
location = WINED3D_LOCATION_SYSMEM;
+ sub_count = texture->level_count * texture->layer_count;
for (i = 0; i < sub_count; ++i)
{
- struct wined3d_texture_sub_resource *sub_resource = &texture_gl->t.sub_resources[i];
-
if (resource->access & WINED3D_RESOURCE_ACCESS_CPU
- && wined3d_texture_load_location(&texture_gl->t, i, context, location))
+ && wined3d_texture_load_location(texture, i, context, location))
{
- wined3d_texture_invalidate_location(&texture_gl->t, i, ~location);
+ wined3d_texture_invalidate_location(texture, i, ~location);
}
else
{
- /* We should only get here on device reset/teardown for implicit
- * resources. */
- if (resource->access & WINED3D_RESOURCE_ACCESS_CPU
- || resource->type != WINED3D_RTYPE_TEXTURE_2D)
+ if (resource->access & WINED3D_RESOURCE_ACCESS_CPU)
ERR("Discarding %s %p sub-resource %u with resource access %s.\n",
debug_d3dresourcetype(resource->type), resource, i,
wined3d_debug_resource_access(resource->access));
- wined3d_texture_validate_location(&texture_gl->t, i, WINED3D_LOCATION_DISCARDED);
- wined3d_texture_invalidate_location(&texture_gl->t, i, ~WINED3D_LOCATION_DISCARDED);
+ wined3d_texture_validate_location(texture, i, WINED3D_LOCATION_DISCARDED);
+ wined3d_texture_invalidate_location(texture, i, ~WINED3D_LOCATION_DISCARDED);
}
-
- if (sub_resource->buffer_object)
- wined3d_texture_remove_buffer_object(&texture_gl->t, i, gl_info);
}
- LIST_FOR_EACH_ENTRY_SAFE(entry, entry2, &texture_gl->renderbuffers, struct wined3d_renderbuffer_entry, entry)
- {
- context_gl_resource_released(device, entry->id, TRUE);
- gl_info->fbo_ops.glDeleteRenderbuffers(1, &entry->id);
- list_remove(&entry->entry);
- heap_free(entry);
- }
- list_init(&texture_gl->renderbuffers);
- texture_gl->current_renderbuffer = NULL;
+ wined3d_texture_unload_location(texture, context, WINED3D_LOCATION_BUFFER);
+ wined3d_texture_unload_location(texture, context, WINED3D_LOCATION_TEXTURE_RGB);
+ wined3d_texture_unload_location(texture, context, WINED3D_LOCATION_TEXTURE_SRGB);
+ wined3d_texture_unload_location(texture, context, WINED3D_LOCATION_RB_MULTISAMPLE);
+ wined3d_texture_unload_location(texture, context, WINED3D_LOCATION_RB_RESOLVED);
context_release(context);
- wined3d_texture_force_reload(&texture_gl->t);
- wined3d_texture_gl_unload_texture(texture_gl);
+ wined3d_texture_force_reload(texture);
+ if (texture->resource.bind_count)
+ device_invalidate_state(device, STATE_SAMPLER(texture->sampler));
+ wined3d_texture_set_dirty(texture);
+
+ resource_unload(&texture->resource);
}
static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resource, unsigned int sub_resource_idx,
@@ -3177,7 +3205,7 @@ static const struct wined3d_resource_ops texture_resource_ops =
texture_resource_incref,
texture_resource_decref,
texture_resource_preload,
- wined3d_texture_gl_unload,
+ texture_resource_unload,
texture_resource_sub_resource_map,
texture_resource_sub_resource_unmap,
};
@@ -4088,10 +4116,17 @@ static BOOL wined3d_texture_no3d_load_location(struct wined3d_texture *texture,
return FALSE;
}
+static void wined3d_texture_no3d_unload_location(struct wined3d_texture *texture,
+ struct wined3d_context *context, unsigned int location)
+{
+ TRACE("texture %p, context %p, location %s.\n", texture, context, wined3d_debug_location(location));
+}
+
static const struct wined3d_texture_ops wined3d_texture_no3d_ops =
{
wined3d_texture_no3d_prepare_location,
wined3d_texture_no3d_load_location,
+ wined3d_texture_no3d_unload_location,
wined3d_texture_no3d_upload_data,
wined3d_texture_no3d_download_data,
};
@@ -4158,10 +4193,17 @@ static BOOL wined3d_texture_vk_load_location(struct wined3d_texture *texture,
return FALSE;
}
+static void wined3d_texture_vk_unload_location(struct wined3d_texture *texture,
+ struct wined3d_context *context, unsigned int location)
+{
+ FIXME("texture %p, context %p, location %s.\n", texture, context, wined3d_debug_location(location));
+}
+
static const struct wined3d_texture_ops wined3d_texture_vk_ops =
{
wined3d_texture_vk_prepare_location,
wined3d_texture_vk_load_location,
+ wined3d_texture_vk_unload_location,
wined3d_texture_vk_upload_data,
wined3d_texture_vk_download_data,
};
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 7d3b709a974..8f9ad1ce856 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3470,6 +3470,8 @@ struct wined3d_texture_ops
struct wined3d_context *context, unsigned int location);
BOOL (*texture_load_location)(struct wined3d_texture *texture, unsigned int sub_resource_idx,
struct wined3d_context *context, unsigned int location);
+ void (*texture_unload_location)(struct wined3d_texture *texture,
+ struct wined3d_context *context, unsigned int location);
void (*texture_upload_data)(struct wined3d_context *context, const struct wined3d_const_bo_address *src_bo_addr,
const struct wined3d_format *src_format, const struct wined3d_box *src_box, unsigned int src_row_pitch,
unsigned int src_slice_pitch, struct wined3d_texture *dst_texture, unsigned int dst_sub_resource_idx,
@@ -3745,7 +3747,6 @@ void wined3d_texture_gl_prepare_texture(struct wined3d_texture_gl *texture_gl,
void wined3d_texture_gl_set_compatible_renderbuffer(struct wined3d_texture_gl *texture_gl,
struct wined3d_context_gl *context_gl, unsigned int level,
const struct wined3d_rendertarget_info *rt) DECLSPEC_HIDDEN;
-void wined3d_texture_gl_unload_texture(struct wined3d_texture_gl *texture_gl) DECLSPEC_HIDDEN;
struct wined3d_texture_vk
{
--
2.11.0
Dec. 6, 2019
[PATCH 1/3] wined3d: Unload buffer resources through buffer ops.
by Henri Verbeet
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
dlls/wined3d/adapter_gl.c | 17 +-----------
dlls/wined3d/buffer.c | 59 +++++++++++++++++++++++++++++++++++++-----
dlls/wined3d/wined3d_private.h | 4 +--
3 files changed, 55 insertions(+), 25 deletions(-)
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c
index eb9965723a2..3408439660f 100644
--- a/dlls/wined3d/adapter_gl.c
+++ b/dlls/wined3d/adapter_gl.c
@@ -4699,21 +4699,6 @@ static HRESULT adapter_gl_create_buffer(struct wined3d_device *device,
return hr;
}
-static void wined3d_buffer_gl_destroy_object(void *object)
-{
- struct wined3d_buffer_gl *buffer_gl = object;
- struct wined3d_context *context;
-
- if (buffer_gl->b.buffer_object)
- {
- context = context_acquire(buffer_gl->b.resource.device, NULL, 0);
- wined3d_buffer_gl_destroy_buffer_object(buffer_gl, wined3d_context_gl(context));
- context_release(context);
- }
-
- heap_free(buffer_gl);
-}
-
static void adapter_gl_destroy_buffer(struct wined3d_buffer *buffer)
{
struct wined3d_buffer_gl *buffer_gl = wined3d_buffer_gl(buffer);
@@ -4729,7 +4714,7 @@ static void adapter_gl_destroy_buffer(struct wined3d_buffer *buffer)
if (swapchain_count)
wined3d_device_incref(device);
wined3d_buffer_cleanup(&buffer_gl->b);
- wined3d_cs_destroy_object(device->cs, wined3d_buffer_gl_destroy_object, buffer_gl);
+ wined3d_cs_destroy_object(device->cs, heap_free, buffer_gl);
if (swapchain_count)
wined3d_device_decref(device);
}
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
index 95fcdff7ef0..89dab8ebfdd 100644
--- a/dlls/wined3d/buffer.c
+++ b/dlls/wined3d/buffer.c
@@ -139,7 +139,7 @@ static void wined3d_buffer_gl_bind(struct wined3d_buffer_gl *buffer_gl, struct w
}
/* Context activation is done by the caller. */
-void wined3d_buffer_gl_destroy_buffer_object(struct wined3d_buffer_gl *buffer_gl,
+static void wined3d_buffer_gl_destroy_buffer_object(struct wined3d_buffer_gl *buffer_gl,
struct wined3d_context_gl *context_gl)
{
const struct wined3d_gl_info *gl_info = context_gl->gl_info;
@@ -602,6 +602,12 @@ static BOOL wined3d_buffer_prepare_location(struct wined3d_buffer *buffer,
return buffer->buffer_ops->buffer_prepare_location(buffer, context, location);
}
+static void wined3d_buffer_unload_location(struct wined3d_buffer *buffer,
+ struct wined3d_context *context, unsigned int location)
+{
+ buffer->buffer_ops->buffer_unload_location(buffer, context, location);
+}
+
BOOL wined3d_buffer_load_location(struct wined3d_buffer *buffer,
struct wined3d_context *context, DWORD location)
{
@@ -699,7 +705,7 @@ DWORD wined3d_buffer_get_memory(struct wined3d_buffer *buffer,
return 0;
}
-static void buffer_unload(struct wined3d_resource *resource)
+static void buffer_resource_unload(struct wined3d_resource *resource)
{
struct wined3d_buffer *buffer = buffer_from_resource(resource);
@@ -713,7 +719,7 @@ static void buffer_unload(struct wined3d_resource *resource)
wined3d_buffer_load_location(buffer, context, WINED3D_LOCATION_SYSMEM);
wined3d_buffer_invalidate_location(buffer, WINED3D_LOCATION_BUFFER);
- wined3d_buffer_gl_destroy_buffer_object(wined3d_buffer_gl(buffer), wined3d_context_gl(context));
+ wined3d_buffer_unload_location(buffer, context, WINED3D_LOCATION_BUFFER);
buffer_clear_dirty_areas(buffer);
context_release(context);
@@ -731,21 +737,28 @@ static void buffer_unload(struct wined3d_resource *resource)
static void wined3d_buffer_drop_bo(struct wined3d_buffer *buffer)
{
buffer->flags &= ~WINED3D_BUFFER_USE_BO;
- buffer_unload(&buffer->resource);
+ buffer_resource_unload(&buffer->resource);
}
static void wined3d_buffer_destroy_object(void *object)
{
struct wined3d_buffer *buffer = object;
+ struct wined3d_context *context;
+ if (buffer->buffer_object)
+ {
+ context = context_acquire(buffer->resource.device, NULL, 0);
+ wined3d_buffer_unload_location(buffer, context, WINED3D_LOCATION_BUFFER);
+ context_release(context);
+ }
heap_free(buffer->conversion_map);
heap_free(buffer->maps);
}
void wined3d_buffer_cleanup(struct wined3d_buffer *buffer)
{
- resource_cleanup(&buffer->resource);
wined3d_cs_destroy_object(buffer->resource.device->cs, wined3d_buffer_destroy_object, buffer);
+ resource_cleanup(&buffer->resource);
}
ULONG CDECL wined3d_buffer_decref(struct wined3d_buffer *buffer)
@@ -1264,7 +1277,7 @@ static const struct wined3d_resource_ops buffer_resource_ops =
buffer_resource_incref,
buffer_resource_decref,
buffer_resource_preload,
- buffer_unload,
+ buffer_resource_unload,
buffer_resource_sub_resource_map,
buffer_resource_sub_resource_unmap,
};
@@ -1382,7 +1395,7 @@ static HRESULT wined3d_buffer_init(struct wined3d_buffer *buffer, struct wined3d
if (!(buffer->maps = heap_alloc(sizeof(*buffer->maps))))
{
ERR("Out of memory.\n");
- buffer_unload(resource);
+ buffer_resource_unload(resource);
resource_cleanup(resource);
wined3d_resource_wait_idle(resource);
return E_OUTOFMEMORY;
@@ -1406,6 +1419,12 @@ static BOOL wined3d_buffer_no3d_prepare_location(struct wined3d_buffer *buffer,
return FALSE;
}
+static void wined3d_buffer_no3d_unload_location(struct wined3d_buffer *buffer,
+ struct wined3d_context *context, unsigned int location)
+{
+ TRACE("buffer %p, context %p, location %s.\n", buffer, context, wined3d_debug_location(location));
+}
+
static void wined3d_buffer_no3d_upload_ranges(struct wined3d_buffer *buffer, struct wined3d_context *context,
const void *data, unsigned int data_offset, unsigned int range_count, const struct wined3d_map_range *ranges)
{
@@ -1421,6 +1440,7 @@ static void wined3d_buffer_no3d_download_ranges(struct wined3d_buffer *buffer, s
static const struct wined3d_buffer_ops wined3d_buffer_no3d_ops =
{
wined3d_buffer_no3d_prepare_location,
+ wined3d_buffer_no3d_unload_location,
wined3d_buffer_no3d_upload_ranges,
wined3d_buffer_no3d_download_ranges,
};
@@ -1463,6 +1483,23 @@ static BOOL wined3d_buffer_gl_prepare_location(struct wined3d_buffer *buffer,
}
}
+static void wined3d_buffer_gl_unload_location(struct wined3d_buffer *buffer,
+ struct wined3d_context *context, unsigned int location)
+{
+ TRACE("buffer %p, context %p, location %s.\n", buffer, context, wined3d_debug_location(location));
+
+ switch (location)
+ {
+ case WINED3D_LOCATION_BUFFER:
+ wined3d_buffer_gl_destroy_buffer_object(wined3d_buffer_gl(buffer), wined3d_context_gl(context));
+ break;
+
+ default:
+ ERR("Unhandled location %s.\n", wined3d_debug_location(location));
+ break;
+ }
+}
+
/* Context activation is done by the caller. */
static void wined3d_buffer_gl_upload_ranges(struct wined3d_buffer *buffer, struct wined3d_context *context,
const void *data, unsigned int data_offset, unsigned int range_count, const struct wined3d_map_range *ranges)
@@ -1506,6 +1543,7 @@ static void wined3d_buffer_gl_download_ranges(struct wined3d_buffer *buffer, str
static const struct wined3d_buffer_ops wined3d_buffer_gl_ops =
{
wined3d_buffer_gl_prepare_location,
+ wined3d_buffer_gl_unload_location,
wined3d_buffer_gl_upload_ranges,
wined3d_buffer_gl_download_ranges,
};
@@ -1542,6 +1580,12 @@ static BOOL wined3d_buffer_vk_prepare_location(struct wined3d_buffer *buffer,
}
}
+static void wined3d_buffer_vk_unload_location(struct wined3d_buffer *buffer,
+ struct wined3d_context *context, unsigned int location)
+{
+ FIXME("buffer %p, context %p, location %s.\n", buffer, context, wined3d_debug_location(location));
+}
+
static void wined3d_buffer_vk_upload_ranges(struct wined3d_buffer *buffer, struct wined3d_context *context,
const void *data, unsigned int data_offset, unsigned int range_count, const struct wined3d_map_range *ranges)
{
@@ -1557,6 +1601,7 @@ static void wined3d_buffer_vk_download_ranges(struct wined3d_buffer *buffer, str
static const struct wined3d_buffer_ops wined3d_buffer_vk_ops =
{
wined3d_buffer_vk_prepare_location,
+ wined3d_buffer_vk_unload_location,
wined3d_buffer_vk_upload_ranges,
wined3d_buffer_vk_download_ranges,
};
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 0fc633ad4a5..7d3b709a974 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -4120,6 +4120,8 @@ struct wined3d_buffer_ops
{
BOOL (*buffer_prepare_location)(struct wined3d_buffer *buffer,
struct wined3d_context *context, unsigned int location);
+ void (*buffer_unload_location)(struct wined3d_buffer *buffer,
+ struct wined3d_context *context, unsigned int location);
void (*buffer_upload_ranges)(struct wined3d_buffer *buffer, struct wined3d_context *context, const void *data,
unsigned int data_offset, unsigned int range_count, const struct wined3d_map_range *ranges);
void (*buffer_download_ranges)(struct wined3d_buffer *buffer, struct wined3d_context *context, void *data,
@@ -4187,8 +4189,6 @@ static inline struct wined3d_buffer_gl *wined3d_buffer_gl(struct wined3d_buffer
GLenum wined3d_buffer_gl_binding_from_bind_flags(const struct wined3d_gl_info *gl_info,
uint32_t bind_flags) DECLSPEC_HIDDEN;
-void wined3d_buffer_gl_destroy_buffer_object(struct wined3d_buffer_gl *buffer_gl,
- struct wined3d_context_gl *context_gl) DECLSPEC_HIDDEN;
HRESULT wined3d_buffer_gl_init(struct wined3d_buffer_gl *buffer_gl, struct wined3d_device *device,
const struct wined3d_buffer_desc *desc, const struct wined3d_sub_resource_data *data,
void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
--
2.11.0
Dec. 6, 2019
Re: [PATCH vkd3d] vkd3d: Remove redundant GetCopyableFootprints() resource size alignment checks.
by Henri Verbeet
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
Dec. 6, 2019
[PATCH vkd3d 6/6] vkd3d-shader: Handle VKD3DSPR_GSINSTID in vkd3d_dxbc_compiler_get_register_name().
by Henri Verbeet
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
libs/vkd3d-shader/spirv.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c
index 40280eb..3d88be9 100644
--- a/libs/vkd3d-shader/spirv.c
+++ b/libs/vkd3d-shader/spirv.c
@@ -2500,6 +2500,9 @@ static bool vkd3d_dxbc_compiler_get_register_name(char *buffer, unsigned int buf
case VKD3DSPR_JOININSTID:
snprintf(buffer, buffer_size, "vJoinInstanceId");
break;
+ case VKD3DSPR_GSINSTID:
+ snprintf(buffer, buffer_size, "vGSInstanceID");
+ break;
case VKD3DSPR_PATCHCONST:
snprintf(buffer, buffer_size, "vpc%u", idx);
break;
--
2.11.0
Dec. 6, 2019
[PATCH vkd3d 5/6] vkd3d-shader: Avoid declaring outputs multiple times with incompatible types.
by Henri Verbeet
This would cause CoreValidation-Shader-InterfaceTypeMismatch validation
errors from Wine's test_shader_interstage_interface() d3d11 test. This
reverts parts of commits 1eb7eca411f71d8dec7cfae5c58c1dff9626a7e0 and
04ec461fb4224e126d271760123bb6d756c06582.
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
libs/vkd3d-shader/spirv.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c
index a949e4a..40280eb 100644
--- a/libs/vkd3d-shader/spirv.c
+++ b/libs/vkd3d-shader/spirv.c
@@ -4438,8 +4438,13 @@ static void vkd3d_dxbc_compiler_emit_output(struct vkd3d_dxbc_compiler *compiler
{
use_private_variable = true;
write_mask = VKD3DSP_WRITEMASK_ALL;
+ entry = rb_get(&compiler->symbol_table, ®_symbol);
}
}
+ else if (!use_private_variable && (entry = rb_get(&compiler->symbol_table, ®_symbol)))
+ {
+ id = RB_ENTRY_VALUE(entry, const struct vkd3d_symbol, entry)->id;
+ }
else
{
if (builtin)
@@ -4487,15 +4492,15 @@ static void vkd3d_dxbc_compiler_emit_output(struct vkd3d_dxbc_compiler *compiler
vkd3d_spirv_build_op_decorate(builder, id, SpvDecorationPatch, NULL, 0);
vkd3d_dxbc_compiler_decorate_xfb_output(compiler, id, output_component_count, signature_element);
-
- compiler->output_info[signature_idx].id = id;
- compiler->output_info[signature_idx].component_type = component_type;
}
+ compiler->output_info[signature_idx].id = id;
+ compiler->output_info[signature_idx].component_type = component_type;
+
if (use_private_variable)
storage_class = SpvStorageClassPrivate;
- if ((entry = rb_get(&compiler->symbol_table, ®_symbol)))
+ if (entry)
var_id = RB_ENTRY_VALUE(entry, const struct vkd3d_symbol, entry)->id;
else if (!use_private_variable)
var_id = id;
--
2.11.0
Dec. 6, 2019
[PATCH vkd3d 4/6] vkd3d-shader: Handle normalised types in vkd3d_component_type_from_data_type().
by Henri Verbeet
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
libs/vkd3d-shader/vkd3d_shader_private.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libs/vkd3d-shader/vkd3d_shader_private.h b/libs/vkd3d-shader/vkd3d_shader_private.h
index 940cb76..100d515 100644
--- a/libs/vkd3d-shader/vkd3d_shader_private.h
+++ b/libs/vkd3d-shader/vkd3d_shader_private.h
@@ -838,6 +838,8 @@ static inline enum vkd3d_component_type vkd3d_component_type_from_data_type(
switch (data_type)
{
case VKD3D_DATA_FLOAT:
+ case VKD3D_DATA_UNORM:
+ case VKD3D_DATA_SNORM:
return VKD3D_TYPE_FLOAT;
case VKD3D_DATA_UINT:
return VKD3D_TYPE_UINT;
--
2.11.0
Dec. 6, 2019
[PATCH vkd3d 3/6] vkd3d: Add stub for ID3D12GraphicsCommandList2::WriteBufferImmediate().
by Henri Verbeet
From: Conor McCarthy <cmccarthy(a)codeweavers.com>
ID3D12GraphicsCommandList2 and WriteBufferImmediate() are used by
Hitman 2, but implementing the function on top of an AMD extension has
no effect on game behaviour. It's commonly used to write debug info.
Signed-off-by: Conor McCarthy <cmccarthy(a)codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
This supersedes patch 174173.
libs/vkd3d/command.c | 272 ++++++++++++++++++++++++---------------------
libs/vkd3d/device.c | 4 +-
libs/vkd3d/vkd3d_private.h | 2 +-
tests/d3d12.c | 10 +-
4 files changed, 154 insertions(+), 134 deletions(-)
diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c
index d6feecf..8a7ff66 100644
--- a/libs/vkd3d/command.c
+++ b/libs/vkd3d/command.c
@@ -1807,9 +1807,9 @@ HRESULT d3d12_command_allocator_create(struct d3d12_device *device,
}
/* ID3D12CommandList */
-static inline struct d3d12_command_list *impl_from_ID3D12GraphicsCommandList1(ID3D12GraphicsCommandList1 *iface)
+static inline struct d3d12_command_list *impl_from_ID3D12GraphicsCommandList2(ID3D12GraphicsCommandList2 *iface)
{
- return CONTAINING_RECORD(iface, struct d3d12_command_list, ID3D12GraphicsCommandList1_iface);
+ return CONTAINING_RECORD(iface, struct d3d12_command_list, ID3D12GraphicsCommandList2_iface);
}
static void d3d12_command_list_invalidate_current_framebuffer(struct d3d12_command_list *list)
@@ -2159,19 +2159,20 @@ static void d3d12_command_list_track_resource_usage(struct d3d12_command_list *l
}
}
-static HRESULT STDMETHODCALLTYPE d3d12_command_list_QueryInterface(ID3D12GraphicsCommandList1 *iface,
+static HRESULT STDMETHODCALLTYPE d3d12_command_list_QueryInterface(ID3D12GraphicsCommandList2 *iface,
REFIID iid, void **object)
{
TRACE("iface %p, iid %s, object %p.\n", iface, debugstr_guid(iid), object);
- if (IsEqualGUID(iid, &IID_ID3D12GraphicsCommandList1)
+ if (IsEqualGUID(iid, &IID_ID3D12GraphicsCommandList2)
+ || IsEqualGUID(iid, &IID_ID3D12GraphicsCommandList1)
|| IsEqualGUID(iid, &IID_ID3D12GraphicsCommandList)
|| IsEqualGUID(iid, &IID_ID3D12CommandList)
|| IsEqualGUID(iid, &IID_ID3D12DeviceChild)
|| IsEqualGUID(iid, &IID_ID3D12Object)
|| IsEqualGUID(iid, &IID_IUnknown))
{
- ID3D12GraphicsCommandList1_AddRef(iface);
+ ID3D12GraphicsCommandList2_AddRef(iface);
*object = iface;
return S_OK;
}
@@ -2182,9 +2183,9 @@ static HRESULT STDMETHODCALLTYPE d3d12_command_list_QueryInterface(ID3D12Graphic
return E_NOINTERFACE;
}
-static ULONG STDMETHODCALLTYPE d3d12_command_list_AddRef(ID3D12GraphicsCommandList1 *iface)
+static ULONG STDMETHODCALLTYPE d3d12_command_list_AddRef(ID3D12GraphicsCommandList2 *iface)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
ULONG refcount = InterlockedIncrement(&list->refcount);
TRACE("%p increasing refcount to %u.\n", list, refcount);
@@ -2192,9 +2193,9 @@ static ULONG STDMETHODCALLTYPE d3d12_command_list_AddRef(ID3D12GraphicsCommandLi
return refcount;
}
-static ULONG STDMETHODCALLTYPE d3d12_command_list_Release(ID3D12GraphicsCommandList1 *iface)
+static ULONG STDMETHODCALLTYPE d3d12_command_list_Release(ID3D12GraphicsCommandList2 *iface)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
ULONG refcount = InterlockedDecrement(&list->refcount);
TRACE("%p decreasing refcount to %u.\n", list, refcount);
@@ -2217,66 +2218,66 @@ static ULONG STDMETHODCALLTYPE d3d12_command_list_Release(ID3D12GraphicsCommandL
return refcount;
}
-static HRESULT STDMETHODCALLTYPE d3d12_command_list_GetPrivateData(ID3D12GraphicsCommandList1 *iface,
+static HRESULT STDMETHODCALLTYPE d3d12_command_list_GetPrivateData(ID3D12GraphicsCommandList2 *iface,
REFGUID guid, UINT *data_size, void *data)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
TRACE("iface %p, guid %s, data_size %p, data %p.\n", iface, debugstr_guid(guid), data_size, data);
return vkd3d_get_private_data(&list->private_store, guid, data_size, data);
}
-static HRESULT STDMETHODCALLTYPE d3d12_command_list_SetPrivateData(ID3D12GraphicsCommandList1 *iface,
+static HRESULT STDMETHODCALLTYPE d3d12_command_list_SetPrivateData(ID3D12GraphicsCommandList2 *iface,
REFGUID guid, UINT data_size, const void *data)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
TRACE("iface %p, guid %s, data_size %u, data %p.\n", iface, debugstr_guid(guid), data_size, data);
return vkd3d_set_private_data(&list->private_store, guid, data_size, data);
}
-static HRESULT STDMETHODCALLTYPE d3d12_command_list_SetPrivateDataInterface(ID3D12GraphicsCommandList1 *iface,
+static HRESULT STDMETHODCALLTYPE d3d12_command_list_SetPrivateDataInterface(ID3D12GraphicsCommandList2 *iface,
REFGUID guid, const IUnknown *data)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
TRACE("iface %p, guid %s, data %p.\n", iface, debugstr_guid(guid), data);
return vkd3d_set_private_data_interface(&list->private_store, guid, data);
}
-static HRESULT STDMETHODCALLTYPE d3d12_command_list_SetName(ID3D12GraphicsCommandList1 *iface, const WCHAR *name)
+static HRESULT STDMETHODCALLTYPE d3d12_command_list_SetName(ID3D12GraphicsCommandList2 *iface, const WCHAR *name)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
TRACE("iface %p, name %s.\n", iface, debugstr_w(name, list->device->wchar_size));
return name ? S_OK : E_INVALIDARG;
}
-static HRESULT STDMETHODCALLTYPE d3d12_command_list_GetDevice(ID3D12GraphicsCommandList1 *iface, REFIID iid, void **device)
+static HRESULT STDMETHODCALLTYPE d3d12_command_list_GetDevice(ID3D12GraphicsCommandList2 *iface, REFIID iid, void **device)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
TRACE("iface %p, iid %s, device %p.\n", iface, debugstr_guid(iid), device);
return d3d12_device_query_interface(list->device, iid, device);
}
-static D3D12_COMMAND_LIST_TYPE STDMETHODCALLTYPE d3d12_command_list_GetType(ID3D12GraphicsCommandList1 *iface)
+static D3D12_COMMAND_LIST_TYPE STDMETHODCALLTYPE d3d12_command_list_GetType(ID3D12GraphicsCommandList2 *iface)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
TRACE("iface %p.\n", iface);
return list->type;
}
-static HRESULT STDMETHODCALLTYPE d3d12_command_list_Close(ID3D12GraphicsCommandList1 *iface)
+static HRESULT STDMETHODCALLTYPE d3d12_command_list_Close(ID3D12GraphicsCommandList2 *iface)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
const struct vkd3d_vk_device_procs *vk_procs;
VkResult vr;
@@ -2320,7 +2321,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_command_list_Close(ID3D12GraphicsCommandL
static void d3d12_command_list_reset_state(struct d3d12_command_list *list,
ID3D12PipelineState *initial_pipeline_state)
{
- ID3D12GraphicsCommandList1 *iface = &list->ID3D12GraphicsCommandList1_iface;
+ ID3D12GraphicsCommandList2 *iface = &list->ID3D12GraphicsCommandList2_iface;
memset(list->strides, 0, sizeof(list->strides));
list->primitive_topology = D3D_PRIMITIVE_TOPOLOGY_POINTLIST;
@@ -2350,14 +2351,14 @@ static void d3d12_command_list_reset_state(struct d3d12_command_list *list,
memset(list->so_counter_buffers, 0, sizeof(list->so_counter_buffers));
memset(list->so_counter_buffer_offsets, 0, sizeof(list->so_counter_buffer_offsets));
- ID3D12GraphicsCommandList1_SetPipelineState(iface, initial_pipeline_state);
+ ID3D12GraphicsCommandList2_SetPipelineState(iface, initial_pipeline_state);
}
-static HRESULT STDMETHODCALLTYPE d3d12_command_list_Reset(ID3D12GraphicsCommandList1 *iface,
+static HRESULT STDMETHODCALLTYPE d3d12_command_list_Reset(ID3D12GraphicsCommandList2 *iface,
ID3D12CommandAllocator *allocator, ID3D12PipelineState *initial_pipeline_state)
{
struct d3d12_command_allocator *allocator_impl = unsafe_impl_from_ID3D12CommandAllocator(allocator);
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
HRESULT hr;
TRACE("iface %p, allocator %p, initial_pipeline_state %p.\n",
@@ -2384,7 +2385,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_command_list_Reset(ID3D12GraphicsCommandL
return hr;
}
-static HRESULT STDMETHODCALLTYPE d3d12_command_list_ClearState(ID3D12GraphicsCommandList1 *iface,
+static HRESULT STDMETHODCALLTYPE d3d12_command_list_ClearState(ID3D12GraphicsCommandList2 *iface,
ID3D12PipelineState *pipeline_state)
{
FIXME("iface %p, pipline_state %p stub!\n", iface, pipeline_state);
@@ -2987,11 +2988,11 @@ static void d3d12_command_list_check_index_buffer_strip_cut_value(struct d3d12_c
}
}
-static void STDMETHODCALLTYPE d3d12_command_list_DrawInstanced(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_DrawInstanced(ID3D12GraphicsCommandList2 *iface,
UINT vertex_count_per_instance, UINT instance_count, UINT start_vertex_location,
UINT start_instance_location)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
const struct vkd3d_vk_device_procs *vk_procs;
TRACE("iface %p, vertex_count_per_instance %u, instance_count %u, "
@@ -3011,11 +3012,11 @@ static void STDMETHODCALLTYPE d3d12_command_list_DrawInstanced(ID3D12GraphicsCom
instance_count, start_vertex_location, start_instance_location));
}
-static void STDMETHODCALLTYPE d3d12_command_list_DrawIndexedInstanced(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_DrawIndexedInstanced(ID3D12GraphicsCommandList2 *iface,
UINT index_count_per_instance, UINT instance_count, UINT start_vertex_location,
INT base_vertex_location, UINT start_instance_location)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
const struct vkd3d_vk_device_procs *vk_procs;
TRACE("iface %p, index_count_per_instance %u, instance_count %u, start_vertex_location %u, "
@@ -3037,10 +3038,10 @@ static void STDMETHODCALLTYPE d3d12_command_list_DrawIndexedInstanced(ID3D12Grap
instance_count, start_vertex_location, base_vertex_location, start_instance_location));
}
-static void STDMETHODCALLTYPE d3d12_command_list_Dispatch(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_Dispatch(ID3D12GraphicsCommandList2 *iface,
UINT x, UINT y, UINT z)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
const struct vkd3d_vk_device_procs *vk_procs;
TRACE("iface %p, x %u, y %u, z %u.\n", iface, x, y, z);
@@ -3056,10 +3057,10 @@ static void STDMETHODCALLTYPE d3d12_command_list_Dispatch(ID3D12GraphicsCommandL
VK_CALL(vkCmdDispatch(list->vk_command_buffer, x, y, z));
}
-static void STDMETHODCALLTYPE d3d12_command_list_CopyBufferRegion(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_CopyBufferRegion(ID3D12GraphicsCommandList2 *iface,
ID3D12Resource *dst, UINT64 dst_offset, ID3D12Resource *src, UINT64 src_offset, UINT64 byte_count)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
struct d3d12_resource *dst_resource, *src_resource;
const struct vkd3d_vk_device_procs *vk_procs;
VkBufferCopy buffer_copy;
@@ -3339,11 +3340,11 @@ static bool validate_d3d12_box(const D3D12_BOX *box)
&& box->back > box->front;
}
-static void STDMETHODCALLTYPE d3d12_command_list_CopyTextureRegion(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_CopyTextureRegion(ID3D12GraphicsCommandList2 *iface,
const D3D12_TEXTURE_COPY_LOCATION *dst, UINT dst_x, UINT dst_y, UINT dst_z,
const D3D12_TEXTURE_COPY_LOCATION *src, const D3D12_BOX *src_box)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
struct d3d12_resource *dst_resource, *src_resource;
const struct vkd3d_format *src_format, *dst_format;
const struct vkd3d_vk_device_procs *vk_procs;
@@ -3474,10 +3475,10 @@ static void STDMETHODCALLTYPE d3d12_command_list_CopyTextureRegion(ID3D12Graphic
}
}
-static void STDMETHODCALLTYPE d3d12_command_list_CopyResource(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_CopyResource(ID3D12GraphicsCommandList2 *iface,
ID3D12Resource *dst, ID3D12Resource *src)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
struct d3d12_resource *dst_resource, *src_resource;
const struct vkd3d_format *src_format, *dst_format;
const struct vkd3d_vk_device_procs *vk_procs;
@@ -3544,7 +3545,7 @@ static void STDMETHODCALLTYPE d3d12_command_list_CopyResource(ID3D12GraphicsComm
}
}
-static void STDMETHODCALLTYPE d3d12_command_list_CopyTiles(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_CopyTiles(ID3D12GraphicsCommandList2 *iface,
ID3D12Resource *tiled_resource, const D3D12_TILED_RESOURCE_COORDINATE *tile_region_start_coordinate,
const D3D12_TILE_REGION_SIZE *tile_region_size, ID3D12Resource *buffer, UINT64 buffer_offset,
D3D12_TILE_COPY_FLAGS flags)
@@ -3555,11 +3556,11 @@ static void STDMETHODCALLTYPE d3d12_command_list_CopyTiles(ID3D12GraphicsCommand
buffer, buffer_offset, flags);
}
-static void STDMETHODCALLTYPE d3d12_command_list_ResolveSubresource(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_ResolveSubresource(ID3D12GraphicsCommandList2 *iface,
ID3D12Resource *dst, UINT dst_sub_resource_idx,
ID3D12Resource *src, UINT src_sub_resource_idx, DXGI_FORMAT format)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
const struct vkd3d_format *src_format, *dst_format, *vk_format;
struct d3d12_resource *dst_resource, *src_resource;
const struct vkd3d_vk_device_procs *vk_procs;
@@ -3630,10 +3631,10 @@ static void STDMETHODCALLTYPE d3d12_command_list_ResolveSubresource(ID3D12Graphi
VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 1, &vk_image_resolve));
}
-static void STDMETHODCALLTYPE d3d12_command_list_IASetPrimitiveTopology(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_IASetPrimitiveTopology(ID3D12GraphicsCommandList2 *iface,
D3D12_PRIMITIVE_TOPOLOGY topology)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
TRACE("iface %p, topology %#x.\n", iface, topology);
@@ -3650,11 +3651,11 @@ static void STDMETHODCALLTYPE d3d12_command_list_IASetPrimitiveTopology(ID3D12Gr
d3d12_command_list_invalidate_current_pipeline(list);
}
-static void STDMETHODCALLTYPE d3d12_command_list_RSSetViewports(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_RSSetViewports(ID3D12GraphicsCommandList2 *iface,
UINT viewport_count, const D3D12_VIEWPORT *viewports)
{
VkViewport vk_viewports[D3D12_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE];
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
const struct vkd3d_vk_device_procs *vk_procs;
unsigned int i;
@@ -3686,10 +3687,10 @@ static void STDMETHODCALLTYPE d3d12_command_list_RSSetViewports(ID3D12GraphicsCo
VK_CALL(vkCmdSetViewport(list->vk_command_buffer, 0, viewport_count, vk_viewports));
}
-static void STDMETHODCALLTYPE d3d12_command_list_RSSetScissorRects(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_RSSetScissorRects(ID3D12GraphicsCommandList2 *iface,
UINT rect_count, const D3D12_RECT *rects)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
VkRect2D vk_rects[D3D12_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE];
const struct vkd3d_vk_device_procs *vk_procs;
unsigned int i;
@@ -3714,10 +3715,10 @@ static void STDMETHODCALLTYPE d3d12_command_list_RSSetScissorRects(ID3D12Graphic
VK_CALL(vkCmdSetScissor(list->vk_command_buffer, 0, rect_count, vk_rects));
}
-static void STDMETHODCALLTYPE d3d12_command_list_OMSetBlendFactor(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_OMSetBlendFactor(ID3D12GraphicsCommandList2 *iface,
const FLOAT blend_factor[4])
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
const struct vkd3d_vk_device_procs *vk_procs;
TRACE("iface %p, blend_factor %p.\n", iface, blend_factor);
@@ -3726,10 +3727,10 @@ static void STDMETHODCALLTYPE d3d12_command_list_OMSetBlendFactor(ID3D12Graphics
VK_CALL(vkCmdSetBlendConstants(list->vk_command_buffer, blend_factor));
}
-static void STDMETHODCALLTYPE d3d12_command_list_OMSetStencilRef(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_OMSetStencilRef(ID3D12GraphicsCommandList2 *iface,
UINT stencil_ref)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
const struct vkd3d_vk_device_procs *vk_procs;
TRACE("iface %p, stencil_ref %u.\n", iface, stencil_ref);
@@ -3738,11 +3739,11 @@ static void STDMETHODCALLTYPE d3d12_command_list_OMSetStencilRef(ID3D12GraphicsC
VK_CALL(vkCmdSetStencilReference(list->vk_command_buffer, VK_STENCIL_FRONT_AND_BACK, stencil_ref));
}
-static void STDMETHODCALLTYPE d3d12_command_list_SetPipelineState(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_SetPipelineState(ID3D12GraphicsCommandList2 *iface,
ID3D12PipelineState *pipeline_state)
{
struct d3d12_pipeline_state *state = unsafe_impl_from_ID3D12PipelineState(pipeline_state);
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
TRACE("iface %p, pipeline_state %p.\n", iface, pipeline_state);
@@ -3793,10 +3794,10 @@ static unsigned int d3d12_find_ds_multiplanar_transition(const D3D12_RESOURCE_BA
return 0;
}
-static void STDMETHODCALLTYPE d3d12_command_list_ResourceBarrier(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_ResourceBarrier(ID3D12GraphicsCommandList2 *iface,
UINT barrier_count, const D3D12_RESOURCE_BARRIER *barriers)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
bool have_aliasing_barriers = false, have_split_barriers = false;
const struct vkd3d_vk_device_procs *vk_procs;
const struct vkd3d_vulkan_info *vk_info;
@@ -4026,13 +4027,13 @@ static void STDMETHODCALLTYPE d3d12_command_list_ResourceBarrier(ID3D12GraphicsC
WARN("Issuing split barrier(s) on D3D12_RESOURCE_BARRIER_FLAG_END_ONLY.\n");
}
-static void STDMETHODCALLTYPE d3d12_command_list_ExecuteBundle(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_ExecuteBundle(ID3D12GraphicsCommandList2 *iface,
ID3D12GraphicsCommandList *command_list)
{
FIXME("iface %p, command_list %p stub!\n", iface, command_list);
}
-static void STDMETHODCALLTYPE d3d12_command_list_SetDescriptorHeaps(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_SetDescriptorHeaps(ID3D12GraphicsCommandList2 *iface,
UINT heap_count, ID3D12DescriptorHeap *const *heaps)
{
TRACE("iface %p, heap_count %u, heaps %p.\n", iface, heap_count, heaps);
@@ -4056,10 +4057,10 @@ static void d3d12_command_list_set_root_signature(struct d3d12_command_list *lis
d3d12_command_list_invalidate_root_parameters(list, bind_point);
}
-static void STDMETHODCALLTYPE d3d12_command_list_SetComputeRootSignature(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_SetComputeRootSignature(ID3D12GraphicsCommandList2 *iface,
ID3D12RootSignature *root_signature)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
TRACE("iface %p, root_signature %p.\n", iface, root_signature);
@@ -4067,10 +4068,10 @@ static void STDMETHODCALLTYPE d3d12_command_list_SetComputeRootSignature(ID3D12G
unsafe_impl_from_ID3D12RootSignature(root_signature));
}
-static void STDMETHODCALLTYPE d3d12_command_list_SetGraphicsRootSignature(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_SetGraphicsRootSignature(ID3D12GraphicsCommandList2 *iface,
ID3D12RootSignature *root_signature)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
TRACE("iface %p, root_signature %p.\n", iface, root_signature);
@@ -4092,10 +4093,10 @@ static void d3d12_command_list_set_descriptor_table(struct d3d12_command_list *l
bindings->descriptor_table_active_mask |= (uint64_t)1 << index;
}
-static void STDMETHODCALLTYPE d3d12_command_list_SetComputeRootDescriptorTable(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_SetComputeRootDescriptorTable(ID3D12GraphicsCommandList2 *iface,
UINT root_parameter_index, D3D12_GPU_DESCRIPTOR_HANDLE base_descriptor)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
TRACE("iface %p, root_parameter_index %u, base_descriptor %#"PRIx64".\n",
iface, root_parameter_index, base_descriptor.ptr);
@@ -4104,10 +4105,10 @@ static void STDMETHODCALLTYPE d3d12_command_list_SetComputeRootDescriptorTable(I
root_parameter_index, base_descriptor);
}
-static void STDMETHODCALLTYPE d3d12_command_list_SetGraphicsRootDescriptorTable(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_SetGraphicsRootDescriptorTable(ID3D12GraphicsCommandList2 *iface,
UINT root_parameter_index, D3D12_GPU_DESCRIPTOR_HANDLE base_descriptor)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
TRACE("iface %p, root_parameter_index %u, base_descriptor %#"PRIx64".\n",
iface, root_parameter_index, base_descriptor.ptr);
@@ -4129,10 +4130,10 @@ static void d3d12_command_list_set_root_constants(struct d3d12_command_list *lis
c->stage_flags, c->offset + offset * sizeof(uint32_t), count * sizeof(uint32_t), data));
}
-static void STDMETHODCALLTYPE d3d12_command_list_SetComputeRoot32BitConstant(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_SetComputeRoot32BitConstant(ID3D12GraphicsCommandList2 *iface,
UINT root_parameter_index, UINT data, UINT dst_offset)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
TRACE("iface %p, root_parameter_index %u, data 0x%08x, dst_offset %u.\n",
iface, root_parameter_index, data, dst_offset);
@@ -4141,10 +4142,10 @@ static void STDMETHODCALLTYPE d3d12_command_list_SetComputeRoot32BitConstant(ID3
root_parameter_index, dst_offset, 1, &data);
}
-static void STDMETHODCALLTYPE d3d12_command_list_SetGraphicsRoot32BitConstant(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_SetGraphicsRoot32BitConstant(ID3D12GraphicsCommandList2 *iface,
UINT root_parameter_index, UINT data, UINT dst_offset)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
TRACE("iface %p, root_parameter_index %u, data 0x%08x, dst_offset %u.\n",
iface, root_parameter_index, data, dst_offset);
@@ -4153,10 +4154,10 @@ static void STDMETHODCALLTYPE d3d12_command_list_SetGraphicsRoot32BitConstant(ID
root_parameter_index, dst_offset, 1, &data);
}
-static void STDMETHODCALLTYPE d3d12_command_list_SetComputeRoot32BitConstants(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_SetComputeRoot32BitConstants(ID3D12GraphicsCommandList2 *iface,
UINT root_parameter_index, UINT constant_count, const void *data, UINT dst_offset)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
TRACE("iface %p, root_parameter_index %u, constant_count %u, data %p, dst_offset %u.\n",
iface, root_parameter_index, constant_count, data, dst_offset);
@@ -4165,10 +4166,10 @@ static void STDMETHODCALLTYPE d3d12_command_list_SetComputeRoot32BitConstants(ID
root_parameter_index, dst_offset, constant_count, data);
}
-static void STDMETHODCALLTYPE d3d12_command_list_SetGraphicsRoot32BitConstants(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_SetGraphicsRoot32BitConstants(ID3D12GraphicsCommandList2 *iface,
UINT root_parameter_index, UINT constant_count, const void *data, UINT dst_offset)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
TRACE("iface %p, root_parameter_index %u, constant_count %u, data %p, dst_offset %u.\n",
iface, root_parameter_index, constant_count, data, dst_offset);
@@ -4221,9 +4222,9 @@ static void d3d12_command_list_set_root_cbv(struct d3d12_command_list *list,
}
static void STDMETHODCALLTYPE d3d12_command_list_SetComputeRootConstantBufferView(
- ID3D12GraphicsCommandList1 *iface, UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS address)
+ ID3D12GraphicsCommandList2 *iface, UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS address)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
TRACE("iface %p, root_parameter_index %u, address %#"PRIx64".\n",
iface, root_parameter_index, address);
@@ -4232,9 +4233,9 @@ static void STDMETHODCALLTYPE d3d12_command_list_SetComputeRootConstantBufferVie
}
static void STDMETHODCALLTYPE d3d12_command_list_SetGraphicsRootConstantBufferView(
- ID3D12GraphicsCommandList1 *iface, UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS address)
+ ID3D12GraphicsCommandList2 *iface, UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS address)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
TRACE("iface %p, root_parameter_index %u, address %#"PRIx64".\n",
iface, root_parameter_index, address);
@@ -4293,9 +4294,9 @@ static void d3d12_command_list_set_root_descriptor(struct d3d12_command_list *li
}
static void STDMETHODCALLTYPE d3d12_command_list_SetComputeRootShaderResourceView(
- ID3D12GraphicsCommandList1 *iface, UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS address)
+ ID3D12GraphicsCommandList2 *iface, UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS address)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
TRACE("iface %p, root_parameter_index %u, address %#"PRIx64".\n",
iface, root_parameter_index, address);
@@ -4305,9 +4306,9 @@ static void STDMETHODCALLTYPE d3d12_command_list_SetComputeRootShaderResourceVie
}
static void STDMETHODCALLTYPE d3d12_command_list_SetGraphicsRootShaderResourceView(
- ID3D12GraphicsCommandList1 *iface, UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS address)
+ ID3D12GraphicsCommandList2 *iface, UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS address)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
TRACE("iface %p, root_parameter_index %u, address %#"PRIx64".\n",
iface, root_parameter_index, address);
@@ -4317,9 +4318,9 @@ static void STDMETHODCALLTYPE d3d12_command_list_SetGraphicsRootShaderResourceVi
}
static void STDMETHODCALLTYPE d3d12_command_list_SetComputeRootUnorderedAccessView(
- ID3D12GraphicsCommandList1 *iface, UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS address)
+ ID3D12GraphicsCommandList2 *iface, UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS address)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
TRACE("iface %p, root_parameter_index %u, address %#"PRIx64".\n",
iface, root_parameter_index, address);
@@ -4329,9 +4330,9 @@ static void STDMETHODCALLTYPE d3d12_command_list_SetComputeRootUnorderedAccessVi
}
static void STDMETHODCALLTYPE d3d12_command_list_SetGraphicsRootUnorderedAccessView(
- ID3D12GraphicsCommandList1 *iface, UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS address)
+ ID3D12GraphicsCommandList2 *iface, UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS address)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
TRACE("iface %p, root_parameter_index %u, address %#"PRIx64".\n",
iface, root_parameter_index, address);
@@ -4340,10 +4341,10 @@ static void STDMETHODCALLTYPE d3d12_command_list_SetGraphicsRootUnorderedAccessV
root_parameter_index, address);
}
-static void STDMETHODCALLTYPE d3d12_command_list_IASetIndexBuffer(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_IASetIndexBuffer(ID3D12GraphicsCommandList2 *iface,
const D3D12_INDEX_BUFFER_VIEW *view)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
const struct vkd3d_vk_device_procs *vk_procs;
struct d3d12_resource *resource;
enum VkIndexType index_type;
@@ -4378,10 +4379,10 @@ static void STDMETHODCALLTYPE d3d12_command_list_IASetIndexBuffer(ID3D12Graphics
view->BufferLocation - resource->gpu_address, index_type));
}
-static void STDMETHODCALLTYPE d3d12_command_list_IASetVertexBuffers(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_IASetVertexBuffers(ID3D12GraphicsCommandList2 *iface,
UINT start_slot, UINT view_count, const D3D12_VERTEX_BUFFER_VIEW *views)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
const struct vkd3d_null_resources *null_resources;
struct vkd3d_gpu_va_allocator *gpu_va_allocator;
VkDeviceSize offsets[ARRAY_SIZE(list->strides)];
@@ -4430,10 +4431,10 @@ static void STDMETHODCALLTYPE d3d12_command_list_IASetVertexBuffers(ID3D12Graphi
d3d12_command_list_invalidate_current_pipeline(list);
}
-static void STDMETHODCALLTYPE d3d12_command_list_SOSetTargets(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_SOSetTargets(ID3D12GraphicsCommandList2 *iface,
UINT start_slot, UINT view_count, const D3D12_STREAM_OUTPUT_BUFFER_VIEW *views)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
VkDeviceSize offsets[ARRAY_SIZE(list->so_counter_buffers)];
VkDeviceSize sizes[ARRAY_SIZE(list->so_counter_buffers)];
VkBuffer buffers[ARRAY_SIZE(list->so_counter_buffers)];
@@ -4495,11 +4496,11 @@ static void STDMETHODCALLTYPE d3d12_command_list_SOSetTargets(ID3D12GraphicsComm
VK_CALL(vkCmdBindTransformFeedbackBuffersEXT(list->vk_command_buffer, first, count, buffers, offsets, sizes));
}
-static void STDMETHODCALLTYPE d3d12_command_list_OMSetRenderTargets(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_OMSetRenderTargets(ID3D12GraphicsCommandList2 *iface,
UINT render_target_descriptor_count, const D3D12_CPU_DESCRIPTOR_HANDLE *render_target_descriptors,
BOOL single_descriptor_handle, const D3D12_CPU_DESCRIPTOR_HANDLE *depth_stencil_descriptor)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
const struct d3d12_rtv_desc *rtv_desc;
const struct d3d12_dsv_desc *dsv_desc;
VkFormat prev_dsv_format;
@@ -4700,12 +4701,12 @@ static void d3d12_command_list_clear(struct d3d12_command_list *list,
}
}
-static void STDMETHODCALLTYPE d3d12_command_list_ClearDepthStencilView(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_ClearDepthStencilView(ID3D12GraphicsCommandList2 *iface,
D3D12_CPU_DESCRIPTOR_HANDLE dsv, D3D12_CLEAR_FLAGS flags, float depth, UINT8 stencil,
UINT rect_count, const D3D12_RECT *rects)
{
const union VkClearValue clear_value = {.depthStencil = {depth, stencil}};
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
const struct d3d12_dsv_desc *dsv_desc = d3d12_dsv_desc_from_cpu_handle(dsv);
struct VkAttachmentDescription attachment_desc;
struct VkAttachmentReference ds_reference;
@@ -4749,10 +4750,10 @@ static void STDMETHODCALLTYPE d3d12_command_list_ClearDepthStencilView(ID3D12Gra
&clear_value, rect_count, rects);
}
-static void STDMETHODCALLTYPE d3d12_command_list_ClearRenderTargetView(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_ClearRenderTargetView(ID3D12GraphicsCommandList2 *iface,
D3D12_CPU_DESCRIPTOR_HANDLE rtv, const FLOAT color[4], UINT rect_count, const D3D12_RECT *rects)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
const struct d3d12_rtv_desc *rtv_desc = d3d12_rtv_desc_from_cpu_handle(rtv);
struct VkAttachmentDescription attachment_desc;
struct VkAttachmentReference color_reference;
@@ -4995,11 +4996,11 @@ static const struct vkd3d_format *vkd3d_fixup_clear_uav_uint_colour(struct d3d12
}
}
-static void STDMETHODCALLTYPE d3d12_command_list_ClearUnorderedAccessViewUint(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_ClearUnorderedAccessViewUint(ID3D12GraphicsCommandList2 *iface,
D3D12_GPU_DESCRIPTOR_HANDLE gpu_handle, D3D12_CPU_DESCRIPTOR_HANDLE cpu_handle, ID3D12Resource *resource,
const UINT values[4], UINT rect_count, const D3D12_RECT *rects)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
struct d3d12_device *device = list->device;
struct vkd3d_view *view, *uint_view = NULL;
struct vkd3d_texture_view_desc view_desc;
@@ -5057,11 +5058,11 @@ static void STDMETHODCALLTYPE d3d12_command_list_ClearUnorderedAccessViewUint(ID
vkd3d_view_decref(uint_view, device);
}
-static void STDMETHODCALLTYPE d3d12_command_list_ClearUnorderedAccessViewFloat(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_ClearUnorderedAccessViewFloat(ID3D12GraphicsCommandList2 *iface,
D3D12_GPU_DESCRIPTOR_HANDLE gpu_handle, D3D12_CPU_DESCRIPTOR_HANDLE cpu_handle, ID3D12Resource *resource,
const float values[4], UINT rect_count, const D3D12_RECT *rects)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
struct d3d12_resource *resource_impl;
VkClearColorValue colour;
struct vkd3d_view *view;
@@ -5076,16 +5077,16 @@ static void STDMETHODCALLTYPE d3d12_command_list_ClearUnorderedAccessViewFloat(I
d3d12_command_list_clear_uav(list, resource_impl, view, &colour, rect_count, rects);
}
-static void STDMETHODCALLTYPE d3d12_command_list_DiscardResource(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_DiscardResource(ID3D12GraphicsCommandList2 *iface,
ID3D12Resource *resource, const D3D12_DISCARD_REGION *region)
{
FIXME_ONCE("iface %p, resource %p, region %p stub!\n", iface, resource, region);
}
-static void STDMETHODCALLTYPE d3d12_command_list_BeginQuery(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_BeginQuery(ID3D12GraphicsCommandList2 *iface,
ID3D12QueryHeap *heap, D3D12_QUERY_TYPE type, UINT index)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
struct d3d12_query_heap *query_heap = unsafe_impl_from_ID3D12QueryHeap(heap);
const struct vkd3d_vk_device_procs *vk_procs;
VkQueryControlFlags flags = 0;
@@ -5112,10 +5113,10 @@ static void STDMETHODCALLTYPE d3d12_command_list_BeginQuery(ID3D12GraphicsComman
VK_CALL(vkCmdBeginQuery(list->vk_command_buffer, query_heap->vk_query_pool, index, flags));
}
-static void STDMETHODCALLTYPE d3d12_command_list_EndQuery(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_EndQuery(ID3D12GraphicsCommandList2 *iface,
ID3D12QueryHeap *heap, D3D12_QUERY_TYPE type, UINT index)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
struct d3d12_query_heap *query_heap = unsafe_impl_from_ID3D12QueryHeap(heap);
const struct vkd3d_vk_device_procs *vk_procs;
@@ -5157,12 +5158,12 @@ static size_t get_query_stride(D3D12_QUERY_TYPE type)
return sizeof(uint64_t);
}
-static void STDMETHODCALLTYPE d3d12_command_list_ResolveQueryData(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_ResolveQueryData(ID3D12GraphicsCommandList2 *iface,
ID3D12QueryHeap *heap, D3D12_QUERY_TYPE type, UINT start_index, UINT query_count,
ID3D12Resource *dst_buffer, UINT64 aligned_dst_buffer_offset)
{
const struct d3d12_query_heap *query_heap = unsafe_impl_from_ID3D12QueryHeap(heap);
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
struct d3d12_resource *buffer = unsafe_impl_from_ID3D12Resource(dst_buffer);
const struct vkd3d_vk_device_procs *vk_procs;
unsigned int i, first, count;
@@ -5238,10 +5239,10 @@ static void STDMETHODCALLTYPE d3d12_command_list_ResolveQueryData(ID3D12Graphics
}
}
-static void STDMETHODCALLTYPE d3d12_command_list_SetPredication(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_SetPredication(ID3D12GraphicsCommandList2 *iface,
ID3D12Resource *buffer, UINT64 aligned_buffer_offset, D3D12_PREDICATION_OP operation)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
struct d3d12_resource *resource = unsafe_impl_from_ID3D12Resource(buffer);
const struct vkd3d_vulkan_info *vk_info = &list->device->vk_info;
const struct vkd3d_vk_device_procs *vk_procs;
@@ -5310,19 +5311,19 @@ static void STDMETHODCALLTYPE d3d12_command_list_SetPredication(ID3D12GraphicsCo
}
}
-static void STDMETHODCALLTYPE d3d12_command_list_SetMarker(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_SetMarker(ID3D12GraphicsCommandList2 *iface,
UINT metadata, const void *data, UINT size)
{
FIXME("iface %p, metadata %#x, data %p, size %u stub!\n", iface, metadata, data, size);
}
-static void STDMETHODCALLTYPE d3d12_command_list_BeginEvent(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_BeginEvent(ID3D12GraphicsCommandList2 *iface,
UINT metadata, const void *data, UINT size)
{
FIXME("iface %p, metadata %#x, data %p, size %u stub!\n", iface, metadata, data, size);
}
-static void STDMETHODCALLTYPE d3d12_command_list_EndEvent(ID3D12GraphicsCommandList1 *iface)
+static void STDMETHODCALLTYPE d3d12_command_list_EndEvent(ID3D12GraphicsCommandList2 *iface)
{
FIXME("iface %p stub!\n", iface);
}
@@ -5331,14 +5332,14 @@ STATIC_ASSERT(sizeof(VkDispatchIndirectCommand) == sizeof(D3D12_DISPATCH_ARGUMEN
STATIC_ASSERT(sizeof(VkDrawIndexedIndirectCommand) == sizeof(D3D12_DRAW_INDEXED_ARGUMENTS));
STATIC_ASSERT(sizeof(VkDrawIndirectCommand) == sizeof(D3D12_DRAW_ARGUMENTS));
-static void STDMETHODCALLTYPE d3d12_command_list_ExecuteIndirect(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_ExecuteIndirect(ID3D12GraphicsCommandList2 *iface,
ID3D12CommandSignature *command_signature, UINT max_command_count, ID3D12Resource *arg_buffer,
UINT64 arg_buffer_offset, ID3D12Resource *count_buffer, UINT64 count_buffer_offset)
{
struct d3d12_command_signature *sig_impl = unsafe_impl_from_ID3D12CommandSignature(command_signature);
struct d3d12_resource *count_impl = unsafe_impl_from_ID3D12Resource(count_buffer);
struct d3d12_resource *arg_impl = unsafe_impl_from_ID3D12Resource(arg_buffer);
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
const D3D12_COMMAND_SIGNATURE_DESC *signature_desc;
const struct vkd3d_vk_device_procs *vk_procs;
unsigned int i;
@@ -5432,7 +5433,7 @@ static void STDMETHODCALLTYPE d3d12_command_list_ExecuteIndirect(ID3D12GraphicsC
}
}
-static void STDMETHODCALLTYPE d3d12_command_list_AtomicCopyBufferUINT(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_AtomicCopyBufferUINT(ID3D12GraphicsCommandList2 *iface,
ID3D12Resource *dst_buffer, UINT64 dst_offset,
ID3D12Resource *src_buffer, UINT64 src_offset,
UINT dependent_resource_count, ID3D12Resource * const *dependent_resources,
@@ -5445,7 +5446,7 @@ static void STDMETHODCALLTYPE d3d12_command_list_AtomicCopyBufferUINT(ID3D12Grap
dependent_resource_count, dependent_resources, dependent_sub_resource_ranges);
}
-static void STDMETHODCALLTYPE d3d12_command_list_AtomicCopyBufferUINT64(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_AtomicCopyBufferUINT64(ID3D12GraphicsCommandList2 *iface,
ID3D12Resource *dst_buffer, UINT64 dst_offset,
ID3D12Resource *src_buffer, UINT64 src_offset,
UINT dependent_resource_count, ID3D12Resource * const *dependent_resources,
@@ -5458,20 +5459,20 @@ static void STDMETHODCALLTYPE d3d12_command_list_AtomicCopyBufferUINT64(ID3D12Gr
dependent_resource_count, dependent_resources, dependent_sub_resource_ranges);
}
-static void STDMETHODCALLTYPE d3d12_command_list_OMSetDepthBounds(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_OMSetDepthBounds(ID3D12GraphicsCommandList2 *iface,
FLOAT min, FLOAT max)
{
FIXME("iface %p, min %.8e, max %.8e stub!\n", iface, min, max);
}
-static void STDMETHODCALLTYPE d3d12_command_list_SetSamplePositions(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_SetSamplePositions(ID3D12GraphicsCommandList2 *iface,
UINT sample_count, UINT pixel_count, D3D12_SAMPLE_POSITION *sample_positions)
{
FIXME("iface %p, sample_count %u, pixel_count %u, sample_positions %p stub!\n",
iface, sample_count, pixel_count, sample_positions);
}
-static void STDMETHODCALLTYPE d3d12_command_list_ResolveSubresourceRegion(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_ResolveSubresourceRegion(ID3D12GraphicsCommandList2 *iface,
ID3D12Resource *dst_resource, UINT dst_sub_resource_idx, UINT dst_x, UINT dst_y,
ID3D12Resource *src_resource, UINT src_sub_resource_idx,
D3D12_RECT *src_rect, DXGI_FORMAT format, D3D12_RESOLVE_MODE mode)
@@ -5483,12 +5484,29 @@ static void STDMETHODCALLTYPE d3d12_command_list_ResolveSubresourceRegion(ID3D12
src_resource, src_sub_resource_idx, src_rect, format, mode);
}
-static void STDMETHODCALLTYPE d3d12_command_list_SetViewInstanceMask(ID3D12GraphicsCommandList1 *iface, UINT mask)
+static void STDMETHODCALLTYPE d3d12_command_list_SetViewInstanceMask(ID3D12GraphicsCommandList2 *iface, UINT mask)
{
FIXME("iface %p, mask %#x stub!\n", iface, mask);
}
-static const struct ID3D12GraphicsCommandList1Vtbl d3d12_command_list_vtbl =
+static void STDMETHODCALLTYPE d3d12_command_list_WriteBufferImmediate(ID3D12GraphicsCommandList2 *iface,
+ UINT count, const D3D12_WRITEBUFFERIMMEDIATE_PARAMETER *parameters,
+ const D3D12_WRITEBUFFERIMMEDIATE_MODE *modes)
+{
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
+ struct d3d12_resource *resource;
+ unsigned int i;
+
+ FIXME("iface %p, count %u, parameters %p, modes %p stub!\n", iface, count, parameters, modes);
+
+ for (i = 0; i < count; ++i)
+ {
+ resource = vkd3d_gpu_va_allocator_dereference(&list->device->gpu_va_allocator, parameters[i].Dest);
+ d3d12_command_list_track_resource_usage(list, resource);
+ }
+}
+
+static const struct ID3D12GraphicsCommandList2Vtbl d3d12_command_list_vtbl =
{
/* IUnknown methods */
d3d12_command_list_QueryInterface,
@@ -5562,6 +5580,8 @@ static const struct ID3D12GraphicsCommandList1Vtbl d3d12_command_list_vtbl =
d3d12_command_list_SetSamplePositions,
d3d12_command_list_ResolveSubresourceRegion,
d3d12_command_list_SetViewInstanceMask,
+ /* ID3D12GraphicsCommandList2 methods */
+ d3d12_command_list_WriteBufferImmediate,
};
static struct d3d12_command_list *unsafe_impl_from_ID3D12CommandList(ID3D12CommandList *iface)
@@ -5569,7 +5589,7 @@ static struct d3d12_command_list *unsafe_impl_from_ID3D12CommandList(ID3D12Comma
if (!iface)
return NULL;
assert(iface->lpVtbl == (struct ID3D12CommandListVtbl *)&d3d12_command_list_vtbl);
- return CONTAINING_RECORD(iface, struct d3d12_command_list, ID3D12GraphicsCommandList1_iface);
+ return CONTAINING_RECORD(iface, struct d3d12_command_list, ID3D12GraphicsCommandList2_iface);
}
static HRESULT d3d12_command_list_init(struct d3d12_command_list *list, struct d3d12_device *device,
@@ -5578,7 +5598,7 @@ static HRESULT d3d12_command_list_init(struct d3d12_command_list *list, struct d
{
HRESULT hr;
- list->ID3D12GraphicsCommandList1_iface.lpVtbl = &d3d12_command_list_vtbl;
+ list->ID3D12GraphicsCommandList2_iface.lpVtbl = &d3d12_command_list_vtbl;
list->refcount = 1;
list->type = type;
diff --git a/libs/vkd3d/device.c b/libs/vkd3d/device.c
index e3bb2aa..96ab6b7 100644
--- a/libs/vkd3d/device.c
+++ b/libs/vkd3d/device.c
@@ -2308,8 +2308,8 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_CreateCommandList(ID3D12Device *if
initial_pipeline_state, &object)))
return hr;
- return return_interface(&object->ID3D12GraphicsCommandList1_iface,
- &IID_ID3D12GraphicsCommandList1, riid, command_list);
+ return return_interface(&object->ID3D12GraphicsCommandList2_iface,
+ &IID_ID3D12GraphicsCommandList2, riid, command_list);
}
/* Direct3D feature levels restrict which formats can be optionally supported. */
diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h
index 9ff6bba..0c031d2 100644
--- a/libs/vkd3d/vkd3d_private.h
+++ b/libs/vkd3d/vkd3d_private.h
@@ -931,7 +931,7 @@ struct vkd3d_pipeline_bindings
/* ID3D12CommandList */
struct d3d12_command_list
{
- ID3D12GraphicsCommandList1 ID3D12GraphicsCommandList1_iface;
+ ID3D12GraphicsCommandList2 ID3D12GraphicsCommandList2_iface;
LONG refcount;
D3D12_COMMAND_LIST_TYPE type;
diff --git a/tests/d3d12.c b/tests/d3d12.c
index b08f115..323ef23 100644
--- a/tests/d3d12.c
+++ b/tests/d3d12.c
@@ -32776,9 +32776,9 @@ static void test_write_buffer_immediate(void)
get_buffer_readback_with_command_list(buffer, DXGI_FORMAT_R32_UINT, &rb, queue, command_list);
value = get_readback_uint(&rb, 0, 0, 0);
- ok(value == parameters[0].Value, "Got unexpected value %#x, expected %#x.\n", value, parameters[0].Value);
+ todo ok(value == parameters[0].Value, "Got unexpected value %#x, expected %#x.\n", value, parameters[0].Value);
value = get_readback_uint(&rb, 1, 0, 0);
- ok(value == parameters[1].Value, "Got unexpected value %#x, expected %#x.\n", value, parameters[1].Value);
+ todo ok(value == parameters[1].Value, "Got unexpected value %#x, expected %#x.\n", value, parameters[1].Value);
release_resource_readback(&rb);
reset_command_list(command_list, context.allocator);
@@ -32795,16 +32795,16 @@ static void test_write_buffer_immediate(void)
get_buffer_readback_with_command_list(buffer, DXGI_FORMAT_R32_UINT, &rb, queue, command_list);
value = get_readback_uint(&rb, 0, 0, 0);
- ok(value == parameters[0].Value, "Got unexpected value %#x, expected %#x.\n", value, parameters[0].Value);
+ todo ok(value == parameters[0].Value, "Got unexpected value %#x, expected %#x.\n", value, parameters[0].Value);
value = get_readback_uint(&rb, 1, 0, 0);
- ok(value == parameters[1].Value, "Got unexpected value %#x, expected %#x.\n", value, parameters[1].Value);
+ todo ok(value == parameters[1].Value, "Got unexpected value %#x, expected %#x.\n", value, parameters[1].Value);
release_resource_readback(&rb);
reset_command_list(command_list, context.allocator);
modes[0] = 0x7fffffff;
ID3D12GraphicsCommandList2_WriteBufferImmediate(command_list2, ARRAY_SIZE(parameters), parameters, modes);
hr = ID3D12GraphicsCommandList_Close(command_list);
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ todo ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
ID3D12Resource_Release(buffer);
ID3D12GraphicsCommandList2_Release(command_list2);
--
2.11.0
Dec. 6, 2019
[PATCH vkd3d 2/6] vkd3d/tests: Add tests for ID3D12GraphicsCommandList2::WriteBufferImmediate().
by Henri Verbeet
From: Conor McCarthy <cmccarthy(a)codeweavers.com>
Signed-off-by: Conor McCarthy <cmccarthy(a)codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
This supersedes patch 174170.
include/vkd3d_d3d12.idl | 26 +++++++++++++++
tests/d3d12.c | 84 +++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 110 insertions(+)
diff --git a/include/vkd3d_d3d12.idl b/include/vkd3d_d3d12.idl
index b887480..3bfe47b 100644
--- a/include/vkd3d_d3d12.idl
+++ b/include/vkd3d_d3d12.idl
@@ -177,6 +177,13 @@ typedef enum D3D12_FORMAT_SUPPORT2
D3D12_FORMAT_SUPPORT2_MULTIPLANE_OVERLAY = 0x00004000,
} D3D12_FORMAT_SUPPORT2;
+typedef enum D3D12_WRITEBUFFERIMMEDIATE_MODE
+{
+ D3D12_WRITEBUFFERIMMEDIATE_MODE_DEFAULT = 0x0,
+ D3D12_WRITEBUFFERIMMEDIATE_MODE_MARKER_IN = 0x1,
+ D3D12_WRITEBUFFERIMMEDIATE_MODE_MARKER_OUT = 0x2,
+} D3D12_WRITEBUFFERIMMEDIATE_MODE;
+
interface ID3D12Fence;
interface ID3D12RootSignature;
interface ID3D12Heap;
@@ -1657,6 +1664,12 @@ typedef enum D3D12_RESIDENCY_PRIORITY
D3D12_RESIDENCY_PRIORITY_MAXIMUM = 0xc8000000,
} D3D12_RESIDENCY_PRIORITY;
+typedef struct D3D12_WRITEBUFFERIMMEDIATE_PARAMETER
+{
+ D3D12_GPU_VIRTUAL_ADDRESS Dest;
+ UINT32 Value;
+} D3D12_WRITEBUFFERIMMEDIATE_PARAMETER;
+
[
uuid(c4fec28f-7966-4e95-9f94-f431cb56c3b8),
object,
@@ -2004,6 +2017,19 @@ interface ID3D12GraphicsCommandList1 : ID3D12GraphicsCommandList
void SetViewInstanceMask(UINT mask);
}
+[
+ uuid(38c3e585-ff17-412c-9150-4fc6f9d72a28),
+ object,
+ local,
+ pointer_default(unique)
+]
+interface ID3D12GraphicsCommandList2 : ID3D12GraphicsCommandList1
+{
+ void WriteBufferImmediate(UINT count,
+ const D3D12_WRITEBUFFERIMMEDIATE_PARAMETER *parameters,
+ const D3D12_WRITEBUFFERIMMEDIATE_MODE *modes);
+}
+
typedef enum D3D12_TILE_RANGE_FLAGS
{
D3D12_TILE_RANGE_FLAG_NONE = 0x0,
diff --git a/tests/d3d12.c b/tests/d3d12.c
index 578ae56..b08f115 100644
--- a/tests/d3d12.c
+++ b/tests/d3d12.c
@@ -32728,6 +32728,89 @@ static void test_bufinfo_instruction(void)
destroy_test_context(&context);
}
+static void test_write_buffer_immediate(void)
+{
+ D3D12_WRITEBUFFERIMMEDIATE_PARAMETER parameters[2];
+ ID3D12GraphicsCommandList2 *command_list2;
+ D3D12_WRITEBUFFERIMMEDIATE_MODE modes[2];
+ ID3D12GraphicsCommandList *command_list;
+ struct resource_readback rb;
+ struct test_context context;
+ ID3D12CommandQueue *queue;
+ ID3D12Resource *buffer;
+ ID3D12Device *device;
+ unsigned int value;
+ HRESULT hr;
+
+ static const unsigned int data_values[] = {0xdeadbeef, 0xf00baa};
+
+ if (!init_test_context(&context, NULL))
+ return;
+ device = context.device;
+ command_list = context.list;
+ queue = context.queue;
+
+ if (FAILED(hr = ID3D12GraphicsCommandList_QueryInterface(command_list,
+ &IID_ID3D12GraphicsCommandList2, (void **)&command_list2)))
+ {
+ skip("ID3D12GraphicsCommandList2 not implemented.\n");
+ destroy_test_context(&context);
+ return;
+ }
+
+ buffer = create_default_buffer(device, sizeof(data_values),
+ D3D12_RESOURCE_FLAG_NONE, D3D12_RESOURCE_STATE_COPY_DEST);
+ upload_buffer_data(buffer, 0, sizeof(data_values), data_values, queue, command_list);
+ reset_command_list(command_list, context.allocator);
+
+ parameters[0].Dest = ID3D12Resource_GetGPUVirtualAddress(buffer);
+ parameters[0].Value = 0x1020304;
+ parameters[1].Dest = parameters[0].Dest + sizeof(data_values[0]);
+ parameters[1].Value = 0xc0d0e0f;
+ ID3D12GraphicsCommandList2_WriteBufferImmediate(command_list2, ARRAY_SIZE(parameters), parameters, NULL);
+ hr = ID3D12GraphicsCommandList_Close(command_list);
+ ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ exec_command_list(queue, command_list);
+ wait_queue_idle(device, queue);
+ reset_command_list(command_list, context.allocator);
+
+ get_buffer_readback_with_command_list(buffer, DXGI_FORMAT_R32_UINT, &rb, queue, command_list);
+ value = get_readback_uint(&rb, 0, 0, 0);
+ ok(value == parameters[0].Value, "Got unexpected value %#x, expected %#x.\n", value, parameters[0].Value);
+ value = get_readback_uint(&rb, 1, 0, 0);
+ ok(value == parameters[1].Value, "Got unexpected value %#x, expected %#x.\n", value, parameters[1].Value);
+ release_resource_readback(&rb);
+ reset_command_list(command_list, context.allocator);
+
+ parameters[0].Value = 0x2030405;
+ parameters[1].Value = 0xb0c0d0e;
+ modes[0] = D3D12_WRITEBUFFERIMMEDIATE_MODE_MARKER_IN;
+ modes[1] = D3D12_WRITEBUFFERIMMEDIATE_MODE_MARKER_OUT;
+ ID3D12GraphicsCommandList2_WriteBufferImmediate(command_list2, ARRAY_SIZE(parameters), parameters, modes);
+ hr = ID3D12GraphicsCommandList_Close(command_list);
+ ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ exec_command_list(queue, command_list);
+ wait_queue_idle(device, queue);
+ reset_command_list(command_list, context.allocator);
+
+ get_buffer_readback_with_command_list(buffer, DXGI_FORMAT_R32_UINT, &rb, queue, command_list);
+ value = get_readback_uint(&rb, 0, 0, 0);
+ ok(value == parameters[0].Value, "Got unexpected value %#x, expected %#x.\n", value, parameters[0].Value);
+ value = get_readback_uint(&rb, 1, 0, 0);
+ ok(value == parameters[1].Value, "Got unexpected value %#x, expected %#x.\n", value, parameters[1].Value);
+ release_resource_readback(&rb);
+ reset_command_list(command_list, context.allocator);
+
+ modes[0] = 0x7fffffff;
+ ID3D12GraphicsCommandList2_WriteBufferImmediate(command_list2, ARRAY_SIZE(parameters), parameters, modes);
+ hr = ID3D12GraphicsCommandList_Close(command_list);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+
+ ID3D12Resource_Release(buffer);
+ ID3D12GraphicsCommandList2_Release(command_list2);
+ destroy_test_context(&context);
+}
+
START_TEST(d3d12)
{
parse_args(argc, argv);
@@ -32891,4 +32974,5 @@ START_TEST(d3d12)
run_test(test_early_depth_stencil_tests);
run_test(test_conditional_rendering);
run_test(test_bufinfo_instruction);
+ run_test(test_write_buffer_immediate);
}
--
2.11.0
Dec. 6, 2019
[PATCH vkd3d 1/6] vkd3d: Add SetViewInstanceMask() to the ID3D12GraphicsCommandList1 interface.
by Henri Verbeet
From: Conor McCarthy <cmccarthy(a)codeweavers.com>
This method was missing in version 10.0.15063.0 of the SDK, but is
present in version 10.0.18362.0, without a UUID change. Presumably that
means this was simply an omission in the older header, rather than an
API change in the newer header.
Signed-off-by: Conor McCarthy <cmccarthy(a)codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
include/vkd3d_d3d12.idl | 2 ++
libs/vkd3d/command.c | 6 ++++++
2 files changed, 8 insertions(+)
diff --git a/include/vkd3d_d3d12.idl b/include/vkd3d_d3d12.idl
index ec8b83d..b887480 100644
--- a/include/vkd3d_d3d12.idl
+++ b/include/vkd3d_d3d12.idl
@@ -2000,6 +2000,8 @@ interface ID3D12GraphicsCommandList1 : ID3D12GraphicsCommandList
UINT dst_sub_resource_idx, UINT dst_x, UINT dst_y,
ID3D12Resource *src_resource, UINT src_sub_resource_idx,
D3D12_RECT *src_rect, DXGI_FORMAT format, D3D12_RESOLVE_MODE mode);
+
+ void SetViewInstanceMask(UINT mask);
}
typedef enum D3D12_TILE_RANGE_FLAGS
diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c
index 75af27d..d6feecf 100644
--- a/libs/vkd3d/command.c
+++ b/libs/vkd3d/command.c
@@ -5483,6 +5483,11 @@ static void STDMETHODCALLTYPE d3d12_command_list_ResolveSubresourceRegion(ID3D12
src_resource, src_sub_resource_idx, src_rect, format, mode);
}
+static void STDMETHODCALLTYPE d3d12_command_list_SetViewInstanceMask(ID3D12GraphicsCommandList1 *iface, UINT mask)
+{
+ FIXME("iface %p, mask %#x stub!\n", iface, mask);
+}
+
static const struct ID3D12GraphicsCommandList1Vtbl d3d12_command_list_vtbl =
{
/* IUnknown methods */
@@ -5556,6 +5561,7 @@ static const struct ID3D12GraphicsCommandList1Vtbl d3d12_command_list_vtbl =
d3d12_command_list_OMSetDepthBounds,
d3d12_command_list_SetSamplePositions,
d3d12_command_list_ResolveSubresourceRegion,
+ d3d12_command_list_SetViewInstanceMask,
};
static struct d3d12_command_list *unsafe_impl_from_ID3D12CommandList(ID3D12CommandList *iface)
--
2.11.0
Dec. 6, 2019
[PATCH] odbcbcp: add new stub dll
by Louis Lenders
https://bugs.winehq.org/show_bug.cgi?id=48234
Signed-off-by: Louis Lenders <xerox.xerox2000x(a)gmail.com>
---
configure | 2 ++
configure.ac | 1 +
dlls/odbcbcp/Makefile.in | 6 ++++++
dlls/odbcbcp/main.c | 40 +++++++++++++++++++++++++++++++++++++++
dlls/odbcbcp/odbcbcp.spec | 28 +++++++++++++++++++++++++++
5 files changed, 77 insertions(+)
create mode 100644 dlls/odbcbcp/Makefile.in
create mode 100644 dlls/odbcbcp/main.c
create mode 100644 dlls/odbcbcp/odbcbcp.spec
diff --git a/configure b/configure
index 822669da7e..576500d8af 100755
--- a/configure
+++ b/configure
@@ -1493,6 +1493,7 @@ enable_ntoskrnl_exe
enable_ntprint
enable_objsel
enable_odbc32
+enable_odbcbcp
enable_odbccp32
enable_odbccu32
enable_ole32
@@ -20702,6 +20703,7 @@ wine_fn_config_makefile dlls/ntprint enable_ntprint
wine_fn_config_makefile dlls/ntprint/tests enable_tests
wine_fn_config_makefile dlls/objsel enable_objsel
wine_fn_config_makefile dlls/odbc32 enable_odbc32
+wine_fn_config_makefile dlls/odbcbcp enable_odbcbcp
wine_fn_config_makefile dlls/odbccp32 enable_odbccp32
wine_fn_config_makefile dlls/odbccp32/tests enable_tests
wine_fn_config_makefile dlls/odbccu32 enable_odbccu32
diff --git a/configure.ac b/configure.ac
index 7f2c3cda23..a002788041 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3557,6 +3557,7 @@ WINE_CONFIG_MAKEFILE(dlls/ntprint)
WINE_CONFIG_MAKEFILE(dlls/ntprint/tests)
WINE_CONFIG_MAKEFILE(dlls/objsel)
WINE_CONFIG_MAKEFILE(dlls/odbc32)
+WINE_CONFIG_MAKEFILE(dlls/odbcbcp)
WINE_CONFIG_MAKEFILE(dlls/odbccp32)
WINE_CONFIG_MAKEFILE(dlls/odbccp32/tests)
WINE_CONFIG_MAKEFILE(dlls/odbccu32)
diff --git a/dlls/odbcbcp/Makefile.in b/dlls/odbcbcp/Makefile.in
new file mode 100644
index 0000000000..c0269cb5a9
--- /dev/null
+++ b/dlls/odbcbcp/Makefile.in
@@ -0,0 +1,6 @@
+MODULE = odbcbcp.dll
+
+EXTRADLLFLAGS = -mno-cygwin
+
+C_SRCS = \
+ main.c
diff --git a/dlls/odbcbcp/main.c b/dlls/odbcbcp/main.c
new file mode 100644
index 0000000000..ef7920765d
--- /dev/null
+++ b/dlls/odbcbcp/main.c
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2019 Louis Lenders
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(odbcbcp);
+
+BOOL WINAPI DllMain(HINSTANCE dll, DWORD reason, LPVOID reserved)
+{
+ TRACE("(%p, %d, %p)\n", dll, reason, reserved);
+
+ switch (reason)
+ {
+ case DLL_WINE_PREATTACH:
+ return FALSE; /* prefer native version */
+ case DLL_PROCESS_ATTACH:
+ DisableThreadLibraryCalls(dll);
+ break;
+ }
+ return TRUE;
+}
diff --git a/dlls/odbcbcp/odbcbcp.spec b/dlls/odbcbcp/odbcbcp.spec
new file mode 100644
index 0000000000..abaeff1003
--- /dev/null
+++ b/dlls/odbcbcp/odbcbcp.spec
@@ -0,0 +1,28 @@
+@ stub bcp_batch
+@ stub bcp_bind
+@ stub bcp_colfmt
+@ stub bcp_collen
+@ stub bcp_colptr
+@ stub bcp_columns
+@ stub bcp_control
+@ stub bcp_done
+@ stub bcp_exec
+@ stub bcp_getcolfmt
+@ stub bcp_initA
+@ stub bcp_initW
+@ stub bcp_moretext
+@ stub bcp_readfmtA
+@ stub bcp_readfmtW
+@ stub bcp_sendrow
+@ stub bcp_setcolfmt
+@ stub bcp_writefmtA
+@ stub bcp_writefmtW
+@ stub dbprtypeA
+@ stub dbprtypeW
+@ stub LibMain
+@ stub SQLCloseEnumServers
+@ stub SQLGetNextEnumeration
+@ stub SQLInitEnumServers
+@ stub SQLLinkedCatalogsA
+@ stub SQLLinkedCatalogsW
+@ stub SQLLinkedServers
--
2.24.0
Dec. 6, 2019
Re: [PATCH 4/4] d3d8: Update the primary stateblock in d3d8_device_MultiplyTransform().
by Henri Verbeet
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
Dec. 6, 2019
Re: [PATCH 3/4] d3d9: Update the primary stateblock in d3d9_device_MultiplyTransform().
by Henri Verbeet
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
Dec. 6, 2019
Re: [PATCH 2/4] ddraw: Update the primary stateblock in d3d_device7_MultiplyTransform().
by Henri Verbeet
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
Dec. 6, 2019
Re: [PATCH 1/4] wined3d: Introduce wined3d_stateblock_multiply_transform().
by Henri Verbeet
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
Dec. 6, 2019
Re: [PATCH v3 3/3] xmllite: Expand test for any unparsed data at end of XML.
by Nikolay Sivov
On 12/5/19 10:53 PM, Jeff Smith wrote:
> @@ -2662,7 +2663,7 @@ static HRESULT reader_parse_nextnode(xmlreader *reader)
> hr = reader_parse_misc(reader);
> if (hr != S_FALSE) return hr;
>
> - if (*reader_get_ptr(reader))
> + if (buffer->cur*sizeof(WCHAR) < buffer->written)
> {
> WARN("found garbage in the end of XML\n");
> return WC_E_SYNTAX;
That means we don't have enough data, it's another change not backed by
tests and potentially depending on current read-ahead buffer size/filled
level.
Dec. 6, 2019
Re: [PATCH v3 2/3] xmllite: Whitespace node not returned when followed by invalid character.
by Nikolay Sivov
On 12/5/19 10:53 PM, Jeff Smith wrote:
> Signed-off-by: Jeff Smith <whydoubt(a)gmail.com>
> ---
> dlls/xmllite/reader.c | 12 ++++++++++--
> dlls/xmllite/tests/reader.c | 2 --
> 2 files changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/dlls/xmllite/reader.c b/dlls/xmllite/reader.c
> index eddc4d8eec..79e5c2253a 100644
> --- a/dlls/xmllite/reader.c
> +++ b/dlls/xmllite/reader.c
> @@ -1113,8 +1113,8 @@ static inline UINT reader_get_cur(xmlreader *reader)
> static inline WCHAR *reader_get_ptr(xmlreader *reader)
> {
> encoded_buffer *buffer = &reader->input->buffer->utf16;
> - WCHAR *ptr = (WCHAR*)buffer->data + buffer->cur;
> - if (!*ptr) reader_more(reader);
> + if (buffer->cur*sizeof(WCHAR) >= buffer->written)
> + reader_more(reader);
> return (WCHAR*)buffer->data + buffer->cur;
> }
Why do you need to change that? It's used everywhere.
>
> @@ -1714,8 +1714,16 @@ static HRESULT reader_parse_whitespace(xmlreader *reader)
> {
> strval value;
> UINT start;
> + const encoded_buffer *buffer = &reader->input->buffer->utf16;
>
> reader_skipspaces(reader);
> +
> + /* Do NOT return Whitespace node if followed by a character other than '<'.
> + * The reader_skipspaces call should have already read in the character. */
> + if (buffer->cur*sizeof(WCHAR) < buffer->written &&
> + *reader_get_ptr2(reader, buffer->cur) != '<')
> + return WC_E_SYNTAX;
> +
Buffer access should not be exposed like that.
> if (is_reader_pending(reader)) return S_OK;
>
> start = reader->resume[XmlReadResume_Body];
> diff --git a/dlls/xmllite/tests/reader.c b/dlls/xmllite/tests/reader.c
> index 88b9103e1e..b02301907d 100644
> --- a/dlls/xmllite/tests/reader.c
> +++ b/dlls/xmllite/tests/reader.c
> @@ -1064,10 +1064,8 @@ todo_wine
>
> type = -1;
> hr = IXmlReader_Read(reader, &type);
> -todo_wine {
> ok(hr == WC_E_SYNTAX || broken(hr == WC_E_XMLCHARACTER), "expected WC_E_SYNTAX, got 0x%08x\n", hr);
> ok(type == XmlNodeType_None, "expected XmlNodeType_None, got %s\n", type_to_str(type));
> -}
>
> stream = create_stream_on_data(xml_comment, sizeof(xml_comment));
> hr = IXmlReader_SetInput(reader, (IUnknown *)stream);
Dec. 6, 2019
[PATCH] msiexec: Check registry value type again for consistency.
by Serge Gautherie
Signed-off-by: Serge Gautherie <winehq-git_serge_180711(a)gautherie.fr>
---
programs/msiexec/msiexec.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/programs/msiexec/msiexec.c b/programs/msiexec/msiexec.c
index 17d4bf8..c586a91 100644
--- a/programs/msiexec/msiexec.c
+++ b/programs/msiexec/msiexec.c
@@ -573,14 +573,14 @@ static BOOL process_args_from_reg( const WCHAR *ident, int *pargc, WCHAR ***parg
{
LONG r;
HKEY hkey;
- DWORD sz = 0, type = 0;
+ DWORD sz, type;
WCHAR *buf;
BOOL ret = FALSE;
r = RegOpenKeyW(HKEY_LOCAL_MACHINE, InstallRunOnce, &hkey);
if(r != ERROR_SUCCESS)
return FALSE;
- r = RegQueryValueExW(hkey, ident, 0, &type, 0, &sz);
+ r = RegQueryValueExW(hkey, ident, NULL, &type, NULL, &sz);
if(r == ERROR_SUCCESS && type == REG_SZ)
{
int len = lstrlenW( *pargv[0] );
@@ -591,8 +591,8 @@ static BOOL process_args_from_reg( const WCHAR *ident, int *pargc, WCHAR ***parg
}
memcpy( buf, *pargv[0], len * sizeof(WCHAR) );
buf[len++] = ' ';
- r = RegQueryValueExW(hkey, ident, 0, &type, (LPBYTE)(buf + len), &sz);
- if( r == ERROR_SUCCESS )
+ r = RegQueryValueExW(hkey, ident, NULL, &type, (LPBYTE)(buf + len), &sz);
+ if (r == ERROR_SUCCESS && type == REG_SZ)
{
process_args(buf, pargc, pargv);
ret = TRUE;
--
2.10.0.windows.1
Dec. 6, 2019
Re: [PATCH resend 2/2] user32/listbox: Set the selection if it's currently invalid in HandleTimer.
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=61516
Your paranoid android.
=== debian10 (32 bit report) ===
user32:
msg.c:8782: Test failed: WaitForSingleObject failed 102
msg.c:8788: Test failed: destroy child on thread exit: 0: the msg 0x0082 was expected, but got msg 0x000f instead
msg.c:8788: Test failed: destroy child on thread exit: 1: the msg 0x000f was expected, but got msg 0x0014 instead
msg.c:8788: Test failed: destroy child on thread exit: 2: the msg sequence is not complete: expected 0014 - actual 0000
Dec. 6, 2019
[PATCH 3/3] dwmapi: Add partial implementation of DWMWA_EXTENDED_FRAME_BOUNDS.
by Gabriel Ivăncescu
Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
---
This stops Unity games like Variables (steam appid 1054800) from complaining
when changing full-screen mode.
dlls/dwmapi/Makefile.in | 1 +
dlls/dwmapi/dwmapi_main.c | 7 +++++++
dlls/dwmapi/tests/dwmapi.c | 14 ++++++++++++++
3 files changed, 22 insertions(+)
diff --git a/dlls/dwmapi/Makefile.in b/dlls/dwmapi/Makefile.in
index 3a36913..d273a22 100644
--- a/dlls/dwmapi/Makefile.in
+++ b/dlls/dwmapi/Makefile.in
@@ -1,5 +1,6 @@
MODULE = dwmapi.dll
IMPORTLIB = dwmapi
+IMPORTS = user32
EXTRADLLFLAGS = -mno-cygwin
diff --git a/dlls/dwmapi/dwmapi_main.c b/dlls/dwmapi/dwmapi_main.c
index e976fda..212c88c 100644
--- a/dlls/dwmapi/dwmapi_main.c
+++ b/dlls/dwmapi/dwmapi_main.c
@@ -217,6 +217,13 @@ HRESULT WINAPI DwmGetWindowAttribute(HWND hwnd, DWORD attribute, PVOID pv_attrib
*(BOOL*)(pv_attribute) = FALSE;
break;
+ case DWMWA_EXTENDED_FRAME_BOUNDS:
+ if (size < sizeof(RECT)) return HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER);
+
+ WARN("DWMWA_EXTENDED_FRAME_BOUNDS: returning window rect.\n");
+ GetWindowRect(hwnd, pv_attribute);
+ break;
+
case DWMWA_CLOAKED:
if (size < sizeof(DWORD)) return E_INVALIDARG;
diff --git a/dlls/dwmapi/tests/dwmapi.c b/dlls/dwmapi/tests/dwmapi.c
index a520991..1463140 100644
--- a/dlls/dwmapi/tests/dwmapi.c
+++ b/dlls/dwmapi/tests/dwmapi.c
@@ -31,6 +31,7 @@ static LRESULT WINAPI test_wndproc(HWND hwnd, UINT message, WPARAM wParam, LPARA
static void test_DwmGetWindowAttribute(void)
{
BOOL nc_rendering;
+ RECT rc, rc2;
HRESULT hr;
hr = pDwmGetWindowAttribute(NULL, DWMWA_NCRENDERING_ENABLED, &nc_rendering, sizeof(nc_rendering));
@@ -47,6 +48,19 @@ static void test_DwmGetWindowAttribute(void)
hr = pDwmGetWindowAttribute(test_wnd, DWMWA_NCRENDERING_ENABLED, &nc_rendering, sizeof(nc_rendering));
ok(hr == S_OK, "DwmGetWindowAttribute(DWMWA_NCRENDERING_ENABLED) failed 0x%08x.\n", hr);
ok(nc_rendering == FALSE || nc_rendering == TRUE, "non-boolean value 0x%x.\n", nc_rendering);
+
+ hr = pDwmGetWindowAttribute(test_wnd, DWMWA_EXTENDED_FRAME_BOUNDS, &rc, sizeof(rc) - 1);
+ ok(hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER) || broken(hr == E_INVALIDARG) /* Vista */,
+ "DwmGetWindowAttribute(DWMWA_EXTENDED_FRAME_BOUNDS) returned 0x%08x.\n", hr);
+ hr = pDwmGetWindowAttribute(test_wnd, DWMWA_EXTENDED_FRAME_BOUNDS, &rc, sizeof(rc));
+ if (hr != E_HANDLE && broken(hr != DWM_E_COMPOSITIONDISABLED) /* Vista */) /* composition is on */
+ {
+ /* For top-level Windows, the returned rect is always at least as large as GetWindowRect */
+ GetWindowRect(test_wnd, &rc2);
+ ok(hr == S_OK, "DwmGetWindowAttribute(DWMWA_EXTENDED_FRAME_BOUNDS) failed 0x%08x.\n", hr);
+ ok(rc.left >= rc2.left && rc.right <= rc2.right && rc.top >= rc2.top && rc.bottom <= rc2.bottom,
+ "returned rect %s not enclosed in window rect %s.\n", wine_dbgstr_rect(&rc), wine_dbgstr_rect(&rc2));
+ }
}
START_TEST(dwmapi)
--
2.21.0
Dec. 6, 2019
[PATCH 2/3] dwmapi: Add basic tests for DwmGetWindowAttribute.
by Gabriel Ivăncescu
Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
---
configure | 1 +
configure.ac | 1 +
dlls/dwmapi/tests/Makefile.in | 6 +++
dlls/dwmapi/tests/dwmapi.c | 88 +++++++++++++++++++++++++++++++++++
4 files changed, 96 insertions(+)
create mode 100644 dlls/dwmapi/tests/Makefile.in
create mode 100644 dlls/dwmapi/tests/dwmapi.c
diff --git a/configure b/configure
index 822669d..5cf03fd 100755
--- a/configure
+++ b/configure
@@ -20388,6 +20388,7 @@ wine_fn_config_makefile dlls/dssenh/tests enable_tests
wine_fn_config_makefile dlls/dswave enable_dswave
wine_fn_config_makefile dlls/dswave/tests enable_tests
wine_fn_config_makefile dlls/dwmapi enable_dwmapi
+wine_fn_config_makefile dlls/dwmapi/tests enable_tests
wine_fn_config_makefile dlls/dwrite enable_dwrite
wine_fn_config_makefile dlls/dwrite/tests enable_tests
wine_fn_config_makefile dlls/dx8vb enable_dx8vb
diff --git a/configure.ac b/configure.ac
index 7f2c3cd..a69e9df 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3243,6 +3243,7 @@ WINE_CONFIG_MAKEFILE(dlls/dssenh/tests)
WINE_CONFIG_MAKEFILE(dlls/dswave)
WINE_CONFIG_MAKEFILE(dlls/dswave/tests)
WINE_CONFIG_MAKEFILE(dlls/dwmapi)
+WINE_CONFIG_MAKEFILE(dlls/dwmapi/tests)
WINE_CONFIG_MAKEFILE(dlls/dwrite)
WINE_CONFIG_MAKEFILE(dlls/dwrite/tests)
WINE_CONFIG_MAKEFILE(dlls/dx8vb)
diff --git a/dlls/dwmapi/tests/Makefile.in b/dlls/dwmapi/tests/Makefile.in
new file mode 100644
index 0000000..778a40f
--- /dev/null
+++ b/dlls/dwmapi/tests/Makefile.in
@@ -0,0 +1,6 @@
+TESTDLL = dwmapi.dll
+IMPORTS = gdi32 user32
+
+
+C_SRCS = \
+ dwmapi.c
diff --git a/dlls/dwmapi/tests/dwmapi.c b/dlls/dwmapi/tests/dwmapi.c
new file mode 100644
index 0000000..a520991
--- /dev/null
+++ b/dlls/dwmapi/tests/dwmapi.c
@@ -0,0 +1,88 @@
+/*
+ * Copyright 2019 Gabriel Ivăncescu for CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include "windows.h"
+#include <dwmapi.h>
+#include "wine/test.h"
+
+static HRESULT (WINAPI *pDwmGetWindowAttribute)(HWND, DWORD, PVOID, DWORD);
+
+static HWND test_wnd;
+static LRESULT WINAPI test_wndproc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
+{
+ return DefWindowProcA(hwnd, message, wParam, lParam);
+}
+
+static void test_DwmGetWindowAttribute(void)
+{
+ BOOL nc_rendering;
+ HRESULT hr;
+
+ hr = pDwmGetWindowAttribute(NULL, DWMWA_NCRENDERING_ENABLED, &nc_rendering, sizeof(nc_rendering));
+ ok(hr == E_HANDLE || broken(hr == E_INVALIDARG) /* Vista */, "DwmGetWindowAttribute(DWMWA_NCRENDERING_ENABLED) returned 0x%08x.\n", hr);
+ hr = pDwmGetWindowAttribute(test_wnd, DWMWA_NCRENDERING_ENABLED, NULL, sizeof(nc_rendering));
+ ok(hr == E_INVALIDARG, "DwmGetWindowAttribute(DWMWA_NCRENDERING_ENABLED) returned 0x%08x.\n", hr);
+ hr = pDwmGetWindowAttribute(test_wnd, DWMWA_NCRENDERING_ENABLED, &nc_rendering, 0);
+ ok(hr == E_INVALIDARG, "DwmGetWindowAttribute(DWMWA_NCRENDERING_ENABLED) returned 0x%08x.\n", hr);
+ nc_rendering = FALSE;
+ hr = pDwmGetWindowAttribute(test_wnd, 0xdeadbeef, &nc_rendering, sizeof(nc_rendering));
+ ok(hr == E_INVALIDARG, "DwmGetWindowAttribute(0xdeadbeef) returned 0x%08x.\n", hr);
+
+ nc_rendering = 0xdeadbeef;
+ hr = pDwmGetWindowAttribute(test_wnd, DWMWA_NCRENDERING_ENABLED, &nc_rendering, sizeof(nc_rendering));
+ ok(hr == S_OK, "DwmGetWindowAttribute(DWMWA_NCRENDERING_ENABLED) failed 0x%08x.\n", hr);
+ ok(nc_rendering == FALSE || nc_rendering == TRUE, "non-boolean value 0x%x.\n", nc_rendering);
+}
+
+START_TEST(dwmapi)
+{
+ HINSTANCE inst = GetModuleHandleA(NULL);
+ HMODULE module;
+ WNDCLASSA cls;
+
+ module = LoadLibraryA("dwmapi.dll");
+ if (!module)
+ {
+ win_skip("dwmapi.dll not found\n");
+ return;
+ }
+
+ pDwmGetWindowAttribute = (void*)GetProcAddress(module, "DwmGetWindowAttribute");
+
+ cls.style = 0;
+ cls.lpfnWndProc = test_wndproc;
+ cls.cbClsExtra = 0;
+ cls.cbWndExtra = 0;
+ cls.hInstance = inst;
+ cls.hIcon = 0;
+ cls.hCursor = LoadCursorA(0, (LPCSTR)IDC_ARROW);
+ cls.hbrBackground = GetStockObject(WHITE_BRUSH);
+ cls.lpszMenuName = NULL;
+ cls.lpszClassName = "Test";
+ RegisterClassA(&cls);
+
+ test_wnd = CreateWindowExA(0, "Test", "Test Window", WS_OVERLAPPEDWINDOW | WS_VISIBLE,
+ 100, 100, 200, 200, 0, 0, 0, NULL);
+ ok(test_wnd != NULL, "Failed to create test window.\n");
+
+ test_DwmGetWindowAttribute();
+
+ DestroyWindow(test_wnd);
+ UnregisterClassA("Test", inst);
+ FreeLibrary(module);
+}
--
2.21.0
Dec. 6, 2019
[PATCH 1/3] dwmapi: Improve DwmGetWindowAttribute stub.
by Gabriel Ivăncescu
Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
---
dlls/dwmapi/dwmapi_main.c | 26 ++++++++++++++++++++++++--
1 file changed, 24 insertions(+), 2 deletions(-)
diff --git a/dlls/dwmapi/dwmapi_main.c b/dlls/dwmapi/dwmapi_main.c
index 6378a09..e976fda 100644
--- a/dlls/dwmapi/dwmapi_main.c
+++ b/dlls/dwmapi/dwmapi_main.c
@@ -205,9 +205,31 @@ BOOL WINAPI DwmDefWindowProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam,
*/
HRESULT WINAPI DwmGetWindowAttribute(HWND hwnd, DWORD attribute, PVOID pv_attribute, DWORD size)
{
- FIXME("(%p %d %p %d) stub\n", hwnd, attribute, pv_attribute, size);
+ if (!hwnd) return E_HANDLE;
+ if (!pv_attribute) return E_INVALIDARG;
- return E_NOTIMPL;
+ switch (attribute)
+ {
+ case DWMWA_NCRENDERING_ENABLED:
+ if (size < sizeof(BOOL)) return E_INVALIDARG;
+
+ WARN("DWMWA_NCRENDERING_ENABLED: always returning FALSE.\n");
+ *(BOOL*)(pv_attribute) = FALSE;
+ break;
+
+ case DWMWA_CLOAKED:
+ if (size < sizeof(DWORD)) return E_INVALIDARG;
+
+ WARN("DWMWA_CLOAKED: always returning 0.\n");
+ *(DWORD*)(pv_attribute) = 0;
+ break;
+
+ default:
+ FIXME("unimplemented attribute %d, size %u, for hwnd %p.\n", attribute, size, hwnd);
+ return E_INVALIDARG;
+ }
+
+ return S_OK;
}
/**********************************************************************
--
2.21.0
Dec. 6, 2019
[PATCH resend 2/2] user32/listbox: Set the selection if it's currently invalid in HandleTimer.
by Gabriel Ivăncescu
Don't skip MoveCaret if it would actually change the selection when it is
invalid. This can happen, for example, in a combo box if the dropdown is shown
by a mouse click + release followed by the mouse being moved into the dropped
listbox, when the listbox has nothing selected. In this case, the item with
the index zero would not be selected the first time the mouse moves over it,
since the focus_item would be zero, despite the fact the item is not selected.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
---
dlls/user32/listbox.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/user32/listbox.c b/dlls/user32/listbox.c
index 3949610..7051449 100644
--- a/dlls/user32/listbox.c
+++ b/dlls/user32/listbox.c
@@ -2347,7 +2347,7 @@ static LRESULT LISTBOX_HandleTimer( LB_DESCR *descr, INT index, TIMER_DIRECTION
case LB_TIMER_NONE:
break;
}
- if (index == descr->focus_item) return FALSE;
+ if (index == descr->focus_item && descr->selected_item != -1) return FALSE;
LISTBOX_MoveCaret( descr, index, FALSE );
return TRUE;
}
--
2.21.0
Dec. 6, 2019
[PATCH resend 1/2] comctl32/listbox: Set the selection if it's currently invalid in HandleTimer.
by Gabriel Ivăncescu
Don't skip MoveCaret if it would actually change the selection when it is
invalid. This can happen, for example, in a combo box if the dropdown is shown
by a mouse click + release followed by the mouse being moved into the dropped
listbox, when the listbox has nothing selected. In this case, the item with
the index zero would not be selected the first time the mouse moves over it,
since the focus_item would be zero, despite the fact the item is not selected.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
---
dlls/comctl32/listbox.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/comctl32/listbox.c b/dlls/comctl32/listbox.c
index 0d6dcd6..7dcc431 100644
--- a/dlls/comctl32/listbox.c
+++ b/dlls/comctl32/listbox.c
@@ -2332,7 +2332,7 @@ static LRESULT LISTBOX_HandleTimer( LB_DESCR *descr, INT index, TIMER_DIRECTION
case LB_TIMER_NONE:
break;
}
- if (index == descr->focus_item) return FALSE;
+ if (index == descr->focus_item && descr->selected_item != -1) return FALSE;
LISTBOX_MoveCaret( descr, index, FALSE );
return TRUE;
}
--
2.21.0
Dec. 6, 2019
Re: [PATCH] configure.ac: disable -fcf-protection
by Zebediah Figura
On 12/6/19 7:33 AM, Austin English wrote:
> Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48161
> Signed-off-by: Austin English <austinenglish(a)gmail.com>
> ---
> configure.ac | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/configure.ac b/configure.ac
> index 7f2c3cda23..942585adfe 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -2113,6 +2113,9 @@ then
> CFLAGS="$CFLAGS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0"
> fi
>
> +dnl **** Disable fcf-protection, it breaks a ton of apps
> +WINE_TRY_CFLAGS([-fcf-protection=none])
> +
> dnl **** Check for CFI directives support ****
>
> AC_CACHE_CHECK([whether CFI directives are supported in assembly code], ac_cv_c_cfi_support,
>
Unfortunately this won't help, since WINE_TRY_CFLAGS puts the requested
options into EXTRACFLAGS, but that'll be overriden later by the option
in CFLAGS. We need that option to be removed from the build script.
Dec. 6, 2019
[PATCH resend 2/2] user32/combo: Don't redraw the Combo Box when dropped down if it has an editbox.
by Gabriel Ivăncescu
Some applications subclass the combo box and handle WM_ERASEBKGND themselves,
without using WS_CLIPCHILDREN. This causes them to erase over the editbox
child. There's no reason to redraw it in this case since the editbox is
supposed to cover it, anyway.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=22260
Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
---
dlls/user32/combo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/user32/combo.c b/dlls/user32/combo.c
index ff5ed18..1b193e4 100644
--- a/dlls/user32/combo.c
+++ b/dlls/user32/combo.c
@@ -1011,7 +1011,7 @@ static void CBDropDown( LPHEADCOMBO lphc )
SWP_NOACTIVATE | SWP_SHOWWINDOW );
- if( !(lphc->wState & CBF_NOREDRAW) )
+ if( !(lphc->wState & (CBF_NOREDRAW | CBF_EDIT)) )
RedrawWindow( lphc->self, NULL, 0, RDW_INVALIDATE |
RDW_ERASE | RDW_UPDATENOW | RDW_NOCHILDREN );
--
2.21.0
Dec. 6, 2019
[PATCH resend 1/2] comctl32/combo: Don't redraw the Combo Box when dropped down if it has an editbox.
by Gabriel Ivăncescu
Some applications subclass the combo box and handle WM_ERASEBKGND themselves,
without using WS_CLIPCHILDREN. This causes them to erase over the editbox
child. There's no reason to redraw it in this case since the editbox is
supposed to cover it, anyway.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=22260
Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
---
dlls/comctl32/combo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/comctl32/combo.c b/dlls/comctl32/combo.c
index 765fc63..c3de4f1 100644
--- a/dlls/comctl32/combo.c
+++ b/dlls/comctl32/combo.c
@@ -1007,7 +1007,7 @@ static void CBDropDown( LPHEADCOMBO lphc )
SWP_NOACTIVATE | SWP_SHOWWINDOW );
- if( !(lphc->wState & CBF_NOREDRAW) )
+ if( !(lphc->wState & (CBF_NOREDRAW | CBF_EDIT)) )
RedrawWindow( lphc->self, NULL, 0, RDW_INVALIDATE |
RDW_ERASE | RDW_UPDATENOW | RDW_NOCHILDREN );
--
2.21.0
Dec. 6, 2019
[PATCH] po: Update German translation.
by Julian Rüger
Thanks Nikolay!
Signed-off-by: Julian Rüger <jr98(a)gmx.net>
Dec. 6, 2019
[PATCH] msvcrt: Support mixing length and width in scanf format.
by Piotr Caban
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45967
Signed-off-by: Piotr Caban <piotr(a)codeweavers.com>
---
dlls/msvcrt/scanf.h | 13 +++++++------
dlls/msvcrt/tests/scanf.c | 24 ++++++++++++++++++++++++
2 files changed, 31 insertions(+), 6 deletions(-)
Dec. 6, 2019
[PATCH] oleaut32: Fix sharing options in TLB_ReadTypeLib.
by Jacek Caban
Spotted by Donna Whisnant and Kevin Puetz.
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com>
---
dlls/oleaut32/typelib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Dec. 6, 2019
[PATCH v4 3/3] bcrypt: Add more BCryptSignHash tests.
by Hans Leidekker
From: Derek Lesho <dlesho(a)codeweavers.com>
v2: Verify signature.
Signed-off-by: Derek Lesho <dlesho(a)codeweavers.com>
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
---
dlls/bcrypt/tests/bcrypt.c | 49 ++++++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)
diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c
index d125e0c89d..198acbf721 100644
--- a/dlls/bcrypt/tests/bcrypt.c
+++ b/dlls/bcrypt/tests/bcrypt.c
@@ -2049,6 +2049,9 @@ static void test_BCryptSignHash(void)
{
static UCHAR hash[] =
{0x7e,0xe3,0x74,0xe7,0xc5,0x0b,0x6b,0x70,0xdb,0xab,0x32,0x6d,0x1d,0x51,0xd6,0x74,0x79,0x8e,0x5b,0x4b};
+ static UCHAR hash_sha256[] =
+ {0x25,0x2f,0x10,0xc8,0x36,0x10,0xeb,0xca,0x1a,0x05,0x9c,0x0b,0xae,0x82,0x55,0xeb,0xa2,0xf9,0x5b,0xe4,
+ 0xd1,0xd7,0xbC,0xfA,0x89,0xd7,0x24,0x8a,0x82,0xd9,0xf1,0x11};
BCRYPT_PKCS1_PADDING_INFO pad;
BCRYPT_ALG_HANDLE alg;
BCRYPT_KEY_HANDLE key;
@@ -2056,6 +2059,8 @@ static void test_BCryptSignHash(void)
NTSTATUS ret;
ULONG len;
+ /* RSA */
+
ret = pBCryptOpenAlgorithmProvider(&alg, BCRYPT_RSA_ALGORITHM, NULL, 0);
if (ret)
{
@@ -2087,6 +2092,14 @@ static void test_BCryptSignHash(void)
len = 0;
memset(sig, 0, sizeof(sig));
+
+ /* inference of padding info on RSA not supported */
+ ret = pBCryptSignHash(key, NULL, hash, sizeof(hash), sig, sizeof(sig), &len, 0);
+ ok(ret == STATUS_INVALID_PARAMETER, "got %08x\n", ret);
+
+ ret = pBCryptSignHash(key, &pad, hash, sizeof(hash), sig, 0, &len, BCRYPT_PAD_PKCS1);
+ ok(ret == STATUS_BUFFER_TOO_SMALL, "got %08x\n", ret);
+
ret = pBCryptSignHash(key, &pad, hash, sizeof(hash), sig, sizeof(sig), &len, BCRYPT_PAD_PKCS1);
ok(!ret, "got %08x\n", ret);
ok(len == 64, "got %u\n", len);
@@ -2099,6 +2112,42 @@ static void test_BCryptSignHash(void)
ret = pBCryptCloseAlgorithmProvider(alg, 0);
ok(!ret, "got %08x\n", ret);
+
+ /* ECDSA */
+
+ ret = pBCryptOpenAlgorithmProvider(&alg, BCRYPT_ECDSA_P256_ALGORITHM, NULL, 0);
+ if (ret)
+ {
+ win_skip("failed to open ECDSA provider: %08x\n", ret);
+ return;
+ }
+
+ ret = pBCryptGenerateKeyPair(alg, &key, 256, 0);
+ ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+
+ ret = pBCryptFinalizeKeyPair(key, 0);
+ ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+
+ memset(sig, 0, sizeof(sig));
+ len = 0;
+
+ /* automatically detects padding info */
+ ret = pBCryptSignHash(key, NULL, hash, sizeof(hash), sig, sizeof(sig), &len, 0);
+ ok (!ret, "got %08x\n", ret);
+ ok (len == 64, "got %u\n", len);
+
+ ret = pBCryptVerifySignature(key, NULL, hash, sizeof(hash), sig, len, 0);
+ ok(!ret, "got %08x\n", ret);
+
+ /* mismatch info (SHA-1 != SHA-256) */
+ ret = pBCryptSignHash(key, &pad, hash_sha256, sizeof(hash_sha256), sig, sizeof(sig), &len, BCRYPT_PAD_PKCS1);
+ ok (ret == STATUS_INVALID_PARAMETER, "got %08x\n", ret);
+
+ ret = pBCryptDestroyKey(key);
+ ok(!ret, "got %08x\n", ret);
+
+ ret = pBCryptCloseAlgorithmProvider(alg, 0);
+ ok(!ret, "got %08x\n", ret);
}
static void test_BCryptEnumAlgorithms(void)
--
2.20.1
Dec. 6, 2019
[PATCH v4 2/3] bcrypt: Handle SHA1 hash in key_asymmetric_verify.
by Hans Leidekker
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
---
dlls/bcrypt/gnutls.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/dlls/bcrypt/gnutls.c b/dlls/bcrypt/gnutls.c
index 28a14e9b85..1c31b5625f 100644
--- a/dlls/bcrypt/gnutls.c
+++ b/dlls/bcrypt/gnutls.c
@@ -1064,6 +1064,7 @@ NTSTATUS key_asymmetric_verify( struct key *key, void *padding, UCHAR *hash, ULO
/* only the hash size must match, not the actual hash function */
switch (hash_len)
{
+ case 20: hash_alg = GNUTLS_DIG_SHA1; break;
case 32: hash_alg = GNUTLS_DIG_SHA256; break;
case 48: hash_alg = GNUTLS_DIG_SHA384; break;
--
2.20.1
Dec. 6, 2019
[PATCH v4 1/3] bcrypt: Add support for signing hashes with ECDSA keys.
by Hans Leidekker
From: Derek Lesho <dlesho(a)codeweavers.com>
v3: Fix accidental return of 0 (STATUS_SUCCESS) when gnutls_decode_rs_value fails.
v4: Print the error with gnutls_error.
Signed-off-by: Derek Lesho <dlesho(a)codeweavers.com>
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
---
dlls/bcrypt/gnutls.c | 147 ++++++++++++++++++++++++++++++++++++++-----
1 file changed, 130 insertions(+), 17 deletions(-)
diff --git a/dlls/bcrypt/gnutls.c b/dlls/bcrypt/gnutls.c
index a6a07fff19..28a14e9b85 100644
--- a/dlls/bcrypt/gnutls.c
+++ b/dlls/bcrypt/gnutls.c
@@ -92,6 +92,7 @@ MAKE_FUNCPTR(gnutls_cipher_decrypt2);
MAKE_FUNCPTR(gnutls_cipher_deinit);
MAKE_FUNCPTR(gnutls_cipher_encrypt2);
MAKE_FUNCPTR(gnutls_cipher_init);
+MAKE_FUNCPTR(gnutls_decode_rs_value);
MAKE_FUNCPTR(gnutls_global_deinit);
MAKE_FUNCPTR(gnutls_global_init);
MAKE_FUNCPTR(gnutls_global_set_log_function);
@@ -189,6 +190,7 @@ BOOL gnutls_initialize(void)
LOAD_FUNCPTR(gnutls_cipher_deinit)
LOAD_FUNCPTR(gnutls_cipher_encrypt2)
LOAD_FUNCPTR(gnutls_cipher_init)
+ LOAD_FUNCPTR(gnutls_decode_rs_value)
LOAD_FUNCPTR(gnutls_global_deinit)
LOAD_FUNCPTR(gnutls_global_init)
LOAD_FUNCPTR(gnutls_global_set_log_function)
@@ -711,6 +713,7 @@ NTSTATUS key_asymmetric_generate( struct key *key )
break;
case ALG_ID_ECDH_P256:
+ case ALG_ID_ECDSA_P256:
pk_alg = GNUTLS_PK_ECC; /* compatible with ECDSA and ECDH */
bitlen = GNUTLS_CURVE_TO_BITS( GNUTLS_ECC_CURVE_SECP256R1 );
break;
@@ -1029,6 +1032,17 @@ static NTSTATUS prepare_gnutls_signature( struct key *key, UCHAR *signature, ULO
}
}
+static gnutls_digest_algorithm_t get_digest_from_id( const WCHAR *alg_id )
+{
+ if (!strcmpW( alg_id, BCRYPT_SHA1_ALGORITHM )) return GNUTLS_DIG_SHA1;
+ if (!strcmpW( alg_id, BCRYPT_SHA256_ALGORITHM )) return GNUTLS_DIG_SHA256;
+ if (!strcmpW( alg_id, BCRYPT_SHA384_ALGORITHM )) return GNUTLS_DIG_SHA384;
+ if (!strcmpW( alg_id, BCRYPT_SHA512_ALGORITHM )) return GNUTLS_DIG_SHA512;
+ if (!strcmpW( alg_id, BCRYPT_MD2_ALGORITHM )) return GNUTLS_DIG_MD2;
+ if (!strcmpW( alg_id, BCRYPT_MD5_ALGORITHM )) return GNUTLS_DIG_MD5;
+ return -1;
+}
+
NTSTATUS key_asymmetric_verify( struct key *key, void *padding, UCHAR *hash, ULONG hash_len, UCHAR *signature,
ULONG signature_len, DWORD flags )
{
@@ -1068,11 +1082,7 @@ NTSTATUS key_asymmetric_verify( struct key *key, void *padding, UCHAR *hash, ULO
if (!(flags & BCRYPT_PAD_PKCS1) || !info) return STATUS_INVALID_PARAMETER;
if (!info->pszAlgId) return STATUS_INVALID_SIGNATURE;
- if (!strcmpW( info->pszAlgId, BCRYPT_SHA1_ALGORITHM )) hash_alg = GNUTLS_DIG_SHA1;
- else if (!strcmpW( info->pszAlgId, BCRYPT_SHA256_ALGORITHM )) hash_alg = GNUTLS_DIG_SHA256;
- else if (!strcmpW( info->pszAlgId, BCRYPT_SHA384_ALGORITHM )) hash_alg = GNUTLS_DIG_SHA384;
- else if (!strcmpW( info->pszAlgId, BCRYPT_SHA512_ALGORITHM )) hash_alg = GNUTLS_DIG_SHA512;
- else
+ if ((hash_alg = get_digest_from_id(info->pszAlgId)) == -1)
{
FIXME( "hash algorithm %s not supported\n", debugstr_w(info->pszAlgId) );
return STATUS_NOT_SUPPORTED;
@@ -1107,26 +1117,130 @@ NTSTATUS key_asymmetric_verify( struct key *key, void *padding, UCHAR *hash, ULO
return (ret < 0) ? STATUS_INVALID_SIGNATURE : STATUS_SUCCESS;
}
+static unsigned int get_signature_length( enum alg_id id )
+{
+ switch (id)
+ {
+ case ALG_ID_ECDSA_P256: return 64;
+ case ALG_ID_ECDSA_P384: return 96;
+ default:
+ FIXME( "unhandled algorithm %u\n", id );
+ return 0;
+ }
+}
+
+NTSTATUS format_gnutls_signature( enum alg_id type, gnutls_datum_t signature, UCHAR *output,
+ ULONG output_len, ULONG *ret_len )
+{
+ switch (type)
+ {
+ case ALG_ID_RSA:
+ case ALG_ID_RSA_SIGN:
+ {
+ if (output_len < signature.size) return STATUS_BUFFER_TOO_SMALL;
+ memcpy( output, signature.data, signature.size );
+ *ret_len = signature.size;
+ return STATUS_SUCCESS;
+ }
+ case ALG_ID_ECDSA_P256:
+ case ALG_ID_ECDSA_P384:
+ {
+ int err;
+ unsigned int pad_size, sig_len = get_signature_length( type );
+ gnutls_datum_t r, s; /* format as r||s */
+
+ if ((err = pgnutls_decode_rs_value( &signature, &r, &s )))
+ {
+ pgnutls_perror( err );
+ return STATUS_INTERNAL_ERROR;
+ }
+
+ if (output_len < sig_len) return STATUS_BUFFER_TOO_SMALL;
+
+ /* remove prepended zero byte */
+ if (r.size % 2)
+ {
+ r.size--;
+ r.data += 1;
+ }
+ if (s.size % 2)
+ {
+ s.size--;
+ s.data += 1;
+ }
+
+ if (r.size != s.size || r.size + s.size > sig_len)
+ {
+ ERR( "we didn't get a correct signature\n" );
+ return STATUS_INTERNAL_ERROR;
+ }
+
+ pad_size = (sig_len / 2) - s.size;
+ memset( output, 0, sig_len );
+
+ memcpy( output + pad_size, r.data, r.size );
+ memcpy( output + (sig_len / 2) + pad_size, s.data, s.size );
+
+ *ret_len = sig_len;
+ return STATUS_SUCCESS;
+ }
+ default:
+ return STATUS_INTERNAL_ERROR;
+ }
+}
+
NTSTATUS key_asymmetric_sign( struct key *key, void *padding, UCHAR *input, ULONG input_len, UCHAR *output,
ULONG output_len, ULONG *ret_len, ULONG flags )
{
BCRYPT_PKCS1_PADDING_INFO *pad = padding;
gnutls_datum_t hash, signature;
+ gnutls_digest_algorithm_t hash_alg;
+ NTSTATUS status;
int ret;
- if (key->alg_id != ALG_ID_RSA && key->alg_id != ALG_ID_RSA_SIGN)
+ if (key->alg_id == ALG_ID_ECDSA_P256 || key->alg_id == ALG_ID_ECDSA_P384)
{
- FIXME( "algorithm %u not supported\n", key->alg_id );
- return STATUS_NOT_IMPLEMENTED;
+ /* With ECDSA, we find the digest algorithm from the hash length, and verify it */
+ switch (input_len)
+ {
+ case 20: hash_alg = GNUTLS_DIG_SHA1; break;
+ case 32: hash_alg = GNUTLS_DIG_SHA256; break;
+ case 48: hash_alg = GNUTLS_DIG_SHA384; break;
+ case 64: hash_alg = GNUTLS_DIG_SHA512; break;
+
+ default:
+ FIXME( "hash size %u not yet supported\n", input_len );
+ return STATUS_INVALID_PARAMETER;
+ }
+
+ if (flags == BCRYPT_PAD_PKCS1 && pad && pad->pszAlgId && get_digest_from_id( pad->pszAlgId ) != hash_alg)
+ {
+ WARN( "incorrect hashing algorithm %s, expected %u\n", debugstr_w(pad->pszAlgId), hash_alg );
+ return STATUS_INVALID_PARAMETER;
+ }
}
- if (flags != BCRYPT_PAD_PKCS1)
+ else if (flags == BCRYPT_PAD_PKCS1)
{
- FIXME( "flags %08x not implemented\n", flags );
- return STATUS_NOT_IMPLEMENTED;
+ if (!pad || !pad->pszAlgId)
+ {
+ WARN( "padding info not found\n" );
+ return STATUS_INVALID_PARAMETER;
+ }
+
+ if ((hash_alg = get_digest_from_id( pad->pszAlgId )) == -1)
+ {
+ FIXME( "hash algorithm %s not recognized\n", debugstr_w(pad->pszAlgId) );
+ return STATUS_NOT_SUPPORTED;
+ }
+ }
+ else if (!flags)
+ {
+ WARN( "invalid flags %08x\n", flags );
+ return STATUS_INVALID_PARAMETER;
}
- if (!pad || !pad->pszAlgId || lstrcmpiW(pad->pszAlgId, BCRYPT_SHA1_ALGORITHM))
+ else
{
- FIXME( "%s padding not implemented\n", debugstr_w(pad ? pad->pszAlgId : NULL) );
+ FIXME( "flags %08x not implemented\n", flags );
return STATUS_NOT_IMPLEMENTED;
}
@@ -1143,17 +1257,16 @@ NTSTATUS key_asymmetric_sign( struct key *key, void *padding, UCHAR *input, ULON
signature.data = NULL;
signature.size = 0;
- if ((ret = pgnutls_privkey_sign_hash( key->u.a.handle, GNUTLS_DIG_SHA1, 0, &hash, &signature )))
+ if ((ret = pgnutls_privkey_sign_hash( key->u.a.handle, hash_alg, 0, &hash, &signature )))
{
pgnutls_perror( ret );
return STATUS_INTERNAL_ERROR;
}
- if (output_len >= signature.size) memcpy( output, signature.data, signature.size );
- *ret_len = signature.size;
+ status = format_gnutls_signature( key->alg_id, signature, output, output_len, ret_len );
free( signature.data );
- return STATUS_SUCCESS;
+ return status;
}
NTSTATUS key_destroy( struct key *key )
--
2.20.1
Dec. 6, 2019
Re: [PATCH v2 5/5] msado15: Implement _Stream_put_Type and _Stream_get_Type.
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=61497
Your paranoid android.
=== debian10 (32 bit report) ===
msado15:
msado15.c:34: Test failed: got 80040154
Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x00401593).
Report errors:
msado15:msado15 crashed (c0000005)
=== debian10 (32 bit French report) ===
msado15:
msado15.c:34: Test failed: got 80040154
Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x00401593).
Report errors:
msado15:msado15 crashed (c0000005)
=== debian10 (32 bit Japanese:Japan report) ===
msado15:
msado15.c:34: Test failed: got 80040154
Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x00401593).
Report errors:
msado15:msado15 crashed (c0000005)
=== debian10 (32 bit Chinese:China report) ===
msado15:
msado15.c:34: Test failed: got 80040154
Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x00401593).
Report errors:
msado15:msado15 crashed (c0000005)
=== debian10 (32 bit WoW report) ===
msado15:
msado15.c:34: Test failed: got 80040154
Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x00401593).
Report errors:
msado15:msado15 crashed (c0000005)
=== debian10 (64 bit WoW report) ===
msado15:
msado15.c:34: Test failed: got 80040154
Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x00401593).
Report errors:
msado15:msado15 crashed (c0000005)
Dec. 6, 2019
[PATCH] dwrite: Remove unnecessary casts.
by Nikolay Sivov
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/dwrite/font.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c
index ef09f8e2bf..2670a22839 100644
--- a/dlls/dwrite/font.c
+++ b/dlls/dwrite/font.c
@@ -1522,7 +1522,7 @@ static HRESULT get_fontface_from_font(struct dwrite_font *font, IDWriteFontFace5
if (FAILED(hr = get_filestream_from_file(data->file, &desc.stream)))
return hr;
- desc.factory = (IDWriteFactory7 *)font->family->collection->factory;
+ desc.factory = font->family->collection->factory;
desc.face_type = data->face_type;
desc.files = &data->file;
desc.files_number = 1;
@@ -4055,7 +4055,7 @@ HRESULT create_font_collection(IDWriteFactory7 *factory, IDWriteFontFileEnumerat
WCHAR familyW[255];
UINT32 index;
- desc.factory = (IDWriteFactory7 *)factory;
+ desc.factory = factory;
desc.face_type = face_type;
desc.files = &file;
desc.stream = stream;
@@ -4400,7 +4400,7 @@ static HRESULT eudc_collection_add_family(IDWriteFactory7 *factory, struct dwrit
struct fontface_desc desc;
/* alloc and init new font data structure */
- desc.factory = (IDWriteFactory7 *)factory;
+ desc.factory = factory;
desc.face_type = face_type;
desc.index = i;
desc.files = &file;
--
2.24.0
Dec. 6, 2019
Re: mferror clarification for translators
by Nikolay Sivov
On 12/6/19 4:32 PM, Julian Rüger wrote:
> Hi Nikolay!
>
> Once again, I have a question regarding your mferror strings.
>
>
> #: mferror.mc:550
> msgid "Media sink stream sinks set is fixed.\n"
>
>
> Is this
> (Media sink) (stream sinks set)?
> Or (Media sink stream) (sinks set)?
> What is that supposed to mean exactly? ;)
>
> Also "fixed" as in "cannot be changed", "repaired/corrected" or
> something else?
It means this set is static, it cannot be changed. Media sink has a set
of stream sinks, this error supposedly happens when you try to add or
remove streams sinks from media sink.
>
> Thanks,
> Julian
>
>
>
> PS:
> If anyone speaking German has ideas for less clumsy translations, I'm
> all ears...
>
> #: mferror.mc:564
> msgid "Sample allocation was canceled.\n"
> msgstr "Allokation des Abtastwerts wurde abgebrochen.\n"
>
> #: mferror.mc:543
> msgid "Stream sinks are out of sync.\n"
> msgstr "Datenstromausgänge nicht mehr synchron.\n"
>
> #: mferror.mc:613
> msgid "No samples were processed by the sink.\n"
> msgstr "Es wurden keine Abtastwerte durch den Ausgang verarbeitet.\n"
>
>
Dec. 6, 2019
Re: [PATCH 5/5] msado15: Implement _Stream_put_Type and _Stream_get_Type.
by Hans Leidekker
On Fri, 2019-12-06 at 05:53 -0600, Marvin wrote:
> msado15.c:34: Test failed: got 80040154
This happens because the dll introduced in the first patch isn't registered.
Dec. 6, 2019
[PATCH v2 5/5] msado15: Implement _Stream_put_Type and _Stream_get_Type.
by Hans Leidekker
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
---
configure.ac | 1 +
dlls/msado15/stream.c | 20 +++++++----
dlls/msado15/tests/Makefile.in | 5 +++
dlls/msado15/tests/msado15.c | 63 ++++++++++++++++++++++++++++++++++
4 files changed, 83 insertions(+), 6 deletions(-)
create mode 100644 dlls/msado15/tests/Makefile.in
create mode 100644 dlls/msado15/tests/msado15.c
diff --git a/configure.ac b/configure.ac
index 06ac9c6c71..b0ba094134 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3439,6 +3439,7 @@ WINE_CONFIG_MAKEFILE(dlls/msacm32.drv)
WINE_CONFIG_MAKEFILE(dlls/msacm32)
WINE_CONFIG_MAKEFILE(dlls/msacm32/tests)
WINE_CONFIG_MAKEFILE(dlls/msado15)
+WINE_CONFIG_MAKEFILE(dlls/msado15/tests)
WINE_CONFIG_MAKEFILE(dlls/msadp32.acm)
WINE_CONFIG_MAKEFILE(dlls/msasn1)
WINE_CONFIG_MAKEFILE(dlls/mscat32)
diff --git a/dlls/msado15/stream.c b/dlls/msado15/stream.c
index 48a485d599..8e88b9aa65 100644
--- a/dlls/msado15/stream.c
+++ b/dlls/msado15/stream.c
@@ -32,8 +32,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(msado15);
struct stream
{
- _Stream Stream_iface;
- LONG refs;
+ _Stream Stream_iface;
+ LONG refs;
+ StreamTypeEnum type;
};
static inline struct stream *impl_from_Stream( _Stream *iface )
@@ -130,14 +131,20 @@ static HRESULT WINAPI stream_put_Position( _Stream *iface, LONG pos )
static HRESULT WINAPI stream_get_Type( _Stream *iface, StreamTypeEnum *type )
{
- FIXME( "%p, %p\n", iface, type );
- return E_NOTIMPL;
+ struct stream *stream = impl_from_Stream( iface );
+ TRACE( "%p, %p\n", stream, type );
+
+ *type = stream->type;
+ return S_OK;
}
static HRESULT WINAPI stream_put_Type( _Stream *iface, StreamTypeEnum type )
{
- FIXME( "%p, %u\n", iface, type );
- return E_NOTIMPL;
+ struct stream *stream = impl_from_Stream( iface );
+ TRACE( "%p, %u\n", stream, type );
+
+ stream->type = type;
+ return S_OK;
}
static HRESULT WINAPI stream_get_LineSeparator( _Stream *iface, LineSeparatorEnum *sep )
@@ -305,6 +312,7 @@ HRESULT Stream_create( void **obj )
if (!(stream = heap_alloc_zero( sizeof(*stream) ))) return E_OUTOFMEMORY;
stream->Stream_iface.lpVtbl = &stream_vtbl;
stream->refs = 1;
+ stream->type = adTypeText;
*obj = &stream->Stream_iface;
TRACE( "returning iface %p\n", *obj );
diff --git a/dlls/msado15/tests/Makefile.in b/dlls/msado15/tests/Makefile.in
new file mode 100644
index 0000000000..a97f3dd433
--- /dev/null
+++ b/dlls/msado15/tests/Makefile.in
@@ -0,0 +1,5 @@
+TESTDLL = msado15.dll
+IMPORTS = oleaut32 ole32
+
+C_SRCS = \
+ msado15.c
diff --git a/dlls/msado15/tests/msado15.c b/dlls/msado15/tests/msado15.c
new file mode 100644
index 0000000000..ed465e2072
--- /dev/null
+++ b/dlls/msado15/tests/msado15.c
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2019 Hans Leidekker for CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <stdio.h>
+#define COBJMACROS
+#include <initguid.h>
+#include <oledb.h>
+#include <msado15_backcompat.h>
+#include "wine/test.h"
+
+static void test_Stream(void)
+{
+ _Stream *stream;
+ StreamTypeEnum type;
+ LONG refs;
+ HRESULT hr;
+
+ hr = CoCreateInstance( &CLSID_Stream, NULL, CLSCTX_INPROC_SERVER, &IID__Stream, (void **)&stream );
+ ok( hr == S_OK, "got %08x\n", hr );
+
+ /* check default type */
+ type = 0;
+ hr = _Stream_get_Type( stream, &type );
+ ok( hr == S_OK, "got %08x\n", hr );
+ ok( type == adTypeText, "got %u\n", type );
+
+ hr = _Stream_put_Type( stream, adTypeBinary );
+ ok( hr == S_OK, "got %08x\n", hr );
+
+ type = 0;
+ hr = _Stream_get_Type( stream, &type );
+ ok( hr == S_OK, "got %08x\n", hr );
+ ok( type == adTypeBinary, "got %u\n", type );
+
+ /* revert */
+ hr = _Stream_put_Type( stream, adTypeText );
+ ok( hr == S_OK, "got %08x\n", hr );
+
+ refs = _Stream_Release( stream );
+ ok( !refs, "got %d\n", refs );
+}
+
+START_TEST(msado15)
+{
+ CoInitialize( NULL );
+ test_Stream();
+ CoUninitialize();
+}
--
2.20.1
Dec. 6, 2019
[PATCH v2 4/5] msado15: Add a stub _Stream implementation.
by Hans Leidekker
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
---
dlls/msado15/Makefile.in | 3 +-
dlls/msado15/main.c | 5 +
dlls/msado15/msado15_classes.idl | 8 +
dlls/msado15/msado15_private.h | 1 +
dlls/msado15/stream.c | 312 +++++++++++++++++++++++++++++++
5 files changed, 328 insertions(+), 1 deletion(-)
create mode 100644 dlls/msado15/stream.c
diff --git a/dlls/msado15/Makefile.in b/dlls/msado15/Makefile.in
index 5b255df323..604f9ff018 100644
--- a/dlls/msado15/Makefile.in
+++ b/dlls/msado15/Makefile.in
@@ -6,7 +6,8 @@ EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \
connection.c \
main.c \
- recordset.c
+ recordset.c \
+ stream.c
IDL_SRCS = \
msado15_classes.idl \
diff --git a/dlls/msado15/main.c b/dlls/msado15/main.c
index 321ba40e3b..32ae252337 100644
--- a/dlls/msado15/main.c
+++ b/dlls/msado15/main.c
@@ -119,6 +119,7 @@ static const struct IClassFactoryVtbl msadocf_vtbl =
static struct msadocf connection_cf = { { &msadocf_vtbl }, Connection_create };
static struct msadocf recordset_cf = { { &msadocf_vtbl }, Recordset_create };
+static struct msadocf stream_cf = { { &msadocf_vtbl }, Stream_create };
/***********************************************************************
* DllGetClassObject
@@ -137,6 +138,10 @@ HRESULT WINAPI DllGetClassObject( REFCLSID clsid, REFIID iid, void **obj )
{
cf = &recordset_cf.IClassFactory_iface;
}
+ else if (IsEqualGUID( clsid, &CLSID_Stream ))
+ {
+ cf = &stream_cf.IClassFactory_iface;
+ }
if (!cf) return CLASS_E_CLASSNOTAVAILABLE;
return IClassFactory_QueryInterface( cf, iid, obj );
}
diff --git a/dlls/msado15/msado15_classes.idl b/dlls/msado15/msado15_classes.idl
index 56e86a0dc6..5ede180240 100644
--- a/dlls/msado15/msado15_classes.idl
+++ b/dlls/msado15/msado15_classes.idl
@@ -33,3 +33,11 @@ coclass Connection { interface _Connection; }
uuid(00000535-0000-0010-8000-00aa006d2ea4)
]
coclass Recordset { interface _Recordset; }
+
+[
+ threading(both),
+ progid("ADODB.Stream.6.0"),
+ vi_progid("ADODB.Stream"),
+ uuid(00000566-0000-0010-8000-00aa006d2ea4)
+]
+coclass Stream { interface _Stream; }
diff --git a/dlls/msado15/msado15_private.h b/dlls/msado15/msado15_private.h
index 1f8948522b..83c8b7c966 100644
--- a/dlls/msado15/msado15_private.h
+++ b/dlls/msado15/msado15_private.h
@@ -21,5 +21,6 @@
HRESULT Connection_create( void ** ) DECLSPEC_HIDDEN;
HRESULT Recordset_create( void ** ) DECLSPEC_HIDDEN;
+HRESULT Stream_create( void ** ) DECLSPEC_HIDDEN;
#endif /* _WINE_MSADO15_PRIVATE_H_ */
diff --git a/dlls/msado15/stream.c b/dlls/msado15/stream.c
new file mode 100644
index 0000000000..48a485d599
--- /dev/null
+++ b/dlls/msado15/stream.c
@@ -0,0 +1,312 @@
+/*
+ * Copyright 2019 Hans Leidekker for CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <stdarg.h>
+#include "windef.h"
+#include "winbase.h"
+#define COBJMACROS
+#include "objbase.h"
+#include "msado15_backcompat.h"
+
+#include "wine/debug.h"
+#include "wine/heap.h"
+
+#include "msado15_private.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(msado15);
+
+struct stream
+{
+ _Stream Stream_iface;
+ LONG refs;
+};
+
+static inline struct stream *impl_from_Stream( _Stream *iface )
+{
+ return CONTAINING_RECORD( iface, struct stream, Stream_iface );
+}
+
+static ULONG WINAPI stream_AddRef( _Stream *iface )
+{
+ struct stream *stream = impl_from_Stream( iface );
+ return InterlockedIncrement( &stream->refs );
+}
+
+static ULONG WINAPI stream_Release( _Stream *iface )
+{
+ struct stream *stream = impl_from_Stream( iface );
+ LONG refs = InterlockedDecrement( &stream->refs );
+ if (!refs)
+ {
+ TRACE( "destroying %p\n", stream );
+ heap_free( stream );
+ }
+ return refs;
+}
+
+static HRESULT WINAPI stream_QueryInterface( _Stream *iface, REFIID riid, void **obj )
+{
+ TRACE( "%p, %s, %p\n", iface, debugstr_guid(riid), obj );
+
+ if (IsEqualGUID( riid, &IID__Stream ) || IsEqualGUID( riid, &IID_IDispatch ) ||
+ IsEqualGUID( riid, &IID_IUnknown ))
+ {
+ *obj = iface;
+ }
+ else
+ {
+ FIXME( "interface %s not implemented\n", debugstr_guid(riid) );
+ return E_NOINTERFACE;
+ }
+ stream_AddRef( iface );
+ return S_OK;
+}
+
+static HRESULT WINAPI stream_GetTypeInfoCount( _Stream *iface, UINT *count )
+{
+ FIXME( "%p, %p\n", iface, count );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI stream_GetTypeInfo( _Stream *iface, UINT index, LCID lcid, ITypeInfo **info )
+{
+ FIXME( "%p, %u, %u, %p\n", iface, index, lcid, info );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI stream_GetIDsOfNames( _Stream *iface, REFIID riid, LPOLESTR *names, UINT count,
+ LCID lcid, DISPID *dispid )
+{
+ FIXME( "%p, %s, %p, %u, %u, %p\n", iface, debugstr_guid(riid), names, count, lcid, dispid );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI stream_Invoke( _Stream *iface, DISPID member, REFIID riid, LCID lcid, WORD flags,
+ DISPPARAMS *params, VARIANT *result, EXCEPINFO *excep_info, UINT *arg_err )
+{
+ FIXME( "%p, %d, %s, %d, %d, %p, %p, %p, %p\n", iface, member, debugstr_guid(riid), lcid, flags, params,
+ result, excep_info, arg_err );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI stream_get_Size( _Stream *iface, LONG *size )
+{
+ FIXME( "%p, %p\n", iface, size );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI stream_get_EOS( _Stream *iface, VARIANT_BOOL *eos )
+{
+ FIXME( "%p, %p\n", iface, eos );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI stream_get_Position( _Stream *iface, LONG *pos )
+{
+ FIXME( "%p, %p\n", iface, pos );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI stream_put_Position( _Stream *iface, LONG pos )
+{
+ FIXME( "%p, %d\n", iface, pos );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI stream_get_Type( _Stream *iface, StreamTypeEnum *type )
+{
+ FIXME( "%p, %p\n", iface, type );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI stream_put_Type( _Stream *iface, StreamTypeEnum type )
+{
+ FIXME( "%p, %u\n", iface, type );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI stream_get_LineSeparator( _Stream *iface, LineSeparatorEnum *sep )
+{
+ FIXME( "%p, %p\n", iface, sep );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI stream_put_LineSeparator( _Stream *iface, LineSeparatorEnum sep )
+{
+ FIXME( "%p, %d\n", iface, sep );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI stream_get_State( _Stream *iface, ObjectStateEnum *state )
+{
+ FIXME( "%p, %p\n", iface, state );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI stream_get_Mode( _Stream *iface, ConnectModeEnum *mode )
+{
+ FIXME( "%p, %p\n", iface, mode );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI stream_put_Mode( _Stream *iface, ConnectModeEnum mode )
+{
+ FIXME( "%p, %u\n", iface, mode );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI stream_get_Charset( _Stream *iface, BSTR *charset )
+{
+ FIXME( "%p, %p\n", iface, charset );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI stream_put_Charset( _Stream *iface, BSTR charset )
+{
+ FIXME( "%p, %s\n", iface, debugstr_w(charset) );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI stream_Read( _Stream *iface, LONG size, VARIANT *val )
+{
+ FIXME( "%p, %d, %p\n", iface, size, val );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI stream_Open( _Stream *iface, VARIANT src, ConnectModeEnum mode, StreamOpenOptionsEnum options,
+ BSTR username, BSTR password )
+{
+ FIXME( "%p, %s, %u, %d, %s, %p\n", iface, debugstr_variant(&src), mode, options, debugstr_w(username), password );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI stream_Close( _Stream *iface )
+{
+ FIXME( "%p\n", iface );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI stream_SkipLine( _Stream *iface )
+{
+ FIXME( "%p\n", iface );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI stream_Write( _Stream *iface, VARIANT buf )
+{
+ FIXME( "%p, %s\n", iface, debugstr_variant(&buf) );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI stream_SetEOS( _Stream *iface )
+{
+ FIXME( "%p\n", iface );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI stream_CopyTo( _Stream *iface, _Stream *dst, LONG size )
+{
+ FIXME( "%p, %p, %d\n", iface, dst, size );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI stream_Flush( _Stream *iface )
+{
+ FIXME( "%p\n", iface );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI stream_SaveToFile( _Stream *iface, BSTR filename, SaveOptionsEnum options )
+{
+ FIXME( "%p, %s, %u\n", iface, debugstr_w(filename), options );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI stream_LoadFromFile( _Stream *iface, BSTR filename )
+{
+ FIXME( "%p, %s\n", iface, debugstr_w(filename) );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI stream_ReadText( _Stream *iface, LONG len, BSTR *ret )
+{
+ FIXME( "%p, %d, %p\n", iface, len, ret );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI stream_WriteText( _Stream *iface, BSTR data, StreamWriteEnum options )
+{
+ FIXME( "%p, %p, %u\n", iface, debugstr_w(data), options );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI stream_Cancel( _Stream *iface )
+{
+ FIXME( "%p\n", iface );
+ return E_NOTIMPL;
+}
+
+static const struct _StreamVtbl stream_vtbl =
+{
+ stream_QueryInterface,
+ stream_AddRef,
+ stream_Release,
+ stream_GetTypeInfoCount,
+ stream_GetTypeInfo,
+ stream_GetIDsOfNames,
+ stream_Invoke,
+ stream_get_Size,
+ stream_get_EOS,
+ stream_get_Position,
+ stream_put_Position,
+ stream_get_Type,
+ stream_put_Type,
+ stream_get_LineSeparator,
+ stream_put_LineSeparator,
+ stream_get_State,
+ stream_get_Mode,
+ stream_put_Mode,
+ stream_get_Charset,
+ stream_put_Charset,
+ stream_Read,
+ stream_Open,
+ stream_Close,
+ stream_SkipLine,
+ stream_Write,
+ stream_SetEOS,
+ stream_CopyTo,
+ stream_Flush,
+ stream_SaveToFile,
+ stream_LoadFromFile,
+ stream_ReadText,
+ stream_WriteText,
+ stream_Cancel
+};
+
+HRESULT Stream_create( void **obj )
+{
+ struct stream *stream;
+
+ if (!(stream = heap_alloc_zero( sizeof(*stream) ))) return E_OUTOFMEMORY;
+ stream->Stream_iface.lpVtbl = &stream_vtbl;
+ stream->refs = 1;
+
+ *obj = &stream->Stream_iface;
+ TRACE( "returning iface %p\n", *obj );
+ return S_OK;
+}
--
2.20.1
Dec. 6, 2019
[PATCH v2 3/5] msado15: Add a stub _Recordset implementation.
by Hans Leidekker
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
---
dlls/msado15/Makefile.in | 3 +-
dlls/msado15/main.c | 5 +
dlls/msado15/msado15_classes.idl | 8 +
dlls/msado15/msado15_private.h | 1 +
dlls/msado15/recordset.c | 686 +++++++++++++++++++++++++++++++
5 files changed, 702 insertions(+), 1 deletion(-)
create mode 100644 dlls/msado15/recordset.c
diff --git a/dlls/msado15/Makefile.in b/dlls/msado15/Makefile.in
index b901944bc1..5b255df323 100644
--- a/dlls/msado15/Makefile.in
+++ b/dlls/msado15/Makefile.in
@@ -5,7 +5,8 @@ EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \
connection.c \
- main.c
+ main.c \
+ recordset.c
IDL_SRCS = \
msado15_classes.idl \
diff --git a/dlls/msado15/main.c b/dlls/msado15/main.c
index d292826b1f..321ba40e3b 100644
--- a/dlls/msado15/main.c
+++ b/dlls/msado15/main.c
@@ -118,6 +118,7 @@ static const struct IClassFactoryVtbl msadocf_vtbl =
};
static struct msadocf connection_cf = { { &msadocf_vtbl }, Connection_create };
+static struct msadocf recordset_cf = { { &msadocf_vtbl }, Recordset_create };
/***********************************************************************
* DllGetClassObject
@@ -132,6 +133,10 @@ HRESULT WINAPI DllGetClassObject( REFCLSID clsid, REFIID iid, void **obj )
{
cf = &connection_cf.IClassFactory_iface;
}
+ else if (IsEqualGUID( clsid, &CLSID_Recordset ))
+ {
+ cf = &recordset_cf.IClassFactory_iface;
+ }
if (!cf) return CLASS_E_CLASSNOTAVAILABLE;
return IClassFactory_QueryInterface( cf, iid, obj );
}
diff --git a/dlls/msado15/msado15_classes.idl b/dlls/msado15/msado15_classes.idl
index f69fea0a1a..56e86a0dc6 100644
--- a/dlls/msado15/msado15_classes.idl
+++ b/dlls/msado15/msado15_classes.idl
@@ -25,3 +25,11 @@
uuid(00000514-0000-0010-8000-00aa006d2ea4)
]
coclass Connection { interface _Connection; }
+
+[
+ threading(both),
+ progid("ADODB.Recordset.6.0"),
+ vi_progid("ADODB.Recordset"),
+ uuid(00000535-0000-0010-8000-00aa006d2ea4)
+]
+coclass Recordset { interface _Recordset; }
diff --git a/dlls/msado15/msado15_private.h b/dlls/msado15/msado15_private.h
index 1d4c379443..1f8948522b 100644
--- a/dlls/msado15/msado15_private.h
+++ b/dlls/msado15/msado15_private.h
@@ -20,5 +20,6 @@
#define _WINE_MSADO15_PRIVATE_H_
HRESULT Connection_create( void ** ) DECLSPEC_HIDDEN;
+HRESULT Recordset_create( void ** ) DECLSPEC_HIDDEN;
#endif /* _WINE_MSADO15_PRIVATE_H_ */
diff --git a/dlls/msado15/recordset.c b/dlls/msado15/recordset.c
new file mode 100644
index 0000000000..bf0ca6e90f
--- /dev/null
+++ b/dlls/msado15/recordset.c
@@ -0,0 +1,686 @@
+/*
+ * Copyright 2019 Hans Leidekker for CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <stdarg.h>
+#include <assert.h>
+#include "windef.h"
+#include "winbase.h"
+#define COBJMACROS
+#include "objbase.h"
+#include "msado15_backcompat.h"
+
+#include "wine/debug.h"
+#include "wine/heap.h"
+
+#include "msado15_private.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(msado15);
+
+struct recordset
+{
+ _Recordset Recordset_iface;
+ LONG refs;
+};
+
+static inline struct recordset *impl_from_Recordset( _Recordset *iface )
+{
+ return CONTAINING_RECORD( iface, struct recordset, Recordset_iface );
+}
+
+static ULONG WINAPI recordset_AddRef( _Recordset *iface )
+{
+ struct recordset *recordset = impl_from_Recordset( iface );
+ LONG refs = InterlockedIncrement( &recordset->refs );
+ TRACE( "%p new refcount %d\n", recordset, refs );
+ return refs;
+}
+
+static ULONG WINAPI recordset_Release( _Recordset *iface )
+{
+ struct recordset *recordset = impl_from_Recordset( iface );
+ LONG refs = InterlockedDecrement( &recordset->refs );
+ TRACE( "%p new refcount %d\n", recordset, refs );
+ if (!refs)
+ {
+ TRACE( "destroying %p\n", recordset );
+ heap_free( recordset );
+ }
+ return refs;
+}
+
+static HRESULT WINAPI recordset_QueryInterface( _Recordset *iface, REFIID riid, void **obj )
+{
+ TRACE( "%p, %s, %p\n", iface, debugstr_guid(riid), obj );
+
+ if (IsEqualGUID( riid, &IID__Recordset ) || IsEqualGUID( riid, &IID_IDispatch ) ||
+ IsEqualGUID( riid, &IID_IUnknown ))
+ {
+ *obj = iface;
+ }
+ else
+ {
+ FIXME( "interface %s not implemented\n", debugstr_guid(riid) );
+ return E_NOINTERFACE;
+ }
+ recordset_AddRef( iface );
+ return S_OK;
+}
+
+static HRESULT WINAPI recordset_GetTypeInfoCount( _Recordset *iface, UINT *count )
+{
+ FIXME( "%p, %p\n", iface, count );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_GetTypeInfo( _Recordset *iface, UINT index, LCID lcid, ITypeInfo **info )
+{
+ FIXME( "%p, %u, %u, %p\n", iface, index, lcid, info );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_GetIDsOfNames( _Recordset *iface, REFIID riid, LPOLESTR *names, UINT count,
+ LCID lcid, DISPID *dispid )
+{
+ FIXME( "%p, %s, %p, %u, %u, %p\n", iface, debugstr_guid(riid), names, count, lcid, dispid );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_Invoke( _Recordset *iface, DISPID member, REFIID riid, LCID lcid, WORD flags,
+ DISPPARAMS *params, VARIANT *result, EXCEPINFO *excep_info, UINT *arg_err )
+{
+ FIXME( "%p, %d, %s, %d, %d, %p, %p, %p, %p\n", iface, member, debugstr_guid(riid), lcid, flags, params,
+ result, excep_info, arg_err );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_get_Properties( _Recordset *iface, Properties **obj )
+{
+ FIXME( "%p, %p\n", iface, obj );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_get_AbsolutePosition( _Recordset *iface, PositionEnum_Param *pos )
+{
+ FIXME( "%p, %p\n", iface, pos );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_put_AbsolutePosition( _Recordset *iface, PositionEnum_Param pos )
+{
+ FIXME( "%p, %d\n", iface, pos );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_putref_ActiveConnection( _Recordset *iface, IDispatch *connection )
+{
+ FIXME( "%p, %p\n", iface, connection );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_put_ActiveConnection( _Recordset *iface, VARIANT connection )
+{
+ FIXME( "%p, %s\n", iface, debugstr_variant(&connection) );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_get_ActiveConnection( _Recordset *iface, VARIANT *connection )
+{
+ FIXME( "%p, %p\n", iface, connection );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_get_BOF( _Recordset *iface, VARIANT_BOOL *bof )
+{
+ FIXME( "%p, %p\n", iface, bof );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_get_Bookmark( _Recordset *iface, VARIANT *bookmark )
+{
+ FIXME( "%p, %p\n", iface, bookmark );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_put_Bookmark( _Recordset *iface, VARIANT bookmark )
+{
+ FIXME( "%p, %s\n", iface, debugstr_variant(&bookmark) );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_get_CacheSize( _Recordset *iface, LONG *size )
+{
+ FIXME( "%p, %p\n", iface, size );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_put_CacheSize( _Recordset *iface, LONG size )
+{
+ FIXME( "%p, %d\n", iface, size );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_get_CursorType( _Recordset *iface, CursorTypeEnum *cursor_type )
+{
+ FIXME( "%p, %p\n", iface, cursor_type );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_put_CursorType( _Recordset *iface, CursorTypeEnum cursor_type )
+{
+ FIXME( "%p, %d\n", iface, cursor_type );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_get_EOF( _Recordset *iface, VARIANT_BOOL *eof )
+{
+ FIXME( "%p, %p\n", iface, eof );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_get_Fields( _Recordset *iface, Fields **obj )
+{
+ FIXME( "%p, %p\n", iface, obj );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_get_LockType( _Recordset *iface, LockTypeEnum *lock_type )
+{
+ FIXME( "%p, %p\n", iface, lock_type );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_put_LockType( _Recordset *iface, LockTypeEnum lock_type )
+{
+ FIXME( "%p, %d\n", iface, lock_type );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_get_MaxRecords( _Recordset *iface, LONG *max_records )
+{
+ FIXME( "%p, %p\n", iface, max_records );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_put_MaxRecords( _Recordset *iface, LONG max_records )
+{
+ FIXME( "%p, %d\n", iface, max_records );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_get_RecordCount( _Recordset *iface, LONG *count )
+{
+ FIXME( "%p, %p\n", iface, count );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_putref_Source( _Recordset *iface, IDispatch *source )
+{
+ FIXME( "%p, %p\n", iface, source );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_put_Source( _Recordset *iface, BSTR source )
+{
+ FIXME( "%p, %s\n", iface, debugstr_w(source) );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_get_Source( _Recordset *iface, VARIANT *source )
+{
+ FIXME( "%p, %p\n", iface, source );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_AddNew( _Recordset *iface, VARIANT field_list, VARIANT values )
+{
+ FIXME( "%p, %s, %s\n", iface, debugstr_variant(&field_list), debugstr_variant(&values) );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_CancelUpdate( _Recordset *iface )
+{
+ FIXME( "%p\n", iface );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_Close( _Recordset *iface )
+{
+ FIXME( "%p\n", iface );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_Delete( _Recordset *iface, AffectEnum affect_records )
+{
+ FIXME( "%p, %u\n", iface, affect_records );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_GetRows( _Recordset *iface, LONG rows, VARIANT start, VARIANT fields, VARIANT *var )
+{
+ FIXME( "%p, %d, %s, %s, %p\n", iface, rows, debugstr_variant(&start), debugstr_variant(&fields), var );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_Move( _Recordset *iface, LONG num_records, VARIANT start )
+{
+ FIXME( "%p, %d, %s\n", iface, num_records, debugstr_variant(&start) );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_MoveNext( _Recordset *iface )
+{
+ FIXME( "%p\n", iface );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_MovePrevious( _Recordset *iface )
+{
+ FIXME( "%p\n", iface );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_MoveFirst( _Recordset *iface )
+{
+ FIXME( "%p\n", iface );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_MoveLast( _Recordset *iface )
+{
+ FIXME( "%p\n", iface );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_Open( _Recordset *iface, VARIANT source, VARIANT active_connection,
+ CursorTypeEnum cursor_type, LockTypeEnum lock_type, LONG options )
+{
+ FIXME( "%p, %s, %s, %d, %d, %d\n", iface, debugstr_variant(&source), debugstr_variant(&active_connection),
+ cursor_type, lock_type, options );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_Requery( _Recordset *iface, LONG options )
+{
+ FIXME( "%p, %d\n", iface, options );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset__xResync( _Recordset *iface, AffectEnum affect_records )
+{
+ FIXME( "%p, %u\n", iface, affect_records );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_Update( _Recordset *iface, VARIANT fields, VARIANT values )
+{
+ FIXME( "%p, %s, %s\n", iface, debugstr_variant(&fields), debugstr_variant(&values) );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_get_AbsolutePage( _Recordset *iface, PositionEnum_Param *pos )
+{
+ FIXME( "%p, %p\n", iface, pos );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_put_AbsolutePage( _Recordset *iface, PositionEnum_Param pos )
+{
+ FIXME( "%p, %d\n", iface, pos );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_get_EditMode( _Recordset *iface, EditModeEnum *mode )
+{
+ FIXME( "%p, %p\n", iface, mode );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_get_Filter( _Recordset *iface, VARIANT *criteria )
+{
+ FIXME( "%p, %p\n", iface, criteria );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_put_Filter( _Recordset *iface, VARIANT criteria )
+{
+ FIXME( "%p, %s\n", iface, debugstr_variant(&criteria) );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_get_PageCount( _Recordset *iface, LONG *count )
+{
+ FIXME( "%p, %p\n", iface, count );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_get_PageSize( _Recordset *iface, LONG *size )
+{
+ FIXME( "%p, %p\n", iface, size );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_put_PageSize( _Recordset *iface, LONG size )
+{
+ FIXME( "%p, %d\n", iface, size );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_get_Sort( _Recordset *iface, BSTR *criteria )
+{
+ FIXME( "%p, %p\n", iface, criteria );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_put_Sort( _Recordset *iface, BSTR criteria )
+{
+ FIXME( "%p, %s\n", iface, debugstr_w(criteria) );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_get_Status( _Recordset *iface, LONG *status )
+{
+ FIXME( "%p, %p\n", iface, status );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_get_State( _Recordset *iface, LONG *state )
+{
+ FIXME( "%p, %p\n", iface, state );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset__xClone( _Recordset *iface, _Recordset **obj )
+{
+ FIXME( "%p, %p\n", iface, obj );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_UpdateBatch( _Recordset *iface, AffectEnum affect_records )
+{
+ FIXME( "%p, %u\n", iface, affect_records );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_CancelBatch( _Recordset *iface, AffectEnum affect_records )
+{
+ FIXME( "%p, %u\n", iface, affect_records );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_get_CursorLocation( _Recordset *iface, CursorLocationEnum *cursor_loc )
+{
+ FIXME( "%p, %p\n", iface, cursor_loc );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_put_CursorLocation( _Recordset *iface, CursorLocationEnum cursor_loc )
+{
+ FIXME( "%p, %u\n", iface, cursor_loc );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_NextRecordset( _Recordset *iface, VARIANT *records_affected, _Recordset **record_set )
+{
+ FIXME( "%p, %p, %p\n", iface, records_affected, record_set );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_Supports( _Recordset *iface, CursorOptionEnum cursor_options, VARIANT_BOOL *ret )
+{
+ FIXME( "%p, %08x, %p\n", iface, cursor_options, ret );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_get_Collect( _Recordset *iface, VARIANT index, VARIANT *var )
+{
+ FIXME( "%p, %s, %p\n", iface, debugstr_variant(&index), var );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_put_Collect( _Recordset *iface, VARIANT index, VARIANT var )
+{
+ FIXME( "%p, %s, %s\n", iface, debugstr_variant(&index), debugstr_variant(&var) );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_get_MarshalOptions( _Recordset *iface, MarshalOptionsEnum *options )
+{
+ FIXME( "%p, %p\n", iface, options );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_put_MarshalOptions( _Recordset *iface, MarshalOptionsEnum options )
+{
+ FIXME( "%p, %u\n", iface, options );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_Find( _Recordset *iface, BSTR criteria, LONG skip_records,
+ SearchDirectionEnum search_direction, VARIANT start )
+{
+ FIXME( "%p, %s, %d, %d, %s\n", iface, debugstr_w(criteria), skip_records, search_direction,
+ debugstr_variant(&start) );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_Cancel( _Recordset *iface )
+{
+ FIXME( "%p\n", iface );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_get_DataSource( _Recordset *iface, IUnknown **data_source )
+{
+ FIXME( "%p, %p\n", iface, data_source );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_putref_DataSource( _Recordset *iface, IUnknown *data_source )
+{
+ FIXME( "%p, %p\n", iface, data_source );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset__xSave( _Recordset *iface, BSTR filename, PersistFormatEnum persist_format )
+{
+ FIXME( "%p, %s, %u\n", iface, debugstr_w(filename), persist_format );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_get_ActiveCommand( _Recordset *iface, IDispatch **cmd )
+{
+ FIXME( "%p, %p\n", iface, cmd );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_put_StayInSync( _Recordset *iface, VARIANT_BOOL stay_in_sync )
+{
+ FIXME( "%p, %d\n", iface, stay_in_sync );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_get_StayInSync( _Recordset *iface, VARIANT_BOOL *stay_in_sync )
+{
+ FIXME( "%p, %p\n", iface, stay_in_sync );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_GetString( _Recordset *iface, StringFormatEnum string_format, LONG num_rows,
+ BSTR column_delimeter, BSTR row_delimeter, BSTR null_expr,
+ BSTR *ret_string )
+{
+ FIXME( "%p, %u, %d, %s, %s, %s, %p\n", iface, string_format, num_rows, debugstr_w(column_delimeter),
+ debugstr_w(row_delimeter), debugstr_w(null_expr), ret_string );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_get_DataMember( _Recordset *iface, BSTR *data_member )
+{
+ FIXME( "%p, %p\n", iface, data_member );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_put_DataMember( _Recordset *iface, BSTR data_member )
+{
+ FIXME( "%p, %s\n", iface, debugstr_w(data_member) );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_CompareBookmarks( _Recordset *iface, VARIANT bookmark1, VARIANT bookmark2, CompareEnum *compare )
+{
+ FIXME( "%p, %s, %s, %p\n", iface, debugstr_variant(&bookmark1), debugstr_variant(&bookmark2), compare );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_Clone( _Recordset *iface, LockTypeEnum lock_type, _Recordset **obj )
+{
+ FIXME( "%p, %d, %p\n", iface, lock_type, obj );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_Resync( _Recordset *iface, AffectEnum affect_records, ResyncEnum resync_values )
+{
+ FIXME( "%p, %u, %u\n", iface, affect_records, resync_values );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_Seek( _Recordset *iface, VARIANT key_values, SeekEnum seek_option )
+{
+ FIXME( "%p, %s, %u\n", iface, debugstr_variant(&key_values), seek_option );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_put_Index( _Recordset *iface, BSTR index )
+{
+ FIXME( "%p, %s\n", iface, debugstr_w(index) );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_get_Index( _Recordset *iface, BSTR *index )
+{
+ FIXME( "%p, %p\n", iface, index );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI recordset_Save( _Recordset *iface, VARIANT destination, PersistFormatEnum persist_format )
+{
+ FIXME( "%p, %s, %u\n", iface, debugstr_variant(&destination), persist_format );
+ return E_NOTIMPL;
+}
+
+static const struct _RecordsetVtbl recordset_vtbl =
+{
+ recordset_QueryInterface,
+ recordset_AddRef,
+ recordset_Release,
+ recordset_GetTypeInfoCount,
+ recordset_GetTypeInfo,
+ recordset_GetIDsOfNames,
+ recordset_Invoke,
+ recordset_get_Properties,
+ recordset_get_AbsolutePosition,
+ recordset_put_AbsolutePosition,
+ recordset_putref_ActiveConnection,
+ recordset_put_ActiveConnection,
+ recordset_get_ActiveConnection,
+ recordset_get_BOF,
+ recordset_get_Bookmark,
+ recordset_put_Bookmark,
+ recordset_get_CacheSize,
+ recordset_put_CacheSize,
+ recordset_get_CursorType,
+ recordset_put_CursorType,
+ recordset_get_EOF,
+ recordset_get_Fields,
+ recordset_get_LockType,
+ recordset_put_LockType,
+ recordset_get_MaxRecords,
+ recordset_put_MaxRecords,
+ recordset_get_RecordCount,
+ recordset_putref_Source,
+ recordset_put_Source,
+ recordset_get_Source,
+ recordset_AddNew,
+ recordset_CancelUpdate,
+ recordset_Close,
+ recordset_Delete,
+ recordset_GetRows,
+ recordset_Move,
+ recordset_MoveNext,
+ recordset_MovePrevious,
+ recordset_MoveFirst,
+ recordset_MoveLast,
+ recordset_Open,
+ recordset_Requery,
+ recordset__xResync,
+ recordset_Update,
+ recordset_get_AbsolutePage,
+ recordset_put_AbsolutePage,
+ recordset_get_EditMode,
+ recordset_get_Filter,
+ recordset_put_Filter,
+ recordset_get_PageCount,
+ recordset_get_PageSize,
+ recordset_put_PageSize,
+ recordset_get_Sort,
+ recordset_put_Sort,
+ recordset_get_Status,
+ recordset_get_State,
+ recordset__xClone,
+ recordset_UpdateBatch,
+ recordset_CancelBatch,
+ recordset_get_CursorLocation,
+ recordset_put_CursorLocation,
+ recordset_NextRecordset,
+ recordset_Supports,
+ recordset_get_Collect,
+ recordset_put_Collect,
+ recordset_get_MarshalOptions,
+ recordset_put_MarshalOptions,
+ recordset_Find,
+ recordset_Cancel,
+ recordset_get_DataSource,
+ recordset_putref_DataSource,
+ recordset__xSave,
+ recordset_get_ActiveCommand,
+ recordset_put_StayInSync,
+ recordset_get_StayInSync,
+ recordset_GetString,
+ recordset_get_DataMember,
+ recordset_put_DataMember,
+ recordset_CompareBookmarks,
+ recordset_Clone,
+ recordset_Resync,
+ recordset_Seek,
+ recordset_put_Index,
+ recordset_get_Index,
+ recordset_Save
+};
+
+HRESULT Recordset_create( void **obj )
+{
+ struct recordset *recordset;
+
+ if (!(recordset = heap_alloc_zero( sizeof(*recordset) ))) return E_OUTOFMEMORY;
+ recordset->Recordset_iface.lpVtbl = &recordset_vtbl;
+ recordset->refs = 1;
+
+ *obj = &recordset->Recordset_iface;
+ TRACE( "returning iface %p\n", *obj );
+ return S_OK;
+}
--
2.20.1
Dec. 6, 2019
[PATCH v2 2/5] msado15: Add a stub _Connection implementation.
by Hans Leidekker
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
---
dlls/msado15/Makefile.in | 8 +-
dlls/msado15/connection.c | 344 +++++++++++++++++++++++++++++++
dlls/msado15/main.c | 106 ++++++++++
dlls/msado15/msado15.spec | 4 +-
dlls/msado15/msado15_classes.idl | 27 +++
dlls/msado15/msado15_private.h | 24 +++
6 files changed, 509 insertions(+), 4 deletions(-)
create mode 100644 dlls/msado15/connection.c
create mode 100644 dlls/msado15/msado15_classes.idl
create mode 100644 dlls/msado15/msado15_private.h
diff --git a/dlls/msado15/Makefile.in b/dlls/msado15/Makefile.in
index 779a18df14..b901944bc1 100644
--- a/dlls/msado15/Makefile.in
+++ b/dlls/msado15/Makefile.in
@@ -1,8 +1,12 @@
MODULE = msado15.dll
+IMPORTS = oleaut32
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \
- main.c \
+ connection.c \
+ main.c
-IDL_SRCS = msado15_tlb.idl
+IDL_SRCS = \
+ msado15_classes.idl \
+ msado15_tlb.idl
diff --git a/dlls/msado15/connection.c b/dlls/msado15/connection.c
new file mode 100644
index 0000000000..f33bc89a1a
--- /dev/null
+++ b/dlls/msado15/connection.c
@@ -0,0 +1,344 @@
+/*
+ * Copyright 2019 Hans Leidekker for CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <stdarg.h>
+#include "windef.h"
+#include "winbase.h"
+#define COBJMACROS
+#include "objbase.h"
+#include "msado15_backcompat.h"
+
+#include "wine/debug.h"
+#include "wine/heap.h"
+
+#include "msado15_private.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(msado15);
+
+struct connection
+{
+ _Connection Connection_iface;
+ LONG refs;
+};
+
+static inline struct connection *impl_from_Connection( _Connection *iface )
+{
+ return CONTAINING_RECORD( iface, struct connection, Connection_iface );
+}
+
+static ULONG WINAPI connection_AddRef( _Connection *iface )
+{
+ struct connection *connection = impl_from_Connection( iface );
+ return InterlockedIncrement( &connection->refs );
+}
+
+static ULONG WINAPI connection_Release( _Connection *iface )
+{
+ struct connection *connection = impl_from_Connection( iface );
+ LONG refs = InterlockedDecrement( &connection->refs );
+ if (!refs)
+ {
+ TRACE( "destroying %p\n", connection );
+ heap_free( connection );
+ }
+ return refs;
+}
+
+static HRESULT WINAPI connection_QueryInterface( _Connection *iface, REFIID riid, void **obj )
+{
+ TRACE( "%p, %s, %p\n", iface, debugstr_guid(riid), obj );
+
+ if (IsEqualGUID( riid, &IID__Connection ) || IsEqualGUID( riid, &IID_IDispatch ) ||
+ IsEqualGUID( riid, &IID_IUnknown ))
+ {
+ *obj = iface;
+ }
+ else
+ {
+ FIXME( "interface %s not implemented\n", debugstr_guid(riid) );
+ return E_NOINTERFACE;
+ }
+ connection_AddRef( iface );
+ return S_OK;
+}
+
+static HRESULT WINAPI connection_GetTypeInfoCount( _Connection *iface, UINT *count )
+{
+ FIXME( "%p, %p\n", iface, count );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI connection_GetTypeInfo( _Connection *iface, UINT index, LCID lcid, ITypeInfo **info )
+{
+ FIXME( "%p, %u, %u, %p\n", iface, index, lcid, info );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI connection_GetIDsOfNames( _Connection *iface, REFIID riid, LPOLESTR *names, UINT count,
+ LCID lcid, DISPID *dispid )
+{
+ FIXME( "%p, %s, %p, %u, %u, %p\n", iface, debugstr_guid(riid), names, count, lcid, dispid );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI connection_Invoke( _Connection *iface, DISPID member, REFIID riid, LCID lcid, WORD flags,
+ DISPPARAMS *params, VARIANT *result, EXCEPINFO *excep_info, UINT *arg_err )
+{
+ FIXME( "%p, %d, %s, %d, %d, %p, %p, %p, %p\n", iface, member, debugstr_guid(riid), lcid, flags, params,
+ result, excep_info, arg_err );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI connection_get_Properties( _Connection *iface, Properties **obj )
+{
+ FIXME( "%p, %p\n", iface, obj );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI connection_get_ConnectionString( _Connection *iface, BSTR *str )
+{
+ FIXME( "%p, %p\n", iface, str );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI connection_put_ConnectionString( _Connection *iface, BSTR str )
+{
+ FIXME( "%p, %s\n", iface, debugstr_w(str) );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI connection_get_CommandTimeout( _Connection *iface, LONG *timeout )
+{
+ FIXME( "%p, %p\n", iface, timeout );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI connection_put_CommandTimeout( _Connection *iface, LONG timeout )
+{
+ FIXME( "%p, %d\n", iface, timeout );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI connection_get_ConnectionTimeout( _Connection *iface, LONG *timeout )
+{
+ FIXME( "%p, %p\n", iface, timeout );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI connection_put_ConnectionTimeout( _Connection *iface, LONG timeout )
+{
+ FIXME( "%p, %d\n", iface, timeout );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI connection_get_Version( _Connection *iface, BSTR *str )
+{
+ FIXME( "%p, %p\n", iface, str );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI connection_Close( _Connection *iface )
+{
+ FIXME( "%p\n", iface );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI connection_Execute( _Connection *iface, BSTR command, VARIANT *records_affected,
+ LONG options, _Recordset **record_set )
+{
+ FIXME( "%p, %s, %p, %08x, %p\n", iface, debugstr_w(command), records_affected, options, record_set );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI connection_BeginTrans( _Connection *iface, LONG *transaction_level )
+{
+ FIXME( "%p, %p\n", iface, transaction_level );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI connection_CommitTrans( _Connection *iface )
+{
+ FIXME( "%p\n", iface );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI connection_RollbackTrans( _Connection *iface )
+{
+ FIXME( "%p\n", iface );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI connection_Open( _Connection *iface, BSTR connect_str, BSTR userid, BSTR password,
+ LONG options )
+{
+ FIXME( "%p, %s, %s, %p, %08x\n", iface, debugstr_w(connect_str), debugstr_w(userid),
+ debugstr_w(password), options );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI connection_get_Errors( _Connection *iface, Errors **obj )
+{
+ FIXME( "%p, %p\n", iface, obj );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI connection_get_DefaultDatabase( _Connection *iface, BSTR *str )
+{
+ FIXME( "%p, %p\n", iface, str );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI connection_put_DefaultDatabase( _Connection *iface, BSTR str )
+{
+ FIXME( "%p, %s\n", iface, debugstr_w(str) );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI connection_get_IsolationLevel( _Connection *iface, IsolationLevelEnum *level )
+{
+ FIXME( "%p, %p\n", iface, level );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI connection_put_IsolationLevel( _Connection *iface, IsolationLevelEnum level )
+{
+ FIXME( "%p, %d\n", iface, level );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI connection_get_Attributes( _Connection *iface, LONG *attr )
+{
+ FIXME( "%p, %p\n", iface, attr );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI connection_put_Attributes( _Connection *iface, LONG attr )
+{
+ FIXME( "%p, %d\n", iface, attr );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI connection_get_CursorLocation( _Connection *iface, CursorLocationEnum *cursor_loc )
+{
+ FIXME( "%p, %p\n", iface, cursor_loc );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI connection_put_CursorLocation( _Connection *iface, CursorLocationEnum cursor_loc )
+{
+ FIXME( "%p, %u\n", iface, cursor_loc );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI connection_get_Mode( _Connection *iface, ConnectModeEnum *mode )
+{
+ FIXME( "%p, %p\n", iface, mode );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI connection_put_Mode( _Connection *iface, ConnectModeEnum mode )
+{
+ FIXME( "%p, %u\n", iface, mode );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI connection_get_Provider( _Connection *iface, BSTR *str )
+{
+ FIXME( "%p, %p\n", iface, str );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI connection_put_Provider( _Connection *iface, BSTR str )
+{
+ FIXME( "%p, %s\n", iface, debugstr_w(str) );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI connection_get_State( _Connection *iface, LONG *state )
+{
+ FIXME( "%p, %p\n", iface, state );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI connection_OpenSchema( _Connection *iface, SchemaEnum schema, VARIANT restrictions,
+ VARIANT schema_id, _Recordset **record_set )
+{
+ FIXME( "%p, %d, %s, %s, %p\n", iface, schema, debugstr_variant(&restrictions),
+ debugstr_variant(&schema_id), record_set );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI connection_Cancel( _Connection *iface )
+{
+ FIXME( "%p\n", iface );
+ return E_NOTIMPL;
+}
+
+static const struct _ConnectionVtbl connection_vtbl =
+{
+ connection_QueryInterface,
+ connection_AddRef,
+ connection_Release,
+ connection_GetTypeInfoCount,
+ connection_GetTypeInfo,
+ connection_GetIDsOfNames,
+ connection_Invoke,
+ connection_get_Properties,
+ connection_get_ConnectionString,
+ connection_put_ConnectionString,
+ connection_get_CommandTimeout,
+ connection_put_CommandTimeout,
+ connection_get_ConnectionTimeout,
+ connection_put_ConnectionTimeout,
+ connection_get_Version,
+ connection_Close,
+ connection_Execute,
+ connection_BeginTrans,
+ connection_CommitTrans,
+ connection_RollbackTrans,
+ connection_Open,
+ connection_get_Errors,
+ connection_get_DefaultDatabase,
+ connection_put_DefaultDatabase,
+ connection_get_IsolationLevel,
+ connection_put_IsolationLevel,
+ connection_get_Attributes,
+ connection_put_Attributes,
+ connection_get_CursorLocation,
+ connection_put_CursorLocation,
+ connection_get_Mode,
+ connection_put_Mode,
+ connection_get_Provider,
+ connection_put_Provider,
+ connection_get_State,
+ connection_OpenSchema,
+ connection_Cancel
+};
+
+HRESULT Connection_create( void **obj )
+{
+ struct connection *connection;
+
+ if (!(connection = heap_alloc( sizeof(*connection) ))) return E_OUTOFMEMORY;
+ connection->Connection_iface.lpVtbl = &connection_vtbl;
+ connection->refs = 1;
+
+ *obj = &connection->Connection_iface;
+ TRACE( "returning iface %p\n", *obj );
+ return S_OK;
+}
diff --git a/dlls/msado15/main.c b/dlls/msado15/main.c
index 0c5b2615d0..d292826b1f 100644
--- a/dlls/msado15/main.c
+++ b/dlls/msado15/main.c
@@ -19,10 +19,18 @@
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
+#include "initguid.h"
+#define COBJMACROS
#include "objbase.h"
#include "rpcproxy.h"
+#include "msado15_backcompat.h"
#include "wine/debug.h"
+#include "wine/heap.h"
+
+#include "msado15_private.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(msado15);
static HINSTANCE hinstance;
@@ -38,6 +46,104 @@ BOOL WINAPI DllMain( HINSTANCE dll, DWORD reason, LPVOID reserved )
return TRUE;
}
+typedef HRESULT (*fnCreateInstance)( void **obj );
+
+struct msadocf
+{
+ IClassFactory IClassFactory_iface;
+ fnCreateInstance pfnCreateInstance;
+};
+
+static inline struct msadocf *impl_from_IClassFactory( IClassFactory *iface )
+{
+ return CONTAINING_RECORD( iface, struct msadocf, IClassFactory_iface );
+}
+
+static HRESULT WINAPI msadocf_QueryInterface( IClassFactory *iface, REFIID riid, void **obj )
+{
+ if (IsEqualGUID( riid, &IID_IUnknown ) || IsEqualGUID( riid, &IID_IClassFactory ))
+ {
+ IClassFactory_AddRef( iface );
+ *obj = iface;
+ return S_OK;
+ }
+ FIXME( "interface %s not implemented\n", debugstr_guid(riid) );
+ return E_NOINTERFACE;
+}
+
+static ULONG WINAPI msadocf_AddRef( IClassFactory *iface )
+{
+ return 2;
+}
+
+static ULONG WINAPI msadocf_Release( IClassFactory *iface )
+{
+ return 1;
+}
+
+static HRESULT WINAPI msadocf_CreateInstance( IClassFactory *iface, LPUNKNOWN outer, REFIID riid, void **obj )
+{
+ struct msadocf *cf = impl_from_IClassFactory( iface );
+ IUnknown *unknown;
+ HRESULT hr;
+
+ TRACE( "%p, %s, %p\n", outer, debugstr_guid(riid), obj );
+
+ *obj = NULL;
+ if (outer)
+ return CLASS_E_NOAGGREGATION;
+
+ hr = cf->pfnCreateInstance( (void **)&unknown );
+ if (FAILED(hr))
+ return hr;
+
+ hr = IUnknown_QueryInterface( unknown, riid, obj );
+ IUnknown_Release( unknown );
+ return hr;
+}
+
+static HRESULT WINAPI msadocf_LockServer( IClassFactory *iface, BOOL dolock )
+{
+ FIXME( "%p, %d\n", iface, dolock );
+ return S_OK;
+}
+
+static const struct IClassFactoryVtbl msadocf_vtbl =
+{
+ msadocf_QueryInterface,
+ msadocf_AddRef,
+ msadocf_Release,
+ msadocf_CreateInstance,
+ msadocf_LockServer
+};
+
+static struct msadocf connection_cf = { { &msadocf_vtbl }, Connection_create };
+
+/***********************************************************************
+ * DllGetClassObject
+ */
+HRESULT WINAPI DllGetClassObject( REFCLSID clsid, REFIID iid, void **obj )
+{
+ IClassFactory *cf = NULL;
+
+ TRACE( "%s, %s, %p\n", debugstr_guid(clsid), debugstr_guid(iid), obj );
+
+ if (IsEqualGUID( clsid, &CLSID_Connection ))
+ {
+ cf = &connection_cf.IClassFactory_iface;
+ }
+ if (!cf) return CLASS_E_CLASSNOTAVAILABLE;
+ return IClassFactory_QueryInterface( cf, iid, obj );
+}
+
+/******************************************************************
+ * DllCanUnloadNow
+ */
+HRESULT WINAPI DllCanUnloadNow(void)
+{
+ return S_FALSE;
+}
+
/***********************************************************************
* DllRegisterServer
*/
diff --git a/dlls/msado15/msado15.spec b/dlls/msado15/msado15.spec
index 6d0e061a53..b16365d0c9 100644
--- a/dlls/msado15/msado15.spec
+++ b/dlls/msado15/msado15.spec
@@ -1,4 +1,4 @@
-@ stub DllCanUnloadNow
-@ stub DllGetClassObject
+@ stdcall -private DllCanUnloadNow()
+@ stdcall -private DllGetClassObject(ptr ptr ptr)
@ stdcall -private DllRegisterServer()
@ stdcall -private DllUnregisterServer()
diff --git a/dlls/msado15/msado15_classes.idl b/dlls/msado15/msado15_classes.idl
new file mode 100644
index 0000000000..f69fea0a1a
--- /dev/null
+++ b/dlls/msado15/msado15_classes.idl
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2019 Hans Leidekker for CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#pragma makedep register
+
+[
+ threading(apartment),
+ progid("ADODB.Connection.6.0"),
+ vi_progid("ADODB.Connection"),
+ uuid(00000514-0000-0010-8000-00aa006d2ea4)
+]
+coclass Connection { interface _Connection; }
diff --git a/dlls/msado15/msado15_private.h b/dlls/msado15/msado15_private.h
new file mode 100644
index 0000000000..1d4c379443
--- /dev/null
+++ b/dlls/msado15/msado15_private.h
@@ -0,0 +1,24 @@
+/*
+ * Copyright 2019 Hans Leidekker for CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#ifndef _WINE_MSADO15_PRIVATE_H_
+#define _WINE_MSADO15_PRIVATE_H_
+
+HRESULT Connection_create( void ** ) DECLSPEC_HIDDEN;
+
+#endif /* _WINE_MSADO15_PRIVATE_H_ */
--
2.20.1
Dec. 6, 2019
[PATCH v2 1/5] msado15: Add typelib.
by Hans Leidekker
v2: Drop explicit calling convention.
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
---
configure.ac | 1 +
dlls/msado15/Makefile.in | 8 +
dlls/msado15/main.c | 55 +
dlls/msado15/msado15.spec | 4 +
dlls/msado15/msado15_tlb.idl | 21 +
include/Makefile.in | 1 +
include/msado15_backcompat.idl | 2104 ++++++++++++++++++++++++++++++++
7 files changed, 2194 insertions(+)
create mode 100644 dlls/msado15/Makefile.in
create mode 100644 dlls/msado15/main.c
create mode 100644 dlls/msado15/msado15.spec
create mode 100644 dlls/msado15/msado15_tlb.idl
create mode 100644 include/msado15_backcompat.idl
diff --git a/configure.ac b/configure.ac
index 7f2c3cda23..06ac9c6c71 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3438,6 +3438,7 @@ WINE_CONFIG_MAKEFILE(dlls/msacm.dll16,enable_win16)
WINE_CONFIG_MAKEFILE(dlls/msacm32.drv)
WINE_CONFIG_MAKEFILE(dlls/msacm32)
WINE_CONFIG_MAKEFILE(dlls/msacm32/tests)
+WINE_CONFIG_MAKEFILE(dlls/msado15)
WINE_CONFIG_MAKEFILE(dlls/msadp32.acm)
WINE_CONFIG_MAKEFILE(dlls/msasn1)
WINE_CONFIG_MAKEFILE(dlls/mscat32)
diff --git a/dlls/msado15/Makefile.in b/dlls/msado15/Makefile.in
new file mode 100644
index 0000000000..779a18df14
--- /dev/null
+++ b/dlls/msado15/Makefile.in
@@ -0,0 +1,8 @@
+MODULE = msado15.dll
+
+EXTRADLLFLAGS = -mno-cygwin
+
+C_SRCS = \
+ main.c \
+
+IDL_SRCS = msado15_tlb.idl
diff --git a/dlls/msado15/main.c b/dlls/msado15/main.c
new file mode 100644
index 0000000000..0c5b2615d0
--- /dev/null
+++ b/dlls/msado15/main.c
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2019 Hans Leidekker for CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <stdarg.h>
+#include "windef.h"
+#include "winbase.h"
+#include "objbase.h"
+#include "rpcproxy.h"
+
+#include "wine/debug.h"
+
+static HINSTANCE hinstance;
+
+BOOL WINAPI DllMain( HINSTANCE dll, DWORD reason, LPVOID reserved )
+{
+ switch (reason)
+ {
+ case DLL_PROCESS_ATTACH:
+ hinstance = dll;
+ DisableThreadLibraryCalls( dll );
+ break;
+ }
+ return TRUE;
+}
+
+/***********************************************************************
+ * DllRegisterServer
+ */
+HRESULT WINAPI DllRegisterServer( void )
+{
+ return __wine_register_resources( hinstance );
+}
+
+/***********************************************************************
+ * DllUnregisterServer
+ */
+HRESULT WINAPI DllUnregisterServer( void )
+{
+ return __wine_unregister_resources( hinstance );
+}
diff --git a/dlls/msado15/msado15.spec b/dlls/msado15/msado15.spec
new file mode 100644
index 0000000000..6d0e061a53
--- /dev/null
+++ b/dlls/msado15/msado15.spec
@@ -0,0 +1,4 @@
+@ stub DllCanUnloadNow
+@ stub DllGetClassObject
+@ stdcall -private DllRegisterServer()
+@ stdcall -private DllUnregisterServer()
diff --git a/dlls/msado15/msado15_tlb.idl b/dlls/msado15/msado15_tlb.idl
new file mode 100644
index 0000000000..f3a77df3ac
--- /dev/null
+++ b/dlls/msado15/msado15_tlb.idl
@@ -0,0 +1,21 @@
+/*
+ * Copyright 2019 Hans Leidekker for CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#pragma makedep regtypelib
+
+#include "msado15_backcompat.idl"
diff --git a/include/Makefile.in b/include/Makefile.in
index 421e3d6c59..2e9a921df7 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -394,6 +394,7 @@ SOURCES = \
msacm.h \
msacmdlg.h \
msacmdrv.h \
+ msado15_backcompat.idl \
msasn1.h \
mscat.h \
mscoree.idl \
diff --git a/include/msado15_backcompat.idl b/include/msado15_backcompat.idl
new file mode 100644
index 0000000000..a1d5e28038
--- /dev/null
+++ b/include/msado15_backcompat.idl
@@ -0,0 +1,2104 @@
+/*
+ * Copyright 2019 Hans Leidekker for CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+import "oaidl.idl";
+
+interface _ADO;
+interface _Collection;
+interface _Command;
+interface _Connection;
+interface _DynaCollection;
+interface _Parameter;
+interface _Record;
+interface _Recordset;
+interface _Stream;
+interface ADODebugging;
+interface ADOConnectionConstruction;
+interface ADOCommandConstruction;
+interface ADORecordsetConstruction;
+interface Command15;
+interface Command25;
+interface Error;
+interface Errors;
+interface Field;
+interface Field15;
+interface Field20;
+interface Fields;
+interface Fields15;
+interface Fields20;
+interface Parameters;
+interface Properties;
+interface Property;
+interface Recordset15;
+interface Recordset20;
+interface Recordset21;
+dispinterface ConnectionEvents;
+dispinterface RecordsetEvents;
+
+typedef [uuid(0000052A-0000-0010-8000-00AA006D2EA4)] enum ErrorValueEnum
+{
+ adErrInvalidArgument = 3001,
+ adErrOpeningFile = 3002,
+ adErrReadFile = 3003,
+ adErrWriteFile = 3004,
+ adErrNoCurrentRecord = 3021,
+ adErrIllegalOperation = 3219,
+ adErrCantChangeProvider = 3220,
+ adErrInTransaction = 3246,
+ adErrFeatureNotAvailable = 3251,
+ adErrItemNotFound = 3265,
+ adErrObjectInCollection = 3367,
+ adErrObjectNotSet = 3420,
+ adErrDataConversion = 3421,
+ adErrObjectClosed = 3704,
+ adErrObjectOpen = 3705,
+ adErrProviderNotFound = 3706,
+ adErrBoundToCommand = 3707,
+ adErrInvalidParamInfo = 3708,
+ adErrInvalidConnection = 3709,
+ adErrNotReentrant = 3710,
+ adErrStillExecuting = 3711,
+ adErrOperationCancelled = 3712,
+ adErrStillConnecting = 3713,
+ adErrInvalidTransaction = 3714,
+ adErrNotExecuting = 3715,
+ adErrUnsafeOperation = 3716,
+ adWrnSecurityDialog = 3717,
+ adWrnSecurityDialogHeader = 3718,
+ adErrIntegrityViolation = 3719,
+ adErrPermissionDenied = 3720,
+ adErrDataOverflow = 3721,
+ adErrSchemaViolation = 3722,
+ adErrSignMismatch = 3723,
+ adErrCantConvertvalue = 3724,
+ adErrCantCreate = 3725,
+ adErrColumnNotOnThisRow = 3726,
+ adErrURLDoesNotExist = 3727,
+ adErrTreePermissionDenied = 3728,
+ adErrInvalidURL = 3729,
+ adErrResourceLocked = 3730,
+ adErrResourceExists = 3731,
+ adErrCannotComplete = 3732,
+ adErrVolumeNotFound = 3733,
+ adErrOutOfSpace = 3734,
+ adErrResourceOutOfScope = 3735,
+ adErrUnavailable = 3736,
+ adErrURLNamedRowDoesNotExist = 3737,
+ adErrDelResOutOfScope = 3738,
+ adErrPropInvalidColumn = 3739,
+ adErrPropInvalidOption = 3740,
+ adErrPropInvalidValue = 3741,
+ adErrPropConflicting = 3742,
+ adErrPropNotAllSettable = 3743,
+ adErrPropNotSet = 3744,
+ adErrPropNotSettable = 3745,
+ adErrPropNotSupported = 3746,
+ adErrCatalogNotSet = 3747,
+ adErrCantChangeConnection = 3748,
+ adErrFieldsUpdateFailed = 3749,
+ adErrDenyNotSupported = 3750,
+ adErrDenyTypeNotSupported = 3751,
+ adErrProviderNotSpecified = 3753,
+ adErrConnectionStringTooLong = 3754
+} ErrorValueEnum;
+
+typedef [uuid(00000528-0000-0010-8000-00aa006d2ea4)] enum PositionEnum
+{
+ adPosUnknown = -1,
+ adPosBOF = -2,
+ adPosEOF = -3
+} PositionEnum;
+
+typedef [uuid(a56187c5-d690-4037-ae32-a00edc376ac3), public] PositionEnum PositionEnum_Param;
+
+typedef [uuid(0000051f-0000-0010-8000-00aa006d2ea4)] enum DataTypeEnum
+{
+ adEmpty = 0,
+ adTinyInt = 16,
+ adSmallInt = 2,
+ adInteger = 3,
+ adBigInt = 20,
+ adUnsignedTinyInt = 17,
+ adUnsignedSmallInt = 18,
+ adUnsignedInt = 19,
+ adUnsignedBigInt = 21,
+ adSingle = 4,
+ adDouble = 5,
+ adCurrency = 6,
+ adDecimal = 14,
+ adNumeric = 131,
+ adBoolean = 11,
+ adError = 10,
+ adUserDefined = 132,
+ adVariant = 12,
+ adIDispatch = 9,
+ adIUnknown = 13,
+ adGUID = 72,
+ adDate = 7,
+ adDBDate = 133,
+ adDBTime = 134,
+ adDBTimeStamp = 135,
+ adBSTR = 8,
+ adChar = 129,
+ adVarChar = 200,
+ adLongVarChar = 201,
+ adWChar = 130,
+ adVarWChar = 202,
+ adLongVarWChar = 203,
+ adBinary = 128,
+ adVarBinary = 204,
+ adLongVarBinary = 205,
+ adChapter = 136,
+ adFileTime = 64,
+ adPropVariant = 138,
+ adVarNumeric = 139,
+ adArray = 0x2000
+} DataTypeEnum;
+
+typedef [uuid(00000548-0000-0010-8000-00aa006d2ea4)] enum PersistFormatEnum
+{
+ adPersistADTG = 0,
+ adPersistXML = 1
+} PersistFormatEnum;
+
+typedef [uuid(00000552-0000-0010-8000-00aa006d2ea4)] enum SeekEnum
+{
+ adSeekFirstEQ = 1,
+ adSeekLastEQ = 2,
+ adSeekAfterEQ = 4,
+ adSeekAfter = 8,
+ adSeekBeforeEQ = 16,
+ adSeekBefore = 32
+} SeekEnum;
+
+typedef [uuid(0000051b-0000-0010-8000-00aa006d2ea4)] enum CursorTypeEnum
+{
+ adOpenUnspecified = -1,
+ adOpenForwardOnly = 0,
+ adOpenKeyset = 1,
+ adOpenDynamic = 2,
+ adOpenStatic = 3
+} CursorTypeEnum;
+
+typedef [uuid(00000525-0000-0010-8000-00aa006d2ea4)] enum FieldAttributeEnum
+{
+ adFldUnspecified = -1,
+ adFldMayDefer = 0x00000002,
+ adFldUpdatable = 0x00000004,
+ adFldUnknownUpdatable = 0x00000008,
+ adFldFixed = 0x00000010,
+ adFldIsNullable = 0x00000020,
+ adFldMayBeNull = 0x00000040,
+ adFldLong = 0x00000080,
+ adFldRowID = 0x00000100,
+ adFldRowVersion = 0x00000200,
+ adFldCacheDeferred = 0x00001000,
+ adFldIsChapter = 0x00002000,
+ adFldNegativeScale = 0x00004000,
+ adFldKeyColumn = 0x00008000,
+ adFldIsRowURL = 0x00010000,
+ adFldIsDefaultStream = 0x00020000,
+ adFldIsCollection = 0x00040000
+} FieldAttributeEnum;
+
+typedef [uuid(00000544-0000-0010-8000-00aa006d2ea4)] enum ResyncEnum
+{
+ adResyncUnderlyingValues = 1,
+ adResyncAllValues = 2
+} ResyncEnum;
+
+typedef [uuid(0000051d-0000-0010-8000-00aa006d2ea4)] enum LockTypeEnum
+{
+ adLockUnspecified = -1,
+ adLockReadOnly = 1,
+ adLockPessimistic = 2,
+ adLockOptimistic = 3,
+ adLockBatchOptimistic = 4
+} LockTypeEnum;
+
+typedef [uuid(00000543-0000-0010-8000-00aa006d2ea4)] enum AffectEnum
+{
+ adAffectCurrent = 1,
+ adAffectGroup = 2,
+ adAffectAll = 3,
+ adAffectAllChapters = 4
+} AffectEnum;
+
+typedef [uuid(00000526-0000-0010-8000-00aa006d2ea4)] enum EditModeEnum
+{
+ adEditNone = 0,
+ adEditInProgress = 1,
+ adEditAdd = 2,
+ adEditDelete = 4
+} EditModeEnum;
+
+typedef [uuid(0000052f-0000-0010-8000-00aa006d2ea4)] enum CursorLocationEnum
+{
+ adUseNone = 1,
+ adUseServer = 2,
+ adUseClient = 3,
+ adUseClientBatch = 3
+} CursorLocationEnum;
+
+typedef [uuid(0000051c-0000-0010-8000-00aa006d2ea4)] enum CursorOptionEnum
+{
+ adHoldRecords = 256,
+ adMovePrevious = 512,
+ adBookmark = 8192,
+ adApproxPosition = 16384,
+ adUpdateBatch = 65536,
+ adResync = 131072,
+ adNotify = 262144,
+ adFind = 524288,
+ adSeek = 4194304,
+ adIndex = 8388608,
+ adAddNew = 16778240,
+ adDelete = 16779264,
+ adUpdate = 16809984
+} CursorOptionEnum;
+
+typedef [uuid(00000540-0000-0010-8000-00aa006d2ea4)] enum MarshalOptionsEnum
+{
+ adMarshalAll = 0,
+ adMarshalModifiedOnly = 1
+} MarshalOptionsEnum;
+
+typedef [uuid(00000547-0000-0010-8000-00aa006d2ea4)] enum SearchDirectionEnum
+{
+ adSearchForward = 1,
+ adSearchBackward = -1
+} SearchDirectionEnum;
+
+typedef [uuid(00000549-0000-0010-8000-00aa006d2ea4)] enum StringFormatEnum
+{
+ adClipString = 2
+} StringFormatEnum;
+
+typedef [uuid(00000545-0000-0010-8000-00aa006d2ea4)] enum CompareEnum
+{
+ adCompareLessThan = 0,
+ adCompareEqual = 1,
+ adCompareGreaterThan = 2,
+ adCompareNotEqual = 3,
+ adCompareNotComparable = 4
+} CompareEnum;
+
+typedef [uuid(00000523-0000-0010-8000-00aa006d2ea4)] enum IsolationLevelEnum
+{
+ adXactUnspecified = -1,
+ adXactChaos = 16,
+ adXactReadUncommitted = 256,
+ adXactBrowse = 256,
+ adXactCursorStability = 4096,
+ adXactReadCommitted = 4096,
+ adXactRepeatableRead = 65536,
+ adXactSerializable = 1048576,
+ adXactIsolated = 1048576
+} IsolationLevelEnum;
+
+typedef [uuid(00000521-0000-0010-8000-00aa006d2ea4)] enum ConnectModeEnum
+{
+ adModeUnknown = 0,
+ adModeRead = 1,
+ adModeWrite = 2,
+ adModeReadWrite = 3,
+ adModeShareDenyRead = 4,
+ adModeShareDenyWrite = 8,
+ adModeShareExclusive = 12,
+ adModeShareDenyNone = 16,
+ adModeRecursive = 4194304
+} ConnectModeEnum;
+
+typedef [uuid(00000533-0000-0010-8000-00aa006d2ea4)] enum SchemaEnum
+{
+ adSchemaProviderSpecific = -1,
+ adSchemaAsserts = 0,
+ adSchemaCatalogs = 1,
+ adSchemaCharacterSets = 2,
+ adSchemaCollations = 3,
+ adSchemaColumns = 4,
+ adSchemaCheckConstraints = 5,
+ adSchemaConstraintColumnUsage = 6,
+ adSchemaConstraintTableUsage = 7,
+ adSchemaKeyColumnUsage = 8,
+ adSchemaReferentialContraints = 9,
+ adSchemaReferentialConstraints = 9,
+ adSchemaTableConstraints = 10,
+ adSchemaColumnsDomainUsage = 11,
+ adSchemaIndexes = 12,
+ adSchemaColumnPrivileges = 13,
+ adSchemaTablePrivileges = 14,
+ adSchemaUsagePrivileges = 15,
+ adSchemaProcedures = 16,
+ adSchemaSchemata = 17,
+ adSchemaSQLLanguages = 18,
+ adSchemaStatistics = 19,
+ adSchemaTables = 20,
+ adSchemaTranslations = 21,
+ adSchemaProviderTypes = 22,
+ adSchemaViews = 23,
+ adSchemaViewColumnUsage = 24,
+ adSchemaViewTableUsage = 25,
+ adSchemaProcedureParameters = 26,
+ adSchemaForeignKeys = 27,
+ adSchemaPrimaryKeys = 28,
+ adSchemaProcedureColumns = 29,
+ adSchemaDBInfoKeywords = 30,
+ adSchemaDBInfoLiterals = 31,
+ adSchemaCubes = 32,
+ adSchemaDimensions = 33,
+ adSchemaHierarchies = 34,
+ adSchemaLevels = 35,
+ adSchemaMeasures = 36,
+ adSchemaProperties = 37,
+ adSchemaMembers = 38,
+ adSchemaTrustees = 39,
+ adSchemaFunctions = 40,
+ adSchemaActions = 41,
+ adSchemaCommands = 42,
+ adSchemaSets = 43
+} SchemaEnum;
+
+typedef [uuid(00000530-0000-0010-8000-00aa006d2ea4)] enum EventStatusEnum
+{
+ adStatusOK = 1,
+ adStatusErrorsOccurred = 2,
+ adStatusCantDeny = 3,
+ adStatusCancel = 4,
+ adStatusUnwantedEvent = 5
+} EventStatusEnum;
+
+typedef [uuid(0000052c-0000-0010-8000-00aa006d2ea4)] enum ParameterDirectionEnum
+{
+ adParamUnknown = 0,
+ adParamInput = 1,
+ adParamOutput = 2,
+ adParamInputOutput = 3,
+ adParamReturnValue = 4
+} ParameterDirectionEnum;
+
+typedef [uuid(0000052e-0000-0010-8000-00aa006d2ea4)] enum CommandTypeEnum
+{
+ adCmdUnspecified = -1,
+ adCmdUnknown = 8,
+ adCmdText = 1,
+ adCmdTable = 2,
+ adCmdStoredProc = 4,
+ adCmdFile = 256,
+ adCmdTableDirect = 512
+} CommandTypeEnum;
+
+typedef [uuid(00000532-0000-0010-8000-00aa006d2ea4)] enum ObjectStateEnum
+{
+ adStateClosed = 0,
+ adStateOpen = 1,
+ adStateConnecting = 2,
+ adStateExecuting = 4,
+ adStateFetching = 8
+} ObjectStateEnum;
+
+typedef [uuid(00000573-0000-0010-8000-00aa006d2ea4)] enum MoveRecordOptionsEnum
+{
+ adMoveUnspecified = -1,
+ adMoveOverWrite = 1,
+ adMoveDontUpdateLinks = 2,
+ adMoveAllowEmulation = 4
+} MoveRecordOptionsEnum;
+
+typedef [uuid(00000574-0000-0010-8000-00aa006d2ea4)] enum CopyRecordOptionsEnum
+{
+ adCopyUnspecified = -1,
+ adCopyOverWrite = 1,
+ adCopyAllowEmulation = 4,
+ adCopyNonRecursive = 2
+} CopyRecordOptionsEnum;
+
+typedef [uuid(00000570-0000-0010-8000-00aa006d2ea4)] enum RecordCreateOptionsEnum
+{
+ adCreateCollection = 0x00002000,
+ adCreateStructDoc = 0x80000000,
+ adCreateNonCollection = 0x00000000,
+ adOpenIfExists = 0x02000000,
+ adCreateOverwrite = 0x04000000,
+ adFailIfNotExists = -1
+} RecordCreateOptionsEnum;
+
+typedef [uuid(00000571-0000-0010-8000-00aa006d2ea4)] enum RecordOpenOptionsEnum
+{
+ adOpenRecordUnspecified = -1,
+ adOpenOutput = 0x00800000,
+ adOpenAsync = 0x00001000,
+ adDelayFetchStream = 0x00004000,
+ adDelayFetchFields = 0x00008000,
+ adOpenExecuteCommand = 0x00010000
+} RecordOpenOptionsEnum;
+
+typedef [uuid(0000057d-0000-0010-8000-00aa006d2ea4)] enum RecordTypeEnum
+{
+ adSimpleRecord = 0,
+ adCollectionRecord = 1,
+ adStructDoc = 2
+} RecordTypeEnum;
+
+typedef [uuid(00000576-0000-0010-8000-00aa006d2ea4)] enum StreamTypeEnum
+{
+ adTypeBinary = 1,
+ adTypeText = 2
+} StreamTypeEnum;
+
+typedef [uuid(00000577-0000-0010-8000-00aa006d2ea4)] enum LineSeparatorEnum
+{
+ adLF = 10,
+ adCR = 13,
+ adCRLF = -1
+} LineSeparatorEnum;
+
+typedef enum
+{
+ adReadAll = -1,
+ adReadLine = -2
+} StreamReadEnum;
+
+typedef [uuid(0000057c-0000-0010-8000-00aa006d2ea4)] enum SaveOptionsEnum
+{
+ adSaveCreateNotExist = 1,
+ adSaveCreateOverWrite = 2
+} SaveOptionsEnum;
+
+typedef [uuid(0000057a-0000-0010-8000-00aa006d2ea4)] enum StreamOpenOptionsEnum
+{
+ adOpenStreamUnspecified = -1,
+ adOpenStreamAsync = 1,
+ adOpenStreamFromRecord = 4
+} StreamOpenOptionsEnum;
+
+typedef [uuid(0000057b-0000-0010-8000-00aa006d2ea4)] enum StreamWriteEnum
+{
+ adWriteChar = 0,
+ adWriteLine = 1
+} StreamWriteEnum;
+
+typedef [uuid(00000531-0000-0010-8000-00aa006d2ea4)] enum EventReasonEnum
+{
+ adRsnAddNew = 1,
+ adRsnDelete = 2,
+ adRsnUpdate = 3,
+ adRsnUndoUpdate = 4,
+ adRsnUndoAddNew = 5,
+ adRsnUndoDelete = 6,
+ adRsnRequery = 7,
+ adRsnResynch = 8,
+ adRsnClose = 9,
+ adRsnMove = 10,
+ adRsnFirstChange = 11,
+ adRsnMoveFirst = 12,
+ adRsnMoveNext = 13,
+ adRsnMovePrevious = 14,
+ adRsnMoveLast = 15
+} EventReasonEnum;
+
+[
+ uuid(00000503-0000-0010-8000-00aa006d2ea4),
+ odl,
+ dual,
+ nonextensible,
+ oleautomation
+]
+interface Property : IDispatch
+{
+ [id(00000000), propget]
+ HRESULT Value(
+ [out, retval] VARIANT *val);
+
+ [id(00000000), propput]
+ HRESULT Value(
+ [in] VARIANT val);
+
+ [id(0x60020002), propget]
+ HRESULT Name(
+ [out, retval] BSTR *str);
+
+ [id(0x60020003), propget]
+ HRESULT Type(
+ [out, retval] DataTypeEnum *type);
+
+ [id(0x60020004), propget]
+ HRESULT Attributes(
+ [out, retval] LONG *attributes);
+
+ [id(0x60020004), propput]
+ HRESULT Attributes(
+ [in] LONG attributes);
+};
+
+[
+ uuid(00000512-0000-0010-8000-00aa006d2ea4),
+ odl,
+ dual,
+ nonextensible,
+ oleautomation
+]
+interface _Collection : IDispatch
+{
+ [id(0x60020000), propget]
+ HRESULT Count(
+ [out, retval] LONG *count);
+
+ [id(0xfffffffc), restricted]
+ HRESULT _NewEnum(
+ [out, retval] IUnknown **object);
+
+ [id(0x60020002)]
+ HRESULT Refresh();
+};
+
+[
+ uuid(00000504-0000-0010-8000-00aa006d2ea4),
+ odl,
+ dual,
+ nonextensible,
+ oleautomation
+]
+interface Properties : _Collection
+{
+ [id(00000000), propget]
+ HRESULT Item(
+ [in] VARIANT index,
+ [out, retval] Property **object);
+};
+
+[
+ uuid(00000534-0000-0010-8000-00aa006d2ea4),
+ odl,
+ dual,
+ nonextensible,
+ oleautomation
+]
+interface _ADO : IDispatch
+{
+ [id(0x000001f4), propget]
+ HRESULT Properties(
+ [out, retval] Properties **object);
+};
+
+[
+ uuid(0000054c-0000-0010-8000-00aa006d2ea4),
+ odl,
+ dual,
+ nonextensible,
+ oleautomation,
+ hidden
+]
+interface Field20 : _ADO
+{
+ [id(0x00000455), propget]
+ HRESULT ActualSize(
+ [out, retval] LONG *size);
+
+ [id(0x0000040c), propget]
+ HRESULT Attributes(
+ [out, retval] LONG *attrs);
+
+ [id(0x0000044f), propget]
+ HRESULT DefinedSize(
+ [out, retval] LONG *size);
+
+ [id(0x0000044c), propget]
+ HRESULT Name(
+ [out, retval] BSTR *str);
+
+ [id(0x0000044e), propget]
+ HRESULT Type(
+ [out, retval] DataTypeEnum *type);
+
+ [id(00000000), propget]
+ HRESULT Value(
+ [out, retval] VARIANT *val);
+
+ [id(00000000), propput]
+ HRESULT Value(
+ [in] VARIANT val);
+
+ [id(0x60030007), propget]
+ HRESULT Precision(
+ [out, retval] unsigned char *precision);
+
+ [id(0x60030008), propget]
+ HRESULT NumericScale(
+ [out, retval] unsigned char *scale);
+
+ [id(0x00000453)]
+ HRESULT AppendChunk(
+ [in] VARIANT data);
+
+ [id(0x00000454)]
+ HRESULT GetChunk(
+ [in] LONG length,
+ [out, retval] VARIANT *var);
+
+ [id(0x00000450), propget]
+ HRESULT OriginalValue(
+ [out, retval] VARIANT *val);
+
+ [id(0x00000451), propget]
+ HRESULT UnderlyingValue(
+ [out, retval] VARIANT *val);
+
+ [id(0x6003000d), propget]
+ HRESULT DataFormat(
+ [out, retval] IUnknown **format);
+
+ [id(0x6003000d), propputref]
+ HRESULT DataFormat(
+ [in] IUnknown *format);
+
+ [id(0x60030007), propput]
+ HRESULT Precision(
+ [in] unsigned char precision);
+
+ [id(0x60030008), propput]
+ HRESULT NumericScale(
+ [in] unsigned char scale);
+
+ [id(0x0000044e), propput]
+ HRESULT Type(
+ [in] DataTypeEnum type);
+
+ [id(0x0000044f), propput]
+ HRESULT DefinedSize(
+ [in] LONG size);
+
+ [id(0x0000040c), propput]
+ HRESULT Attributes(
+ [in] LONG attrs);
+};
+
+[
+ uuid(00000569-0000-0010-8000-00aa006d2ea4),
+ odl,
+ dual,
+ nonextensible,
+ oleautomation
+]
+interface Field : Field20
+{
+ [id(0x0000045c), propget]
+ HRESULT Status(
+ [out, retval] LONG *status);
+};
+
+[
+ uuid(00000506-0000-0010-8000-00aa006d2ea4),
+ odl,
+ dual,
+ nonextensible,
+ oleautomation
+]
+interface Fields15 : _Collection
+{
+ [id(00000000), propget]
+ HRESULT Item(
+ [in] VARIANT index,
+ [out, retval] Field **object);
+};
+
+[
+ uuid(0000054d-0000-0010-8000-00aa006d2ea4),
+ odl,
+ dual,
+ nonextensible,
+ oleautomation
+]
+interface Fields20 : Fields15
+{
+ [id(0x60030001)]
+ HRESULT _Append(
+ [in] BSTR name,
+ [in] DataTypeEnum type,
+ [in, defaultvalue(0)] LONG size,
+ [in, defaultvalue(adFldUnspecified)] FieldAttributeEnum attr);
+
+ [id(0x60030002)]
+ HRESULT Delete(
+ [in] VARIANT index);
+};
+
+[
+ uuid(00000564-0000-0010-8000-00aa006d2ea4),
+ odl,
+ dual,
+ nonextensible,
+ oleautomation
+]
+interface Fields : Fields20
+{
+ [id(0x60040001)]
+ HRESULT Append(
+ [in] BSTR name,
+ [in] DataTypeEnum type,
+ [in, defaultvalue(0)] LONG size,
+ [in, defaultvalue(adFldUnspecified)] FieldAttributeEnum attr,
+ [in, optional] VARIANT value);
+
+ [id(0x60040002)]
+ HRESULT Update();
+
+ [id(0x60040003)]
+ HRESULT Resync(
+ [in, defaultvalue(adResyncAllValues)] ResyncEnum resync_values);
+
+ [id(0x60040004)]
+ HRESULT CancelUpdate();
+};
+
+[
+ uuid(0000050e-0000-0010-8000-00aa006d2ea4),
+ odl,
+ dual,
+ nonextensible,
+ oleautomation
+]
+interface Recordset15 : _ADO
+{
+ [id(0x000003e8), propget]
+ HRESULT AbsolutePosition(
+ [out, retval] PositionEnum_Param *position);
+
+ [id(0x000003e8), propput]
+ HRESULT AbsolutePosition(
+ [in] PositionEnum_Param position);
+
+ [id(0x000003e9), propputref]
+ HRESULT ActiveConnection(
+ [in] IDispatch *connection);
+
+ [id(0x000003e9), propput]
+ HRESULT ActiveConnection(
+ [in] VARIANT connection);
+
+ [id(0x000003e9), propget]
+ HRESULT ActiveConnection(
+ [out, retval] VARIANT *connection);
+
+ [id(0x000003ea), propget]
+ HRESULT BOF(
+ [out, retval] VARIANT_BOOL *bof);
+
+ [id(0x000003eb), propget]
+ HRESULT Bookmark(
+ [out, retval] VARIANT *bookmark);
+
+ [id(0x000003eb), propput]
+ HRESULT Bookmark(
+ [in] VARIANT bookmark);
+
+ [id(0x000003ec), propget]
+ HRESULT CacheSize(
+ [out, retval] LONG *size);
+
+ [id(0x000003ec), propput]
+ HRESULT CacheSize(
+ [in] LONG size);
+
+ [id(0x000003ed), propget]
+ HRESULT CursorType(
+ [out, retval] CursorTypeEnum *cursor_type);
+
+ [id(0x000003ed), propput]
+ HRESULT CursorType(
+ [in] CursorTypeEnum cursor_type);
+
+ [id(0x000003ee), propget]
+ HRESULT EOF(
+ [out, retval] VARIANT_BOOL *eof);
+
+ [id(00000000), propget]
+ HRESULT Fields(
+ [out, retval] Fields **object);
+
+ [id(0x000003f0), propget]
+ HRESULT LockType(
+ [out, retval] LockTypeEnum *lock_type);
+
+ [id(0x000003f0), propput]
+ HRESULT LockType(
+ [in] LockTypeEnum lock_type);
+
+ [id(0x000003f1), propget]
+ HRESULT MaxRecords(
+ [out, retval] LONG *max_records);
+
+ [id(0x000003f1), propput]
+ HRESULT MaxRecords(
+ [in] LONG max_records);
+
+ [id(0x000003f2), propget]
+ HRESULT RecordCount(
+ [out, retval] LONG *count);
+
+ [id(0x000003f3), propputref]
+ HRESULT Source(
+ [in] IDispatch *source);
+
+ [id(0x000003f3), propput]
+ HRESULT Source(
+ [in] BSTR source);
+
+ [id(0x000003f3), propget]
+ HRESULT Source(
+ [out, retval] VARIANT *source);
+
+ [id(0x000003f4)]
+ HRESULT AddNew(
+ [in, optional] VARIANT field_list,
+ [in, optional] VARIANT values);
+
+ [id(0x000003f5)]
+ HRESULT CancelUpdate();
+
+ [id(0x000003f6)]
+ HRESULT Close();
+
+ [id(0x000003f7)]
+ HRESULT Delete(
+ [in, defaultvalue(adAffectCurrent)] AffectEnum affect_records);
+
+ [id(0x000003f8)]
+ HRESULT GetRows(
+ [in, defaultvalue(-1)] LONG rows,
+ [in, optional] VARIANT start,
+ [in, optional] VARIANT fields,
+ [out, retval] VARIANT *var);
+
+ [id(0x000003f9)]
+ HRESULT Move(
+ [in] LONG num_records,
+ [in, optional] VARIANT start);
+
+ [id(0x000003fa)]
+ HRESULT MoveNext();
+
+ [id(0x000003fb)]
+ HRESULT MovePrevious();
+
+ [id(0x000003fc)]
+ HRESULT MoveFirst();
+
+ [id(0x000003fd)]
+ HRESULT MoveLast();
+
+ [id(0x000003fe)]
+ HRESULT Open(
+ [in, optional] VARIANT source,
+ [in, optional] VARIANT active_connection,
+ [in, defaultvalue(adOpenUnspecified)] CursorTypeEnum cursor_type,
+ [in, defaultvalue(adLockUnspecified)] LockTypeEnum lock_type,
+ [in, defaultvalue(-1)] LONG options);
+
+ [id(0x000003ff)]
+ HRESULT Requery(
+ [in, defaultvalue(-1)] LONG options);
+
+ [id(0x60030022), hidden]
+ HRESULT _xResync(
+ [in, defaultvalue(adAffectAll)] AffectEnum affect_records);
+
+ [id(0x00000401)]
+ HRESULT Update(
+ [in, optional] VARIANT fields,
+ [in, optional] VARIANT values);
+
+ [id(0x00000417), propget]
+ HRESULT AbsolutePage(
+ [out, retval] PositionEnum_Param *position);
+
+ [id(0x00000417), propput]
+ HRESULT AbsolutePage(
+ [in] PositionEnum_Param position);
+
+ [id(0x00000402), propget]
+ HRESULT EditMode(
+ [out, retval] EditModeEnum *mode);
+
+ [id(0x00000406), propget]
+ HRESULT Filter(
+ [out, retval] VARIANT *criteria);
+
+ [id(0x00000406), propput]
+ HRESULT Filter(
+ [in] VARIANT criteria);
+
+ [id(0x0000041a), propget]
+ HRESULT PageCount(
+ [out, retval] LONG *count);
+
+ [id(0x00000418), propget]
+ HRESULT PageSize(
+ [out, retval] LONG *size);
+
+ [id(0x00000418), propput]
+ HRESULT PageSize(
+ [in] LONG size);
+
+ [id(0x00000407), propget]
+ HRESULT Sort(
+ [out, retval] BSTR *criteria);
+
+ [id(0x00000407), propput]
+ HRESULT Sort(
+ [in] BSTR criteria);
+
+ [id(0x00000405), propget]
+ HRESULT Status(
+ [out, retval] LONG *status);
+
+ [id(0x0000041e), propget]
+ HRESULT State(
+ [out, retval] LONG *state);
+
+ [id(0x60030030), hidden]
+ HRESULT _xClone(
+ [out, retval] _Recordset **object);
+
+ [id(0x0000040b)]
+ HRESULT UpdateBatch(
+ [in, defaultvalue(adAffectAll)] AffectEnum affect_records);
+
+ [id(0x00000419)]
+ HRESULT CancelBatch(
+ [in, defaultvalue(adAffectAll)] AffectEnum affect_records);
+
+ [id(0x0000041b), propget]
+ HRESULT CursorLocation(
+ [out, retval] CursorLocationEnum *cursor_loc);
+
+ [id(0x0000041b), propput]
+ HRESULT CursorLocation(
+ [in] CursorLocationEnum cursor_loc);
+
+ [id(0x0000041c)]
+ HRESULT NextRecordset(
+ [out, optional] VARIANT *records_affected,
+ [out, retval] _Recordset **record_set);
+
+ [id(0x0000040c)]
+ HRESULT Supports(
+ [in] CursorOptionEnum cursor_options,
+ [out, retval] VARIANT_BOOL *ret);
+
+ [id(0xfffffff8), propget, hidden]
+ HRESULT Collect(
+ [in] VARIANT index,
+ [out, retval] VARIANT *var);
+
+ [id(0xfffffff8), propput, hidden]
+ HRESULT Collect(
+ [in] VARIANT index,
+ [in] VARIANT var);
+
+ [id(0x0000041d), propget]
+ HRESULT MarshalOptions(
+ [out, retval] MarshalOptionsEnum *options);
+
+ [id(0x0000041d), propput]
+ HRESULT MarshalOptions(
+ [in] MarshalOptionsEnum options);
+
+ [id(0x00000422)]
+ HRESULT Find(
+ [in] BSTR criteria,
+ [in, defaultvalue(0)] LONG skip_records,
+ [in, defaultvalue(adSearchForward)] SearchDirectionEnum search_direction,
+ [in, optional] VARIANT start);
+};
+
+[
+ uuid(0000054f-0000-0010-8000-00aa006d2ea4),
+ odl,
+ dual,
+ nonextensible,
+ oleautomation
+]
+interface Recordset20 : Recordset15
+{
+ [id(0x0000041f)]
+ HRESULT Cancel();
+
+ [id(0x00000420), propget]
+ HRESULT DataSource(
+ [out, retval] IUnknown **data_source);
+
+ [id(0x00000420), propputref]
+ HRESULT DataSource(
+ [in] IUnknown *data_source);
+
+ [hidden]
+ HRESULT _xSave(
+ [in, optional] BSTR filename,
+ [in, defaultvalue(adPersistADTG)] PersistFormatEnum persist_format);
+
+ [id(0x00000425), propget]
+ HRESULT ActiveCommand(
+ [out, retval] IDispatch **cmd);
+
+ [id(0x00000427), propput]
+ HRESULT StayInSync(
+ [in] VARIANT_BOOL stay_in_sync);
+
+ [id(0x00000427), propget]
+ HRESULT StayInSync(
+ [out, retval] VARIANT_BOOL *stay_in_sync);
+
+ [id(0x00000426)]
+ HRESULT GetString(
+ [in, defaultvalue(adClipString)] StringFormatEnum string_format,
+ [in, defaultvalue(-1)] LONG num_rows,
+ [in, optional] BSTR column_delimeter,
+ [in, optional] BSTR row_delimeter,
+ [in, optional] BSTR null_expr,
+ [out, retval] BSTR *ret_string);
+
+ [id(0x00000428), propget]
+ HRESULT DataMember(
+ [out, retval] BSTR *data_member);
+
+ [id(0x00000428), propput]
+ HRESULT DataMember(
+ [in] BSTR data_member);
+
+ [id(0x00000429)]
+ HRESULT CompareBookmarks(
+ [in] VARIANT bookmark1,
+ [in] VARIANT bookmark2,
+ [out, retval] CompareEnum *compare);
+
+ [id(0x0000040a)]
+ HRESULT Clone(
+ [in, defaultvalue(adLockUnspecified)] LockTypeEnum lock_type,
+ [out, retval] _Recordset **object);
+
+ [id(0x00000400)]
+ HRESULT Resync(
+ [in, defaultvalue(adAffectAll)] AffectEnum affect_records,
+ [in, defaultvalue(adResyncAllValues)] ResyncEnum resync_values);
+};
+
+[
+ uuid(00000555-0000-0010-8000-00aa006d2ea4),
+ odl,
+ dual,
+ nonextensible,
+ oleautomation
+]
+interface Recordset21 : Recordset20
+{
+ [id(0x0000042a)]
+ HRESULT Seek(
+ [in] VARIANT key_values,
+ [in, defaultvalue(adSeekFirstEQ)] SeekEnum seek_option);
+
+ [id(0x0000042b), propput]
+ HRESULT Index(
+ [in] BSTR index);
+
+ [id(0x0000042b), propget]
+ HRESULT Index(
+ [out, retval] BSTR *index);
+};
+
+[
+ uuid(00000556-0000-0010-8000-00aa006d2ea4),
+ odl,
+ dual,
+ nonextensible,
+ oleautomation
+]
+interface _Recordset : Recordset21
+{
+ [id(0x00000421)]
+ HRESULT Save(
+ [in, optional] VARIANT destination,
+ [in, defaultvalue(adPersistADTG)] PersistFormatEnum persist_format);
+};
+
+[
+ uuid(00000500-0000-0010-8000-00aa006d2ea4),
+ odl,
+ dual,
+ nonextensible,
+ oleautomation
+]
+interface Error : IDispatch
+{
+ [id(0x60020000), propget]
+ HRESULT Number(
+ [out, retval] LONG *number);
+
+ [id(0x60020001), propget]
+ HRESULT Source(
+ [out, retval] BSTR *str);
+
+ [id(00000000), propget]
+ HRESULT Description(
+ [out, retval] BSTR *str);
+
+ [id(0x60020003), propget]
+ HRESULT HelpFile(
+ [out, retval] BSTR *str);
+
+ [id(0x60020004), propget]
+ HRESULT HelpContext(
+ [out, retval] LONG *ctx);
+
+ [id(0x60020005), propget]
+ HRESULT SQLState(
+ [out, retval] BSTR *str);
+
+ [id(0x60020006), propget]
+ HRESULT NativeError(
+ [out, retval] LONG *error);
+};
+
+[
+ uuid(00000501-0000-0010-8000-00aa006d2ea4),
+ odl,
+ dual,
+ nonextensible,
+ oleautomation
+]
+interface Errors : _Collection
+{
+ [id(00000000), propget]
+ HRESULT Item(
+ [in] VARIANT index,
+ [out, retval] Error **object);
+
+ [id(0x60030001)]
+ HRESULT Clear();
+};
+
+[
+ uuid(00000515-0000-0010-8000-00aa006d2ea4),
+ odl,
+ dual,
+ oleautomation
+]
+interface Connection15 : _ADO
+{
+ [id(00000000), propget]
+ HRESULT ConnectionString(
+ [out, retval] BSTR *str);
+
+ [id(00000000), propput]
+ HRESULT ConnectionString(
+ [in] BSTR str);
+
+ [id(0x00000002), propget]
+ HRESULT CommandTimeout(
+ [out, retval] LONG *timeout);
+
+ [id(0x00000002), propput]
+ HRESULT CommandTimeout(
+ [in] LONG timeout);
+
+ [id(0x00000003), propget]
+ HRESULT ConnectionTimeout(
+ [out, retval] LONG *timeout);
+
+ [id(0x00000003), propput]
+ HRESULT ConnectionTimeout(
+ [in] LONG timeout);
+
+ [id(0x00000004), propget]
+ HRESULT Version(
+ [out, retval] BSTR *str);
+
+ [id(0x00000005)]
+ HRESULT Close();
+
+ [id(0x00000006)]
+ HRESULT Execute(
+ [in] BSTR command,
+ [out, optional] VARIANT *records_affected,
+ [in, defaultvalue(-1)] LONG options,
+ [out, retval] _Recordset **record_set);
+
+ [id(0x00000007)]
+ HRESULT BeginTrans(
+ [out, retval] LONG *transaction_level);
+
+ [id(0x00000008)]
+ HRESULT CommitTrans();
+
+ [id(0x00000009)]
+ HRESULT RollbackTrans();
+
+ [id(0x0000000a)]
+ HRESULT Open(
+ [in, defaultvalue("")] BSTR connection_str,
+ [in, defaultvalue("")] BSTR user_id,
+ [in, defaultvalue("")] BSTR password,
+ [in, defaultvalue(-1)] LONG options);
+
+ [id(0x0000000b), propget]
+ HRESULT Errors(
+ [out, retval] Errors **object);
+
+ [id(0x0000000c), propget]
+ HRESULT DefaultDatabase(
+ [out, retval] BSTR *str);
+
+ [id(0x0000000c), propput]
+ HRESULT DefaultDatabase(
+ [in] BSTR str);
+
+ [id(0x0000000d), propget]
+ HRESULT IsolationLevel(
+ [out, retval] IsolationLevelEnum *level);
+
+ [id(0x0000000d), propput]
+ HRESULT IsolationLevel(
+ [in] IsolationLevelEnum level);
+
+ [id(0x0000000e), propget]
+ HRESULT Attributes(
+ [out, retval] LONG *attr);
+
+ [id(0x0000000e), propput]
+ HRESULT Attributes(
+ [in] LONG attr);
+
+ [id(0x0000000f), propget]
+ HRESULT CursorLocation(
+ [out, retval] CursorLocationEnum *cursor_loc);
+
+ [id(0x0000000f), propput]
+ HRESULT CursorLocation(
+ [in] CursorLocationEnum cursor_loc);
+
+ [id(0x00000010), propget]
+ HRESULT Mode(
+ [out, retval] ConnectModeEnum *mode);
+
+ [id(0x00000010), propput]
+ HRESULT Mode(
+ [in] ConnectModeEnum mode);
+
+ [id(0x00000011), propget]
+ HRESULT Provider(
+ [out, retval] BSTR *str);
+
+ [id(0x00000011), propput]
+ HRESULT Provider(
+ [in] BSTR str);
+
+ [id(0x00000012), propget]
+ HRESULT State(
+ [out, retval] LONG *state);
+
+ [id(0x00000013)]
+ HRESULT OpenSchema(
+ [in] SchemaEnum schema,
+ [in, optional] VARIANT restrictions,
+ [in, optional] VARIANT schema_id,
+ [out, retval] _Recordset **record_set);
+};
+
+[
+ uuid(00000550-0000-0010-8000-00aa006d2ea4),
+ odl,
+ dual,
+ oleautomation
+]
+interface _Connection : Connection15
+{
+ [id(0x00000015)]
+ HRESULT Cancel();
+};
+
+[
+ uuid(0000050c-0000-0010-8000-00aa006d2ea4),
+ odl,
+ dual,
+ nonextensible,
+ oleautomation
+]
+interface _Parameter : _ADO
+{
+ [id(0x60030000), propget]
+ HRESULT Name(
+ [out, retval] BSTR *str);
+
+ [id(0x60030000), propput]
+ HRESULT Name(
+ [in] BSTR str);
+
+ [id(00000000), propget]
+ HRESULT Value(
+ [out, retval] VARIANT *val);
+
+ [id(00000000), propput]
+ HRESULT Value(
+ [in] VARIANT val);
+
+ [id(0x60030004), propget]
+ HRESULT Type(
+ [out, retval] DataTypeEnum *data_type);
+
+ [id(0x60030004), propput]
+ HRESULT Type(
+ [in] DataTypeEnum data_type);
+
+ [id(0x60030006), propput]
+ HRESULT Direction(
+ [in] ParameterDirectionEnum direction);
+
+ [id(0x60030006), propget]
+ HRESULT Direction(
+ [out, retval] ParameterDirectionEnum *direction);
+
+ [id(0x60030008), propput]
+ HRESULT Precision(
+ [in] unsigned char precision);
+
+ [id(0x60030008), propget]
+ HRESULT Precision(
+ [out, retval] unsigned char *precision);
+
+ [id(0x6003000a), propput]
+ HRESULT NumericScale(
+ [in] unsigned char scale);
+
+ [id(0x6003000a), propget]
+ HRESULT NumericScale(
+ [out, retval] unsigned char *scale);
+
+ [id(0x6003000c), propput]
+ HRESULT Size(
+ [in] LONG size);
+
+ [id(0x6003000c), propget]
+ HRESULT Size(
+ [out, retval] LONG *size);
+
+ [id(0x6003000e)]
+ HRESULT AppendChunk(
+ [in] VARIANT val);
+
+ [id(0x6003000f), propget]
+ HRESULT Attributes(
+ [out, retval] LONG *attrs);
+
+ [id(0x6003000f), propput]
+ HRESULT Attributes(
+ [in] LONG attrs);
+};
+
+[
+ uuid(00000513-0000-0010-8000-00aa006d2ea4),
+ odl,
+ dual,
+ nonextensible,
+ oleautomation
+]
+interface _DynaCollection : _Collection
+{
+ [id(0x60030000)]
+ HRESULT Append(
+ [in] IDispatch *object);
+
+ [id(0x60030001)]
+ HRESULT Delete(
+ [in] VARIANT index);
+};
+
+[
+ uuid(0000050d-0000-0010-8000-00aa006d2ea4),
+ odl,
+ dual,
+ nonextensible,
+ oleautomation
+]
+interface Parameters : _DynaCollection
+{
+ [id(00000000), propget]
+ HRESULT Item(
+ [in] VARIANT index,
+ [out, retval] _Parameter **object);
+};
+
+[
+ uuid(00000508-0000-0010-8000-00aa006d2ea4),
+ odl,
+ dual,
+ nonextensible,
+ oleautomation
+]
+interface Command15 : _ADO
+{
+ [id(0x60030000), propget]
+ HRESULT ActiveConnection(
+ [out, retval] _Connection **object);
+
+ [id(0x60030000), propputref]
+ HRESULT ActiveConnection(
+ [in] _Connection *object);
+
+ [id(0x60030000), propput]
+ HRESULT ActiveConnection(
+ [in] VARIANT object);
+
+ [id(0x60030003), propget]
+ HRESULT CommandText(
+ [out, retval] BSTR *str);
+
+ [id(0x60030003), propput]
+ HRESULT CommandText(
+ [in] BSTR str);
+
+ [id(0x60030005), propget]
+ HRESULT CommandTimeout(
+ [out, retval] LONG *timeout);
+
+ [id(0x60030005), propput]
+ HRESULT CommandTimeout(
+ [in] LONG timeout);
+
+ [id(0x60030007), propget]
+ HRESULT Prepared(
+ [out, retval] VARIANT_BOOL *prepared);
+
+ [id(0x60030007), propput]
+ HRESULT Prepared(
+ [in] VARIANT_BOOL prepared);
+
+ [id(0x60030009)]
+ HRESULT Execute(
+ [out, optional] VARIANT *records_affected,
+ [in, optional] VARIANT *parameters,
+ [in, defaultvalue(-1)] LONG options,
+ [out, retval] _Recordset **record_set);
+
+ [id(0x6003000a)]
+ HRESULT CreateParameter(
+ [in, defaultvalue("")] BSTR name,
+ [in, defaultvalue(adEmpty)] DataTypeEnum type,
+ [in, defaultvalue(adParamInput)] ParameterDirectionEnum direction,
+ [in, defaultvalue(0)] LONG size,
+ [in, optional] VARIANT value,
+ [out, retval] _Parameter **parameter);
+
+ [id(00000000), propget]
+ HRESULT Parameters(
+ [out, retval] Parameters **object);
+
+ [id(0x6003000c), propput]
+ HRESULT CommandType(
+ [in] CommandTypeEnum cmd_type);
+
+ [id(0x6003000c), propget]
+ HRESULT CommandType(
+ [out, retval] CommandTypeEnum *cmd_type);
+
+ [id(0x6003000e), propget]
+ HRESULT Name(
+ [out, retval] BSTR *name);
+
+ [id(0x6003000e), propput]
+ HRESULT Name(
+ [in] BSTR name);
+};
+
+[
+ uuid(0000054e-0000-0010-8000-00aa006d2ea4),
+ odl,
+ dual,
+ nonextensible,
+ oleautomation
+]
+interface Command25 : Command15
+{
+ [id(0x60030010), propget]
+ HRESULT State(
+ [out, retval] LONG *state);
+
+ [id(0x60030011)]
+ HRESULT Cancel();
+};
+
+[
+ uuid(b08400bd-f9d1-4d02-b856-71d5dba123e9),
+ odl,
+ dual,
+ nonextensible,
+ oleautomation
+]
+interface _Command : Command25
+{
+ [id(0x60030012), propputref]
+ HRESULT CommandStream(
+ [in] IUnknown *stream);
+
+ [id(0x60030012), propget]
+ HRESULT CommandStream(
+ [out, retval] VARIANT *stream);
+
+ [id(0x60030013), propput]
+ HRESULT Dialect(
+ [in] BSTR dialect);
+
+ [id(0x60030013), propget]
+ HRESULT Dialect(
+ [out, retval] BSTR *dialect);
+
+ [id(0x60030014), propput]
+ HRESULT NamedParameters(
+ [in] VARIANT_BOOL named_parameters);
+
+ [id(0x60030014), propget]
+ HRESULT NamedParameters(
+ [out, retval] VARIANT_BOOL *named_parameters);
+};
+
+[
+ uuid(00000400-0000-0010-8000-00aa006d2ea4)
+]
+dispinterface ConnectionEvents
+{
+ properties:
+ methods:
+ [id(00000000)]
+ HRESULT InfoMessage(
+ [in] Error *error,
+ [in, out] EventStatusEnum *status,
+ [in] _Connection *Connection);
+
+ [id(0x00000001)]
+ HRESULT BeginTransComplete(
+ [in] LONG TransactionLevel,
+ [in] Error *error,
+ [in, out] EventStatusEnum *status,
+ [in] _Connection *connection);
+
+ [id(0x00000003)]
+ HRESULT CommitTransComplete(
+ [in] Error *error,
+ [in, out] EventStatusEnum *status,
+ [in] _Connection *connection);
+
+ [id(0x00000002)]
+ HRESULT RollbackTransComplete(
+ [in] Error *error,
+ [in, out] EventStatusEnum *status,
+ [in] _Connection *connection);
+
+ [id(0x00000004)]
+ HRESULT WillExecute(
+ [in, out] BSTR *source,
+ [in, out] CursorTypeEnum *cursor_type,
+ [in, out] LockTypeEnum *lock_type,
+ [in, out] LONG *options,
+ [in, out] EventStatusEnum *status,
+ [in] _Command *command,
+ [in] _Recordset *record_set,
+ [in] _Connection *connection);
+
+ [id(0x00000005)]
+ HRESULT ExecuteComplete(
+ [in] LONG records_affected,
+ [in] Error *error,
+ [in, out] EventStatusEnum *status,
+ [in] _Command *command,
+ [in] _Recordset *record_set,
+ [in] _Connection *connection);
+
+ [id(0x00000006)]
+ HRESULT WillConnect(
+ [in, out] BSTR *string,
+ [in, out] BSTR *userid,
+ [in, out] BSTR *password,
+ [in, out] LONG *options,
+ [in, out] EventStatusEnum *status,
+ [in] _Connection *connection);
+
+ [id(0x00000007)]
+ HRESULT ConnectComplete(
+ [in] Error *error,
+ [in, out] EventStatusEnum *status,
+ [in] _Connection *connection);
+
+ [id(0x00000008)]
+ HRESULT Disconnect(
+ [in, out] EventStatusEnum *status,
+ [in] _Connection *connection);
+};
+
+[
+ uuid(00000562-0000-0010-8000-00aa006d2ea4),
+ odl,
+ dual,
+ nonextensible,
+ oleautomation
+]
+interface _Record : _ADO
+{
+ [id(1), propget]
+ HRESULT ActiveConnection(
+ [out, retval] VARIANT *connection);
+
+ [id(1), propput]
+ HRESULT ActiveConnection(
+ [in] BSTR connection);
+
+ [id(1), propputref]
+ HRESULT ActiveConnection(
+ [in] _Connection *connection);
+
+ [id(2), propget]
+ HRESULT State(
+ [out, retval] ObjectStateEnum *state);
+
+ [id(3), propget]
+ HRESULT Source(
+ [out, retval] VARIANT *source);
+
+ [id(3), propput]
+ HRESULT Source(
+ [in] BSTR source);
+
+ [id(3), propputref]
+ HRESULT Source(
+ [in] IDispatch *source);
+
+ [id(4), propget]
+ HRESULT Mode(
+ [out, retval] ConnectModeEnum *mode);
+
+ [id(4), propput]
+ HRESULT Mode(
+ [in] ConnectModeEnum mode);
+
+ [id(5), propget]
+ HRESULT ParentURL(
+ [out, retval] BSTR *parent_URL);
+
+ [id(6)]
+ HRESULT MoveRecord(
+ [in, defaultvalue("")] BSTR source,
+ [in, defaultvalue("")] BSTR Destination,
+ [in, optional] BSTR UserName,
+ [in, optional] BSTR Password,
+ [in, defaultvalue(adMoveUnspecified)] MoveRecordOptionsEnum Options,
+ [in, optional] VARIANT_BOOL Async,
+ [out, retval] BSTR *pbstrNewURL);
+
+ [id(7)]
+ HRESULT CopyRecord(
+ [in, defaultvalue("")] BSTR source,
+ [in, defaultvalue("")] BSTR destination,
+ [in, optional] BSTR username,
+ [in, optional] BSTR password,
+ [in, defaultvalue(adCopyUnspecified)] CopyRecordOptionsEnum options,
+ [in, optional] VARIANT_BOOL async,
+ [out, retval] BSTR *new_URL);
+
+ [id(8)]
+ HRESULT DeleteRecord(
+ [in] BSTR source,
+ [in, optional] VARIANT_BOOL async);
+
+ [id(9)]
+ HRESULT Open(
+ [in, optional] VARIANT source,
+ [in, optional] VARIANT active_connection,
+ [in, optional] ConnectModeEnum mode,
+ [in, defaultvalue(adFailIfNotExists)] RecordCreateOptionsEnum create_options,
+ [in, defaultvalue(adOpenRecordUnspecified)] RecordOpenOptionsEnum options,
+ [in, optional] BSTR username,
+ [in, optional] BSTR password);
+
+ [id(10)]
+ HRESULT Close();
+
+ [id(0), propget]
+ HRESULT Fields(
+ [out, retval] Fields **fields);
+
+ [id(11), propget]
+ HRESULT RecordType(
+ [out, retval] RecordTypeEnum *type);
+
+ [id(12)]
+ HRESULT GetChildren(
+ [out, retval] _Recordset **record_set);
+
+ [id(13)]
+ HRESULT Cancel();
+};
+
+[
+ uuid(00000565-0000-0010-8000-00aa006d2ea4),
+ odl,
+ dual,
+ nonextensible,
+ oleautomation
+]
+interface _Stream : IDispatch
+{
+ [id(1), propget]
+ HRESULT Size(
+ [out, retval] LONG *size);
+
+ [id(2), propget]
+ HRESULT EOS(
+ [out, retval] VARIANT_BOOL *eos);
+
+ [id(3), propget]
+ HRESULT Position(
+ [out, retval] LONG *position);
+
+ [id(3), propput]
+ HRESULT Position(
+ [in] LONG position);
+
+ [id(4), propget]
+ HRESULT Type(
+ [out, retval] StreamTypeEnum *type);
+
+ [id(4), propput]
+ HRESULT Type(
+ [in] StreamTypeEnum type);
+
+ [id(5), propget]
+ HRESULT LineSeparator(
+ [out, retval] LineSeparatorEnum *separator);
+
+ [id(5), propput]
+ HRESULT LineSeparator(
+ [in] LineSeparatorEnum separator);
+
+ [id(6), propget]
+ HRESULT State(
+ [out, retval] ObjectStateEnum *state);
+
+ [id(7), propget]
+ HRESULT Mode(
+ [out, retval] ConnectModeEnum *mode);
+
+ [id(7), propput]
+ HRESULT Mode(
+ [in] ConnectModeEnum mode);
+
+ [id(8), propget]
+ HRESULT Charset(
+ [out, retval] BSTR *charset);
+
+ [id(8), propput]
+ HRESULT Charset(
+ [in] BSTR charset);
+
+ [id(9)]
+ HRESULT Read(
+ [in, defaultvalue(adReadAll)] LONG num_bytes,
+ [out, retval] VARIANT *val);
+
+ [id(10)]
+ HRESULT Open(
+ [in, optional] VARIANT source,
+ [in, defaultvalue(adModeUnknown)] ConnectModeEnum mode,
+ [in, defaultvalue(adOpenStreamUnspecified)] StreamOpenOptionsEnum options,
+ [in, optional] BSTR username,
+ [in, optional] BSTR password);
+
+ [id(11)]
+ HRESULT Close(void);
+
+ [id(12)]
+ HRESULT SkipLine(void);
+
+ [id(13)]
+ HRESULT Write(
+ [in] VARIANT buffer);
+
+ [id(14)]
+ HRESULT SetEOS(void);
+
+ [id(15)]
+ HRESULT CopyTo(
+ [in] _Stream *dest,
+ [in, defaultvalue(-1)] LONG size);
+
+ [id(16)]
+ HRESULT Flush(void);
+
+ [id(17)]
+ HRESULT SaveToFile(
+ [in] BSTR FileName,
+ [in, defaultvalue(adSaveCreateNotExist)] SaveOptionsEnum options);
+
+ [id(18)]
+ HRESULT LoadFromFile(
+ [in] BSTR filename);
+
+ [id(19)]
+ HRESULT ReadText(
+ [in, defaultvalue(adReadAll)] LONG size,
+ [out, retval] BSTR *str);
+
+ [id(20)]
+ HRESULT WriteText(
+ [in] BSTR data,
+ [in, defaultvalue(adWriteChar)] StreamWriteEnum options);
+
+ [id(21)]
+ HRESULT Cancel(void);
+};
+
+[
+ uuid(00000266-0000-0010-8000-00aa006d2ea4)
+]
+dispinterface RecordsetEvents
+{
+ properties:
+ methods:
+ [id(0x00000009)]
+ HRESULT WillChangeField(
+ [in] LONG count,
+ [in] VARIANT fields,
+ [in, out] EventStatusEnum *status,
+ [in] _Recordset *record_set);
+
+ [id(0x0000000a)]
+ HRESULT FieldChangeComplete(
+ [in] LONG count,
+ [in] VARIANT fields,
+ [in] Error *error,
+ [in, out] EventStatusEnum *status,
+ [in] _Recordset *record_set);
+
+ [id(0x0000000b)]
+ HRESULT WillChangeRecord(
+ [in] EventReasonEnum reason,
+ [in] LONG count,
+ [in, out] EventStatusEnum *status,
+ [in] _Recordset *record_set);
+
+ [id(0x0000000c)]
+ HRESULT RecordChangeComplete(
+ [in] EventReasonEnum reason,
+ [in] LONG count,
+ [in] Error *error,
+ [in, out] EventStatusEnum *status,
+ [in] _Recordset *record_set);
+
+ [id(0x0000000d)]
+ HRESULT WillChangeRecordset(
+ [in] EventReasonEnum reason,
+ [in, out] EventStatusEnum *status,
+ [in] _Recordset *record_set);
+
+ [id(0x0000000e)]
+ HRESULT RecordsetChangeComplete(
+ [in] EventReasonEnum reason,
+ [in] Error *error,
+ [in, out] EventStatusEnum *status,
+ [in] _Recordset *record_set);
+
+ [id(0x0000000f)]
+ HRESULT WillMove(
+ [in] EventReasonEnum reason,
+ [in, out] EventStatusEnum *status,
+ [in] _Recordset *record_set);
+
+ [id(0x00000010)]
+ HRESULT MoveComplete(
+ [in] EventReasonEnum reason,
+ [in] Error *error,
+ [in, out] EventStatusEnum *status,
+ [in] _Recordset *record_set);
+
+ [id(0x00000011)]
+ HRESULT EndOfRecordset(
+ [in, out] VARIANT_BOOL *more_data,
+ [in, out] EventStatusEnum *status,
+ [in] _Recordset *record_set);
+
+ [id(0x00000012)]
+ HRESULT FetchProgress(
+ [in] LONG progress,
+ [in] LONG max_progress,
+ [in, out] EventStatusEnum *status,
+ [in] _Recordset *record_set);
+
+ [id(0x00000013)]
+ HRESULT FetchComplete(
+ [in] Error *error,
+ [in, out] EventStatusEnum *status,
+ [in] _Recordset *record_set);
+};
+
+[
+ uuid(00000538-0000-0010-8000-00aa006d2ea4),
+ odl,
+ hidden
+]
+interface ADODebugging : IUnknown
+{
+ HRESULT IsGlobalDebugMode(
+ VARIANT_BOOL *debugging_on);
+
+ HRESULT SetGlobalDebugMode(
+ IUnknown *debugger,
+ VARIANT_BOOL debugging_on);
+};
+
+[
+ uuid(00000516-0000-0010-8000-00aa006d2ea4),
+ odl,
+ restricted
+]
+interface ADOConnectionConstruction15 : IUnknown
+{
+ [propget]
+ HRESULT DSO(
+ [out, retval] IUnknown **dso);
+
+ [propget]
+ HRESULT Session(
+ [out, retval] IUnknown **session);
+
+ HRESULT WrapDSOandSession(
+ [in] IUnknown *dso,
+ [in] IUnknown *session);
+};
+
+[
+ uuid(00000551-0000-0010-8000-00aa006d2ea4),
+ odl,
+ restricted
+]
+interface ADOConnectionConstruction : ADOConnectionConstruction15
+{
+};
+
+[
+ uuid(00000517-0000-0010-8000-00aa006d2ea4),
+ odl,
+ restricted
+]
+interface ADOCommandConstruction : IUnknown
+{
+ [propget]
+ HRESULT OLEDBCommand(
+ [out, retval] IUnknown **command);
+
+ [propput]
+ HRESULT OLEDBCommand(
+ [in] IUnknown *command);
+};
+
+[
+ uuid(00000283-0000-0010-8000-00aa006d2ea4),
+ odl,
+ restricted
+]
+interface ADORecordsetConstruction : IDispatch
+{
+ [propget]
+ HRESULT Rowset(
+ [out, retval] IUnknown **row_set);
+
+ [propput]
+ HRESULT Rowset(
+ [in] IUnknown *row_set);
+
+ [propget]
+ HRESULT Chapter(
+ [out, retval] LONG *chapter);
+
+ [propput]
+ HRESULT Chapter(
+ [in] LONG chapter);
+
+ [propget]
+ HRESULT RowPosition(
+ [out, retval] IUnknown **row_pos);
+
+ [propput]
+ HRESULT RowPosition(
+ [in] IUnknown *row_pos);
+};
+
+[
+ uuid(2a75196c-d9eb-4129-b803-931327f72d5c),
+ version(2.8)
+]
+library ADODB
+{
+ importlib("stdole2.tlb");
+
+ [
+ uuid(00000514-0000-0010-8000-00aa006d2ea4),
+ ]
+ coclass Connection
+ {
+ [default] interface _Connection;
+ [default, source] dispinterface ConnectionEvents;
+ };
+
+ [
+ uuid(00000507-0000-0010-8000-00aa006d2ea4),
+ ]
+ coclass Command
+ {
+ [default] interface _Command;
+ };
+
+ [
+ uuid(00000535-0000-0010-8000-00aa006d2ea4),
+ ]
+ coclass Recordset
+ {
+ [default] interface _Recordset;
+ [default, source] dispinterface RecordsetEvents;
+ };
+
+ [
+ uuid(0000050b-0000-0010-8000-00aa006d2ea4),
+ ]
+ coclass Parameter
+ {
+ [default] interface _Parameter;
+ };
+
+ [
+ uuid(00000560-0000-0010-8000-00aa006d2ea4),
+ ]
+ coclass Record
+ {
+ [default] interface _Record;
+ };
+
+ [
+ uuid(00000566-0000-0010-8000-00aa006d2ea4),
+ ]
+ coclass Stream
+ {
+ [default] interface _Stream;
+ };
+}
--
2.20.1
Dec. 6, 2019
[PATCH 2/2] msvcrt: Provide exp2 in importlib.
by Jacek Caban
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com>
---
dlls/msvcrt/mathf.c | 4 ++++
1 file changed, 4 insertions(+)
Dec. 6, 2019
[PATCH 1/2] makedep: Build implib cross object files with -fno-builtin.
by Jacek Caban
We want to be specific about used function and not want optimizations to
interfere.
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com>
---
tools/makedep.c | 1 +
1 file changed, 1 insertion(+)
Dec. 6, 2019
[PATCH] configure.ac: disable -fcf-protection
by Austin English
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48161
Signed-off-by: Austin English <austinenglish(a)gmail.com>
---
configure.ac | 3 +++
1 file changed, 3 insertions(+)
diff --git a/configure.ac b/configure.ac
index 7f2c3cda23..942585adfe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2113,6 +2113,9 @@ then
CFLAGS="$CFLAGS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0"
fi
+dnl **** Disable fcf-protection, it breaks a ton of apps
+WINE_TRY_CFLAGS([-fcf-protection=none])
+
dnl **** Check for CFI directives support ****
AC_CACHE_CHECK([whether CFI directives are supported in assembly code], ac_cv_c_cfi_support,
--
2.23.0
Dec. 6, 2019
mferror clarification for translators
by Julian Rüger
Hi Nikolay!
Once again, I have a question regarding your mferror strings.
#: mferror.mc:550
msgid "Media sink stream sinks set is fixed.\n"
Is this
(Media sink) (stream sinks set)?
Or (Media sink stream) (sinks set)?
What is that supposed to mean exactly? ;)
Also "fixed" as in "cannot be changed", "repaired/corrected" or
something else?
Thanks,
Julian
PS:
If anyone speaking German has ideas for less clumsy translations, I'm
all ears...
#: mferror.mc:564
msgid "Sample allocation was canceled.\n"
msgstr "Allokation des Abtastwerts wurde abgebrochen.\n"
#: mferror.mc:543
msgid "Stream sinks are out of sync.\n"
msgstr "Datenstromausgänge nicht mehr synchron.\n"
#: mferror.mc:613
msgid "No samples were processed by the sink.\n"
msgstr "Es wurden keine Abtastwerte durch den Ausgang verarbeitet.\n"
Dec. 6, 2019
[PATCH 10/10] vbscript/tests: Add initial tests for the script TypeInfo.
by Jacek Caban
From: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com>
---
dlls/vbscript/tests/vbscript.c | 271 +++++++++++++++++++++++++++++++++
1 file changed, 271 insertions(+)
Dec. 6, 2019
[PATCH 09/10] vbscript: Implement ScriptTypeInfo_GetTypeComp.
by Jacek Caban
From: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com>
---
dlls/vbscript/vbdisp.c | 60 ++++++++++++++++++++++++++++++++++++++++--
1 file changed, 58 insertions(+), 2 deletions(-)
Dec. 6, 2019
[PATCH 08/10] vbscript: Implement ScriptTypeInfo_GetIDsOfNames.
by Jacek Caban
From: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com>
---
dlls/vbscript/vbdisp.c | 45 +++++++++++++++++++++++++++++++++--
dlls/vbscript/vbscript.h | 1 +
dlls/vbscript/vbscript_main.c | 25 +++++++++++++++++++
3 files changed, 69 insertions(+), 2 deletions(-)
Dec. 6, 2019
[PATCH 07/10] vbscript: Implement ScriptTypeInfo_GetVarDesc.
by Jacek Caban
From: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com>
---
dlls/vbscript/vbdisp.c | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
Dec. 6, 2019
[PATCH 06/10] vbscript: Implement ScriptTypeInfo_GetFuncDesc.
by Jacek Caban
From: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com>
---
dlls/vbscript/vbdisp.c | 31 ++++++++++++++++++++++++++++---
1 file changed, 28 insertions(+), 3 deletions(-)
Dec. 6, 2019
[PATCH 05/10] vbscript: Implement ScriptTypeInfo_GetTypeAttr.
by Jacek Caban
From: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com>
---
dlls/vbscript/vbdisp.c | 36 +++++++++++++++++++++++++++++++-----
1 file changed, 31 insertions(+), 5 deletions(-)
Dec. 6, 2019
[PATCH 04/10] vbscript: Store the necessary function and variable info in the script TypeInfo.
by Jacek Caban
From: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
The TypeInfo is built when it is retrieved and frozen at that moment, even
if the script changes after that and more identifiers are added to it,
or existing ones replaced.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com>
---
dlls/vbscript/vbdisp.c | 45 ++++++++++++++++++++++++++++++++++++++++
dlls/vbscript/vbscript.h | 5 +++++
2 files changed, 50 insertions(+)
Dec. 6, 2019
[PATCH 03/10] vbscript: Copy the variable names into the script dispatch's heap.
by Jacek Caban
From: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com>
---
dlls/vbscript/vbscript.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
Dec. 6, 2019
[PATCH 02/10] vbscript: Reference count the vbscode_t.
by Jacek Caban
From: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com>
---
dlls/vbscript/compile.c | 4 +++-
dlls/vbscript/vbscript.c | 11 +++++++++--
dlls/vbscript/vbscript.h | 1 +
3 files changed, 13 insertions(+), 3 deletions(-)
Dec. 6, 2019
[PATCH 01/10] vbscript: Move the global lists to the script dispatch object.
by Jacek Caban
From: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com>
---
dlls/vbscript/compile.c | 15 +++++----
dlls/vbscript/interp.c | 39 +++++++++++-----------
dlls/vbscript/vbdisp.c | 34 +++++++++++++------
dlls/vbscript/vbscript.c | 70 +++++++++++++---------------------------
dlls/vbscript/vbscript.h | 41 ++++++++++++-----------
5 files changed, 97 insertions(+), 102 deletions(-)
Dec. 6, 2019
Re: [PATCH 5/5] msado15: Implement _Stream_put_Type and _Stream_get_Type.
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=61473
Your paranoid android.
=== debian10 (32 bit report) ===
msado15:
msado15.c:34: Test failed: got 80040154
Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x00401593).
Report errors:
msado15:msado15 crashed (c0000005)
=== debian10 (32 bit French report) ===
msado15:
msado15.c:34: Test failed: got 80040154
Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x00401593).
Report errors:
msado15:msado15 crashed (c0000005)
=== debian10 (32 bit Japanese:Japan report) ===
msado15:
msado15.c:34: Test failed: got 80040154
Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x00401593).
Report errors:
msado15:msado15 crashed (c0000005)
=== debian10 (32 bit Chinese:China report) ===
msado15:
msado15.c:34: Test failed: got 80040154
Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x00401593).
Report errors:
msado15:msado15 crashed (c0000005)
=== debian10 (32 bit WoW report) ===
msado15:
msado15.c:34: Test failed: got 80040154
Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x00401593).
Report errors:
msado15:msado15 crashed (c0000005)
=== debian10 (64 bit WoW report) ===
msado15:
msado15.c:34: Test failed: got 80040154
Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x00401593).
Report errors:
msado15:msado15 crashed (c0000005)
Dec. 6, 2019