A powerful screen capturer and Keyboard/mouse input simulator(Support Windows UAC\Winlogon\DirectShowOverlay)./Windows 高级桌面截图和输入控制工具,支持UAC、Winlogon、DirectShowOverlay窗口(基于 dll 注入 hook)。
Switch branches/tags
Nothing to show
Clone or download
Latest commit a5183e8 Jul 16, 2016
Type Name Latest commit message Commit time
Failed to load latest commit information.
JNI fixed issue #10 Jul 16, 2016
Java begin git Oct 10, 2015
doc begin git Oct 10, 2015
.gitignore fixed issue #10 Jul 16, 2016
Doxyfile begin git Oct 10, 2015
LICENSE Create LICENSE May 8, 2016
README.md Update README.md May 27, 2016
WinRobot.jar Added files via upload May 7, 2016


About WinRobot

![Gitter](https://badges.gitter.im/Join Chat.svg) GitHub license

  • A powerful & high performance screen capturer and Keyboard/mouse input simulator(Support Windows UAC\Winlogon\DirectShowOverlay).
  • (Optional)An implementation of java.awt.Robot under windows

User Manual

Compiling from source on Windows

About the files:

WinRobot\JNI The c++ part of the project
WinRobot\Java The java part of the project
  • Build C++ part: Add/adjust the following environment variables (via Control Panel/System/Advanced/Environment Variables):set JDKDIR to the path of jdk include,for example "c:\Program Files\Java\jdk1.6.0_22\include" The c++ part files are provided for Visual Studio 2010 sp1.The next step is to open "WinRobot\JNI\WinRobot.sln" and build the solution.The output directory is "WinRobot\bin\debug" and "WinRobot\bin\release".If all succeed,the following targets will be created:WinRobotHost.exe,JNIAdapter.dll,WinRobotCore.dll,WinRobotHook.dll,WinRobotHostPS.dll.

    About the output files:

      JNIAdapter*.dll WinRobot JNI library,load by JAVA part.
      WinRobotCore*.dll COM component:WinRobotService and WinRobotSession.
      WinRobotHook*.dll Provide API hook ability,used to hook DirectDraw Overlay API.
      WinRobotHost*.exe the service executable file.
      WinRobotHostPS*.dll Proxy dll for WinRobotHost*.exe,needed by ATL service.
  • Build java part: make sure you have install Java sdk 1.6+. Use NetBeans to open the project("WinRobot\java\WinRobot").Copy c++ output files(WinRobotHost*.exe,JNIAdapter*.dll,WinRobotCore*.dll,WinRobotHook*.dll,WinRobotHostPS*.dll) to WinRobot\Java\WinRobot\build\classes, to package them to the WinRobot.jar,


For Win32:

WinRobotHostx32.exe -I

For Win64:

WinRobotHostx64.exe -I

How to use


#ifdef _WIN64
#import "WinRobotCorex64.dll" raw_interfaces_only, raw_native_types,auto_search,no_namespace
#import "WinRobotHostx64.exe" auto_search,no_namespace
#import "WinRobotCorex86.dll" raw_interfaces_only, raw_native_types,auto_search,no_namespace
#import "WinRobotHostx86.exe" auto_search,no_namespace

CComPtr<IWinRobotService> pService;
hr = pService.CoCreateInstance(__uuidof(ServiceHost) );

//get active console session
CComPtr<IUnknown> pUnk;
hr = pService->GetActiveConsoleSession(&pUnk);
CComQIPtr<IWinRobotSession> pSession = pUnk;

// capture screen
pUnk = 0;
hr = pSession->CreateScreenCapture(0,0,1024,768,&pUnk);

// get screen image data(with file mapping)
CComQIPtr<IScreenBufferStream> pBuffer = pUnk;
CComBSTR name;
ULONG size = 0;
CFileMapping fm;
// do something with fm...

// get screen image data(with stream read)
CComQIPtr<ISequentialStream> pStream = pUnk;
char buf[1024];
ULONG cbBuffer  = 0 ;
while (pStream->Read(buf,sizeof(buf),&cbBuffer) == S_OK ){
    //	do something


import com.caoym.WinRobot;
WinRobot robot;
BufferedImage screen = robot.createScreenCapture(new Rectangle(0, 0, 1024, 768));