Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions ctypes_generation/definitions/functions/file.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,22 @@ BOOL LockFileEx(
[in] DWORD nNumberOfBytesToLockHigh,
[in, out] LPOVERLAPPED lpOverlapped
);

BOOL SetFileInformationByHandle(
[in] HANDLE hFile,
[in] FILE_INFO_BY_HANDLE_CLASS FileInformationClass,
[in] LPVOID lpFileInformation,
[in] DWORD dwBufferSize
);

BOOL GetFileInformationByHandle(
[in] HANDLE hFile,
[out] LPBY_HANDLE_FILE_INFORMATION lpFileInformation
);

BOOL GetFileInformationByHandleEx(
[in] HANDLE hFile,
[in] FILE_INFO_BY_HANDLE_CLASS FileInformationClass,
[out] LPVOID lpFileInformation,
[in] DWORD dwBufferSize
);
41 changes: 41 additions & 0 deletions ctypes_generation/definitions/structures/file_info.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,35 @@ typedef enum _FILE_INFORMATION_CLASS {
FileMaximumInformation
} FILE_INFORMATION_CLASS, *PFILE_INFORMATION_CLASS;

typedef enum _FILE_INFO_BY_HANDLE_CLASS {
FileBasicInfo,
FileStandardInfo,
FileNameInfo,
FileRenameInfo,
FileDispositionInfo,
FileAllocationInfo,
FileEndOfFileInfo,
FileStreamInfo,
FileCompressionInfo,
FileAttributeTagInfo,
FileIdBothDirectoryInfo,
FileIdBothDirectoryRestartInfo,
FileIoPriorityHintInfo,
FileRemoteProtocolInfo,
FileFullDirectoryInfo,
FileFullDirectoryRestartInfo,
FileStorageInfo,
FileAlignmentInfo,
FileIdInfo,
FileIdExtdDirectoryInfo,
FileIdExtdDirectoryRestartInfo,
FileDispositionInfoEx,
FileRenameInfoEx,
FileCaseSensitiveInfo,
FileNormalizedNameInfo,
MaximumFileInfoByHandleClass
} FILE_INFO_BY_HANDLE_CLASS, *PFILE_INFO_BY_HANDLE_CLASS;

typedef enum _IO_PRIORITY_HINT {
IoPriorityVeryLow = 0,
IoPriorityLow = 1,
Expand Down Expand Up @@ -193,6 +222,18 @@ typedef struct _FILE_GET_EA_INFORMATION
CHAR EaName[1];
} FILE_GET_EA_INFORMATION, *PFILE_GET_EA_INFORMATION;

typedef struct _BY_HANDLE_FILE_INFORMATION {
DWORD dwFileAttributes;
FILETIME ftCreationTime;
FILETIME ftLastAccessTime;
FILETIME ftLastWriteTime;
DWORD dwVolumeSerialNumber;
DWORD nFileSizeHigh;
DWORD nFileSizeLow;
DWORD nNumberOfLinks;
DWORD nFileIndexHigh;
DWORD nFileIndexLow;
} BY_HANDLE_FILE_INFORMATION, *PBY_HANDLE_FILE_INFORMATION, *LPBY_HANDLE_FILE_INFORMATION;

typedef struct tagVS_FIXEDFILEINFO {
DWORD dwSignature;
Expand Down
20 changes: 10 additions & 10 deletions docs/source/interfaces_generated.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,6 @@

Interfaces
----------
.. class:: IActivationStageInfo

.. method:: QueryInterface
.. method:: AddRef
.. method:: Release
.. method:: SetStageAndIndex
.. method:: GetStage
.. method:: GetIndex


.. class:: ICallFactory

.. method:: QueryInterface
Expand Down Expand Up @@ -722,6 +712,16 @@ Interfaces
.. method:: GetReturnActivationProperties


.. class:: IActivationStageInfo

.. method:: QueryInterface
.. method:: AddRef
.. method:: Release
.. method:: SetStageAndIndex
.. method:: GetStage
.. method:: GetIndex


.. class:: IClassClassicInfo

.. method:: QueryInterface
Expand Down
6 changes: 6 additions & 0 deletions docs/source/winfuncs_generated.rst
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,12 @@ Functions

.. function:: LockFileEx(hFile, dwFlags, dwReserved, nNumberOfBytesToLockLow, nNumberOfBytesToLockHigh, lpOverlapped)

.. function:: SetFileInformationByHandle(hFile, FileInformationClass, lpFileInformation, dwBufferSize)

.. function:: GetFileInformationByHandle(hFile, lpFileInformation)

.. function:: GetFileInformationByHandleEx(hFile, FileInformationClass, lpFileInformation, dwBufferSize)

.. function:: HeapAlloc(hHeap, dwFlags, dwBytes)

.. function:: InternetCheckConnectionA(lpszUrl, dwFlags, dwReserved)
Expand Down
157 changes: 157 additions & 0 deletions docs/source/winstructs_generated.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21089,6 +21089,71 @@ _FILE_GET_EA_INFORMATION

:class:`CHAR`

_BY_HANDLE_FILE_INFORMATION
'''''''''''''''''''''''''''
.. class:: BY_HANDLE_FILE_INFORMATION

Alias for :class:`_BY_HANDLE_FILE_INFORMATION`

.. class:: LPBY_HANDLE_FILE_INFORMATION

Pointer to :class:`_BY_HANDLE_FILE_INFORMATION`

.. class:: PBY_HANDLE_FILE_INFORMATION

Pointer to :class:`_BY_HANDLE_FILE_INFORMATION`

.. class:: _BY_HANDLE_FILE_INFORMATION

.. attribute:: dwFileAttributes

:class:`DWORD`


.. attribute:: ftCreationTime

:class:`FILETIME`


.. attribute:: ftLastAccessTime

:class:`FILETIME`


.. attribute:: ftLastWriteTime

:class:`FILETIME`


.. attribute:: dwVolumeSerialNumber

:class:`DWORD`


.. attribute:: nFileSizeHigh

:class:`DWORD`


.. attribute:: nFileSizeLow

:class:`DWORD`


.. attribute:: nNumberOfLinks

:class:`DWORD`


.. attribute:: nFileIndexHigh

:class:`DWORD`


.. attribute:: nFileIndexLow

:class:`DWORD`

tagVS_FIXEDFILEINFO
'''''''''''''''''''
.. class:: VS_FIXEDFILEINFO
Expand Down Expand Up @@ -32567,6 +32632,98 @@ _FILE_INFORMATION_CLASS

.. attribute:: FileMaximumInformation(67)

_FILE_INFO_BY_HANDLE_CLASS
''''''''''''''''''''''''''
.. class:: FILE_INFO_BY_HANDLE_CLASS

Alias for :class:`_FILE_INFO_BY_HANDLE_CLASS`


.. class:: PFILE_INFO_BY_HANDLE_CLASS

Pointer to :class:`_FILE_INFO_BY_HANDLE_CLASS`


.. class:: _FILE_INFO_BY_HANDLE_CLASS


.. attribute:: FileBasicInfo(0)


.. attribute:: FileStandardInfo(1)


.. attribute:: FileNameInfo(2)


.. attribute:: FileRenameInfo(3)


.. attribute:: FileDispositionInfo(4)


.. attribute:: FileAllocationInfo(5)


.. attribute:: FileEndOfFileInfo(6)


.. attribute:: FileStreamInfo(7)


.. attribute:: FileCompressionInfo(8)


.. attribute:: FileAttributeTagInfo(9)


.. attribute:: FileIdBothDirectoryInfo(10)


.. attribute:: FileIdBothDirectoryRestartInfo(11)


.. attribute:: FileIoPriorityHintInfo(12)


.. attribute:: FileRemoteProtocolInfo(13)


.. attribute:: FileFullDirectoryInfo(14)


.. attribute:: FileFullDirectoryRestartInfo(15)


.. attribute:: FileStorageInfo(16)


.. attribute:: FileAlignmentInfo(17)


.. attribute:: FileIdInfo(18)


.. attribute:: FileIdExtdDirectoryInfo(19)


.. attribute:: FileIdExtdDirectoryRestartInfo(20)


.. attribute:: FileDispositionInfoEx(21)


.. attribute:: FileRenameInfoEx(22)


.. attribute:: FileCaseSensitiveInfo(23)


.. attribute:: FileNormalizedNameInfo(24)


.. attribute:: MaximumFileInfoByHandleClass(25)

_IO_PRIORITY_HINT
'''''''''''''''''
.. class:: IO_PRIORITY_HINT
Expand Down
36 changes: 18 additions & 18 deletions windows/generated_def/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,6 @@ def marshal(self, target_iid=None, destination=MSHCTX_NOSHAREDMEM, flags=MSHLFLA



class IActivationStageInfo(COMInterface):
IID = generate_IID(0x000001A8, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, name="IActivationStageInfo", strid="000001A8-0000-0000-C000-000000000046")

class ICallFactory(COMInterface):
IID = generate_IID(0x1C733A30, 0x2A1C, 0x11CE, 0xAD, 0xE5, 0x00, 0xAA, 0x00, 0x44, 0x77, 0x3D, name="ICallFactory", strid="1C733A30-2A1C-11CE-ADE5-00AA0044773D")

Expand Down Expand Up @@ -234,6 +231,9 @@ class IActivationPropertiesOut(COMInterface):
class IActivationPropertiesIn(COMInterface):
IID = generate_IID(0x000001A2, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, name="IActivationPropertiesIn", strid="000001A2-0000-0000-C000-000000000046")

class IActivationStageInfo(COMInterface):
IID = generate_IID(0x000001A8, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, name="IActivationStageInfo", strid="000001A8-0000-0000-C000-000000000046")

class IClassClassicInfo(COMInterface):
IID = generate_IID(0x000001E2, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, name="IClassClassicInfo", strid="000001E2-0000-0000-C000-000000000046")

Expand Down Expand Up @@ -432,21 +432,6 @@ class IWbemQualifierSet(COMInterface):
class IWbemServices(COMInterface):
IID = generate_IID(0x0EFA6E54, 0xF313, 0x405D, 0xB5, 0xD8, 0x83, 0x0A, 0x91, 0x4F, 0x64, 0x96, name="IWbemServices", strid="0EFA6E54-F313-405D-B5D8-830A914F6496")

IActivationStageInfo._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"),
# SetStageAndIndex -> stage:ACTIVATION_STAGE, index:INT
"SetStageAndIndex": ctypes.WINFUNCTYPE(HRESULT, ACTIVATION_STAGE, INT)(3, "SetStageAndIndex"),
# GetStage -> pstage:*ACTIVATION_STAGE
"GetStage": ctypes.WINFUNCTYPE(HRESULT, POINTER(ACTIVATION_STAGE))(4, "GetStage"),
# GetIndex -> pindex:*INT
"GetIndex": ctypes.WINFUNCTYPE(HRESULT, POINTER(INT))(5, "GetIndex"),
}

ICallFactory._functions_ = {
# QueryInterface -> riid:REFIID, ppvObject:**void
"QueryInterface": ctypes.WINFUNCTYPE(HRESULT, REFIID, POINTER(PVOID))(0, "QueryInterface"),
Expand Down Expand Up @@ -1652,6 +1637,21 @@ class IWbemServices(COMInterface):
"GetReturnActivationProperties": ctypes.WINFUNCTYPE(HRESULT, IUnknown, POINTER(IActivationPropertiesOut))(12, "GetReturnActivationProperties"),
}

IActivationStageInfo._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"),
# SetStageAndIndex -> stage:ACTIVATION_STAGE, index:INT
"SetStageAndIndex": ctypes.WINFUNCTYPE(HRESULT, ACTIVATION_STAGE, INT)(3, "SetStageAndIndex"),
# GetStage -> pstage:*ACTIVATION_STAGE
"GetStage": ctypes.WINFUNCTYPE(HRESULT, POINTER(ACTIVATION_STAGE))(4, "GetStage"),
# GetIndex -> pindex:*INT
"GetIndex": ctypes.WINFUNCTYPE(HRESULT, POINTER(INT))(5, "GetIndex"),
}

IClassClassicInfo._functions_ = {
# QueryInterface -> riid:REFIID, ppvObject:**void
"QueryInterface": ctypes.WINFUNCTYPE(HRESULT, REFIID, POINTER(PVOID))(0, "QueryInterface"),
Expand Down
Loading