Files
naksyn 9bb2f6761d Added control and moved folder
Added control for empty passed argument and moved windows folder out for easier importing.
2023-12-16 13:03:40 +01:00

29 lines
1.0 KiB
Python

import ctypes
import windows.generated_def as gdef
from ..apiproxy import ApiProxy, NeededParameter
from ..error import fail_on_zero, succeed_on_zero
class Shell32Proxy(ApiProxy):
APIDLL = "shell32"
default_error_check = staticmethod(fail_on_zero)
@Shell32Proxy()
def ShellExecuteA(hwnd, lpOperation, lpFile, lpParameters, lpDirectory, nShowCmd):
return ShellExecuteA.ctypes_function(hwnd, lpOperation, lpFile, lpParameters, lpDirectory, nShowCmd)
@Shell32Proxy()
def ShellExecuteW(hwnd, lpOperation, lpFile, lpParameters, lpDirectory, nShowCmd):
return ShellExecuteW.ctypes_function(hwnd, lpOperation, lpFile, lpParameters, lpDirectory, nShowCmd)
@Shell32Proxy()
def SHGetPathFromIDListA(pidl, pszPath):
return SHGetPathFromIDListA.ctypes_function(pidl, pszPath)
@Shell32Proxy()
def SHGetPathFromIDListW(pidl, pszPath):
return SHGetPathFromIDListW.ctypes_function(pidl, pszPath)
@Shell32Proxy(error_check=succeed_on_zero)
def SHFileOperationA(lpFileOp):
return SHFileOperationA.ctypes_function(lpFileOp)