int imgHeight = bm.bmHeight;
int /* long */hDC = Extension.GetDC(0);
int /* long */srcHdc = Extension.CreateCompatibleDC(hDC);
int /* long */oldSrcBitmap = Extension.SelectObject(srcHdc, hBitmap);
int /* long */memHdc = Extension.CreateCompatibleDC(hDC);
BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER();
bmiHeader.biSize = BITMAPINFOHEADER.sizeof;
bmiHeader.biWidth = imgWidth;
bmiHeader.biHeight = -imgHeight;
bmiHeader.biPlanes = 1;
bmiHeader.biBitCount = (short) 32;