Show More
@@ -279,7 +279,7 b' def executablepath():' | |||||
279 | buf = ctypes.create_string_buffer(size + 1) |
|
279 | buf = ctypes.create_string_buffer(size + 1) | |
280 | len = _kernel32.GetModuleFileNameA(None, ctypes.byref(buf), size) |
|
280 | len = _kernel32.GetModuleFileNameA(None, ctypes.byref(buf), size) | |
281 | if len == 0: |
|
281 | if len == 0: | |
282 | raise ctypes.WinError() |
|
282 | raise ctypes.WinError() # Note: WinError is a function | |
283 | elif len == size: |
|
283 | elif len == size: | |
284 | raise ctypes.WinError(_ERROR_INSUFFICIENT_BUFFER) |
|
284 | raise ctypes.WinError(_ERROR_INSUFFICIENT_BUFFER) | |
285 | return buf.value |
|
285 | return buf.value |
General Comments 0
You need to be logged in to leave comments.
Login now