Showing posts with label fix. Show all posts
Showing posts with label fix. Show all posts

Saturday, March 25, 2017

GUIDE Fix status 6 while flashing ROMs

GUIDE Fix status 6 while flashing ROMs


I often find myself needing to query the phones screen dimensions or needing to take a screen shot for demo purposes. This usually resulted in me recycling some of the screen scraping code I wrote for Omnipresence (a prototype cross platform remote desktop type client). I figured I may as well post this code since its been pretty handy to me, and that others may find it handy as well.

The code below lets you do just that:

  • PixelDimensions - Returns the devices resolution.
  • GetScreenCapture - Capture the current contents of a screen to a bitmap that can then be saved/manipulated however you please.
using System; using System.Runtime.InteropServices; using System.Drawing; using System.Drawing.Imaging; namespace WindowsMobile.Utilities { public class DeviceScreen { enum RasterOperation : uint { SRC_COPY = 0x00CC0020 } [DllImport("coredll.dll")] static extern int BitBlt(IntPtr hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, IntPtr hdcSrc, int nXSrc, int nYSrc, RasterOperation rasterOperation); [DllImport("coredll.dll")] private static extern IntPtr GetDC(IntPtr hwnd); [DllImport("coredll.dll")] private static extern int GetDeviceCaps(IntPtr hdc, DeviceCapsIndex nIndex); enum DeviceCapsIndex : int { HORZRES = 8, VERTRES = 10, } public static Size PixelDimensions { get { IntPtr hdc = GetDC(IntPtr.Zero); return new Size(GetDeviceCaps(hdc, DeviceCapsIndex.HORZRES), GetDeviceCaps(hdc, DeviceCapsIndex.VERTRES)); } } public static Bitmap GetScreenCapture() { IntPtr hdc = GetDC(IntPtr.Zero); Size size = PixelDimensions; Bitmap bitmap = new Bitmap(size.Width, size.Height, PixelFormat.Format16bppRgb565); using (Graphics graphics = Graphics.FromImage(bitmap)) { IntPtr dstHdc = graphics.GetHdc(); BitBlt(dstHdc, 0, 0, size.Width, size.Height, hdc, 0, 0, RasterOperation.SRC_COPY); graphics.ReleaseHdc(dstHdc); } return bitmap; } } }

Go to link for download

Read more »

Friday, March 17, 2017

How to Fix a MTP USB Device Driver Problem SURE WAY

How to Fix a MTP USB Device Driver Problem SURE WAY


 I connected my Android phone to my PC and I heard the USB connection sound but my phone’s storages weren’t detected (both Internal and SD card). I checked under Device Manager and noticed that MTP had a warning icon (yellow triangle) on it meaning it had somehow malfunctioned.


The i try solving the problem by Downloading MPT (Media Transfer Protocol) Porting Kit from Microsofts official website yet it didnt solve the issue!


>>To Fix MTP USB Device Driver Problem

Go to Device Manager, under Portable Devices, right-click on MTP USB Device, and then click on Update Driver Software to update the MTP USB device driver.


>>Select “Let me pick from a List of device drivers on your computer”. The list will show installed driver software compatible with the device. 



>>Select the driver you want to install and then click “Next”. Reconnect your mobile phone to your computer.
You will found out that is now working!!! :) dont forget to drop your experience in the comment box....

Go to link for download

Read more »