directx - C# Capturing A Fullscreen Game With SlimDX -


I recently created an application that takes screenshots of the game.

At first I captured GDI, but for this I had to disable the arrow on winter 7 / VO and I had some problems on Windows XP.

With this I decided that by going with DirectX and Microsoft's DX is not working for me, I found this fantastic example of a SlimDex Screen Capture (http://spazzarama.wordpress.com/ 2009/02/07 / screencapture-with-direct3d /)

Slimdex did great work! And also allowed me to capture a game without disabling the air on win7 / vis

The only problem - when I switch the game to full screen, I get the "D3DERR_Vivilost: Device lost (-2005530520)".

Can anyone recommend a way to customize the code, capture the fullscreen application?

Note: I have a way that can determine whether the game is full screen or windowed.

And I change this line:

  bitmap = new bitmap (SlimDX.Direct3D9.Surface.ToStream (surface, SlimDX.Direct3D9.ImageFileFormat.bmp, new rectangle (Area. Lift, area top, area area, area .high)));   

To do this:

  bitmap = new bitmap (SlimDX.Direct3D9.Surface.ToStream (Surface, SlimDX.Direct3D9.ImageFileFormat.bmp)) ;    

When a direct 3D device enters fullscreen mode, this video card Provides exclusive access to. From:

When a direct 3D object accepts unique mode, which goes on full screen, all the other devices are kept in the lost state.

I do not have any way to work with your tech to take a screenshot of any other application after going into the 'Thunderbird' unique mode. My understanding is that other applications that achieve the status of fullscreen surfaces (i.e. video recording programs and similar), by themselves injecting their own code into direct 3D libraries do so, it is a non-trivial attempt; You can try searching for "direct x code injection" or something similar if you are interested in going to that road.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -