private void SaveRawImageToFile(IntPtr rawimage, int width, int height, string fileName, GrCaptureImageFormat imageFormat) { int errorCode = 0; try { errorCode = GrFingerprintProxy.GrCapSaveRawImageToFile(rawimage, width, height, fileName, imageFormat); } catch (AccessViolationException exception) { FingerprintException exception2 = new FingerprintException(-7, exception); throw exception2; } FingerprintException.CheckError(errorCode); }