From 68a37443fd1af4a89eee43eaccffd871aabea447 Mon Sep 17 00:00:00 2001 From: hakril Date: Mon, 4 Nov 2024 16:00:30 +0100 Subject: [PATCH] Update some access-right names --- .../defines/specific_access_right.txt | 14 +-- docs/source/interfaces_generated.rst | 54 ++++------ docs/source/windef_generated.rst | 62 +++++------ docs/source/winstructs_generated.rst | 26 ----- windows/generated_def/interfaces.py | 102 ++++++++---------- windows/generated_def/meta.py | 16 ++- windows/generated_def/windef.py | 62 +++++------ windows/generated_def/winstructs.py | 18 ---- windows/security.py | 11 +- 9 files changed, 144 insertions(+), 221 deletions(-) diff --git a/ctypes_generation/definitions/defines/specific_access_right.txt b/ctypes_generation/definitions/defines/specific_access_right.txt index 0779901e..12288ba3 100644 --- a/ctypes_generation/definitions/defines/specific_access_right.txt +++ b/ctypes_generation/definitions/defines/specific_access_right.txt @@ -258,15 +258,15 @@ #define FAX_JOB_MANAGE (0x0040) -// COM Specific Access Rights (Custom NAME) -// Based on internet search for "COM Access Mask" +// COM Specific Access Rights +// Based on https://learn.microsoft.com/en-us/windows/win32/com/access-control-lists-for-com -#define COM_EXECUTE (0x0001) -#define COM_EXECUTE_LOCAL (0x0002) -#define COM_EXECUTE_REMOTE (0x0004) -#define COM_ACTIVATE_LOCAL (0x0008) -#define COM_ACTIVATE_REMOTE (0x0010) +#define COM_RIGHTS_EXECUTE (0x0001) +#define COM_RIGHTS_EXECUTE_LOCAL (0x0002) +#define COM_RIGHTS_EXECUTE_REMOTE (0x0004) +#define COM_RIGHTS_ACTIVATE_LOCAL (0x0008) +#define COM_RIGHTS_ACTIVATE_REMOTE (0x0010) // // Section Access Rights. diff --git a/docs/source/interfaces_generated.rst b/docs/source/interfaces_generated.rst index e0b446bb..561b2b8e 100644 --- a/docs/source/interfaces_generated.rst +++ b/docs/source/interfaces_generated.rst @@ -397,6 +397,28 @@ Interfaces .. method:: Release +.. class:: IStorage + + .. method:: QueryInterface + .. method:: AddRef + .. method:: Release + .. method:: CreateStream + .. method:: OpenStream + .. method:: CreateStorage + .. method:: OpenStorage + .. method:: CopyTo + .. method:: MoveElementTo + .. method:: Commit + .. method:: Revert + .. method:: EnumElements + .. method:: DestroyElement + .. method:: RenameElement + .. method:: SetElementTimes + .. method:: SetClass + .. method:: SetStateBits + .. method:: Stat + + .. class:: IStream .. method:: QueryInterface @@ -474,16 +496,6 @@ Interfaces .. method:: Release -.. class:: MyCls - - .. method:: QueryInterface - .. method:: AddRef - .. method:: Release - .. method:: add - .. method:: dprint - .. method:: tstvalue - - .. class:: IBackgroundCopyCallback .. method:: QueryInterface @@ -874,28 +886,6 @@ Interfaces .. method:: Reset -.. class:: IStorage - - .. method:: QueryInterface - .. method:: AddRef - .. method:: Release - .. method:: CreateStream - .. method:: OpenStream - .. method:: CreateStorage - .. method:: OpenStorage - .. method:: CopyTo - .. method:: MoveElementTo - .. method:: Commit - .. method:: Revert - .. method:: EnumElements - .. method:: DestroyElement - .. method:: RenameElement - .. method:: SetElementTimes - .. method:: SetClass - .. method:: SetStateBits - .. method:: Stat - - .. class:: ISystemActivator .. method:: QueryInterface diff --git a/docs/source/windef_generated.rst b/docs/source/windef_generated.rst index 06cb5465..01097f63 100644 --- a/docs/source/windef_generated.rst +++ b/docs/source/windef_generated.rst @@ -126,6 +126,32 @@ WinDef .. autodata:: NUM_CR_RESULTS .. autodata:: PCD_MAX_MEMORY .. autodata:: PCD_MAX_IO +.. autodata:: ORPCF_NULL +.. autodata:: ORPCF_LOCAL +.. autodata:: ORPCF_RESERVED1 +.. autodata:: ORPCF_RESERVED2 +.. autodata:: ORPCF_RESERVED3 +.. autodata:: ORPCF_RESERVED4 +.. autodata:: ORPCF_INPUT_SYNC +.. autodata:: ORPCF_ASYNC +.. autodata:: ORPCF_DYNAMIC_CLOAKING +.. autodata:: ORPCF_REJECTED +.. autodata:: ORPCF_RETRY_LATER +.. autodata:: OBJREF_SIGNATURE +.. autodata:: OBJREF_STANDARD +.. autodata:: OBJREF_HANDLER +.. autodata:: OBJREF_CUSTOM +.. autodata:: OBJREF_EXTENDED +.. autodata:: SORF_OXRES1 +.. autodata:: SORF_OXRES2 +.. autodata:: SORF_OXRES3 +.. autodata:: SORF_OXRES4 +.. autodata:: SORF_OXRES5 +.. autodata:: SORF_OXRES6 +.. autodata:: SORF_OXRES7 +.. autodata:: SORF_OXRES8 +.. autodata:: SORF_NULL +.. autodata:: SORF_NOPING .. autodata:: CWCSTORAGENAME .. autodata:: STGM_DIRECT .. autodata:: STGM_TRANSACTED @@ -299,32 +325,6 @@ WinDef .. autodata:: BIND_IF_SYNTAX_NDR32 .. autodata:: BIND_IF_SYNTAX_NDR64 .. autodata:: BIND_IF_SYNTAX_UNKNOWN -.. autodata:: ORPCF_NULL -.. autodata:: ORPCF_LOCAL -.. autodata:: ORPCF_RESERVED1 -.. autodata:: ORPCF_RESERVED2 -.. autodata:: ORPCF_RESERVED3 -.. autodata:: ORPCF_RESERVED4 -.. autodata:: ORPCF_INPUT_SYNC -.. autodata:: ORPCF_ASYNC -.. autodata:: ORPCF_DYNAMIC_CLOAKING -.. autodata:: ORPCF_REJECTED -.. autodata:: ORPCF_RETRY_LATER -.. autodata:: OBJREF_SIGNATURE -.. autodata:: OBJREF_STANDARD -.. autodata:: OBJREF_HANDLER -.. autodata:: OBJREF_CUSTOM -.. autodata:: OBJREF_EXTENDED -.. autodata:: SORF_OXRES1 -.. autodata:: SORF_OXRES2 -.. autodata:: SORF_OXRES3 -.. autodata:: SORF_OXRES4 -.. autodata:: SORF_OXRES5 -.. autodata:: SORF_OXRES6 -.. autodata:: SORF_OXRES7 -.. autodata:: SORF_OXRES8 -.. autodata:: SORF_NULL -.. autodata:: SORF_NOPING .. autodata:: FILE_DEVICE_8042_PORT .. autodata:: FILE_DEVICE_ACPI .. autodata:: FILE_DEVICE_BATTERY @@ -2419,11 +2419,11 @@ WinDef .. autodata:: FAX_PORT_QUERY .. autodata:: FAX_PORT_SET .. autodata:: FAX_JOB_MANAGE -.. autodata:: COM_EXECUTE -.. autodata:: COM_EXECUTE_LOCAL -.. autodata:: COM_EXECUTE_REMOTE -.. autodata:: COM_ACTIVATE_LOCAL -.. autodata:: COM_ACTIVATE_REMOTE +.. autodata:: COM_RIGHTS_EXECUTE +.. autodata:: COM_RIGHTS_EXECUTE_LOCAL +.. autodata:: COM_RIGHTS_EXECUTE_REMOTE +.. autodata:: COM_RIGHTS_ACTIVATE_LOCAL +.. autodata:: COM_RIGHTS_ACTIVATE_REMOTE .. autodata:: SECTION_QUERY .. autodata:: SECTION_MAP_WRITE .. autodata:: SECTION_MAP_READ diff --git a/docs/source/winstructs_generated.rst b/docs/source/winstructs_generated.rst index 96521ba5..3878cb33 100644 --- a/docs/source/winstructs_generated.rst +++ b/docs/source/winstructs_generated.rst @@ -3631,32 +3631,6 @@ _PROCESS_MITIGATION_IMAGE_LOAD_POLICY :class:`_ANON__PROCESS_MITIGATION_IMAGE_LOAD_POLICY_SUB_UNION_1` -TagTestStructV1 -''''''''''''''' -.. class:: PTestStructV1 - - Pointer to :class:`TagTestStructV1` - -.. class:: TestStructV1 - - Alias for :class:`TagTestStructV1` - -.. class:: TagTestStructV1 - - .. attribute:: Type - - :class:`DWORD` - - - .. attribute:: Name - - :class:`LPCH` - - - .. attribute:: anon_01 - - :class:`_ANON_TAGTESTSTRUCTV1_SUB_UNION_1` - _MIB_IPNETROW_LH '''''''''''''''' .. class:: MIB_IPNETROW diff --git a/windows/generated_def/interfaces.py b/windows/generated_def/interfaces.py index 25f1a476..f928999e 100644 --- a/windows/generated_def/interfaces.py +++ b/windows/generated_def/interfaces.py @@ -153,6 +153,9 @@ class IShellLinkW(COMInterface): class IStdIdentity(COMInterface): IID = generate_IID(0x0000001b, 0x0000, 0x0000, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, name="IStdIdentity", strid="0000001b-0000-0000-c000-000000000046") +class IStorage(COMInterface): + IID = generate_IID(0x0000000B, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, name="IStorage", strid="0000000B-0000-0000-C000-000000000046") + class IStream(COMInterface): IID = generate_IID(0x0000000C, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, name="IStream", strid="0000000C-0000-0000-C000-000000000046") @@ -192,9 +195,6 @@ class ITypeLib(COMInterface): class IUnknown(COMInterface): IID = generate_IID(0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, name="IUnknown", strid="00000000-0000-0000-C000-000000000046") -class MyCls(COMInterface): - IID = generate_IID(0x11223344, 0x5555, 0x6666, 0x77, 0x77, 0x88, 0x99, 0x00, 0x00, 0x00, 0x02, name="MyCls", strid="11223344-5555-6666-7777-889900000002") - class IBackgroundCopyCallback(COMInterface): IID = generate_IID(0x97EA99C7, 0x0186, 0x4AD4, 0x8D, 0xF9, 0xC5, 0xB4, 0xE0, 0xED, 0x6B, 0x22, name="IBackgroundCopyCallback", strid="97EA99C7-0186-4AD4-8DF9-C5B4E0ED6B22") @@ -270,9 +270,6 @@ class IScmRequestInfo(COMInterface): class IStandardActivator(COMInterface): IID = generate_IID(0x000001B8, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, name="IStandardActivator", strid="000001B8-0000-0000-C000-000000000046") -class IStorage(COMInterface): - IID = generate_IID(0x0000000B, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, name="IStorage", strid="0000000B-0000-0000-C000-000000000046") - class ISystemActivator(COMInterface): IID = generate_IID(0x000001A0, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, name="ISystemActivator", strid="000001A0-0000-0000-C000-000000000046") @@ -1100,6 +1097,45 @@ class IWbemServices(COMInterface): "Release": ctypes.WINFUNCTYPE(ULONG)(2, "Release"), } +IStorage._functions_ = { + # QueryInterface -> riid:REFIID, ppvObject:**void + "QueryInterface": ctypes.WINFUNCTYPE(HRESULT, REFIID, POINTER(PVOID))(0, "QueryInterface"), + # AddRef -> + "AddRef": ctypes.WINFUNCTYPE(ULONG)(1, "AddRef"), + # Release -> + "Release": ctypes.WINFUNCTYPE(ULONG)(2, "Release"), + # CreateStream -> pwcsName:*OLECHAR, grfMode:DWORD, reserved1:DWORD, reserved2:DWORD, ppstm:**IStream + "CreateStream": ctypes.WINFUNCTYPE(HRESULT, POINTER(OLECHAR), DWORD, DWORD, DWORD, POINTER(IStream))(3, "CreateStream"), + # OpenStream -> pwcsName:*OLECHAR, reserved1:*void, grfMode:DWORD, reserved2:DWORD, ppstm:**IStream + "OpenStream": ctypes.WINFUNCTYPE(HRESULT, POINTER(OLECHAR), PVOID, DWORD, DWORD, POINTER(IStream))(4, "OpenStream"), + # CreateStorage -> pwcsName:*OLECHAR, grfMode:DWORD, reserved1:DWORD, reserved2:DWORD, ppstg:**IStorage + "CreateStorage": ctypes.WINFUNCTYPE(HRESULT, POINTER(OLECHAR), DWORD, DWORD, DWORD, POINTER(IStorage))(5, "CreateStorage"), + # OpenStorage -> pwcsName:*OLECHAR, pstgPriority:*IStorage, grfMode:DWORD, snbExclude:SNB, reserved:DWORD, ppstg:**IStorage + "OpenStorage": ctypes.WINFUNCTYPE(HRESULT, POINTER(OLECHAR), IStorage, DWORD, SNB, DWORD, POINTER(IStorage))(6, "OpenStorage"), + # CopyTo -> ciidExclude:DWORD, rgiidExclude:*IID, snbExclude:SNB, pstgDest:*IStorage + "CopyTo": ctypes.WINFUNCTYPE(HRESULT, DWORD, POINTER(IID), SNB, IStorage)(7, "CopyTo"), + # MoveElementTo -> pwcsName:*OLECHAR, pstgDest:*IStorage, pwcsNewName:*OLECHAR, grfFlags:DWORD + "MoveElementTo": ctypes.WINFUNCTYPE(HRESULT, POINTER(OLECHAR), IStorage, POINTER(OLECHAR), DWORD)(8, "MoveElementTo"), + # Commit -> grfCommitFlags:DWORD + "Commit": ctypes.WINFUNCTYPE(HRESULT, DWORD)(9, "Commit"), + # Revert -> + "Revert": ctypes.WINFUNCTYPE(HRESULT)(10, "Revert"), + # EnumElements -> reserved1:DWORD, reserved2:*void, reserved3:DWORD, ppenum:**IEnumSTATSTG + "EnumElements": ctypes.WINFUNCTYPE(HRESULT, DWORD, PVOID, DWORD, POINTER(IEnumSTATSTG))(11, "EnumElements"), + # DestroyElement -> pwcsName:*OLECHAR + "DestroyElement": ctypes.WINFUNCTYPE(HRESULT, POINTER(OLECHAR))(12, "DestroyElement"), + # RenameElement -> pwcsOldName:*OLECHAR, pwcsNewName:*OLECHAR + "RenameElement": ctypes.WINFUNCTYPE(HRESULT, POINTER(OLECHAR), POINTER(OLECHAR))(13, "RenameElement"), + # SetElementTimes -> pwcsName:*OLECHAR, pctime:*FILETIME, patime:*FILETIME, pmtime:*FILETIME + "SetElementTimes": ctypes.WINFUNCTYPE(HRESULT, POINTER(OLECHAR), POINTER(FILETIME), POINTER(FILETIME), POINTER(FILETIME))(14, "SetElementTimes"), + # SetClass -> clsid:REFCLSID + "SetClass": ctypes.WINFUNCTYPE(HRESULT, REFCLSID)(15, "SetClass"), + # SetStateBits -> grfStateBits:DWORD, grfMask:DWORD + "SetStateBits": ctypes.WINFUNCTYPE(HRESULT, DWORD, DWORD)(16, "SetStateBits"), + # Stat -> pstatstg:*STATSTG, grfStatFlag:DWORD + "Stat": ctypes.WINFUNCTYPE(HRESULT, POINTER(STATSTG), DWORD)(17, "Stat"), + } + IStream._functions_ = { # QueryInterface -> riid:REFIID, ppvObject:**void "QueryInterface": ctypes.WINFUNCTYPE(HRESULT, REFIID, POINTER(PVOID))(0, "QueryInterface"), @@ -1229,21 +1265,6 @@ class IWbemServices(COMInterface): "Release": ctypes.WINFUNCTYPE(ULONG)(2, "Release"), } -MyCls._functions_ = { - # QueryInterface -> riid:REFIID, ppvObject:*PVOID - "QueryInterface": ctypes.WINFUNCTYPE(HRESULT, REFIID, POINTER(PVOID))(0, "QueryInterface"), - # AddRef -> - "AddRef": ctypes.WINFUNCTYPE(ULONG)(1, "AddRef"), - # Release -> - "Release": ctypes.WINFUNCTYPE(ULONG)(2, "Release"), - # add -> x:UINT, y:UINT, res:*UINT - "add": ctypes.WINFUNCTYPE(HRESULT, UINT, UINT, POINTER(UINT))(3, "add"), - # dprint -> msg:*WCHAR - "dprint": ctypes.WINFUNCTYPE(HRESULT, POINTER(WCHAR))(4, "dprint"), - # tstvalue -> rettype:DWORD, out:**TestStructV1 - "tstvalue": ctypes.WINFUNCTYPE(HRESULT, DWORD, POINTER(POINTER(TestStructV1)))(5, "tstvalue"), - } - IBackgroundCopyCallback._functions_ = { # QueryInterface -> riid:REFIID, ppvObject:**void "QueryInterface": ctypes.WINFUNCTYPE(HRESULT, REFIID, POINTER(PVOID))(0, "QueryInterface"), @@ -1899,45 +1920,6 @@ class IWbemServices(COMInterface): "Reset": ctypes.WINFUNCTYPE(HRESULT)(7, "Reset"), } -IStorage._functions_ = { - # QueryInterface -> riid:REFIID, ppvObject:**void - "QueryInterface": ctypes.WINFUNCTYPE(HRESULT, REFIID, POINTER(PVOID))(0, "QueryInterface"), - # AddRef -> - "AddRef": ctypes.WINFUNCTYPE(ULONG)(1, "AddRef"), - # Release -> - "Release": ctypes.WINFUNCTYPE(ULONG)(2, "Release"), - # CreateStream -> pwcsName:*OLECHAR, grfMode:DWORD, reserved1:DWORD, reserved2:DWORD, ppstm:**IStream - "CreateStream": ctypes.WINFUNCTYPE(HRESULT, POINTER(OLECHAR), DWORD, DWORD, DWORD, POINTER(IStream))(3, "CreateStream"), - # OpenStream -> pwcsName:*OLECHAR, reserved1:*void, grfMode:DWORD, reserved2:DWORD, ppstm:**IStream - "OpenStream": ctypes.WINFUNCTYPE(HRESULT, POINTER(OLECHAR), PVOID, DWORD, DWORD, POINTER(IStream))(4, "OpenStream"), - # CreateStorage -> pwcsName:*OLECHAR, grfMode:DWORD, reserved1:DWORD, reserved2:DWORD, ppstg:**IStorage - "CreateStorage": ctypes.WINFUNCTYPE(HRESULT, POINTER(OLECHAR), DWORD, DWORD, DWORD, POINTER(IStorage))(5, "CreateStorage"), - # OpenStorage -> pwcsName:*OLECHAR, pstgPriority:*IStorage, grfMode:DWORD, snbExclude:SNB, reserved:DWORD, ppstg:**IStorage - "OpenStorage": ctypes.WINFUNCTYPE(HRESULT, POINTER(OLECHAR), IStorage, DWORD, SNB, DWORD, POINTER(IStorage))(6, "OpenStorage"), - # CopyTo -> ciidExclude:DWORD, rgiidExclude:*IID, snbExclude:SNB, pstgDest:*IStorage - "CopyTo": ctypes.WINFUNCTYPE(HRESULT, DWORD, POINTER(IID), SNB, IStorage)(7, "CopyTo"), - # MoveElementTo -> pwcsName:*OLECHAR, pstgDest:*IStorage, pwcsNewName:*OLECHAR, grfFlags:DWORD - "MoveElementTo": ctypes.WINFUNCTYPE(HRESULT, POINTER(OLECHAR), IStorage, POINTER(OLECHAR), DWORD)(8, "MoveElementTo"), - # Commit -> grfCommitFlags:DWORD - "Commit": ctypes.WINFUNCTYPE(HRESULT, DWORD)(9, "Commit"), - # Revert -> - "Revert": ctypes.WINFUNCTYPE(HRESULT)(10, "Revert"), - # EnumElements -> reserved1:DWORD, reserved2:*void, reserved3:DWORD, ppenum:**IEnumSTATSTG - "EnumElements": ctypes.WINFUNCTYPE(HRESULT, DWORD, PVOID, DWORD, POINTER(IEnumSTATSTG))(11, "EnumElements"), - # DestroyElement -> pwcsName:*OLECHAR - "DestroyElement": ctypes.WINFUNCTYPE(HRESULT, POINTER(OLECHAR))(12, "DestroyElement"), - # RenameElement -> pwcsOldName:*OLECHAR, pwcsNewName:*OLECHAR - "RenameElement": ctypes.WINFUNCTYPE(HRESULT, POINTER(OLECHAR), POINTER(OLECHAR))(13, "RenameElement"), - # SetElementTimes -> pwcsName:*OLECHAR, pctime:*FILETIME, patime:*FILETIME, pmtime:*FILETIME - "SetElementTimes": ctypes.WINFUNCTYPE(HRESULT, POINTER(OLECHAR), POINTER(FILETIME), POINTER(FILETIME), POINTER(FILETIME))(14, "SetElementTimes"), - # SetClass -> clsid:REFCLSID - "SetClass": ctypes.WINFUNCTYPE(HRESULT, REFCLSID)(15, "SetClass"), - # SetStateBits -> grfStateBits:DWORD, grfMask:DWORD - "SetStateBits": ctypes.WINFUNCTYPE(HRESULT, DWORD, DWORD)(16, "SetStateBits"), - # Stat -> pstatstg:*STATSTG, grfStatFlag:DWORD - "Stat": ctypes.WINFUNCTYPE(HRESULT, POINTER(STATSTG), DWORD)(17, "Stat"), - } - ISystemActivator._functions_ = { # QueryInterface -> riid:REFIID, ppvObject:**void "QueryInterface": ctypes.WINFUNCTYPE(HRESULT, REFIID, POINTER(PVOID))(0, "QueryInterface"), diff --git a/windows/generated_def/meta.py b/windows/generated_def/meta.py index b73b40e9..0a22507f 100644 --- a/windows/generated_def/meta.py +++ b/windows/generated_def/meta.py @@ -651,11 +651,11 @@ 'COMPRESSION_FORMAT_NONE', 'COMPRESSION_FORMAT_XPRESS', 'COMPRESSION_FORMAT_XPRESS_HUFF', -'COM_ACTIVATE_LOCAL', -'COM_ACTIVATE_REMOTE', -'COM_EXECUTE', -'COM_EXECUTE_LOCAL', -'COM_EXECUTE_REMOTE', +'COM_RIGHTS_ACTIVATE_LOCAL', +'COM_RIGHTS_ACTIVATE_REMOTE', +'COM_RIGHTS_EXECUTE', +'COM_RIGHTS_EXECUTE_LOCAL', +'COM_RIGHTS_EXECUTE_REMOTE', 'CONTAINER_INHERIT_ACE', 'CONTEXT_ALL', 'CONTEXT_AMD64', @@ -13317,7 +13317,6 @@ 'PTRUSTEEW', 'PTRUSTEE_A', 'PTRUSTEE_W', -'PTestStructV1', 'PUBLICKEYSTRUC', 'PUBLIC_OBJECT_BASIC_INFORMATION', 'PUBLIC_OBJECT_TYPE_INFORMATION', @@ -13495,8 +13494,6 @@ 'TRUSTEE_W', 'TYPEATTR', 'TYPEDESC', -'TagTestStructV1', -'TestStructV1', 'UNICODE_STRING', 'UNLOAD_DLL_DEBUG_INFO', 'USER_INFO_0', @@ -15366,8 +15363,7 @@ 'IWbemObjectTextSrc', 'IWbemQualifierSet', 'IWbemServices', -'IWebBrowser2', -'MyCls'} +'IWebBrowser2'} def generate_walker(namelist, target_module): diff --git a/windows/generated_def/windef.py b/windows/generated_def/windef.py index 37a84302..6e197d15 100644 --- a/windows/generated_def/windef.py +++ b/windows/generated_def/windef.py @@ -143,6 +143,32 @@ def CTL_CODE(DeviceType, Function, Method, Access): NUM_CR_RESULTS = make_flag("NUM_CR_RESULTS", ( 0x0000003C )) PCD_MAX_MEMORY = make_flag("PCD_MAX_MEMORY", 2) PCD_MAX_IO = make_flag("PCD_MAX_IO", 2) +ORPCF_NULL = make_flag("ORPCF_NULL", ( 0 )) +ORPCF_LOCAL = make_flag("ORPCF_LOCAL", ( 1 )) +ORPCF_RESERVED1 = make_flag("ORPCF_RESERVED1", ( 2 )) +ORPCF_RESERVED2 = make_flag("ORPCF_RESERVED2", ( 4 )) +ORPCF_RESERVED3 = make_flag("ORPCF_RESERVED3", ( 8 )) +ORPCF_RESERVED4 = make_flag("ORPCF_RESERVED4", ( 16 )) +ORPCF_INPUT_SYNC = make_flag("ORPCF_INPUT_SYNC", ORPCF_RESERVED1) +ORPCF_ASYNC = make_flag("ORPCF_ASYNC", ORPCF_RESERVED2) +ORPCF_DYNAMIC_CLOAKING = make_flag("ORPCF_DYNAMIC_CLOAKING", ORPCF_RESERVED3) +ORPCF_REJECTED = make_flag("ORPCF_REJECTED", ORPCF_RESERVED1) +ORPCF_RETRY_LATER = make_flag("ORPCF_RETRY_LATER", ORPCF_RESERVED2) +OBJREF_SIGNATURE = make_flag("OBJREF_SIGNATURE", ( 0x574f454d )) +OBJREF_STANDARD = make_flag("OBJREF_STANDARD", ( 0x1 )) +OBJREF_HANDLER = make_flag("OBJREF_HANDLER", ( 0x2 )) +OBJREF_CUSTOM = make_flag("OBJREF_CUSTOM", ( 0x4 )) +OBJREF_EXTENDED = make_flag("OBJREF_EXTENDED", ( 0x8 )) +SORF_OXRES1 = make_flag("SORF_OXRES1", ( 0x1 )) +SORF_OXRES2 = make_flag("SORF_OXRES2", ( 0x20 )) +SORF_OXRES3 = make_flag("SORF_OXRES3", ( 0x40 )) +SORF_OXRES4 = make_flag("SORF_OXRES4", ( 0x80 )) +SORF_OXRES5 = make_flag("SORF_OXRES5", ( 0x100 )) +SORF_OXRES6 = make_flag("SORF_OXRES6", ( 0x200 )) +SORF_OXRES7 = make_flag("SORF_OXRES7", ( 0x400 )) +SORF_OXRES8 = make_flag("SORF_OXRES8", ( 0x800 )) +SORF_NULL = make_flag("SORF_NULL", ( 0 )) +SORF_NOPING = make_flag("SORF_NOPING", ( 0x1000 )) CWCSTORAGENAME = make_flag("CWCSTORAGENAME", 32) STGM_DIRECT = make_flag("STGM_DIRECT", 0x00000000) STGM_TRANSACTED = make_flag("STGM_TRANSACTED", 0x00010000) @@ -316,32 +342,6 @@ def CTL_CODE(DeviceType, Function, Method, Access): BIND_IF_SYNTAX_NDR32 = make_flag("BIND_IF_SYNTAX_NDR32", 1) BIND_IF_SYNTAX_NDR64 = make_flag("BIND_IF_SYNTAX_NDR64", 2) BIND_IF_SYNTAX_UNKNOWN = make_flag("BIND_IF_SYNTAX_UNKNOWN", 4) -ORPCF_NULL = make_flag("ORPCF_NULL", ( 0 )) -ORPCF_LOCAL = make_flag("ORPCF_LOCAL", ( 1 )) -ORPCF_RESERVED1 = make_flag("ORPCF_RESERVED1", ( 2 )) -ORPCF_RESERVED2 = make_flag("ORPCF_RESERVED2", ( 4 )) -ORPCF_RESERVED3 = make_flag("ORPCF_RESERVED3", ( 8 )) -ORPCF_RESERVED4 = make_flag("ORPCF_RESERVED4", ( 16 )) -ORPCF_INPUT_SYNC = make_flag("ORPCF_INPUT_SYNC", ORPCF_RESERVED1) -ORPCF_ASYNC = make_flag("ORPCF_ASYNC", ORPCF_RESERVED2) -ORPCF_DYNAMIC_CLOAKING = make_flag("ORPCF_DYNAMIC_CLOAKING", ORPCF_RESERVED3) -ORPCF_REJECTED = make_flag("ORPCF_REJECTED", ORPCF_RESERVED1) -ORPCF_RETRY_LATER = make_flag("ORPCF_RETRY_LATER", ORPCF_RESERVED2) -OBJREF_SIGNATURE = make_flag("OBJREF_SIGNATURE", ( 0x574f454d )) -OBJREF_STANDARD = make_flag("OBJREF_STANDARD", ( 0x1 )) -OBJREF_HANDLER = make_flag("OBJREF_HANDLER", ( 0x2 )) -OBJREF_CUSTOM = make_flag("OBJREF_CUSTOM", ( 0x4 )) -OBJREF_EXTENDED = make_flag("OBJREF_EXTENDED", ( 0x8 )) -SORF_OXRES1 = make_flag("SORF_OXRES1", ( 0x1 )) -SORF_OXRES2 = make_flag("SORF_OXRES2", ( 0x20 )) -SORF_OXRES3 = make_flag("SORF_OXRES3", ( 0x40 )) -SORF_OXRES4 = make_flag("SORF_OXRES4", ( 0x80 )) -SORF_OXRES5 = make_flag("SORF_OXRES5", ( 0x100 )) -SORF_OXRES6 = make_flag("SORF_OXRES6", ( 0x200 )) -SORF_OXRES7 = make_flag("SORF_OXRES7", ( 0x400 )) -SORF_OXRES8 = make_flag("SORF_OXRES8", ( 0x800 )) -SORF_NULL = make_flag("SORF_NULL", ( 0 )) -SORF_NOPING = make_flag("SORF_NOPING", ( 0x1000 )) FILE_DEVICE_8042_PORT = make_flag("FILE_DEVICE_8042_PORT", 0x00000027) FILE_DEVICE_ACPI = make_flag("FILE_DEVICE_ACPI", 0x00000032) FILE_DEVICE_BATTERY = make_flag("FILE_DEVICE_BATTERY", 0x00000029) @@ -2436,11 +2436,11 @@ def CTL_CODE(DeviceType, Function, Method, Access): FAX_PORT_QUERY = make_flag("FAX_PORT_QUERY", ( 0x0010 )) FAX_PORT_SET = make_flag("FAX_PORT_SET", ( 0x0020 )) FAX_JOB_MANAGE = make_flag("FAX_JOB_MANAGE", ( 0x0040 )) -COM_EXECUTE = make_flag("COM_EXECUTE", ( 0x0001 )) -COM_EXECUTE_LOCAL = make_flag("COM_EXECUTE_LOCAL", ( 0x0002 )) -COM_EXECUTE_REMOTE = make_flag("COM_EXECUTE_REMOTE", ( 0x0004 )) -COM_ACTIVATE_LOCAL = make_flag("COM_ACTIVATE_LOCAL", ( 0x0008 )) -COM_ACTIVATE_REMOTE = make_flag("COM_ACTIVATE_REMOTE", ( 0x0010 )) +COM_RIGHTS_EXECUTE = make_flag("COM_RIGHTS_EXECUTE", ( 0x0001 )) +COM_RIGHTS_EXECUTE_LOCAL = make_flag("COM_RIGHTS_EXECUTE_LOCAL", ( 0x0002 )) +COM_RIGHTS_EXECUTE_REMOTE = make_flag("COM_RIGHTS_EXECUTE_REMOTE", ( 0x0004 )) +COM_RIGHTS_ACTIVATE_LOCAL = make_flag("COM_RIGHTS_ACTIVATE_LOCAL", ( 0x0008 )) +COM_RIGHTS_ACTIVATE_REMOTE = make_flag("COM_RIGHTS_ACTIVATE_REMOTE", ( 0x0010 )) SECTION_QUERY = make_flag("SECTION_QUERY", 0x0001) SECTION_MAP_WRITE = make_flag("SECTION_MAP_WRITE", 0x0002) SECTION_MAP_READ = make_flag("SECTION_MAP_READ", 0x0004) diff --git a/windows/generated_def/winstructs.py b/windows/generated_def/winstructs.py index 33d9ad32..1aa45c87 100644 --- a/windows/generated_def/winstructs.py +++ b/windows/generated_def/winstructs.py @@ -2020,24 +2020,6 @@ class _PROCESS_MITIGATION_IMAGE_LOAD_POLICY(Structure): PPROCESS_MITIGATION_IMAGE_LOAD_POLICY = POINTER(_PROCESS_MITIGATION_IMAGE_LOAD_POLICY) PROCESS_MITIGATION_IMAGE_LOAD_POLICY = _PROCESS_MITIGATION_IMAGE_LOAD_POLICY -class _ANON_TAGTESTSTRUCTV1_SUB_UNION_1(Union): - _fields_ = [ - ("Byte", BYTE), - ("Short", USHORT), - ("Dword", DWORD), - ("Qword", ULONG64), - ] - -class TagTestStructV1(Structure): - _anonymous_ = ("anon_01",) - _fields_ = [ - ("Type", DWORD), - ("Name", LPCH), - ("anon_01", _ANON_TAGTESTSTRUCTV1_SUB_UNION_1), - ] -PTestStructV1 = POINTER(TagTestStructV1) -TestStructV1 = TagTestStructV1 - class _ANON__MIB_IPNETROW_LH_SUB_UNION_1(Union): _fields_ = [ ("dwType", DWORD), diff --git a/windows/security.py b/windows/security.py index cc5ed9a8..09ef68e4 100644 --- a/windows/security.py +++ b/windows/security.py @@ -175,11 +175,11 @@ ) COM_ACCESS_RIGHT = gdef.FlagMapper( - gdef.COM_EXECUTE, - gdef.COM_EXECUTE_LOCAL, - gdef.COM_EXECUTE_REMOTE, - gdef.COM_ACTIVATE_LOCAL, - gdef.COM_ACTIVATE_REMOTE, + gdef.COM_RIGHTS_EXECUTE, + gdef.COM_RIGHTS_EXECUTE_LOCAL, + gdef.COM_RIGHTS_EXECUTE_REMOTE, + gdef.COM_RIGHTS_ACTIVATE_LOCAL, + gdef.COM_RIGHTS_ACTIVATE_REMOTE, ) SERVICE_ACCESS_RIGHT = gdef.FlagMapper( @@ -206,7 +206,6 @@ gdef.ADS_RIGHT_DS_CONTROL_ACCESS, ) - SPECIFIC_ACCESS_RIGTH_BY_TYPE = { None: gdef.FlagMapper(), "file": FILE_ACCESS_RIGHT,