code: def SetClipboardData(type, content):
  	
  	allocators = {
  		clipboard.CF_TEXT: ctypes.create_string_buffer,
  		clipboard.CF_UNICODETEXT: ctypes.create_unicode_buffer,
  		clipboard.CF_HTML: ctypes.create_string_buffer,
  	}
  	if type not in allocators:
  		raise NotImplementedError(
  			"Only text and HTML types are supported at this time")
  	# allocate the memory for the data
  	content = allocators[type](content)
  	flags = memory.GMEM_MOVEABLE
  	size = ctypes.sizeof(content)
  	handle_to_copy = windll.kernel32.GlobalAlloc(flags, size)
  	with LockedMemory(handle_to_copy) as lm:
  		ctypes.memmove(lm.data_ptr, content, size)
  	result = clipboard.SetClipboardData(type, handle_to_copy)
  	if result is None:
  		raise WindowsError()
docs: Modeled after http://msdn.microsoft.com
  	/en-us/library/ms649016%28VS.85%29.aspx
  	#_win32_Copying_Information_to_the_Clipboard