docs: def _captureScreen(self, device_name):
          """ Captures a bitmap from the given monitor device name
  
          Returns as a PIL Image (BGR rather than RGB, for compatibility with OpenCV)
          """
  
          ## Define constants/structs
          class HBITMAP(ctypes.Structure):
              _fields_ = [("bmType", ctypes.c_long),
                          ("bmWidth", ctypes.c_long),
                          ("bmHeight", ctypes.c_long),
                          ("bmWidthBytes", ctypes.c_long),
                          ("bmPlanes", ctypes.wintypes.WORD),
                          ("bmBitsPixel", ctypes.wintypes.WORD),
                          ("bmBits", ctypes.wintypes.LPVOID)]
          class BITMAPINFOHEADER(ctypes.Structure):
              _fields_ = [("biSize", ctypes.wintypes.DWORD),
                          ("biWidth", ctypes.c_long),
                          ("biHeight", ctypes.c_long),
                          ("biPlanes", ctypes.wintypes.WORD),
                          ("biBitCount", ctypes.wintypes.WORD),
                          ("biCompression", ctypes.wintypes.DWORD),
                          ("biSizeImage", ctypes.wintypes.DWORD),
                          ("biXPelsPerMeter", ctypes.c_long),
                          ("biYPelsPerMeter", ctypes.c_long),
                          ("biClrUsed", ctypes.wintypes.DWORD),
                          ("biClrImportant", ctypes.wintypes.DWORD)]
          class BITMAPINFO(ctypes.Structure):
              _fields_ = [("bmiHeader", BITMAPINFOHEADER),
                          ("bmiColors", ctypes.wintypes.DWORD*3)]
          HORZRES = ctypes.c_int(8)
          VERTRES = ctypes.c_int(10)
          SRCCOPY =    0x00CC0020
          CAPTUREBLT = 0x40000000
          DIB_RGB_COLORS = 0
  
          ## Begin logic
          self._gdi32.CreateDCW.restype = ctypes.c_void_p
          hdc = self._gdi32.CreateDCW(ctypes.c_wchar_p(str(device_name)), 0, 0, 0) # Convert to bytestring for c_wchar_p type
          if hdc == 0:
              raise ValueError("Empty hdc provided")
  
          # Get monitor specs
          self._gdi32.GetDeviceCaps.argtypes = [ctypes.c_void_p, ctypes.c_int]
          screen_width = self._gdi32.GetDeviceCaps(hdc, HORZRES)
          screen_height = self._gdi32.GetDeviceCaps(hdc, VERTRES)
  
          # Create memory device context for monitor
          self._gdi32.CreateCompatibleDC.restype = ctypes.c_void_p
          self._gdi32.CreateCompatibleDC.argtypes = [ctypes.c_void_p]
          hCaptureDC = self._gdi32.CreateCompatibleDC(hdc)
          if hCaptureDC == 0:
              raise WindowsError("gdi:CreateCompatibleDC failed")
  
          # Create bitmap compatible with monitor
          self._gdi32.CreateCompatibleBitmap.restype = ctypes.c_void_p
          self._gdi32.CreateCompatibleBitmap.argtypes = [ctypes.c_void_p, ctypes.c_int, ctypes.c_int]
          hCaptureBmp = self._gdi32.CreateCompatibleBitmap(hdc, screen_width, screen_height)
          if hCaptureBmp == 0:
              raise WindowsError("gdi:CreateCompatibleBitmap failed")
  
          # Select hCaptureBmp into hCaptureDC device context
          self._gdi32.SelectObject.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
          self._gdi32.SelectObject(hCaptureDC, hCaptureBmp)
  
          # Perform bit-block transfer from screen to device context (and thereby hCaptureBmp)
          self._gdi32.BitBlt.argtypes = [
              ctypes.c_void_p,
              ctypes.c_int,
              ctypes.c_int,
              ctypes.c_int,
              ctypes.c_int,
              ctypes.c_void_p,
              ctypes.c_int,
              ctypes.c_int,
              ctypes.c_ulong
          ]
          self._gdi32.BitBlt(hCaptureDC, 0, 0, screen_width, screen_height, hdc, 0, 0, SRCCOPY | CAPTUREBLT)
  
          # Capture image bits from bitmap
          img_info = BITMAPINFO()
          img_info.bmiHeader.biSize = ctypes.sizeof(BITMAPINFOHEADER)
          img_info.bmiHeader.biWidth = screen_width
          img_info.bmiHeader.biHeight = screen_height
          img_info.bmiHeader.biPlanes = 1
          img_info.bmiHeader.biBitCount = 32
          img_info.bmiHeader.biCompression = 0
          img_info.bmiHeader.biClrUsed = 0
          img_info.bmiHeader.biClrImportant = 0
  
          buffer_length = screen_width * 4 * screen_height
          image_data = ctypes.create_string_buffer(buffer_length)
  
          self._gdi32.GetDIBits.restype = ctypes.c_int
          self._gdi32.GetDIBits.argtypes = [
              ctypes.c_void_p,
              ctypes.c_void_p,
              ctypes.c_uint,
              ctypes.c_uint,
              ctypes.c_void_p,
              ctypes.c_void_p,
              ctypes.c_uint
          ]
          scanlines = self._gdi32.GetDIBits(
              hCaptureDC,
              hCaptureBmp,
              0,
              screen_height,
              ctypes.byref(image_data),
              ctypes.byref(img_info),
              DIB_RGB_COLORS)
          if scanlines != screen_height:
              raise WindowsError("gdi:GetDIBits failed")
          final_image = ImageOps.flip(
              Image.frombuffer(
                  "RGBX",
                  (screen_width, screen_height),
                  image_data,
                  "raw",
                  "RGBX",
                  0,
                  1))
          # Destroy created device context & GDI bitmap
          self._gdi32.DeleteObject.argtypes = [ctypes.c_void_p]
          self._gdi32.DeleteObject(hdc)
          self._gdi32.DeleteObject(hCaptureDC)
          self._gdi32.DeleteObject(hCaptureBmp)
          return final_image