Show More
@@ -156,7 +156,7 b' def getoutput(cmd):' | |||
|
156 | 156 | try: |
|
157 | 157 | CommandLineToArgvW = ctypes.windll.shell32.CommandLineToArgvW |
|
158 | 158 | CommandLineToArgvW.arg_types = [LPCWSTR, POINTER(c_int)] |
|
159 |
CommandLineToArgvW.res |
|
|
159 | CommandLineToArgvW.restype = POINTER(LPCWSTR) | |
|
160 | 160 | LocalFree = ctypes.windll.kernel32.LocalFree |
|
161 | 161 | LocalFree.res_type = HLOCAL |
|
162 | 162 | LocalFree.arg_types = [HLOCAL] |
@@ -178,7 +178,7 b' try:' | |||
|
178 | 178 | argvn = c_int() |
|
179 | 179 | result_pointer = CommandLineToArgvW(py3compat.cast_unicode(commandline.lstrip()), ctypes.byref(argvn)) |
|
180 | 180 | result_array_type = LPCWSTR * argvn.value |
|
181 | result = [arg for arg in result_array_type.from_address(result_pointer)] | |
|
181 | result = [arg for arg in result_array_type.from_address(ctypes.addressof(result_pointer.contents))] | |
|
182 | 182 | retval = LocalFree(result_pointer) |
|
183 | 183 | return result |
|
184 | 184 | except AttributeError: |
General Comments 0
You need to be logged in to leave comments.
Login now