Skip to content

Commit

Permalink
Update some access-right names
Browse files Browse the repository at this point in the history
  • Loading branch information
hakril committed Nov 4, 2024
1 parent 72962be commit 68a3744
Show file tree
Hide file tree
Showing 9 changed files with 144 additions and 221 deletions.
14 changes: 7 additions & 7 deletions ctypes_generation/definitions/defines/specific_access_right.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
54 changes: 22 additions & 32 deletions docs/source/interfaces_generated.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
62 changes: 31 additions & 31 deletions docs/source/windef_generated.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
26 changes: 0 additions & 26 deletions docs/source/winstructs_generated.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
102 changes: 42 additions & 60 deletions windows/generated_def/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down Expand Up @@ -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")

Expand Down Expand Up @@ -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")

Expand Down Expand Up @@ -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"),
Expand Down Expand Up @@ -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"),
Expand Down Expand Up @@ -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"),
Expand Down
Loading

0 comments on commit 68a3744

Please sign in to comment.