Closed ForestJay closed 8 years ago
Sorry for the delay.
Try attaching the debugger to the target application, then inject / hook etc.. and then see where the problem arises.
Unfortunately that error is fairly unhelpful (it is a DirectX error), and will generally mean that some part of the call has incompatible parameters, either with the DirectX device or other elements (e.g. trying to use a texture format that is not available for that particular device due to the way it was created by the game).
Thank you! I've moved onto another project but might come back to this in the future.
@ForestJay what project are You using? Could You please post link to it? Thanks.
Unfortunately, it is in a private repository. I might be able to share the specific code but we are keeping the repo private for now.
On Nov 2, 2016 12:40 AM, "Tomek" notifications@github.com wrote:
@ForestJay https://github.com/ForestJay what project are You using? Could You please post link to it? Thanks.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/spazzarama/Direct3DHook/issues/43#issuecomment-257793444, or mute the thread https://github.com/notifications/unsubscribe-auth/AHeitfO-MMMxwIB4hZmHrwmcruCesWLSks5q6D6JgaJpZM4IzOWq .
@ForestJay I'm building ambilight clone, so I'll be more than happy to have it working with newest games. If You can share code responsible for grabbing (recording) screen that would be awesome!
Hello,
First, thank you so much for creating this tool! Without it I don't know how I'd capture screenshots from Direct3D games.
Most games (like Portal 2) work fine using the capture.dll straight from a clone of master (ie: I made no changes to the Direct3DHook code). When I try to get screenshots from Rise of the Tomb Raider the following exception occurs:
DXHookD3D11: PresentHook: Request Start
DXHookD3D11: PresentHook: Exeception: SharpDX.SharpDXException: SharpDX.SharpDXException: HRESULT: [0x80070057], Module: [General], ApiCode: [E_INVALIDARG/Invalid Arguments], Message: The parameter is incorrect.
at SharpDX.Result.CheckError() at SharpDX.Direct3D11.Device.CreateTexture2D(Texture2DDescription& descRef, DataBox[] initialDataRef, Texture2D texture2DOut) at SharpDX.Direct3D11.Texture2D..ctor(Device device, Texture2DDescription description) at Capture.Hook.DXHookD3D11.EnsureResources(Device device, Texture2DDescription description, Rectangle captureRegion, ScreenshotRequest request) in C:\Users\fores\git\Direct3DHook\Capture\Hook\DXHookD3D11.cs:line 280 at Capture.Hook.DXHookD3D11.PresentHook(IntPtr swapChainPtr, Int32 syncInterval, PresentFlags flags) in C:\Users\fores\git\Direct3DHook\Capture\Hook\DXHookD3D11.cs:line 355
When I load the symbols for capture.dll the debugger never stops at the code listed in this exception. For reference, I have DirectX12 installed and am running Windows 10. I've tried the game with DirectX 12 enabled and disabled.
This could very well be an issue with my code, but that exception doesn't tell me what argument is wrong or why it is wrong.
Here is my calling code:
` using System; using System.Diagnostics; using System.Threading; using System.Drawing; using Capture.Hook; using Capture.Interface; using Capture; using System.IO;
`
Any help would be greatly appreciated. Thank you!