C# Class ScreenshotInject.DXHookD3D9

Inheritance: BaseDXHook
显示文件 Open project: stani/GScreensTool

Public Methods

Method Description
Cleanup ( ) : void

Just ensures that the surface we created is cleaned up.

DXHookD3D9 ( ScreenshotInterface ssInterface ) : System
Hook ( ) : void

Protected Methods

Method Description
DrawText ( Object dev, String text, String text2 = null, int alpha ) : void

Private Methods

Method Description
BitBlt ( IntPtr hdc, int nXDest, int nYDest, int nWidth, int nHeight, IntPtr hdcSrc, int nXSrc, int nYSrc, Int32 dwRop ) : bool
CopyStream ( Stream input, String filename ) : void
DrawSprite ( Device device ) : void
EndSceneHook ( IntPtr devicePtr ) : int

Hook for IDirect3DDevice9.EndScene

Remember that this is called many times a second by the Direct3D application - be mindful of memory and performance!

PresentHook ( IntPtr devicePtr, RECT src, RECT dst, IntPtr handle, IntPtr regdata ) : int
ProcessRequest ( ) : void

Copies the _renderTarget surface into a stream and starts a new thread to send the data back to the host process

ResetHook ( IntPtr devicePtr, D3DPRESENT_PARAMETERS &presentParameters ) : int

The IDirect3DDevice9.Reset function definition

Reset the _renderTarget so that we are sure it will have the correct presentation parameters (required to support working across changes to windowed/fullscreen or resolution changes)

RetrieveImageData ( object param ) : void

ParameterizedThreadStart method that places the image data from the stream into a byte array and then sets the Interface screenshot response. This can be called asynchronously.

The stream object passed will be closed!

SaveFileOld ( object param ) : void
copyBuffer ( Device device, Surface bb ) : void

Method Details

Cleanup() public method

Just ensures that the surface we created is cleaned up.
public Cleanup ( ) : void
return void

DXHookD3D9() public method

public DXHookD3D9 ( ScreenshotInterface ssInterface ) : System
ssInterface ScreenshotInterface
return System

DrawText() protected method

protected DrawText ( Object dev, String text, String text2 = null, int alpha ) : void
dev Object
text String
text2 String
alpha int
return void

Hook() public method

public Hook ( ) : void
return void