mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-09-13 09:17:20 -07:00
Rebase against b54a8dda844a1a43d1dff22eff0ea206be5c630c.
[d3dx9_36-D3DXDisassembleShader] Removed patch to implement d3dx9_36.D3DXCreateTextureShader with stub interface (accepted upstream). [ntdll-NtQuerySection] Partially removed patches to implement NtQuerySection (fixed upstream).
This commit is contained in:
parent
e7778c5622
commit
104c5b24f1
@ -1,302 +0,0 @@
|
||||
From 472e521bce8bb2f218518718a645efc53acd5d29 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Costa <titan.costa@gmail.com>
|
||||
Date: Mon, 8 Feb 2016 23:02:52 +0100
|
||||
Subject: d3dx9_36: Implement D3DXCreateTextureShader with stubbed
|
||||
ID3DXTextureShader interface.
|
||||
|
||||
---
|
||||
dlls/d3dx9_36/d3dx9_36.spec | 2 +-
|
||||
dlls/d3dx9_36/shader.c | 267 ++++++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 268 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/d3dx9_36.spec b/dlls/d3dx9_36/d3dx9_36.spec
|
||||
index 611adf0..28f1a26 100644
|
||||
--- a/dlls/d3dx9_36/d3dx9_36.spec
|
||||
+++ b/dlls/d3dx9_36/d3dx9_36.spec
|
||||
@@ -104,7 +104,7 @@
|
||||
@ stdcall D3DXCreateTextureFromResourceExW(ptr ptr wstr long long long long long long long long long ptr ptr ptr)
|
||||
@ stdcall D3DXCreateTextureFromResourceW(ptr ptr wstr ptr)
|
||||
@ stub D3DXCreateTextureGutterHelper(long long ptr long ptr)
|
||||
-@ stub D3DXCreateTextureShader(ptr ptr)
|
||||
+@ stdcall D3DXCreateTextureShader(ptr ptr)
|
||||
@ stdcall D3DXCreateTorus(ptr long long long long ptr ptr)
|
||||
@ stdcall D3DXCreateVolumeTexture(ptr long long long long long long long ptr)
|
||||
@ stdcall D3DXCreateVolumeTextureFromFileA(ptr ptr ptr)
|
||||
diff --git a/dlls/d3dx9_36/shader.c b/dlls/d3dx9_36/shader.c
|
||||
index eb0680a..8a9cbf2 100644
|
||||
--- a/dlls/d3dx9_36/shader.c
|
||||
+++ b/dlls/d3dx9_36/shader.c
|
||||
@@ -2297,3 +2297,270 @@ HRESULT WINAPI D3DXGetShaderOutputSemantics(const DWORD *byte_code, D3DXSEMANTIC
|
||||
|
||||
return D3D_OK;
|
||||
}
|
||||
+
|
||||
+struct d3dx9_texture_shader
|
||||
+{
|
||||
+ ID3DXTextureShader ID3DXTextureShader_iface;
|
||||
+ LONG ref;
|
||||
+};
|
||||
+
|
||||
+static inline struct d3dx9_texture_shader *impl_from_ID3DXTextureShader(ID3DXTextureShader *iface)
|
||||
+{
|
||||
+ return CONTAINING_RECORD(iface, struct d3dx9_texture_shader, ID3DXTextureShader_iface);
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_texture_shader_QueryInterface(ID3DXTextureShader *iface, REFIID riid, void **out)
|
||||
+{
|
||||
+ TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out);
|
||||
+
|
||||
+ if (IsEqualGUID(riid, &IID_IUnknown) ||
|
||||
+ IsEqualGUID(riid, &IID_ID3DXTextureShader))
|
||||
+ {
|
||||
+ iface->lpVtbl->AddRef(iface);
|
||||
+ *out = iface;
|
||||
+ return D3D_OK;
|
||||
+ }
|
||||
+
|
||||
+ WARN("Interface %s not found.\n", debugstr_guid(riid));
|
||||
+ *out = NULL;
|
||||
+ return E_NOINTERFACE;
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI d3dx9_texture_shader_AddRef(ID3DXTextureShader *iface)
|
||||
+{
|
||||
+ struct d3dx9_texture_shader *texture_shader = impl_from_ID3DXTextureShader(iface);
|
||||
+ ULONG refcount = InterlockedIncrement(&texture_shader->ref);
|
||||
+
|
||||
+ TRACE("%p increasing refcount to %u.\n", texture_shader, refcount);
|
||||
+
|
||||
+ return refcount;
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI d3dx9_texture_shader_Release(ID3DXTextureShader *iface)
|
||||
+{
|
||||
+ struct d3dx9_texture_shader *texture_shader = impl_from_ID3DXTextureShader(iface);
|
||||
+ ULONG refcount = InterlockedDecrement(&texture_shader->ref);
|
||||
+
|
||||
+ TRACE("%p decreasing refcount to %u.\n", texture_shader, refcount);
|
||||
+
|
||||
+ if (!refcount)
|
||||
+ {
|
||||
+ HeapFree(GetProcessHeap(), 0, texture_shader);
|
||||
+ }
|
||||
+
|
||||
+ return refcount;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_texture_shader_GetFunction(ID3DXTextureShader *iface, struct ID3DXBuffer **function)
|
||||
+{
|
||||
+ FIXME("iface %p, function %p stub.\n", iface, function);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_texture_shader_GetConstantBuffer(ID3DXTextureShader *iface, struct ID3DXBuffer **constant_buffer)
|
||||
+{
|
||||
+ FIXME("iface %p, constant_buffer %p stub.\n", iface, constant_buffer);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_texture_shader_GetDesc(ID3DXTextureShader *iface, D3DXCONSTANTTABLE_DESC *desc)
|
||||
+{
|
||||
+ FIXME("iface %p, desc %p stub.\n", iface, desc);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_texture_shader_GetConstantDesc(ID3DXTextureShader *iface, D3DXHANDLE constant, D3DXCONSTANT_DESC *constant_desc, UINT *count)
|
||||
+{
|
||||
+ FIXME("iface %p, constant %p, constant_desc %p, count %p stub.\n", iface, constant, constant_desc, count);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static D3DXHANDLE WINAPI d3dx9_texture_shader_GetConstant(ID3DXTextureShader *iface, D3DXHANDLE constant, UINT index)
|
||||
+{
|
||||
+ FIXME("iface %p, constant %p, index %u stub.\n", iface, constant, index);
|
||||
+
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
+static D3DXHANDLE WINAPI d3dx9_texture_shader_GetConstantByName(ID3DXTextureShader *iface, D3DXHANDLE constant, const char *name)
|
||||
+{
|
||||
+ FIXME("iface %p, constant %p, name %s stub.\n", iface, constant, debugstr_a(name));
|
||||
+
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
+static D3DXHANDLE WINAPI d3dx9_texture_shader_GetConstantElement(ID3DXTextureShader *iface, D3DXHANDLE constant, UINT index)
|
||||
+{
|
||||
+ FIXME("iface %p, constant %p, index %u stub.\n", iface, constant, index);
|
||||
+
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_texture_shader_SetDefaults(ID3DXTextureShader *iface)
|
||||
+{
|
||||
+ FIXME("iface %p stub.\n", iface);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_texture_shader_SetValue(ID3DXTextureShader *iface, D3DXHANDLE constant, const void *data, UINT bytes)
|
||||
+{
|
||||
+ FIXME("iface %p, constant %p, data %p, bytes %u stub.\n", iface, constant, data, bytes);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_texture_shader_SetBool(ID3DXTextureShader *iface, D3DXHANDLE constant, BOOL b)
|
||||
+{
|
||||
+ FIXME("iface %p, constant %p, b %u stub.\n", iface, constant, b);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_texture_shader_SetBoolArray(ID3DXTextureShader *iface, D3DXHANDLE constant, const BOOL *b, UINT count)
|
||||
+{
|
||||
+ FIXME("iface %p, constant %p, b %p, count %u stub.\n", iface, constant, b, count);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_texture_shader_SetInt(ID3DXTextureShader *iface, D3DXHANDLE constant, INT n)
|
||||
+{
|
||||
+ FIXME("iface %p, constant %p, n %d stub.\n", iface, constant, n);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_texture_shader_SetIntArray(ID3DXTextureShader *iface, D3DXHANDLE constant, const INT *n, UINT count)
|
||||
+{
|
||||
+ FIXME("iface %p, constant %p, n %p, count %u stub.\n", iface, constant, n, count);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_texture_shader_SetFloat(ID3DXTextureShader *iface, D3DXHANDLE constant, FLOAT f)
|
||||
+{
|
||||
+ FIXME("iface %p, constant %p, f %f stub.\n", iface, constant, f);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_texture_shader_SetFloatArray(ID3DXTextureShader *iface, D3DXHANDLE constant, const FLOAT *f, UINT count)
|
||||
+{
|
||||
+ FIXME("iface %p, constant %p, f %p, count %u stub.\n", iface, constant, f, count);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_texture_shader_SetVector(ID3DXTextureShader *iface, D3DXHANDLE constant, const D3DXVECTOR4 *vector)
|
||||
+{
|
||||
+ FIXME("iface %p, constant %p, vector %p stub.\n", iface, constant, vector);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_texture_shader_SetVectorArray(ID3DXTextureShader *iface, D3DXHANDLE constant, const D3DXVECTOR4 *vector, UINT count)
|
||||
+{
|
||||
+ FIXME("iface %p, constant %p, vector %p, count %u stub.\n", iface, constant, vector, count);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_texture_shader_SetMatrix(ID3DXTextureShader *iface, D3DXHANDLE constant, const D3DXMATRIX *matrix)
|
||||
+{
|
||||
+ FIXME("iface %p, constant %p, matrix %p stub.\n", iface, constant, matrix);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_texture_shader_SetMatrixArray(ID3DXTextureShader *iface, D3DXHANDLE constant, const D3DXMATRIX *matrix, UINT count)
|
||||
+{
|
||||
+ FIXME("iface %p, constant %p, matrix %p, count %u stub.\n", iface, constant, matrix, count);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_texture_shader_SetMatrixPointerArray(ID3DXTextureShader *iface, D3DXHANDLE constant, const D3DXMATRIX **matrix, UINT count)
|
||||
+{
|
||||
+ FIXME("iface %p, constant %p, matrix %p, count %u stub.\n", iface, constant, matrix, count);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_texture_shader_SetMatrixTranspose(ID3DXTextureShader *iface, D3DXHANDLE constant, const D3DXMATRIX *matrix)
|
||||
+{
|
||||
+ FIXME("iface %p, constant %p, matrix %p stub.\n", iface, constant, matrix);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_texture_shader_SetMatrixTransposeArray(ID3DXTextureShader *iface, D3DXHANDLE constant, const D3DXMATRIX *matrix, UINT count)
|
||||
+{
|
||||
+ FIXME("iface %p, constant %p, matrix %p, count %u stub.\n", iface, constant, matrix, count);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI d3dx9_texture_shader_SetMatrixTransposePointerArray(ID3DXTextureShader *iface, D3DXHANDLE constant, const D3DXMATRIX **matrix, UINT count)
|
||||
+{
|
||||
+ FIXME("iface %p, constant %p, matrix %p, count %u stub.\n", iface, constant, matrix, count);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static const struct ID3DXTextureShaderVtbl d3dx9_texture_shader_vtbl =
|
||||
+{
|
||||
+ /*** IUnknown methods ***/
|
||||
+ d3dx9_texture_shader_QueryInterface,
|
||||
+ d3dx9_texture_shader_AddRef,
|
||||
+ d3dx9_texture_shader_Release,
|
||||
+ /*** ID3DXTextureShader methods ***/
|
||||
+ d3dx9_texture_shader_GetFunction,
|
||||
+ d3dx9_texture_shader_GetConstantBuffer,
|
||||
+ d3dx9_texture_shader_GetDesc,
|
||||
+ d3dx9_texture_shader_GetConstantDesc,
|
||||
+ d3dx9_texture_shader_GetConstant,
|
||||
+ d3dx9_texture_shader_GetConstantByName,
|
||||
+ d3dx9_texture_shader_GetConstantElement,
|
||||
+ d3dx9_texture_shader_SetDefaults,
|
||||
+ d3dx9_texture_shader_SetValue,
|
||||
+ d3dx9_texture_shader_SetBool,
|
||||
+ d3dx9_texture_shader_SetBoolArray,
|
||||
+ d3dx9_texture_shader_SetInt,
|
||||
+ d3dx9_texture_shader_SetIntArray,
|
||||
+ d3dx9_texture_shader_SetFloat,
|
||||
+ d3dx9_texture_shader_SetFloatArray,
|
||||
+ d3dx9_texture_shader_SetVector,
|
||||
+ d3dx9_texture_shader_SetVectorArray,
|
||||
+ d3dx9_texture_shader_SetMatrix,
|
||||
+ d3dx9_texture_shader_SetMatrixArray,
|
||||
+ d3dx9_texture_shader_SetMatrixPointerArray,
|
||||
+ d3dx9_texture_shader_SetMatrixTranspose,
|
||||
+ d3dx9_texture_shader_SetMatrixTransposeArray,
|
||||
+ d3dx9_texture_shader_SetMatrixTransposePointerArray
|
||||
+};
|
||||
+
|
||||
+HRESULT WINAPI D3DXCreateTextureShader(const DWORD *function, ID3DXTextureShader **texture_shader)
|
||||
+{
|
||||
+ struct d3dx9_texture_shader *object;
|
||||
+
|
||||
+ TRACE("function %p, texture_shader %p.\n", function, texture_shader);
|
||||
+
|
||||
+ if (!function || !texture_shader)
|
||||
+ return D3DERR_INVALIDCALL;
|
||||
+
|
||||
+ object = HeapAlloc(GetProcessHeap(), 0, sizeof(*object));
|
||||
+ if (!object)
|
||||
+ return E_OUTOFMEMORY;
|
||||
+
|
||||
+ object->ID3DXTextureShader_iface.lpVtbl = &d3dx9_texture_shader_vtbl;
|
||||
+ object->ref = 1;
|
||||
+
|
||||
+ *texture_shader = &object->ID3DXTextureShader_iface;
|
||||
+
|
||||
+ return D3D_OK;
|
||||
+}
|
||||
--
|
||||
2.7.1
|
||||
|
@ -1,32 +0,0 @@
|
||||
From 94a5f0e6ac8a945dcb08dcb607eee0df3228e41f Mon Sep 17 00:00:00 2001
|
||||
From: Christian Costa <titan.costa@gmail.com>
|
||||
Date: Sat, 13 Feb 2016 15:24:00 +0100
|
||||
Subject: include: Fix prototypes of D3DXFillXXXTextureTx for d3dx9.
|
||||
|
||||
---
|
||||
include/d3dx9tex.h | 9 +++------
|
||||
1 file changed, 3 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/include/d3dx9tex.h b/include/d3dx9tex.h
|
||||
index 542460f..77f2d35 100644
|
||||
--- a/include/d3dx9tex.h
|
||||
+++ b/include/d3dx9tex.h
|
||||
@@ -337,12 +337,9 @@ HRESULT WINAPI D3DXFillTexture(struct IDirect3DTexture9 *texture, LPD3DXFILL2D f
|
||||
HRESULT WINAPI D3DXFillCubeTexture(struct IDirect3DCubeTexture9 *cube, LPD3DXFILL3D function, void *data);
|
||||
HRESULT WINAPI D3DXFillVolumeTexture(struct IDirect3DVolumeTexture9 *volume, LPD3DXFILL3D function, void *data);
|
||||
|
||||
-HRESULT WINAPI D3DXFillTextureTX(struct IDirect3DTexture9 *texture, const DWORD *function,
|
||||
- const D3DXVECTOR4 *constants, UINT numconstants);
|
||||
-HRESULT WINAPI D3DXFillCubeTextureTX(struct IDirect3DCubeTexture9 *cube, const DWORD *function,
|
||||
- const D3DXVECTOR4 *constants, UINT numconstants);
|
||||
-HRESULT WINAPI D3DXFillVolumeTextureTX(struct IDirect3DVolumeTexture9 *volume, const DWORD *function,
|
||||
- const D3DXVECTOR4 *constants, UINT numconstants);
|
||||
+HRESULT WINAPI D3DXFillTextureTX(struct IDirect3DTexture9 *texture, ID3DXTextureShader *texture_shader);
|
||||
+HRESULT WINAPI D3DXFillCubeTextureTX(struct IDirect3DCubeTexture9 *cube, ID3DXTextureShader *texture_shader);
|
||||
+HRESULT WINAPI D3DXFillVolumeTextureTX(struct IDirect3DVolumeTexture9 *volume, ID3DXTextureShader *texture_shader);
|
||||
|
||||
HRESULT WINAPI D3DXComputeNormalMap(IDirect3DTexture9 *texture, IDirect3DTexture9 *srctexture,
|
||||
const PALETTEENTRY *srcpalette, DWORD flags, DWORD channel, float amplitude);
|
||||
--
|
||||
2.7.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From af160ceb1fc68b5c3edb35d9bbe0ab3bc2bb7563 Mon Sep 17 00:00:00 2001
|
||||
From ac716fe03fbbe45d9128e4e31c5654b9049c59aa Mon Sep 17 00:00:00 2001
|
||||
From: Christian Costa <titan.costa@gmail.com>
|
||||
Date: Sat, 13 Feb 2016 15:29:37 +0100
|
||||
Subject: d3dx9_36: Implement D3DXDisassembleShader. (v2)
|
||||
@ -10,7 +10,7 @@ Changes in v2 (by Christian Costa):
|
||||
1 file changed, 328 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/shader.c b/dlls/d3dx9_36/shader.c
|
||||
index 0f6e226..4b63f4c 100644
|
||||
index e3924a9..34a98aa 100644
|
||||
--- a/dlls/d3dx9_36/shader.c
|
||||
+++ b/dlls/d3dx9_36/shader.c
|
||||
@@ -1,7 +1,7 @@
|
||||
@ -366,7 +366,7 @@ index 0f6e226..4b63f4c 100644
|
||||
+ return hr;
|
||||
}
|
||||
|
||||
static const DWORD* skip_instruction(const DWORD *byte_code, UINT shader_model)
|
||||
struct d3dx9_texture_shader
|
||||
--
|
||||
2.7.1
|
||||
2.8.0
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
Fixes: [37919] Implement d3dx9_36.D3DXCreateTextureShader with stub interface
|
||||
Fixes: Implement stub for d3dx9_36.D3DXFillCubeTextureTX
|
||||
Fixes: Initial implementation for d3dx9_36.D3DXDisassembleShader
|
||||
Depends: d3dx9_36-GetShaderSemantics
|
||||
|
@ -1,4 +1,4 @@
|
||||
From f6450f50915fa8aa93983cb736015c4eb2d1bf97 Mon Sep 17 00:00:00 2001
|
||||
From 4a759d3fc62318aad4e7da7fbaaa5099940e2a3f Mon Sep 17 00:00:00 2001
|
||||
From: Christian Costa <titan.costa@gmail.com>
|
||||
Date: Sat, 5 Apr 2014 14:02:07 +0200
|
||||
Subject: d3dx9_36: Implement D3DXGetShaderInputSemantics + tests. (rev 3)
|
||||
@ -31,7 +31,7 @@ Fixes bug 22682.
|
||||
23 files changed, 200 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_24/d3dx9_24.spec b/dlls/d3dx9_24/d3dx9_24.spec
|
||||
index 88ad9af..7e4217d 100644
|
||||
index f182d7e..f8068f9 100644
|
||||
--- a/dlls/d3dx9_24/d3dx9_24.spec
|
||||
+++ b/dlls/d3dx9_24/d3dx9_24.spec
|
||||
@@ -154,7 +154,7 @@
|
||||
@ -44,7 +44,7 @@ index 88ad9af..7e4217d 100644
|
||||
@ stdcall D3DXGetShaderSamplers(ptr ptr ptr)
|
||||
@ stdcall D3DXGetShaderSize(ptr)
|
||||
diff --git a/dlls/d3dx9_25/d3dx9_25.spec b/dlls/d3dx9_25/d3dx9_25.spec
|
||||
index fc64fb4..2c7ae49 100644
|
||||
index 300dc1d..da1c874 100644
|
||||
--- a/dlls/d3dx9_25/d3dx9_25.spec
|
||||
+++ b/dlls/d3dx9_25/d3dx9_25.spec
|
||||
@@ -154,7 +154,7 @@
|
||||
@ -57,7 +57,7 @@ index fc64fb4..2c7ae49 100644
|
||||
@ stdcall D3DXGetShaderSamplers(ptr ptr ptr)
|
||||
@ stdcall D3DXGetShaderSize(ptr)
|
||||
diff --git a/dlls/d3dx9_26/d3dx9_26.spec b/dlls/d3dx9_26/d3dx9_26.spec
|
||||
index 5bcf2cc..21b7f3c 100644
|
||||
index 79e0a0c..03492f9 100644
|
||||
--- a/dlls/d3dx9_26/d3dx9_26.spec
|
||||
+++ b/dlls/d3dx9_26/d3dx9_26.spec
|
||||
@@ -158,7 +158,7 @@
|
||||
@ -70,7 +70,7 @@ index 5bcf2cc..21b7f3c 100644
|
||||
@ stdcall D3DXGetShaderSamplers(ptr ptr ptr)
|
||||
@ stdcall D3DXGetShaderSize(ptr)
|
||||
diff --git a/dlls/d3dx9_27/d3dx9_27.spec b/dlls/d3dx9_27/d3dx9_27.spec
|
||||
index 5bcf2cc..21b7f3c 100644
|
||||
index 79e0a0c..03492f9 100644
|
||||
--- a/dlls/d3dx9_27/d3dx9_27.spec
|
||||
+++ b/dlls/d3dx9_27/d3dx9_27.spec
|
||||
@@ -158,7 +158,7 @@
|
||||
@ -83,7 +83,7 @@ index 5bcf2cc..21b7f3c 100644
|
||||
@ stdcall D3DXGetShaderSamplers(ptr ptr ptr)
|
||||
@ stdcall D3DXGetShaderSize(ptr)
|
||||
diff --git a/dlls/d3dx9_28/d3dx9_28.spec b/dlls/d3dx9_28/d3dx9_28.spec
|
||||
index edb494e..5f630a6 100644
|
||||
index abbfa94..977da28 100644
|
||||
--- a/dlls/d3dx9_28/d3dx9_28.spec
|
||||
+++ b/dlls/d3dx9_28/d3dx9_28.spec
|
||||
@@ -158,7 +158,7 @@
|
||||
@ -96,7 +96,7 @@ index edb494e..5f630a6 100644
|
||||
@ stdcall D3DXGetShaderSamplers(ptr ptr ptr)
|
||||
@ stdcall D3DXGetShaderSize(ptr)
|
||||
diff --git a/dlls/d3dx9_29/d3dx9_29.spec b/dlls/d3dx9_29/d3dx9_29.spec
|
||||
index edb494e..5f630a6 100644
|
||||
index abbfa94..977da28 100644
|
||||
--- a/dlls/d3dx9_29/d3dx9_29.spec
|
||||
+++ b/dlls/d3dx9_29/d3dx9_29.spec
|
||||
@@ -158,7 +158,7 @@
|
||||
@ -109,7 +109,7 @@ index edb494e..5f630a6 100644
|
||||
@ stdcall D3DXGetShaderSamplers(ptr ptr ptr)
|
||||
@ stdcall D3DXGetShaderSize(ptr)
|
||||
diff --git a/dlls/d3dx9_30/d3dx9_30.spec b/dlls/d3dx9_30/d3dx9_30.spec
|
||||
index dc00086..5f0e3a4 100644
|
||||
index 0269caa..27e8c08 100644
|
||||
--- a/dlls/d3dx9_30/d3dx9_30.spec
|
||||
+++ b/dlls/d3dx9_30/d3dx9_30.spec
|
||||
@@ -158,7 +158,7 @@
|
||||
@ -122,7 +122,7 @@ index dc00086..5f0e3a4 100644
|
||||
@ stdcall D3DXGetShaderSamplers(ptr ptr ptr)
|
||||
@ stdcall D3DXGetShaderSize(ptr)
|
||||
diff --git a/dlls/d3dx9_31/d3dx9_31.spec b/dlls/d3dx9_31/d3dx9_31.spec
|
||||
index c650a77..1d52ecb 100644
|
||||
index be37e8f..f6ed856 100644
|
||||
--- a/dlls/d3dx9_31/d3dx9_31.spec
|
||||
+++ b/dlls/d3dx9_31/d3dx9_31.spec
|
||||
@@ -157,7 +157,7 @@
|
||||
@ -135,7 +135,7 @@ index c650a77..1d52ecb 100644
|
||||
@ stdcall D3DXGetShaderSamplers(ptr ptr ptr)
|
||||
@ stdcall D3DXGetShaderSize(ptr)
|
||||
diff --git a/dlls/d3dx9_32/d3dx9_32.spec b/dlls/d3dx9_32/d3dx9_32.spec
|
||||
index 8c2fe78..4333519 100644
|
||||
index 6d9e244..4f92df8 100644
|
||||
--- a/dlls/d3dx9_32/d3dx9_32.spec
|
||||
+++ b/dlls/d3dx9_32/d3dx9_32.spec
|
||||
@@ -157,7 +157,7 @@
|
||||
@ -148,7 +148,7 @@ index 8c2fe78..4333519 100644
|
||||
@ stdcall D3DXGetShaderSamplers(ptr ptr ptr)
|
||||
@ stdcall D3DXGetShaderSize(ptr)
|
||||
diff --git a/dlls/d3dx9_33/d3dx9_33.spec b/dlls/d3dx9_33/d3dx9_33.spec
|
||||
index 8c2fe78..4333519 100644
|
||||
index 6d9e244..4f92df8 100644
|
||||
--- a/dlls/d3dx9_33/d3dx9_33.spec
|
||||
+++ b/dlls/d3dx9_33/d3dx9_33.spec
|
||||
@@ -157,7 +157,7 @@
|
||||
@ -161,7 +161,7 @@ index 8c2fe78..4333519 100644
|
||||
@ stdcall D3DXGetShaderSamplers(ptr ptr ptr)
|
||||
@ stdcall D3DXGetShaderSize(ptr)
|
||||
diff --git a/dlls/d3dx9_34/d3dx9_34.spec b/dlls/d3dx9_34/d3dx9_34.spec
|
||||
index 8c2fe78..4333519 100644
|
||||
index 6d9e244..4f92df8 100644
|
||||
--- a/dlls/d3dx9_34/d3dx9_34.spec
|
||||
+++ b/dlls/d3dx9_34/d3dx9_34.spec
|
||||
@@ -157,7 +157,7 @@
|
||||
@ -174,7 +174,7 @@ index 8c2fe78..4333519 100644
|
||||
@ stdcall D3DXGetShaderSamplers(ptr ptr ptr)
|
||||
@ stdcall D3DXGetShaderSize(ptr)
|
||||
diff --git a/dlls/d3dx9_35/d3dx9_35.spec b/dlls/d3dx9_35/d3dx9_35.spec
|
||||
index 8c2fe78..4333519 100644
|
||||
index 6d9e244..4f92df8 100644
|
||||
--- a/dlls/d3dx9_35/d3dx9_35.spec
|
||||
+++ b/dlls/d3dx9_35/d3dx9_35.spec
|
||||
@@ -157,7 +157,7 @@
|
||||
@ -187,7 +187,7 @@ index 8c2fe78..4333519 100644
|
||||
@ stdcall D3DXGetShaderSamplers(ptr ptr ptr)
|
||||
@ stdcall D3DXGetShaderSize(ptr)
|
||||
diff --git a/dlls/d3dx9_36/d3dx9_36.spec b/dlls/d3dx9_36/d3dx9_36.spec
|
||||
index 622f2d0..e81aef2 100644
|
||||
index 2db0152..3a15b76 100644
|
||||
--- a/dlls/d3dx9_36/d3dx9_36.spec
|
||||
+++ b/dlls/d3dx9_36/d3dx9_36.spec
|
||||
@@ -159,7 +159,7 @@
|
||||
@ -200,7 +200,7 @@ index 622f2d0..e81aef2 100644
|
||||
@ stdcall D3DXGetShaderSamplers(ptr ptr ptr)
|
||||
@ stdcall D3DXGetShaderSize(ptr)
|
||||
diff --git a/dlls/d3dx9_36/shader.c b/dlls/d3dx9_36/shader.c
|
||||
index 9723aa4..940cd15 100644
|
||||
index 4dbecb1..538cd42 100644
|
||||
--- a/dlls/d3dx9_36/shader.c
|
||||
+++ b/dlls/d3dx9_36/shader.c
|
||||
@@ -1,6 +1,7 @@
|
||||
@ -211,9 +211,9 @@ index 9723aa4..940cd15 100644
|
||||
* Copyright 2011 Travis Athougies
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
@@ -2146,3 +2147,95 @@ HRESULT WINAPI D3DXDisassembleShader(const DWORD *shader, BOOL colorcode, const
|
||||
FIXME("%p %d %s %p: stub\n", shader, colorcode, debugstr_a(comments), disassembly);
|
||||
return E_OUTOFMEMORY;
|
||||
@@ -2413,3 +2414,95 @@ HRESULT WINAPI D3DXCreateTextureShader(const DWORD *function, ID3DXTextureShader
|
||||
|
||||
return D3D_OK;
|
||||
}
|
||||
+
|
||||
+static const DWORD* skip_instruction(const DWORD *byte_code, UINT shader_model)
|
||||
@ -423,7 +423,7 @@ index 4a7ae67..9a2769f 100644
|
||||
+ test_get_shader_semantics();
|
||||
}
|
||||
diff --git a/dlls/d3dx9_37/d3dx9_37.spec b/dlls/d3dx9_37/d3dx9_37.spec
|
||||
index 622f2d0..e81aef2 100644
|
||||
index 2db0152..3a15b76 100644
|
||||
--- a/dlls/d3dx9_37/d3dx9_37.spec
|
||||
+++ b/dlls/d3dx9_37/d3dx9_37.spec
|
||||
@@ -159,7 +159,7 @@
|
||||
@ -436,7 +436,7 @@ index 622f2d0..e81aef2 100644
|
||||
@ stdcall D3DXGetShaderSamplers(ptr ptr ptr)
|
||||
@ stdcall D3DXGetShaderSize(ptr)
|
||||
diff --git a/dlls/d3dx9_38/d3dx9_38.spec b/dlls/d3dx9_38/d3dx9_38.spec
|
||||
index 622f2d0..e81aef2 100644
|
||||
index 2db0152..3a15b76 100644
|
||||
--- a/dlls/d3dx9_38/d3dx9_38.spec
|
||||
+++ b/dlls/d3dx9_38/d3dx9_38.spec
|
||||
@@ -159,7 +159,7 @@
|
||||
@ -449,7 +449,7 @@ index 622f2d0..e81aef2 100644
|
||||
@ stdcall D3DXGetShaderSamplers(ptr ptr ptr)
|
||||
@ stdcall D3DXGetShaderSize(ptr)
|
||||
diff --git a/dlls/d3dx9_39/d3dx9_39.spec b/dlls/d3dx9_39/d3dx9_39.spec
|
||||
index 622f2d0..e81aef2 100644
|
||||
index 2db0152..3a15b76 100644
|
||||
--- a/dlls/d3dx9_39/d3dx9_39.spec
|
||||
+++ b/dlls/d3dx9_39/d3dx9_39.spec
|
||||
@@ -159,7 +159,7 @@
|
||||
@ -462,7 +462,7 @@ index 622f2d0..e81aef2 100644
|
||||
@ stdcall D3DXGetShaderSamplers(ptr ptr ptr)
|
||||
@ stdcall D3DXGetShaderSize(ptr)
|
||||
diff --git a/dlls/d3dx9_40/d3dx9_40.spec b/dlls/d3dx9_40/d3dx9_40.spec
|
||||
index 622f2d0..e81aef2 100644
|
||||
index 2db0152..3a15b76 100644
|
||||
--- a/dlls/d3dx9_40/d3dx9_40.spec
|
||||
+++ b/dlls/d3dx9_40/d3dx9_40.spec
|
||||
@@ -159,7 +159,7 @@
|
||||
@ -475,7 +475,7 @@ index 622f2d0..e81aef2 100644
|
||||
@ stdcall D3DXGetShaderSamplers(ptr ptr ptr)
|
||||
@ stdcall D3DXGetShaderSize(ptr)
|
||||
diff --git a/dlls/d3dx9_41/d3dx9_41.spec b/dlls/d3dx9_41/d3dx9_41.spec
|
||||
index 622f2d0..e81aef2 100644
|
||||
index 2db0152..3a15b76 100644
|
||||
--- a/dlls/d3dx9_41/d3dx9_41.spec
|
||||
+++ b/dlls/d3dx9_41/d3dx9_41.spec
|
||||
@@ -159,7 +159,7 @@
|
||||
@ -488,7 +488,7 @@ index 622f2d0..e81aef2 100644
|
||||
@ stdcall D3DXGetShaderSamplers(ptr ptr ptr)
|
||||
@ stdcall D3DXGetShaderSize(ptr)
|
||||
diff --git a/dlls/d3dx9_42/d3dx9_42.spec b/dlls/d3dx9_42/d3dx9_42.spec
|
||||
index 7851c60..257c6bd 100644
|
||||
index 9a69e76..0422f8a 100644
|
||||
--- a/dlls/d3dx9_42/d3dx9_42.spec
|
||||
+++ b/dlls/d3dx9_42/d3dx9_42.spec
|
||||
@@ -152,7 +152,7 @@
|
||||
@ -501,7 +501,7 @@ index 7851c60..257c6bd 100644
|
||||
@ stdcall D3DXGetShaderSamplers(ptr ptr ptr)
|
||||
@ stdcall D3DXGetShaderSize(ptr)
|
||||
diff --git a/dlls/d3dx9_43/d3dx9_43.spec b/dlls/d3dx9_43/d3dx9_43.spec
|
||||
index 7851c60..257c6bd 100644
|
||||
index 9a69e76..0422f8a 100644
|
||||
--- a/dlls/d3dx9_43/d3dx9_43.spec
|
||||
+++ b/dlls/d3dx9_43/d3dx9_43.spec
|
||||
@@ -152,7 +152,7 @@
|
||||
|
@ -1,292 +0,0 @@
|
||||
From 11aafdc465774d1b89836aa681f4af8b2bc85407 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Thu, 16 Oct 2014 23:24:37 +0200
|
||||
Subject: ntdll: Implement NtQuerySection. (try 2)
|
||||
|
||||
Some small modifications by Sebastian Lackner <sebastian@fds-team.de>
|
||||
---
|
||||
dlls/ntdll/nt.c | 19 --------
|
||||
dlls/ntdll/ntdll.spec | 4 +-
|
||||
dlls/ntdll/virtual.c | 95 +++++++++++++++++++++++++++++++++++++
|
||||
dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 2 +-
|
||||
server/mapping.c | 42 ++++++++++++++++
|
||||
server/protocol.def | 7 +++
|
||||
6 files changed, 147 insertions(+), 22 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
|
||||
index 47d7b31..f4d77a4 100644
|
||||
--- a/dlls/ntdll/nt.c
|
||||
+++ b/dlls/ntdll/nt.c
|
||||
@@ -646,25 +646,6 @@ NTSTATUS WINAPI NtPrivilegeCheck(
|
||||
}
|
||||
|
||||
/*
|
||||
- * Section
|
||||
- */
|
||||
-
|
||||
-/******************************************************************************
|
||||
- * NtQuerySection [NTDLL.@]
|
||||
- */
|
||||
-NTSTATUS WINAPI NtQuerySection(
|
||||
- IN HANDLE SectionHandle,
|
||||
- IN SECTION_INFORMATION_CLASS SectionInformationClass,
|
||||
- OUT PVOID SectionInformation,
|
||||
- IN ULONG Length,
|
||||
- OUT PULONG ResultLength)
|
||||
-{
|
||||
- FIXME("(%p,%d,%p,0x%08x,%p) stub!\n",
|
||||
- SectionHandle,SectionInformationClass,SectionInformation,Length,ResultLength);
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-/*
|
||||
* ports
|
||||
*/
|
||||
|
||||
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
|
||||
index 0a68144..c69934f 100644
|
||||
--- a/dlls/ntdll/ntdll.spec
|
||||
+++ b/dlls/ntdll/ntdll.spec
|
||||
@@ -269,7 +269,7 @@
|
||||
@ stdcall NtQueryPerformanceCounter(ptr ptr)
|
||||
# @ stub NtQueryPortInformationProcess
|
||||
# @ stub NtQueryQuotaInformationFile
|
||||
-@ stdcall NtQuerySection (long long long long long)
|
||||
+@ stdcall NtQuerySection(long long ptr long ptr)
|
||||
@ stdcall NtQuerySecurityObject (long long long long long)
|
||||
@ stdcall NtQuerySemaphore (long long ptr long ptr)
|
||||
@ stdcall NtQuerySymbolicLinkObject(long ptr ptr)
|
||||
@@ -1190,7 +1190,7 @@
|
||||
@ stdcall ZwQueryPerformanceCounter(ptr ptr) NtQueryPerformanceCounter
|
||||
# @ stub ZwQueryPortInformationProcess
|
||||
# @ stub ZwQueryQuotaInformationFile
|
||||
-@ stdcall ZwQuerySection (long long long long long) NtQuerySection
|
||||
+@ stdcall ZwQuerySection(long long ptr long ptr) NtQuerySection
|
||||
@ stdcall ZwQuerySecurityObject (long long long long long) NtQuerySecurityObject
|
||||
@ stdcall ZwQuerySemaphore(long long ptr long ptr) NtQuerySemaphore
|
||||
@ stdcall ZwQuerySymbolicLinkObject(long ptr ptr) NtQuerySymbolicLinkObject
|
||||
diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
|
||||
index 5c43d26..4f0e711 100644
|
||||
--- a/dlls/ntdll/virtual.c
|
||||
+++ b/dlls/ntdll/virtual.c
|
||||
@@ -2517,6 +2517,101 @@ NTSTATUS WINAPI NtOpenSection( HANDLE *handle, ACCESS_MASK access, const OBJECT_
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
+ * NtQuerySection (NTDLL.@)
|
||||
+ */
|
||||
+NTSTATUS WINAPI NtQuerySection( HANDLE handle, SECTION_INFORMATION_CLASS info_class,
|
||||
+ PVOID buffer, ULONG len, PULONG ret_len )
|
||||
+{
|
||||
+ HANDLE dup_mapping, shared_file;
|
||||
+ unsigned protect;
|
||||
+ LARGE_INTEGER size;
|
||||
+ void *entry;
|
||||
+ short machine, subsystem;
|
||||
+ short major_subsystem, minor_subsystem;
|
||||
+ short characteristics, dll_characteristics;
|
||||
+ NTSTATUS res;
|
||||
+
|
||||
+ if (info_class == SectionBasicInformation)
|
||||
+ {
|
||||
+ if (len < sizeof(SECTION_BASIC_INFORMATION))
|
||||
+ return STATUS_INFO_LENGTH_MISMATCH;
|
||||
+ }
|
||||
+ else if (info_class == SectionImageInformation)
|
||||
+ {
|
||||
+ if (len < sizeof(SECTION_IMAGE_INFORMATION))
|
||||
+ return STATUS_INFO_LENGTH_MISMATCH;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ FIXME("%p,info_class=%d,%p,%u,%p) Unknown information class\n",
|
||||
+ handle, info_class, buffer, len, ret_len);
|
||||
+ return STATUS_INVALID_INFO_CLASS;
|
||||
+ }
|
||||
+
|
||||
+ if (!buffer) return STATUS_ACCESS_VIOLATION;
|
||||
+
|
||||
+ SERVER_START_REQ( get_mapping_info )
|
||||
+ {
|
||||
+ req->handle = wine_server_obj_handle( handle );
|
||||
+ req->access = SECTION_QUERY;
|
||||
+ res = wine_server_call( req );
|
||||
+ protect = reply->protect;
|
||||
+ size.QuadPart = reply->size;
|
||||
+ dup_mapping = wine_server_ptr_handle( reply->mapping );
|
||||
+ shared_file = wine_server_ptr_handle( reply->shared_file );
|
||||
+ entry = wine_server_get_ptr( reply->entry );
|
||||
+ subsystem = reply->subsystem;
|
||||
+ major_subsystem = reply->major_subsystem;
|
||||
+ minor_subsystem = reply->minor_subsystem;
|
||||
+ characteristics = reply->characteristics;
|
||||
+ dll_characteristics = reply->dll_characteristics;
|
||||
+ machine = reply->machine;
|
||||
+ }
|
||||
+ SERVER_END_REQ;
|
||||
+ if (res) return res;
|
||||
+
|
||||
+ if (dup_mapping) close_handle( dup_mapping );
|
||||
+ if (shared_file) close_handle( shared_file );
|
||||
+
|
||||
+ if (info_class == SectionBasicInformation)
|
||||
+ {
|
||||
+ SECTION_BASIC_INFORMATION *info = buffer;
|
||||
+
|
||||
+ info->BaseAddress = NULL;
|
||||
+ info->Size = size;
|
||||
+ info->Attributes = (protect & VPROT_COMMITTED) ? SEC_COMMIT : SEC_RESERVE;
|
||||
+ if (protect & VPROT_NOCACHE) info->Attributes |= SEC_NOCACHE;
|
||||
+ if (protect & VPROT_IMAGE) info->Attributes |= SEC_IMAGE;
|
||||
+ /* FIXME: SEC_FILE */
|
||||
+ if (ret_len) *ret_len = sizeof(*info);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ SECTION_IMAGE_INFORMATION *info = buffer;
|
||||
+
|
||||
+ if (!(protect & VPROT_IMAGE))
|
||||
+ return STATUS_SECTION_NOT_IMAGE;
|
||||
+
|
||||
+ memset( info, 0, sizeof(*info) );
|
||||
+ info->TransferAddress = entry;
|
||||
+ info->ZeroBits = 0; /* FIXME */
|
||||
+ info->MaximumStackSize = 0; /* FIXME */
|
||||
+ info->CommittedStackSize = 0; /* FIXME */
|
||||
+ info->SubSystemType = subsystem;
|
||||
+ info->SubsystemVersionHigh = major_subsystem;
|
||||
+ info->SubsystemVersionLow = minor_subsystem;
|
||||
+ info->ImageCharacteristics = characteristics;
|
||||
+ info->DllCharacteristics = dll_characteristics;
|
||||
+ info->Machine = machine;
|
||||
+ info->ImageContainsCode = TRUE; /* FIXME */
|
||||
+ if (ret_len) *ret_len = sizeof(*info);
|
||||
+ }
|
||||
+
|
||||
+ return STATUS_SUCCESS;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+/***********************************************************************
|
||||
* NtMapViewOfSection (NTDLL.@)
|
||||
* ZwMapViewOfSection (NTDLL.@)
|
||||
*/
|
||||
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
|
||||
index b688a3f..0c94d8e 100644
|
||||
--- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
|
||||
+++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
|
||||
@@ -1351,7 +1351,7 @@
|
||||
@ stdcall ZwQueryInstallUILanguage(ptr) ntdll.ZwQueryInstallUILanguage
|
||||
@ stdcall ZwQueryKey(long long ptr long ptr) ntdll.ZwQueryKey
|
||||
@ stdcall ZwQueryObject(long long long long long) ntdll.ZwQueryObject
|
||||
-@ stdcall ZwQuerySection(long long long long long) ntdll.ZwQuerySection
|
||||
+@ stdcall ZwQuerySection(long long ptr long ptr) ntdll.ZwQuerySection
|
||||
@ stdcall ZwQuerySecurityObject(long long long long long) ntdll.ZwQuerySecurityObject
|
||||
@ stdcall ZwQuerySymbolicLinkObject(long ptr ptr) ntdll.ZwQuerySymbolicLinkObject
|
||||
@ stdcall ZwQuerySystemInformation(long long long long) ntdll.ZwQuerySystemInformation
|
||||
diff --git a/server/mapping.c b/server/mapping.c
|
||||
index fe30450..ec0ef98 100644
|
||||
--- a/server/mapping.c
|
||||
+++ b/server/mapping.c
|
||||
@@ -64,6 +64,15 @@ struct mapping
|
||||
enum cpu_type cpu; /* client CPU (for PE image mapping) */
|
||||
int header_size; /* size of headers (for PE image mapping) */
|
||||
client_ptr_t base; /* default base addr (for PE image mapping) */
|
||||
+ client_ptr_t entry; /* entry point addr (for PE image mapping) */
|
||||
+ mem_size_t stack_reserve; /* stack reserve (for PE image mapping) */
|
||||
+ mem_size_t stack_commit; /* stack commit (for PE image mapping) */
|
||||
+ int subsystem; /* subsystem (for PE image mapping) */
|
||||
+ int major_subsystem; /* major subsystem version (for PE image mapping) */
|
||||
+ int minor_subsystem; /* minor subsystem version (for PE image mapping) */
|
||||
+ int characteristics; /* image characteristics (for PE image mapping) */
|
||||
+ int dll_characteristics; /* dll characteristics (for PE image mapping) */
|
||||
+ int machine; /* image machine type (for PE image mapping) */
|
||||
struct ranges *committed; /* list of committed ranges in this mapping */
|
||||
struct file *shared_file; /* temp file for shared PE mapping */
|
||||
struct list shared_entry; /* entry in global shared PE mappings list */
|
||||
@@ -434,17 +443,34 @@ static unsigned int get_image_params( struct mapping *mapping, int unix_fd, int
|
||||
return STATUS_INVALID_IMAGE_FORMAT;
|
||||
}
|
||||
|
||||
+ mapping->characteristics = nt.FileHeader.Characteristics;
|
||||
+ mapping->machine = nt.FileHeader.Machine;
|
||||
+
|
||||
switch (nt.opt.hdr32.Magic)
|
||||
{
|
||||
case IMAGE_NT_OPTIONAL_HDR32_MAGIC:
|
||||
mapping->size = ROUND_SIZE( nt.opt.hdr32.SizeOfImage );
|
||||
mapping->base = nt.opt.hdr32.ImageBase;
|
||||
mapping->header_size = nt.opt.hdr32.SizeOfHeaders;
|
||||
+ mapping->entry = mapping->base + nt.opt.hdr32.AddressOfEntryPoint;
|
||||
+ mapping->stack_reserve = nt.opt.hdr32.SizeOfStackReserve;
|
||||
+ mapping->stack_commit = nt.opt.hdr32.SizeOfStackCommit;
|
||||
+ mapping->subsystem = nt.opt.hdr32.Subsystem;
|
||||
+ mapping->major_subsystem = nt.opt.hdr32.MajorSubsystemVersion;
|
||||
+ mapping->minor_subsystem = nt.opt.hdr32.MinorSubsystemVersion;
|
||||
+ mapping->dll_characteristics = nt.opt.hdr32.DllCharacteristics;
|
||||
break;
|
||||
case IMAGE_NT_OPTIONAL_HDR64_MAGIC:
|
||||
mapping->size = ROUND_SIZE( nt.opt.hdr64.SizeOfImage );
|
||||
mapping->base = nt.opt.hdr64.ImageBase;
|
||||
mapping->header_size = nt.opt.hdr64.SizeOfHeaders;
|
||||
+ mapping->entry = mapping->base + nt.opt.hdr64.AddressOfEntryPoint;
|
||||
+ mapping->stack_reserve = nt.opt.hdr64.SizeOfStackReserve;
|
||||
+ mapping->stack_commit = nt.opt.hdr64.SizeOfStackCommit;
|
||||
+ mapping->subsystem = nt.opt.hdr64.Subsystem;
|
||||
+ mapping->major_subsystem = nt.opt.hdr64.MajorSubsystemVersion;
|
||||
+ mapping->minor_subsystem = nt.opt.hdr64.MinorSubsystemVersion;
|
||||
+ mapping->dll_characteristics = nt.opt.hdr64.DllCharacteristics;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -490,6 +516,15 @@ static struct object *create_mapping( struct object *root, const struct unicode_
|
||||
|
||||
mapping->header_size = 0;
|
||||
mapping->base = 0;
|
||||
+ mapping->entry = 0;
|
||||
+ mapping->stack_reserve = 0;
|
||||
+ mapping->stack_commit = 0;
|
||||
+ mapping->subsystem = 0;
|
||||
+ mapping->major_subsystem = 0;
|
||||
+ mapping->minor_subsystem = 0;
|
||||
+ mapping->characteristics = 0;
|
||||
+ mapping->dll_characteristics = 0;
|
||||
+ mapping->machine = 0;
|
||||
mapping->fd = NULL;
|
||||
mapping->shared_file = NULL;
|
||||
mapping->committed = NULL;
|
||||
@@ -706,6 +741,13 @@ DECL_HANDLER(get_mapping_info)
|
||||
reply->protect = mapping->protect;
|
||||
reply->header_size = mapping->header_size;
|
||||
reply->base = mapping->base;
|
||||
+ reply->entry = mapping->entry;
|
||||
+ reply->subsystem = mapping->subsystem;
|
||||
+ reply->major_subsystem = mapping->major_subsystem;
|
||||
+ reply->minor_subsystem = mapping->minor_subsystem;
|
||||
+ reply->characteristics = mapping->characteristics;
|
||||
+ reply->dll_characteristics = mapping->dll_characteristics;
|
||||
+ reply->machine = mapping->machine;
|
||||
reply->shared_file = 0;
|
||||
if ((fd = get_obj_fd( &mapping->obj )))
|
||||
{
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index a5a45eb..fdc07a3 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -1675,6 +1675,13 @@ enum char_info_mode
|
||||
int protect; /* protection flags */
|
||||
int header_size; /* header size (for VPROT_IMAGE mapping) */
|
||||
client_ptr_t base; /* default base addr (for VPROT_IMAGE mapping) */
|
||||
+ client_ptr_t entry; /* entry point addr (for PE image mapping) */
|
||||
+ short int subsystem; /* subsystem (for PE image mapping) */
|
||||
+ short int major_subsystem; /* major subsystem version (for PE image mapping) */
|
||||
+ short int minor_subsystem; /* minor subsystem version (for PE image mapping) */
|
||||
+ short int characteristics; /* image characteristics (for PE image mapping) */
|
||||
+ short int dll_characteristics; /* dll characteristics (for PE image mapping) */
|
||||
+ short int machine; /* image machine type (for PE image mapping) */
|
||||
obj_handle_t mapping; /* duplicate mapping handle unless removable */
|
||||
obj_handle_t shared_file; /* shared mapping file handle */
|
||||
@END
|
||||
--
|
||||
2.8.0
|
||||
|
@ -1,24 +1,17 @@
|
||||
From f781fe643462f94c07cef57b28403ab6a3b5348a Mon Sep 17 00:00:00 2001
|
||||
From b28aedb793ed3367b42906a19da394d4e8b93753 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Thu, 16 Oct 2014 23:26:35 +0200
|
||||
Subject: kernel32/tests: Add tests for NtQuerySection. (try 2)
|
||||
|
||||
---
|
||||
dlls/kernel32/tests/virtual.c | 258 ++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 258 insertions(+)
|
||||
dlls/kernel32/tests/virtual.c | 251 ++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 251 insertions(+)
|
||||
|
||||
diff --git a/dlls/kernel32/tests/virtual.c b/dlls/kernel32/tests/virtual.c
|
||||
index 5503e25..fb8d598 100644
|
||||
index 40b1bc9..26e5195 100644
|
||||
--- a/dlls/kernel32/tests/virtual.c
|
||||
+++ b/dlls/kernel32/tests/virtual.c
|
||||
@@ -47,12 +47,30 @@ static PVOID (WINAPI *pRtlAddVectoredExceptionHandler)(ULONG, PVECTORED_EXCEPTI
|
||||
static ULONG (WINAPI *pRtlRemoveVectoredExceptionHandler)(PVOID);
|
||||
static BOOL (WINAPI *pGetProcessDEPPolicy)(HANDLE, LPDWORD, PBOOL);
|
||||
static BOOL (WINAPI *pIsWow64Process)(HANDLE, PBOOL);
|
||||
+static NTSTATUS (WINAPI *pNtQuerySection)(HANDLE, int, PVOID, ULONG, PULONG);
|
||||
static NTSTATUS (WINAPI *pNtProtectVirtualMemory)(HANDLE, PVOID *, SIZE_T *, ULONG, ULONG *);
|
||||
static NTSTATUS (WINAPI *pNtAllocateVirtualMemory)(HANDLE, PVOID *, ULONG, SIZE_T *, ULONG, ULONG);
|
||||
static NTSTATUS (WINAPI *pNtFreeVirtualMemory)(HANDLE, PVOID *, SIZE_T *, ULONG);
|
||||
@@ -56,6 +56,23 @@ static NTSTATUS (WINAPI *pNtFreeVirtualMemory)(HANDLE, PVOID *, SIZE_T *, ULONG)
|
||||
|
||||
/* ############################### */
|
||||
|
||||
@ -42,7 +35,7 @@ index 5503e25..fb8d598 100644
|
||||
static HANDLE create_target_process(const char *arg)
|
||||
{
|
||||
char **argv;
|
||||
@@ -3768,6 +3786,244 @@ static void test_shared_memory_ro(BOOL is_child, DWORD child_access)
|
||||
@@ -3828,6 +3845,239 @@ static void test_shared_memory_ro(BOOL is_child, DWORD child_access)
|
||||
CloseHandle(mapping);
|
||||
}
|
||||
|
||||
@ -103,7 +96,6 @@ index 5503e25..fb8d598 100644
|
||||
+ ok(status == STATUS_SUCCESS, "NtQuerySection error %#x\n", status);
|
||||
+ ok(ret == sizeof(info.basic), "wrong returned size %u\n", ret);
|
||||
+ ok(info.basic.BaseAddress == NULL, "expected NULL, got %p\n", info.basic.BaseAddress);
|
||||
+todo_wine
|
||||
+ ok(info.basic.Attributes == SEC_FILE, "expected SEC_FILE, got %#x\n", info.basic.Attributes);
|
||||
+todo_wine
|
||||
+ ok(info.basic.Size.QuadPart == fsize, "expected %#lx, got %#x/%08x\n", fsize, info.basic.Size.HighPart, info.basic.Size.LowPart);
|
||||
@ -127,7 +119,6 @@ index 5503e25..fb8d598 100644
|
||||
+ ok(status == STATUS_SUCCESS, "NtQuerySection error %#x\n", status);
|
||||
+ ok(ret == sizeof(info.basic), "wrong returned size %u\n", ret);
|
||||
+ ok(info.basic.BaseAddress == NULL, "expected NULL, got %p\n", info.basic.BaseAddress);
|
||||
+todo_wine
|
||||
+ ok(info.basic.Attributes == SEC_FILE, "expected SEC_FILE, got %#x\n", info.basic.Attributes);
|
||||
+todo_wine
|
||||
+ ok(info.basic.Size.QuadPart == fsize, "expected %#lx, got %#x/%08x\n", fsize, info.basic.Size.HighPart, info.basic.Size.LowPart);
|
||||
@ -148,7 +139,6 @@ index 5503e25..fb8d598 100644
|
||||
+ ok(status == STATUS_SUCCESS, "NtQuerySection error %#x\n", status);
|
||||
+ ok(ret == sizeof(info.basic), "wrong returned size %u\n", ret);
|
||||
+ ok(info.basic.BaseAddress == NULL, "expected NULL, got %p\n", info.basic.BaseAddress);
|
||||
+todo_wine
|
||||
+ ok(info.basic.Attributes == (SEC_FILE|SEC_IMAGE), "expected SEC_FILE|SEC_IMAGE, got %#x\n", info.basic.Attributes);
|
||||
+ ok(info.basic.Size.QuadPart == image_size, "expected %#lx, got %#x/%08x\n", image_size, info.basic.Size.HighPart, info.basic.Size.LowPart);
|
||||
+
|
||||
@ -178,9 +168,7 @@ index 5503e25..fb8d598 100644
|
||||
+ ok((ULONG_PTR)info.image.TransferAddress == nt->OptionalHeader.ImageBase + nt->OptionalHeader.AddressOfEntryPoint,
|
||||
+ "expected %#lx, got %p\n", (SIZE_T)(nt->OptionalHeader.ImageBase + nt->OptionalHeader.AddressOfEntryPoint), info.image.TransferAddress);
|
||||
+ ok(info.image.ZeroBits == 0, "expected 0, got %#x\n", info.image.ZeroBits);
|
||||
+todo_wine
|
||||
+ ok(info.image.MaximumStackSize == nt->OptionalHeader.SizeOfStackReserve, "expected %#lx, got %#lx\n", (SIZE_T)nt->OptionalHeader.SizeOfStackReserve, info.image.MaximumStackSize);
|
||||
+todo_wine
|
||||
+ ok(info.image.CommittedStackSize == nt->OptionalHeader.SizeOfStackCommit, "expected %#lx, got %#lx\n", (SIZE_T)nt->OptionalHeader.SizeOfStackCommit, info.image.CommittedStackSize);
|
||||
+ ok(info.image.SubSystemType == nt->OptionalHeader.Subsystem, "expected %#x, got %#x\n", nt->OptionalHeader.Subsystem, info.image.SubSystemType);
|
||||
+ ok(info.image.SubsystemVersionLow == nt->OptionalHeader.MinorSubsystemVersion, "expected %#x, got %#x\n", nt->OptionalHeader.MinorSubsystemVersion, info.image.SubsystemVersionLow);
|
||||
@ -188,6 +176,7 @@ index 5503e25..fb8d598 100644
|
||||
+ ok(info.image.ImageCharacteristics == nt->FileHeader.Characteristics, "expected %#x, got %#x\n", nt->FileHeader.Characteristics, info.image.ImageCharacteristics);
|
||||
+ ok(info.image.DllCharacteristics == nt->OptionalHeader.DllCharacteristics, "expected %#x, got %#x\n", nt->OptionalHeader.DllCharacteristics, info.image.DllCharacteristics);
|
||||
+ ok(info.image.Machine == nt->FileHeader.Machine, "expected %#x, got %#x\n", nt->FileHeader.Machine, info.image.Machine);
|
||||
+todo_wine
|
||||
+ ok(info.image.ImageContainsCode == TRUE, "expected 1, got %#x\n", info.image.ImageContainsCode);
|
||||
+
|
||||
+ memset(&info, 0x55, sizeof(info));
|
||||
@ -196,7 +185,6 @@ index 5503e25..fb8d598 100644
|
||||
+ ok(status == STATUS_SUCCESS, "NtQuerySection error %#x\n", status);
|
||||
+ ok(ret == sizeof(info.basic), "wrong returned size %u\n", ret);
|
||||
+ ok(info.basic.BaseAddress == NULL, "expected NULL, got %p\n", info.basic.BaseAddress);
|
||||
+todo_wine
|
||||
+ ok(info.basic.Attributes == (SEC_FILE|SEC_IMAGE), "expected SEC_FILE|SEC_IMAGE, got %#x\n", info.basic.Attributes);
|
||||
+ ok(info.basic.Size.QuadPart == image_size, "expected %#lx, got %#x/%08x\n", image_size, info.basic.Size.HighPart, info.basic.Size.LowPart);
|
||||
+
|
||||
@ -287,15 +275,7 @@ index 5503e25..fb8d598 100644
|
||||
START_TEST(virtual)
|
||||
{
|
||||
int argc;
|
||||
@@ -3820,6 +4076,7 @@ START_TEST(virtual)
|
||||
pNtUnmapViewOfSection = (void *)GetProcAddress( hntdll, "NtUnmapViewOfSection" );
|
||||
pRtlAddVectoredExceptionHandler = (void *)GetProcAddress( hntdll, "RtlAddVectoredExceptionHandler" );
|
||||
pRtlRemoveVectoredExceptionHandler = (void *)GetProcAddress( hntdll, "RtlRemoveVectoredExceptionHandler" );
|
||||
+ pNtQuerySection = (void *)GetProcAddress( hntdll, "NtQuerySection" );
|
||||
pNtProtectVirtualMemory = (void *)GetProcAddress( hntdll, "NtProtectVirtualMemory" );
|
||||
pNtAllocateVirtualMemory = (void *)GetProcAddress( hntdll, "NtAllocateVirtualMemory" );
|
||||
pNtFreeVirtualMemory = (void *)GetProcAddress( hntdll, "NtFreeVirtualMemory" );
|
||||
@@ -3829,6 +4086,7 @@ START_TEST(virtual)
|
||||
@@ -3891,6 +4141,7 @@ START_TEST(virtual)
|
||||
test_shared_memory_ro(FALSE, FILE_MAP_COPY);
|
||||
test_shared_memory_ro(FALSE, FILE_MAP_COPY|FILE_MAP_WRITE);
|
||||
test_mapping();
|
||||
@ -304,5 +284,5 @@ index 5503e25..fb8d598 100644
|
||||
test_VirtualAlloc_protection();
|
||||
test_VirtualProtect();
|
||||
--
|
||||
2.7.1
|
||||
2.8.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From e25dd58ca9b187745ddfb4b8eb10cbcef24992de Mon Sep 17 00:00:00 2001
|
||||
From 84cdc8afb6575024f2ebab1347cfc6becf41ce06 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Wed, 9 Mar 2016 13:06:13 +0800
|
||||
Subject: server: CreateFileMapping should not fail without SEC_COMMIT for a
|
||||
@ -6,15 +6,15 @@ Subject: server: CreateFileMapping should not fail without SEC_COMMIT for a
|
||||
|
||||
Anonymous file mapping already behaves this way.
|
||||
---
|
||||
dlls/kernel32/tests/virtual.c | 5 ++---
|
||||
dlls/kernel32/tests/virtual.c | 4 +---
|
||||
server/mapping.c | 5 +++--
|
||||
2 files changed, 5 insertions(+), 5 deletions(-)
|
||||
2 files changed, 4 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/tests/virtual.c b/dlls/kernel32/tests/virtual.c
|
||||
index 10e72b2..6d25b5f 100644
|
||||
index 26e5195..866d1b8 100644
|
||||
--- a/dlls/kernel32/tests/virtual.c
|
||||
+++ b/dlls/kernel32/tests/virtual.c
|
||||
@@ -3961,9 +3961,7 @@ todo_wine
|
||||
@@ -4016,9 +4016,7 @@ todo_wine
|
||||
|
||||
SetLastError(0xdeadbef);
|
||||
mapping = CreateFileMappingA(file, NULL, PAGE_READONLY|SEC_RESERVE, 0, 0, NULL);
|
||||
@ -24,11 +24,9 @@ index 10e72b2..6d25b5f 100644
|
||||
|
||||
memset(&info, 0x55, sizeof(info));
|
||||
ret = 0xdeadbeef;
|
||||
@@ -3971,11 +3969,12 @@ todo_wine
|
||||
ok(status == STATUS_SUCCESS, "NtQuerySection error %#x\n", status);
|
||||
@@ -4027,10 +4025,10 @@ todo_wine
|
||||
ok(ret == sizeof(info.basic), "wrong returned size %u\n", ret);
|
||||
ok(info.basic.BaseAddress == NULL, "expected NULL, got %p\n", info.basic.BaseAddress);
|
||||
+todo_wine
|
||||
ok(info.basic.Attributes == SEC_FILE, "expected SEC_FILE, got %#x\n", info.basic.Attributes);
|
||||
+todo_wine
|
||||
ok(info.basic.Size.QuadPart == fsize, "expected %#lx, got %#x/%08x\n", fsize, info.basic.Size.HighPart, info.basic.Size.LowPart);
|
||||
@ -39,12 +37,12 @@ index 10e72b2..6d25b5f 100644
|
||||
|
||||
SetLastError(0xdeadbef);
|
||||
diff --git a/server/mapping.c b/server/mapping.c
|
||||
index ec0ef98..aa38193 100644
|
||||
index 71c3437..c223037 100644
|
||||
--- a/server/mapping.c
|
||||
+++ b/server/mapping.c
|
||||
@@ -539,8 +539,9 @@ static struct object *create_mapping( struct object *root, const struct unicode_
|
||||
@@ -529,8 +529,9 @@ static struct object *create_mapping( struct object *root, const struct unicode_
|
||||
|
||||
if (!(protect & VPROT_COMMITTED))
|
||||
if (flags & SEC_RESERVE)
|
||||
{
|
||||
- set_error( STATUS_INVALID_PARAMETER );
|
||||
- goto error;
|
||||
@ -55,5 +53,5 @@ index ec0ef98..aa38193 100644
|
||||
if (!(file = get_file_obj( current->process, handle, access ))) goto error;
|
||||
fd = get_obj_fd( (struct object *)file );
|
||||
--
|
||||
2.7.1
|
||||
2.8.0
|
||||
|
||||
|
@ -1,76 +0,0 @@
|
||||
From 83766ac8e17968e234462a35588bc0765a0f35aa Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Wed, 9 Mar 2016 13:51:59 +0800
|
||||
Subject: ntdll: For section queries return real file size.
|
||||
|
||||
---
|
||||
dlls/kernel32/tests/virtual.c | 4 ----
|
||||
dlls/ntdll/virtual.c | 9 +++++++++
|
||||
2 files changed, 9 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/tests/virtual.c b/dlls/kernel32/tests/virtual.c
|
||||
index 6d25b5f..485e2f3 100644
|
||||
--- a/dlls/kernel32/tests/virtual.c
|
||||
+++ b/dlls/kernel32/tests/virtual.c
|
||||
@@ -3844,7 +3844,6 @@ static void test_NtQuerySection(void)
|
||||
ok(info.basic.BaseAddress == NULL, "expected NULL, got %p\n", info.basic.BaseAddress);
|
||||
todo_wine
|
||||
ok(info.basic.Attributes == SEC_FILE, "expected SEC_FILE, got %#x\n", info.basic.Attributes);
|
||||
-todo_wine
|
||||
ok(info.basic.Size.QuadPart == fsize, "expected %#lx, got %#x/%08x\n", fsize, info.basic.Size.HighPart, info.basic.Size.LowPart);
|
||||
|
||||
status = pNtQuerySection(mapping, SectionImageInformation, &info, sizeof(info.basic), &ret);
|
||||
@@ -3868,7 +3867,6 @@ todo_wine
|
||||
ok(info.basic.BaseAddress == NULL, "expected NULL, got %p\n", info.basic.BaseAddress);
|
||||
todo_wine
|
||||
ok(info.basic.Attributes == SEC_FILE, "expected SEC_FILE, got %#x\n", info.basic.Attributes);
|
||||
-todo_wine
|
||||
ok(info.basic.Size.QuadPart == fsize, "expected %#lx, got %#x/%08x\n", fsize, info.basic.Size.HighPart, info.basic.Size.LowPart);
|
||||
|
||||
UnmapViewOfFile(p);
|
||||
@@ -3954,7 +3952,6 @@ todo_wine
|
||||
ok(info.basic.BaseAddress == NULL, "expected NULL, got %p\n", info.basic.BaseAddress);
|
||||
todo_wine
|
||||
ok(info.basic.Attributes == SEC_FILE, "expected SEC_FILE, got %#x\n", info.basic.Attributes);
|
||||
-todo_wine
|
||||
ok(info.basic.Size.QuadPart == fsize, "expected %#lx, got %#x/%08x\n", fsize, info.basic.Size.HighPart, info.basic.Size.LowPart);
|
||||
|
||||
CloseHandle(mapping);
|
||||
@@ -3971,7 +3968,6 @@ todo_wine
|
||||
ok(info.basic.BaseAddress == NULL, "expected NULL, got %p\n", info.basic.BaseAddress);
|
||||
todo_wine
|
||||
ok(info.basic.Attributes == SEC_FILE, "expected SEC_FILE, got %#x\n", info.basic.Attributes);
|
||||
-todo_wine
|
||||
ok(info.basic.Size.QuadPart == fsize, "expected %#lx, got %#x/%08x\n", fsize, info.basic.Size.HighPart, info.basic.Size.LowPart);
|
||||
|
||||
CloseHandle(mapping);
|
||||
diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
|
||||
index 5a8d85c..f00aae9 100644
|
||||
--- a/dlls/ntdll/virtual.c
|
||||
+++ b/dlls/ntdll/virtual.c
|
||||
@@ -2538,6 +2538,7 @@ NTSTATUS WINAPI SYSCALL(NtQuerySection)( HANDLE handle, SECTION_INFORMATION_CLAS
|
||||
short machine, subsystem;
|
||||
short major_subsystem, minor_subsystem;
|
||||
short characteristics, dll_characteristics;
|
||||
+ int unix_fd, needs_close;
|
||||
NTSTATUS res;
|
||||
|
||||
if (info_class == SectionBasicInformation)
|
||||
@@ -2579,6 +2580,14 @@ NTSTATUS WINAPI SYSCALL(NtQuerySection)( HANDLE handle, SECTION_INFORMATION_CLAS
|
||||
SERVER_END_REQ;
|
||||
if (res) return res;
|
||||
|
||||
+ if (!(protect & VPROT_IMAGE) && dup_mapping &&
|
||||
+ !server_get_unix_fd( dup_mapping, 0, &unix_fd, &needs_close, NULL, NULL ))
|
||||
+ {
|
||||
+ struct stat st;
|
||||
+ if (!fstat( unix_fd, &st )) size.QuadPart = st.st_size;
|
||||
+ if (needs_close) close( unix_fd );
|
||||
+ }
|
||||
+
|
||||
if (dup_mapping) close_handle( dup_mapping );
|
||||
if (shared_file) close_handle( shared_file );
|
||||
|
||||
--
|
||||
2.7.1
|
||||
|
@ -1,2 +0,0 @@
|
||||
Fixes: [37338] Support for NtQuerySection
|
||||
# Depends: ntdll-Syscall_Wrappers
|
@ -51,13 +51,13 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "267e8e3eeb6d0b6e8ccab809fddd27bae05cbfc2"
|
||||
echo "b54a8dda844a1a43d1dff22eff0ea206be5c630c"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
version()
|
||||
{
|
||||
echo "Wine Staging 1.9.15"
|
||||
echo "Wine Staging 1.9.16 (unreleased)"
|
||||
echo "Copyright (C) 2014-2016 the Wine Staging project authors."
|
||||
echo ""
|
||||
echo "Patchset to be applied on upstream Wine:"
|
||||
@ -2975,22 +2975,15 @@ fi
|
||||
# | This patchset has the following (direct or indirect) dependencies:
|
||||
# | * d3dx9_36-GetShaderSemantics
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#37919] Implement d3dx9_36.D3DXCreateTextureShader with stub interface
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/d3dx9_36/d3dx9_36.spec, dlls/d3dx9_36/shader.c, dlls/d3dx9_36/tests/shader.c, include/d3dx9tex.h
|
||||
# | * dlls/d3dx9_36/d3dx9_36.spec, dlls/d3dx9_36/shader.c, dlls/d3dx9_36/tests/shader.c
|
||||
# |
|
||||
if test "$enable_d3dx9_36_D3DXDisassembleShader" -eq 1; then
|
||||
patch_apply d3dx9_36-D3DXDisassembleShader/0001-d3dx9_36-Implement-D3DXCreateTextureShader-with-stub.patch
|
||||
patch_apply d3dx9_36-D3DXDisassembleShader/0002-include-Fix-prototypes-of-D3DXFillXXXTextureTx-for-d.patch
|
||||
patch_apply d3dx9_36-D3DXDisassembleShader/0003-d3dx9_36-Add-stub-for-D3DXFillCubeTextureTX.patch
|
||||
patch_apply d3dx9_36-D3DXDisassembleShader/0004-d3dx9_36-Implement-D3DXDisassembleShader.patch
|
||||
patch_apply d3dx9_36-D3DXDisassembleShader/0005-d3dx9_36-tests-Add-initial-tests-for-D3DXDisassemble.patch
|
||||
patch_apply d3dx9_36-D3DXDisassembleShader/0006-d3dx9_36-tests-Add-additional-tests-for-special-case.patch
|
||||
(
|
||||
echo '+ { "Christian Costa", "d3dx9_36: Implement D3DXCreateTextureShader with stubbed ID3DXTextureShader interface.", 1 },';
|
||||
echo '+ { "Christian Costa", "include: Fix prototypes of D3DXFillXXXTextureTx for d3dx9.", 1 },';
|
||||
echo '+ { "Christian Costa", "d3dx9_36: Add stub for D3DXFillCubeTextureTX.", 1 },';
|
||||
echo '+ { "Christian Costa", "d3dx9_36: Implement D3DXDisassembleShader.", 2 },';
|
||||
echo '+ { "Sebastian Lackner", "d3dx9_36/tests: Add initial tests for D3DXDisassembleShader.", 1 },';
|
||||
@ -4978,23 +4971,15 @@ fi
|
||||
|
||||
# Patchset ntdll-NtQuerySection
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#37338] Support for NtQuerySection
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/kernel32/tests/virtual.c, dlls/ntdll/nt.c, dlls/ntdll/ntdll.spec, dlls/ntdll/virtual.c,
|
||||
# | dlls/ntoskrnl.exe/ntoskrnl.exe.spec, server/mapping.c, server/protocol.def
|
||||
# | * dlls/kernel32/tests/virtual.c, server/mapping.c
|
||||
# |
|
||||
if test "$enable_ntdll_NtQuerySection" -eq 1; then
|
||||
patch_apply ntdll-NtQuerySection/0001-ntdll-Implement-NtQuerySection.patch
|
||||
patch_apply ntdll-NtQuerySection/0002-kernel32-tests-Add-tests-for-NtQuerySection.patch
|
||||
patch_apply ntdll-NtQuerySection/0003-server-CreateFileMapping-should-not-fail-without-SEC.patch
|
||||
patch_apply ntdll-NtQuerySection/0004-ntdll-For-section-queries-return-real-file-size.patch
|
||||
(
|
||||
echo '+ { "Dmitry Timoshkov", "ntdll: Implement NtQuerySection.", 2 },';
|
||||
echo '+ { "Dmitry Timoshkov", "kernel32/tests: Add tests for NtQuerySection.", 2 },';
|
||||
echo '+ { "Dmitry Timoshkov", "server: CreateFileMapping should not fail without SEC_COMMIT for a named file section.", 1 },';
|
||||
echo '+ { "Dmitry Timoshkov", "ntdll: For section queries return real file size.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
|
@ -1 +1 @@
|
||||
Wine Staging 1.9.15
|
||||
Wine Staging 1.9.16 (unreleased)
|
||||
|
Loading…
Reference in New Issue
Block a user