logging.debug(str(ctypes.FormatError(ctypes.GetLastError()))# prev set size call needs to processtime.sleep(0.2)# set window sizeself.set_window_size(self.window_width, self.window_height)# init read buffersself.tc = ctypes.create_unicode_buffer(self.buffer_width) self.ac = ctypes.create_u...
create_unicode_buffer(260) buf2 = ctypes.create_unicode_buffer(1024) SHGetSpecialFolderPath = ctypes.windll.shell32.SHGetSpecialFolderPathW if SHGetSpecialFolderPath(None, buf, csidl, False): if GetShortPathName(buf, buf2, 1024): return buf2.value else: return buf.value else: return None...
stringBuffer = ctypes.create_unicode_buffer(textLenInCharacters +1)# +1 for the \0 at the end of the null-terminated string.ctypes.windll.user32.GetWindowTextW(window_obj.hWnd, stringBuffer, textLenInCharacters +1)# TODO it's ambiguous if an error happened or the title text is just empty...
path_buf = wintypes.create_unicode_buffer(wintypes.MAX_PATH) result = _SHGetFolderPath(0, CSIDL_APPDATA,0,0, path_buf)returnpath_buf.value 开发者ID:shamrin,项目名称:droplink,代码行数:13,代码来源:droplink.py 示例7: common_appdata_path ▲点赞 1▼ defcommon_appdata_path():"""Returns t...