Visual C#

IWInput opjInput = new WInputClass();
IWResult opjResult = new WResultClass();
long hwnd = 0;
long x1 = 0;
long x2 = 0;
long y1 = 0;
long y2 = 0;
long ContextWordsLeft = 0;
long ContextWordsRight = 0;
//Set this values
...
opjInput.Hwnd = hwnd;
opjInput.StartX = x1;
opjInput.StartY = y1;
opjInput.EndX = x2;
opjInput.EndY = y2;
opjInput.ContextWordsLeft = ContextWordsLeft;
opjInput.ContextWordsRight = ContextWordsRight;
try
{
opjResult = capture.Capture(opjInput);
}
catch(Exception e)
{
MessageBox.Show(e.Message);
}
Comments